aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge branch 'all-authorities-reduce-memory' into rails-3-developMark Longair2013-11-19-7/+43
|\ | | | | | | | | This has already been cherry-picked into the wdtk branch, but it should also be merged into rails-3-develop
| * Reduce the memory used to serve /body/all-authorities.csvMark Longair2013-11-14-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On WDTK, /body/all-authorities was using lots of memory - this commit reduces that by (a) fetching the public bodies in batches, rather than keeping them all in memory at one time and (b) writing the CSV to a file and then returning it with X-Sendfile (or equivalent), rather than returning the whole file from memory with send_data. There's a FIXME to do with the layout of download directories; if that's changed, the example nginx config, etc. will need to be updated too. This commit also adds a basic test for reasonable CSV being returned and switches from FasterCSV to CSV in order to fix this NotImplementedError under Ruby 1.9: Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus support for Ruby 1.9's m17n encoding engine. (The CSV version seems to still work fine under 1.8.7.)
* | Merge branch 'fixes-for-upstream-globalize' into rails-3-developMark Longair2013-11-19-32/+40
|\ \
| * | Fix construction of example public bodies for upstream globalizeMark Longair2013-11-19-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're trying to switch to an upstream version of globalize, which now has Henare's change to allowed blank values without them being converted to nil - however, there is another intermediate change that was introduced which means that the name is only written back to the original table if the locale matches the default locale. This is described in more depth here: https://github.com/globalize/globalize/pull/183 This change broke the make_single_language_example helper, but this commit fixes that by also setting the default locale before creating the example public bodies.
| * | Refactor some tests to use with_default_localeMark Longair2013-11-19-17/+15
| | |
| * | Add a helper method for temporarily setting I18n.default_localeMark Longair2013-11-19-0/+8
| | | | | | | | | | | | | | | | | | Although the I18n library has an I18n.with_locale helper, there's no equivalent for I18n.default_locale. This method will make a couple of our tests clearer and less brittle.
* | | Update commonlib to include Alaveteli support in install-site.shMark Longair2013-11-19-0/+0
| | |
* | | Use our own copy of globalize3 for now.Louise Crow2013-11-19-4/+4
|/ /
* | Update globalize3 repo.Louise Crow2013-11-18-5/+5
| | | | | | | | This is the commit where @henares' pull request was merged. This is a quick fix, but I think we want to see if we can use the globalize 3.0.1 gem with minimal fixes. It causes tests to fail at the moment, I think because we still have translated attributes in our public_bodies table (and not null constraints at the databse level on at least the name attribute).
* | Insert cookie stripping at correct point in middleware stack.Louise Crow2013-11-18-1/+13
| |
* | Session keys are stored as strings in Rails 3.Louise Crow2013-11-18-30/+30
| | | | | | | | Update our session-stripping code.
* | Merge branch 'master' into rails-3-developMark Longair2013-11-15-289/+317
|\ \
| * | Bump ALAVETELI_VERSION to 0.150.15Mark Longair2013-11-15-1/+1
| | |
| * | Release notes for 0.15Mark Longair2013-11-15-0/+28
| | |
| * | Fixes for the Welsh translationMark Longair2013-11-15-46/+46
| | |
| * | Include the latest translations from TransifexMark Longair2013-11-15-287/+287
| |/ | | | | | | | | Note that this includes some errors in the Welsh translation, which I will fix in a subsequent commit.
* | Merge branch 'rails-3-develop' of ↵Louise Crow2013-11-12-2713/+6930
|\| | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Update translations after re-pulling from Transfix + cleaningrelease/0.15Mark Longair2013-11-08-246/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in the release manager's checklist, this commit introduces the results of re-pulling from transifex: tx pull -a -f ... and cleaning the .po files again: bundle exec rake gettext:clean ... which removes the fuzzy strings from the repository.
| * Fix a syntax error in locale/sr@latin/app.poMark Longair2013-11-08-4/+1
| |
| * Fix a syntax error in locale/bg/app.poMark Longair2013-11-08-3/+1
| |
| * Updated .po files and the .pot file with 'rake gettext:find'Mark Longair2013-11-08-384/+625
| |
| * Update translatable columnsMark Longair2013-11-08-2/+1
| |
| * cy (Welsh) locale: fix various problemsMark Longair2013-11-08-81/+81
| | | | | | | | | | | | | | | | | | | | | | | | The latest updates had several problems, which are fixed in this commit, e.g. * Malformed links * Broken uses of variables (e.g. translating the 'date' in '{{date}}') Additionally, I've stripped unnecessary space around many HTML tags that may cause the text rendering to look odd.
| * cy (Welsh) locale: fix a link element's nameMark Longair2013-11-08-1/+1
| |
| * cy (Welsh) locale: fix capitalization of USER_NAMEMark Longair2013-11-08-3/+3
| |
| * Update with the latest translations from TransifexMark Longair2013-11-08-2213/+5663
| |
| * Merge branch 'feature/1118-fix-ask-us-to-add-links' into rails-3-developMark Longair2013-11-07-13/+28
| |\
| | * Show 'browse all' and 'ask us to add' one for authority only search.Louise Crow2013-11-07-0/+7
| | | | | | | | | | | | | | | This is for the case where there are no results and the user was explicitly searching for authorities.
| | * Don't show sorting links when there are no results.Louise Crow2013-11-07-1/+1
| | |
| | * Don't show link for browsing bodiesLouise Crow2013-11-07-2/+0
| | | | | | | | | | | | | | | | | | The context here is that bodies have merely been included in the search - it hasn't been explicitly restricted to bodies. So the links don't really make sense.
| | * Show highlights and correction regardless of search type.Louise Crow2013-11-07-8/+20
| | | | | | | | | | | | Contributes to #1118.
| | * Add 'browse all' and 'ask us to add' to authority search.Louise Crow2013-11-07-3/+1
| | | | | | | | | | | | | | | This is the template used when the user is searching for a public body specifically to make a request to.
| * | Switch .tx/config to refer to transifex.com instead of transifex.netMark Longair2013-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The transifex-client version 0.9.1 rejects the transifex.net URL, with the following error: CertificateError: hostname 'www.transifex.net' doesn't match either of '*.transifex.com', 'transifex.com' ... so update it to transifex.com.
| * | Merge branch 'install-script' into rails-3-developMark Longair2013-11-07-87/+737
| |\ \
| | * | Set 'constraint_disabling: false' for tests in database.ymlMark Longair2013-11-07-0/+1
| | | | | | | | | | | | | | | | | | | | Without this setting, the PostgreSQL user still has to be a superuser for the tests to work without constraint disabling errors.
| | * | Add a Vagrantfile to use the install script in a Vagrant boxMark Longair2013-11-07-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be used with: vagrant --no-color up ... which (after some time) will leave you with a running site at: http://alaveteli.10.10.10.30.xip.io Many thanks to Simon Coffey (@urbanautomaton) and Chris Adams (@mrchrisadams) who produced a working Vagrantfile with a independent install script while our installation script work was ongoing - their advice and that script were very helpful for creating this Vagrantfile that uses our generic mySociety installation script.
| | * | Rename /etc/postfix/regexp to /etc/postfix/transportsMark Longair2013-11-07-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems slightly less confusing, since both this file and /etc/postfix/recipients contain regexp patterns. This also switches to replacing any transport_maps file that was in use and overwrites the existing file rather than modifying it.
| | * | Reduce "backscatter" bounce risk by setting local_recipient_mapsMark Longair2013-11-07-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaving the local_recipient_maps setting empty has a risk which is described in the Postfix manual: "[...] That is, an empty value. With this setting, the Postfix SMTP server will not reject mail with "User unknown in local recipient table". Don't do this on systems that receive mail directly from the Internet. With today's worms and viruses, Postfix will become a backscatter source: it accepts mail for non-existent recipients and then tries to return that mail as "undeliverable" to the often forged sender address." This commit changes the local_recipient_maps setting to only accept (and potentially bounce) emails where the local part is known (one that we've mentioned in general.yml) or to a Unix user that exists. Fixes #1166
| | * | Invoke commands as the unprivileged user in a login shellMark Longair2013-11-07-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some setups, the unprivileged user's .bashrc file won't be sourced unless you've started a login shell - we need that to be sourced to add the gem's bin directory to the PATH, or "bundle" won't be found, for example.
| | * | Use a more recent rubygems from squeeze-backportsMark Longair2013-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The version of rubygems in squeeze is old enough that it won't work with our Gemfile / Gemfile.lock. Fortunately, the one in squeeze-backports seems to work OK.
| | * | Update INSTALL.md with details of the AMI and install scriptMark Longair2013-11-07-20/+140
| | | | | | | | | | | | | | | | | | | | These instructions are heavily based on those written by me and @dracos for FixMyStreet and MapIt.
| | * | Remove make-crontab and update INSTALL.mdMark Longair2013-11-07-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | The make-crontab script is now redundant, so instead direct people to use the config_files:convert_crontab rake task for generating a crontab file.
| | * | Make X-Accel-Redirect work with the example nginx configMark Longair2013-11-07-0/+7
| | | |
| | * | nginx: root should be the public directory so that try_files worksMark Longair2013-11-07-1/+1
| | | |
| | * | Add a rake task to rewrite the crontab-example fileMark Longair2013-11-07-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | As suggested by Louise Crow, this new rake task reuses the convert_ugly function to rewrite the crontab-example file into a usable crontab file.
| | * | Fix an undefined variable errorMark Longair2013-11-07-6/+2
| | | | | | | | | | | | | | | | | | | | I assume 'skip' must have been an argument to this function before it was introduced into our repository.
| | * | Switch to using 'rake config_files:convert_init_script'Mark Longair2013-11-07-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | Rather than reimplement the processing of the ugly file with sed, we can use the existing rake task for rewriting config/alert-tracks-debian.ugly.
| | * | If the origin/install-script branch exists, use that in preferenceMark Longair2013-11-07-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | Once merged to master we can remove origin/install-script, but development is awkward without it. This commit also makes it easy to have an arbitrary number of fallbacks.
| | * | crontab-example: use !!(*= .vhost_dir *)!! to avoid '/data/vhost/'Mark Longair2013-10-31-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is so that we can rewrite the crontab-example file into a real crontab on systems where the prefix for virtual host directories is something other than '/data/vhost'.
| | * | We don't use foi-purge-varnish ourselves, so remove itMark Longair2013-10-31-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | We had various problems with the foi-purge-varnish script ourselves that led to us removing it, so it seems like a bad idea to be implicitly suggesting that others should use it.