Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbot committed May 15, 2014
2 parents 6d215fb + 21027d0 commit bb5f950
Show file tree
Hide file tree
Showing 239 changed files with 14,794 additions and 2,984 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ webrat.log
/db/development_structure.sql
/db/structure.sql
/public/assets
.vagrant
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ branches:
- master
- rails-3-develop
rvm:
- 1.8.7
- 1.8.7-p374
- 1.9.3
- 2.0.0
env:
global:
- S3_REGION=us-east-1
- S3_BUCKET_NAME=alaveteli-bundle-cache
- secure: "cbZMhxbih4k2syqykwVprnBBTyD9Rk9pVhwM2W1Oa3Y9QIn79giL2yTUrJi3+bapHHFedWstG1wkLxEalc/Ei1G4vWYDqXiOtdzYR/WMqqCyd8royrkusist+rVcolvZ2dTCu8uvmteQ6sE3/FsoayTlYJmWCNFWhAiWayaai8Q="
before_install:
- gem update --system 2.1.11
- gem install rake --version=0.9.2.2
Expand All @@ -21,7 +26,7 @@ before_install:
- sudo apt-get -y install `cut -d " " -f 1 config/packages | egrep -v "(^#|wkhtml|bundler|^ruby$|^ruby1.8$|^rubygems$|^rake)"`
- RAILS_ENV=test ./script/rails-post-deploy
- RAILS_ENV=test ./script/update-xapian-index
before_script:
install: echo 'Bundle installed through script/rails-post-deploy'
notifications:
irc: "irc.freenode.org#alaveteli"
email:
Expand Down
24 changes: 15 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@ gem 'pg'

# New gem releases aren't being done. master is newer and supports Rails > 3.0
gem 'acts_as_versioned', :git => 'git://github.com/technoweenie/acts_as_versioned.git'
gem 'capistrano'
gem 'charlock_holmes'
gem 'dynamic_form'
gem 'exception_notification'
gem 'fancybox-rails'
gem 'fastercsv', '>=1.5.5'
gem 'foundation-rails'
gem 'jquery-rails', '~> 3.0.4'
gem 'jquery-ui-rails'
gem 'json'
gem 'mahoro'
gem 'memcache-client'
gem 'net-http-local', :platforms => [:ruby_18, :ruby_19]
gem 'net-purge'
gem 'newrelic_rpm'
gem 'rack'
gem 'rake', '0.9.2.2'
gem 'rails-i18n'
gem 'rdoc'
gem 'recaptcha', '~> 0.3.1', :require => 'recaptcha/rails'
# :require avoids "already initialized constant" warnings
gem 'rmagick', :require => 'RMagick'
Expand Down Expand Up @@ -63,25 +62,32 @@ group :assets do
gem 'therubyracer'
end

group :production do
gem 'newrelic_rpm'
end

group :test do
gem 'fakeweb'
gem 'coveralls', :require => false
gem 'webrat'
gem 'nokogiri'
end

group :test, :development do
gem 'factory_girl_rails', '~> 1.7'
gem 'rspec-rails'
gem 'spork-rails'
end

group :development do
gem 'capistrano'
gem 'mailcatcher'
gem 'rdoc'
end

group :develop do
group :debug do
gem 'ruby-debug', :platforms => :ruby_18
gem 'debugger', :platforms => :ruby_19
gem 'annotate'
end

group :test, :development do
gem 'factory_girl_rails', '~> 1.7'
gem 'rspec-rails'
gem 'spork-rails'
end
9 changes: 8 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,13 @@ GEM
factory_girl (~> 2.6.0)
railties (>= 3.0.0)
fakeweb (1.3.0)
fancybox-rails (0.2.1)
railties (>= 3.1.0)
fast_gettext (0.7.0)
fastercsv (1.5.5)
foundation-rails (5.2.1.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
fssm (0.2.10)
gettext (2.3.9)
locale
Expand Down Expand Up @@ -150,7 +155,7 @@ GEM
net-ssh (2.6.7)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.6.8.164)
newrelic_rpm (3.8.0.218)
nokogiri (1.5.9)
paper_trail (2.7.2)
activerecord (~> 3.0)
Expand Down Expand Up @@ -288,8 +293,10 @@ DEPENDENCIES
exception_notification
factory_girl_rails (~> 1.7)
fakeweb
fancybox-rails
fast_gettext
fastercsv (>= 1.5.5)
foundation-rails
gettext
gettext_i18n_rails
globalize3!
Expand Down
87 changes: 87 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Welcome! Thanks for taking an interest in contributing to Alaveteli.
# This Vagrantfile should get you started with the minimum of fuss.
#
# Usage
# =====
#
# Get a copy of Alaveteli from GitHub and create the Vagrant instance
#
# # Host
# $ git clone [email protected]:mysociety/alaveteli.git
# $ cd alaveteli
# $ git submodule update --init
# $ vagrant --no-color up
#
# You should now be able to ssh in to the guest and run the test suite
#
# # Host
# $ vagrant ssh
#
# # Guest
# $ cd /home/vagrant/alaveteli
# $ bundle exec rake spec
#
# Run the rails server and visit the application in your host browser
# at http://10.10.10.30:3000
#
# # Guest
# bundle exec rails server
#
# Customizing the Vagrant instance
# ================================
#
# This Vagrantfile allows customisation of some aspects of the virtaual machine
# See the customization options below for details.
#
# The options can be set either by prefixing the vagrant command, or by
# exporting to the environment.
#
# # Prefixing the command
# $ ALAVETELI_VAGRANT_MEMORY=2048 vagrant up
#
# # Exporting to the environment
# $ export ALAVETELI_VAGRANT_MEMORY=2048
# $ vagrant up
#
# Both have the same effect, but exporting will retain the variable for the
# duration of your shell session.
#
# Customization Options
# =====================
ALAVETELI_FQDN = ENV['ALAVETELI_VAGRANT_FQDN'] || "alaveteli.10.10.10.30.xip.io"
ALAVETELI_MEMORY = ENV['ALAVETELI_VAGRANT_MEMORY'] || 1536
ALAVETELI_THEMES_DIR = ENV['ALAVETELI_THEMES_DIR'] || '../alaveteli-themes'

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, :ip => "10.10.10.30"

config.vm.synced_folder ".", "/home/vagrant/alaveteli", :owner => "vagrant", :group => "vagrant"

if File.directory?(ALAVETELI_THEMES_DIR)
config.vm.synced_folder ALAVETELI_THEMES_DIR,
"/home/vagrant/alaveteli-themes",
:owner => "vagrant",
:group => "vagrant"
end

config.ssh.forward_agent = true

# The bundle install fails unless you have quite a large amount of
# memory; insist on 1.5GiB:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", ALAVETELI_MEMORY]
end

# Fetch and run the install script:
config.vm.provision :shell, :inline => "wget -O install-site.sh https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh"
config.vm.provision :shell, :inline => "chmod a+rx install-site.sh"
config.vm.provision :shell, :inline => "./install-site.sh " \
"--dev " \
"alaveteli " \
"vagrant " \
"#{ ALAVETELI_FQDN }"
end
Binary file added app/assets/images/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// ...
//= require jquery
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require jquery.ui.position
//= require jquery.cookie
//= require general
//= require ba-throttle-debounce
8 changes: 4 additions & 4 deletions app/assets/javascripts/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ $(document).ready(function() {
return false;
});

// "link to this" widget
$('a.link_to_this').click(function() {
// "link to this" widget
$('a.link_to_this').click(function() {
var box = $('div#link_box');
var location = window.location.protocol + "//" + window.location.hostname + $(this).attr('href');
box.width(location.length + " em");
box.find('input').val(location).attr('size', location.length + " em");
box.show();
box.find('input').select();
box.position({
my: "left top",
my: "right center",
at: "left bottom",
of: this,
collision: "fit" });
return false;
});
});

$('.close-button').click(function() { $(this).parent().hide() });
$('div#variety-filter a').each(function() {
Expand Down
Loading

0 comments on commit bb5f950

Please sign in to comment.