| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
These are regenerated with "bundle exec annotate"
|
|
|
|
| |
This causes several specs to fail.
|
|\
| |
| |
| | |
rails-3-develop
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 #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
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Move it into the Ability module.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Add a convenience method for getting the 'response' event associated
with an incoming message.
|
| | | |
|
| | | |
|
|\ \ \ |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The spec uses a hook method to simulate the insertion of an
acts_as_xapian_job in another process for the model.
Credit to: http://stackoverflow.com/questions/2017587/simulating-race-conditions-in-rspec-unit-tests
Conflicts:
vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Check to see if the stripped version is different before setting it on
the record. If we don't do this, the subsequent call to write_attribute
in Globalize3 which uses attribute_will_change! means we're storing
versions when there hasn't really been any change.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On PublicBody, we don't need to update info_requests_count
because that's already done with :counter_cache. On the
other hand, info_requests_successful_count and
info_requests_not_held_count can't be updated easily with
counter_cache (since they need conditions to be attached).
Instead we update them in post_save and post_destroy,
as suggested here:
http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions
This also adds tests to ensure that the
after_(save|destroy) callbacks are called and that they
modify the counts correctly.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure that admin edits changing the described state of an info
request are reflected in the latest_status and status values of info
request events so that the info requests are retrieved correctly in
status-based searches.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Update test expectations and add further test to explicitly show that we
want the described status from a status update to be propagated to a
preceding response, as well as being filled in in the status update
itself (which is mostly to deal with the case where there isn't a
preceding response). Make those changes to calculate_event_states
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
the method to be stubbed and avoid side effects.
|
| |
| |
| |
| | |
ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
'openaustralia_github/tests_set_described_state' into rails-3-develop
Conflicts:
spec/models/info_request_spec.rb
|
| |
| |
| |
| | |
user classifies a request
|
| | |
|
| |
| |
| |
| | |
https://www.whatdotheyknow.com/details/request/family_support_worker_redundanci
|
| |
| |
| |
| | |
https://www.whatdotheyknow.com/request/human_rights_and_deprivation_of
|
| | |
|
| | |
|
| | |
|