| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
This requires us to clear the I18n.fallbacks when changing the
I18n.default_locale, otherwise the old default locale remains there.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.)
|
| |/
| |
| |
| | |
Since the project's now under Git, this can be removed!
|
|\ \
| |/
|/| |
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Gemfile.lock
app/views/layouts/default.html.erb
config/application.rb
public/admin/stylesheets/admin.css
|
| | |
| | |
| | |
| | | |
We've removed it from whatdotheyknow-theme
|
| | |
| | |
| | |
| | | |
banner is inside entirebody.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Should resolve #1233
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |\
| | | |
| | | |
| | | |
| | | | |
Conflicts:
Gemfile
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This was the previous behaviour. Setting it explicitly avoids a
deprecation warning.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Update our session-stripping code.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
|
| | |\ \ |
|
| | | | | |
|
| | |\| | |
|
| | |\ \ \
| | | | |/
| | | |/|
| | | | |
| | | | | |
Conflicts:
lib/tasks/stats.rake
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.)
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Update our session-stripping code.
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | | |
into wdtk
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | |\ \ \ \
| | | |/ / /
| | |/| | | |
|
| | |\ \ \ \ |
|
| | |\ \ \ \ \ |
|
| | | | | | | | |
|
| | |\ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Conflicts:
app/views/request/show.html.erb
|
| | |\ \ \ \ \ \ \ |
|
| | |\ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
When status was updated by a script.
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Conflicts:
locale/he_IL/app.po
locale/hr_HR/app.po
locale/nb_NO/app.po
locale/uk/app.po
|
| | | | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
into wdtk
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
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.
|
| | |/ / / / / / / / / / |
|