aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Handle gmail-style quoting from the HTML part of a mail.Louise Crow2014-01-22-0/+57
| | | | | | | We already handled this type of quoting when coming directly from a text part of a mail, but when we choose the HTML part as the main part and then convert it to text, the 'On [date] <email> person said:' part can get split over two lines.
* Tighten up expectation, make expected files consistent.Louise Crow2014-01-17-34/+59
| | | | | | | Just expecting the parsed file to include the expected one would mean success in the case where nothing has been folded. Tighten up the expectation, and add quoting placeholders to expected files that didn't have them.
* Merge branch 'rails-3-develop' of ↵Louise Crow2014-01-14-20/+55
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Merge branch 'internal-admin-body-fix' into rails-3-developMark Longair2014-01-14-15/+55
| |\
| | * Ignore translations when finding the internal admin bodyMark Longair2014-01-14-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you change the default locale after having set up your site, and exception would always be thrown by PublicBody.internal_admin_body, which looks up that distinguished body based on url_name. Since that's a translated field, and there would be no translation for it in the new locale, it wouldn't be found, and the code would try to create a second internal_admin_body, which would fail because of the url_name being non-unque in public_bodies. There are various ways of fixing this; the one introduced in this commit is to use raw SQL to find the public body, bypassing the public_body_translations table. Fixes #1001.
| | * Make test fail as with issue #1001Louise Crow2014-01-14-0/+5
| | | | | | | | | | | | | | | This requires us to clear the I18n.fallbacks when changing the I18n.default_locale, otherwise the old default locale remains there.
| | * Add further tests for creation of the internal admin bodyMark Longair2014-01-09-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | The internal admin body should be created automatically if it doesn't exist on calls to PublicBody.internal_admin_body; we've seen errors (#1001) where this fails after the default locale changes. (Although these tests don't actually replicate that problem.)
| * | Delete .cvsignoreSean Handley2014-01-12-5/+0
| |/ | | | | | | Since the project's now under Git, this can be removed!
* | Merge branch 'release/0.16' into rails-3-developLouise Crow2014-01-14-85/+89
|\ \ | |/ |/|
| * Add some notes on the popup restyling changes.Louise Crow2014-01-14-0/+5
| |
| * Merge branch 'feature/cleanup-popups' into release/0.16Louise Crow2014-01-14-85/+84
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/views/layouts/default.html.erb config/application.rb public/admin/stylesheets/admin.css
| | * Remove special-notice styling.Louise Crow2014-01-14-2/+0
| | | | | | | | | | | | We've removed it from whatdotheyknow-theme
| | * Don't pad banner and entirebodyLouise Crow2014-01-14-1/+1
| | | | | | | | | | | | banner is inside entirebody.
| | * Cleanup popup notices.Louise Crow2014-01-14-46/+57
| | | | | | | | | | | | | | | | | | | | | | | | Move HTML to view from controller, use same elements for other country popup and everypage - partly so they don't display on top of each other anymore. Don't position them over existing content, position them at the top of the page. Use consistent styling, and keep the javascript unobtrusive.
| | * Whitespace changes.Louise Crow2014-01-14-33/+33
| | |
| | * Neaten up spacing of admin bar in main site context.Louise Crow2014-01-13-2/+2
| | |
| | * Remove the duplicate close button on the popup bannerMark Longair2013-12-10-1/+0
| | |
| | * Add an 'Allow' directive to allow crawling of cached attachments.Louise Crow2013-12-05-1/+5
| | | | | | | | | | | | Should resolve #1233
| | * Treat any document/pdf attachment as if it were application/pdfMark Longair2013-12-05-1/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for issue #1232. Richard Taylor pointed out that some PDF attachments had the non-standard content-type document/pdf, and that these weren't being treated as PDFs. (Ganesh Sittampalam discovered that all of these PDFs were generated by a Lexmark X945e, according to the PDF metadata.) This commit adds an extra case to normalise_content_type to map document/pdf to application/pdf. In fact, since the upgrade of the Mail gem in ccebe3c3d6d4dc5f81 the behaviour when handling the non-standard content-type document/pdf was much better, but this commit also means that you get the right icon for the attachment, and can be cherry-picked onto older versions to fix #1232.
| | * Merge branch 'hotfix/0.15.0.2' into wdtkLouise Crow2013-12-04-2/+25
| | |\ | | | | | | | | | | | | | | | | Conflicts: Gemfile
| | | * Apply monkey patch for CVE-2013-6414.0.15.0.2hotfix/0.15.0.2Louise Crow2013-12-04-0/+22
| | | |
| | | * Set enforce_available_locales to falseLouise Crow2013-12-03-0/+2
| | | | | | | | | | | | | | | | | | | | This was the previous behaviour. Setting it explicitly avoids a deprecation warning.
| | | * Upgrade i18n to get fix for CVE-2013-4492.Louise Crow2013-12-03-1/+1
| | | |
| | | * Session keys are stored as strings in Rails 3.0.15.0.1hotfix/0.15.0.1Louise Crow2013-11-19-30/+30
| | | | | | | | | | | | | | | | Update our session-stripping code.
| | | * Insert cookie stripping at correct point in middleware stack.Louise Crow2013-11-19-1/+13
| | | |
| | | * Update commonlib to include Alaveteli support in install-site.shMark Longair2013-11-19-0/+0
| | | |
| | | * Use upstream globalize.Mark Longair2013-11-19-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: globalize/globalize#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.
| | | * Merge branch 'master', remote-tracking branch 'origin'Louise Crow2013-11-18-0/+0
| | | |
| | * | Merge branch 'feature/restore-caching' into wdtkLouise Crow2013-11-26-3/+3
| | |\ \
| | | * | Ruby 1.8 compatibility fixes.Louise Crow2013-11-26-3/+3
| | | | |
| | * | | Merge branch 'feature/restore-caching' into wdtkLouise Crow2013-11-26-425/+266
| | |\| |
| | * | | Merge branch 'release/0.15' into wdtkMark Longair2013-11-15-3310/+11671
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | Conflicts: lib/tasks/stats.rake
| | * | | 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.)
| | * | | Insert cookie stripping at correct point in middleware stack.Louise Crow2013-11-13-1/+13
| | | | |
| | * | | Session keys are stored as strings in Rails 3.Louise Crow2013-11-13-30/+30
| | | | | | | | | | | | | | | | | | | | Update our session-stripping code.
| | * | | Merge branch 'wdtk' of ssh://git.mysociety.org/data/git/public/alaveteli ↵Louise Crow2013-10-24-2/+3
| | |\ \ \ | | | | | | | | | | | | | | | | | | into wdtk
| | | * | | Reduce the memory consumption of rake stats:update_public_bodies_statsMark Longair2013-10-09-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This task was taking a huge amount of memory, even when fetching the InfoRequest objects with find_each. With an additional find_each for public bodies (10 at a time) and reducing the batch size for info requests to 200 at a time, the memory size of this rake task is kept down to about 400MB.
| | * | | | Merge branch 'hotfix/0.14.0.3' into wdtkLouise Crow2013-10-24-0/+16
| | |\ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge branch 'hotfix/0.14.0.2' into wdtkLouise Crow2013-10-03-1/+42
| | |\ \ \ \
| | * \ \ \ \ Merge branch 'hotfix/0.14.0.1' into wdtkLouise Crow2013-09-30-1/+11
| | |\ \ \ \ \
| | * | | | | | Fix typoLouise Crow2013-09-24-1/+1
| | | | | | | |
| | * | | | | | Merge branch 'release/0.14' into wdtkLouise Crow2013-09-24-13498/+17329
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/views/request/show.html.erb
| | * \ \ \ \ \ \ Merge branch 'hotfix/0.13.0.3' into wdtkLouise Crow2013-09-18-3/+49
| | |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge branch 'hotfix/0.13.0.2' into wdtkLouise Crow2013-09-04-1/+2
| | |\ \ \ \ \ \ \ \
| | * | | | | | | | | Handle case of nil user_idLouise Crow2013-08-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When status was updated by a script.
| | * | | | | | | | | Merge branch 'release/0.13' into wdtkLouise Crow2013-08-20-4319/+20044
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: locale/he_IL/app.po locale/hr_HR/app.po locale/nb_NO/app.po locale/uk/app.po
| | * | | | | | | | | | New version of commonlibLouise Crow2013-07-25-0/+0
| | | | | | | | | | | |
| | * | | | | | | | | | Merge branch 'wdtk' of ssh://git.mysociety.org/data/git/public/alaveteli ↵Louise Crow2013-07-24-9/+15
| | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into wdtk
| | | * | | | | | | | | | Ignore exceptions when re-extracting attachmentsMark Longair2013-07-15-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be a very long-running script, and there is an exception thrown on re-extraction once every 50,000 emails or so. So, just catch any StandardError, output details of the exception and the IncomingMessage ID and then carry on.
| | * | | | | | | | | | | Update commonlib.Louise Crow2013-07-24-0/+0
| | |/ / / / / / / / / /