Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
garethrees committed Aug 28, 2014
2 parents 0b51194 + 533f0ab commit d801fff
Show file tree
Hide file tree
Showing 180 changed files with 4,065 additions and 3,433 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ bin/
config/aliases
config/httpd.conf
config/general*.yml
config/deploy.yml.*
.sass-cache
alaveteli.sublime*
webrat.log
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ before_install:
- gem update --system 2.1.11
- gem install rake --version=0.9.2.2
- git submodule update --init --recursive
- psql -c "create database foi_test template template0 encoding 'SQL_ASCII';" -U postgres
- psql -c "create database template_utf8 template template0 encoding 'UTF-8';" -U postgres
- psql -c "update pg_database set datistemplate=true where datname='template_utf8';" -U postgres
- psql -c "create database foi_test template template_utf8;" -U postgres
- cp config/database.yml-test config/database.yml
- cp config/general.yml-example config/general.yml
- cp config/newrelic.yml-example config/newrelic.yml
Expand Down
11 changes: 2 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Work around bug in Debian Squeeze - see https://github.com/mysociety/alaveteli/pull/297#issuecomment-4101012
if File.exist? "/etc/debian_version" and File.open("/etc/debian_version").read.strip =~ /^(squeeze.*|6\.0\.[45])$/
if File.exist? "/lib/libuuid.so.1"
require 'dl'
DL::dlopen('/lib/libuuid.so.1')
end
end
source 'https://rubygems.org'

gem 'rails', '3.2.18'
gem 'rails', '3.2.19'

gem 'pg'

Expand All @@ -17,7 +10,6 @@ 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'
Expand Down Expand Up @@ -82,6 +74,7 @@ end
group :development do
gem 'capistrano'
gem 'mailcatcher'
gem 'quiet_assets'
gem 'rdoc'
end

Expand Down
63 changes: 32 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.18)
actionpack (= 3.2.18)
actionmailer (3.2.19)
actionpack (= 3.2.19)
mail (~> 2.5.4)
actionpack (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
actionpack (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.18)
activesupport (= 3.2.18)
activemodel (3.2.19)
activesupport (= 3.2.19)
builder (~> 3.0.0)
activerecord (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
activerecord (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
activesupport (3.2.18)
activeresource (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
activesupport (3.2.19)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
annotate (2.5.0)
Expand Down Expand Up @@ -104,7 +104,6 @@ GEM
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)
Expand Down Expand Up @@ -145,7 +144,7 @@ GEM
thin (~> 1.5.0)
memcache-client (1.8.5)
mime-types (1.25.1)
multi_json (1.10.0)
multi_json (1.10.1)
net-http-local (0.1.2)
net-purge (0.1.0)
net-scp (1.1.1)
Expand All @@ -155,13 +154,15 @@ GEM
net-ssh (2.6.7)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.8.0.218)
newrelic_rpm (3.9.1.236)
nokogiri (1.5.9)
paper_trail (2.7.2)
activerecord (~> 3.0)
railties (~> 3.0)
pg (0.15.1)
polyglot (0.3.4)
polyglot (0.3.5)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
Expand All @@ -171,19 +172,19 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.18)
actionmailer (= 3.2.18)
actionpack (= 3.2.18)
activerecord (= 3.2.18)
activeresource (= 3.2.18)
activesupport (= 3.2.18)
rails (3.2.19)
actionmailer (= 3.2.19)
actionpack (= 3.2.19)
activerecord (= 3.2.19)
activeresource (= 3.2.19)
activesupport (= 3.2.19)
bundler (~> 1.0)
railties (= 3.2.18)
railties (= 3.2.19)
rails-i18n (0.7.3)
i18n (~> 0.5)
railties (3.2.18)
actionpack (= 3.2.18)
activesupport (= 3.2.18)
railties (3.2.19)
actionpack (= 3.2.19)
activesupport (= 3.2.19)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
Expand Down Expand Up @@ -243,7 +244,7 @@ GEM
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
statistics2 (0.54)
syslog_protocol (0.9.2)
Expand Down Expand Up @@ -295,7 +296,6 @@ DEPENDENCIES
fakeweb
fancybox-rails
fast_gettext
fastercsv (>= 1.5.5)
foundation-rails
gettext
gettext_i18n_rails
Expand All @@ -312,8 +312,9 @@ DEPENDENCIES
newrelic_rpm
nokogiri
pg
quiet_assets
rack
rails (= 3.2.18)
rails (= 3.2.19)
rails-i18n
rake (= 0.9.2.2)
rdoc
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Welcome to Alaveteli!

[![Build Status](https://secure.travis-ci.org/mysociety/alaveteli.png)](http://travis-ci.org/mysociety/alaveteli) [![Dependency Status](https://gemnasium.com/mysociety/alaveteli.png)](https://gemnasium.com/mysociety/alaveteli) [![Coverage Status](https://coveralls.io/repos/mysociety/alaveteli/badge.png?branch=rails-3-develop)](https://coveralls.io/r/mysociety/alaveteli) [![Code Climate](https://codeclimate.com/github/mysociety/alaveteli.png)](https://codeclimate.com/github/mysociety/alaveteli)
[![Installability: Gold](http://img.shields.io/badge/installability-gold-ffd700.svg "Installability: Gold")](http://mysociety.github.io/installation-standards.html)

This is an open source project to create a standard, internationalised
platform for making Freedom of Information (FOI) requests in different
Expand All @@ -17,12 +18,12 @@ Please join our mailing list at
https://groups.google.com/group/alaveteli-dev and introduce yourself, or
drop a line to [email protected] to let us know that you're using Alaveteli.

Some documentation can be found in the
[`doc/` folder](https://github.com/mysociety/alaveteli/tree/master/doc).
There's background information and more documentation on
[our wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and lots
of useful information (including a blog) on
[the project website](http://alaveteli.org)
There's lots of useful information and documentation (including a blog)
on [the project website](http://alaveteli.org). There's background
information and notes on [our
wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and upgrade
notes in the [`doc/`
folder](https://github.com/mysociety/alaveteli/tree/master/doc/CHANGES.md)

## How to contribute

Expand Down
31 changes: 28 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,41 @@
# Both have the same effect, but exporting will retain the variable for the
# duration of your shell session.
#
# Using Themes
# ------------
#
# You can also use the built in theme switcher (script/switch-theme.rb). The
# ALAVETELI_THEMES_DIR will be shared in to /home/vagrant/alaveteli-themes so
# that the default location is used on the guest. You can use the env var
# ALAVETELI_THEMES_DIR to change where this Vagrantfile looks for the themes
# directory on the host.
#
# 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'
ALAVETELI_OS = ENV['ALAVETELI_VAGRANT_OS'] || 'precise64'

SUPPORTED_OPERATING_SYSTEMS = {
'precise64' => 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box',
'squeeze64' => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',
'wheezy64' => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box'
}

def box
ALAVETELI_OS
end

def box_url
SUPPORTED_OPERATING_SYSTEMS[ALAVETELI_OS]
end

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.box = box
config.vm.box_url = box_url
config.vm.network :private_network, :ip => "10.10.10.30"

config.vm.synced_folder ".", "/home/vagrant/alaveteli", :owner => "vagrant", :group => "vagrant"
Expand All @@ -77,7 +101,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
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 => "apt-get -y install curl"
config.vm.provision :shell, :inline => "curl -O https://raw.githubusercontent.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 " \
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/responsive/_footer_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@

img {
display: inherit;
@include lte-ie7 {
display: block;
}
}

}
}
5 changes: 4 additions & 1 deletion app/assets/stylesheets/responsive/_global_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,7 @@ div.pagination {

}


/* Search result highlighting */
.highlight {
background:#FF0;
}
7 changes: 4 additions & 3 deletions app/controllers/admin_request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def fully_destroy
@info_request.fully_destroy
# expire cached files
expire_for_request(@info_request)
flash[:notice] = "Request #{url_title} has been completely destroyed. Email of user who made request: " + user.email
email = user.try(:email) ? user.email : 'This request is external so has no associated user'
flash[:notice] = "Request #{ url_title } has been completely destroyed. Email of user who made request: #{ email }"
redirect_to admin_request_list_url
end

Expand Down Expand Up @@ -199,7 +200,7 @@ def generate_upload_url
end

# Bejeeps, look, sometimes a URL is something that belongs in a controller, jesus.
# XXX hammer this square peg into the round MVC hole
# TODO: hammer this square peg into the round MVC hole
post_redirect = PostRedirect.new(
:uri => upload_response_url(:url_title => info_request.url_title),
:user_id => user.id)
Expand Down Expand Up @@ -253,7 +254,7 @@ def mark_event_as_clarification
end
info_request_event.described_state = 'waiting_clarification'
info_request_event.calculated_state = 'waiting_clarification'
# XXX deliberately don't update described_at so doesn't reenter search?
# TODO: deliberately don't update described_at so doesn't reenter search?
info_request_event.save!

flash[:notice] = "Old response marked as having been a clarification"
Expand Down
Loading

0 comments on commit d801fff

Please sign in to comment.