| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
These are regenerated with "bundle exec annotate"
|
|\
| |
| |
| |
| | |
Conflicts:
config/initializers/alaveteli.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code that extracted the theme name from each entry in THEME_URLS (in
order to require code from a directory whose leaf name is the theme
name) only supported git URLs that ended in '.git'. However, the
themes:install rake task usefully supports a wider range of git URLs -
for example, all of the following were supported:
/home/whoever/themes/blah-theme => blah-theme
/home/whoever/themes/blah-theme/ => blah-theme
git://wherever/blah-theme.git => blah-theme
ssh://wherever/blah-theme.git// => blah-theme
This commit factors out a theme_url_to_theme_name method,
adds tests for it, and uses that method in both:
lib/tasks/themes.rake
config/initializers/theme_loader.rb
... so that a wider range of theme URLs are consistently supported.
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes #1104.
|
| |/
|/|
| |
| | |
This causes several specs to fail.
|
|\ \
| | |
| | |
| | | |
rails-3-develop
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were seeing errors in xapian_create_job that indicated that the
current transaction had been aborted but not rolled-back. It seems
that this happened because sometimes xapian_create_job was called
from within another transaction (e.g. from the transaction block in
AdminIncomingMessageController#redeliver). The default behaviour
of nested transactions in Rails is for them to behave as if all
but the outermost transaction blocks had no effect; this means
that the exception thrown in the inner transaction block in
xapian_create_job wasn't causing a rollback, and it was then being
caught before propagating up to the outermost transaction. Thus
the transaction was never being rolled-back so any subsequent
operation on this database connection would error.
This commit fixes this problem by using the :requires_new => true
option to transaction, which asks ActiveRecord to fake genuinely
nested transcations using SAVEPOINT.
Fixes #1124.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In a subsequent commit, we will want to wrap an additional section
of code with the addition and removal of a hook that creates a
duplicate xapian job, so it's useful for this to be factored out.
This commit introduces a 'with_duplicate_xapian_job_creation'
method that can be passed a block which will be run with the forced
duplicate xapian job creation.
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | | |
Apart from anything else, we don't want translators to have to worry
about the special case text. See https://github.com/mysociety/whatdotheyknow-theme/commit/2078febca5181ce3b1a9c0fae0123ae5f6448718 for the corresponding change to whatdotheyknow-theme.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the rare circumstance that someone created a public body
whose name started with a lower case letter outside [a-z]
with Alaveteli running under Ruby 1.8, the letter would not be
upcased correctly before saving to the first_letter column.
This commit fixes that by using a Unicode-aware upcase function.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Under Ruby 1.8, it was previously impossible to use one of the "first
letter" alphabet links on the public body listing page if the first
letter was outside [A-Za-z] since the test for the parameter only
being a single letter wasn't aware of the possibly of multi-byte
characters. In addition, upcasing of letters outside [A-Za-z] didn't
work because String#upcase in Ruby 1.8 isn't Unicode-aware.
This commit fixes these two problems, so that non-US-ASCII first
letter links will work under Ruby 1.8.
(Fixes #1112.)
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a public body called "Åčçèñtéd Authority" in the
Czech locale (cs) so that we can create tests that exercise,
for example, searching based on an initial letter that has a
multi-byte representation in UTF-8.
An old test for "add mass tags" in the admin needed to be updated
since it implicitly assumed that all the public bodies in the
fixtures had translations in the :en locale.
The tests for loading CSV files of public bodies also needed to
be updated, since they were assuming that public body names
only contained letters in [A-Za-z ]. Since Unicode character
classes aren't easily available in Ruby 1.8 and it makes little
difference to the test, the character class is replaced by '.'.
|
| | |
|
|/
|
|
| |
Fixes #1104.
|
|
|
|
| |
Fixes #1101.
|
|\ |
|
| |
| |
| |
| | |
Fixes #1082.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Gemfile
app/views/admin_request/edit_outgoing.html.erb
config/packages
doc/CHANGES.md
doc/INSTALL.md
spec/models/info_request_spec.rb
spec/models/public_body_spec.rb
|
| | |
| | |
| | |
| | |
| | | |
As @mhl points out, this more clearly indicates that they may come back
at some point.
|
| | |
| | |
| | |
| | |
| | | |
So that files attached to different messages with the same name and
url_part don't get overwritten.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Make old_unclassified_params method consistent with
last_public_response_event and associated methods.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
get_last_response_event and get_last_outgoing_event are used in various
places to determine which events to link to, use in queries etc.
Restrict them to refer to the last publicly visible event of the
relevant type, and rename them to make that clear.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Add some tests that it's working on the outgoing message model.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
app/views/request/_incoming_correspondence.html.erb
|
| | |
| | |
| | |
| | |
| | | |
Add some sequences to make sure that we don't get validation errors on
unique fields.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
spec/integration/view_request_spec.rb
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
By default, give an incoming message a body attachment.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was disabled for hidden requests as the download was by redirect,
allowing people who have not been authenticated to conceivably access
the download. We'll be moving to send_file instead, so can restore it.
|
| | |
| | |
| | |
| | |
| | | |
The third (and any subsequent) session created shares a session id with
the second without this explicit reset.
|
| | |
| | |
| | |
| | | |
We're testing the code path where there is no converter here.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds a spec for what we want to see - no message text in
correspondence.txt, and no attachments. Refactors the
simple_correspondence templates to make it clearer that these are doing
the same job as the html.erb ones, for text.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Each part is a separate sentence, and we're going to reuse some of them
in the text view.
Conflicts:
spec/integration/view_request_spec.rb
|
| | |
| | |
| | |
| | | |
Also, store an event for the incoming message.
|