aboutsummaryrefslogtreecommitdiffstats
path: root/vendor
Commit message (Collapse)AuthorAgeLines
* Move acts_as_xapian out of vendor/pluginsMark Longair2013-11-29-1382/+0
| | | | | This includes making making sure that xapiandbs directory is moved with this version of the code.
* Move has_tag_string out of vendor/pluginsMark Longair2013-11-29-168/+0
|
* Move strip_attributes out of vendor/pluginsMark Longair2013-11-29-257/+0
|
* Fix for an aborted transaction not being rolled-backMark Longair2013-10-07-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'feature/issue-555-fix' into rails-3-developLouise Crow2013-09-17-20/+23
|\
| * Handle a race condition in index update requests.Louise Crow2013-09-17-6/+12
| | | | | | | | | | | | Conflicts: vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
| * Add a failing spec for handling a race conditionLouise Crow2013-09-17-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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
| * Refactor duplicated code into one shared method.Louise Crow2013-09-17-19/+10
| |
* | Don't dirty every attribute in checking for whitespace.Louise Crow2013-09-05-3/+6
|/ | | | | | | 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.
* Merge remote-tracking branch ↵Louise Crow2013-06-04-1/+4
|\ | | | | | | 'openaustralia_github/fix_search_highlight_non_ascii_characters' into rails-3-develop
| * Fix word highlighting in acts_as_xapian for non-ascii characters. Fixes #505Matthew Landauer2013-03-25-1/+4
| |
* | xapian:rebuild_index: fix for "SSL error: decryption failed or bad record mac"Mark Longair2013-05-24-2/+6
| | | | | | | | | | | | | | | | | | | | The connection to the database doesn't survive a fork, but can be re-established if we disconnect beforehand, and use establish_connection in the child after the fork. rebuild_index with safe_rebuild=true is only called as a rake task (i.e. in its own process) so this disconnection and reconnection shouldn't affect the running of the site.
* | Revert "Workaround a Postgres connection error we are getting under Rails 3.1"Louise Crow2013-05-13-10/+2
| | | | | | | | This reverts commit b03451b6253b0c0ecd202b48f7a702b7e6844a90.
* | Update RAILS_ROOT to Rails.rootLouise Crow2013-05-02-2/+2
| |
* | Update comments to reflect deprecation of RAILS_ROOT in favour of Rails.rootLouise Crow2013-05-02-20/+20
| |
* | Remove rails-locales from vendor directory in favour of rails-i18n gemLouise Crow2013-04-25-0/+0
| |
* | Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-3/+3
|/
* Reinstate exception_notificationHenare Degan2013-03-05-516/+0
|
* RAILS_ENV is deprecatedHenare Degan2013-03-05-1/+1
|
* Workaround a Postgres connection error we are getting under Rails 3.1Henare Degan2013-03-05-2/+10
|
* Convert validators to newer, more Railsy ActiveModelHenare Degan2013-03-04-163/+0
|
* Merge branch 'develop' into rails-3-spikeHenare Degan2013-02-15-169/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/general_controller.rb app/controllers/track_controller.rb app/models/outgoing_message.rb app/models/public_body.rb app/models/user.rb app/views/general/frontpage.rhtml config/environment.rb config/initializers/inflections.rb config/initializers/mime_types.rb db/migrate/094_remove_old_tags_foreign_key.rb lib/timezone_fixes.rb spec/models/request_mailer_spec.rb spec/views/request/list.rhtml_spec.rb
| * Remove interlock as it's not compatible with Rails 3 and is unmaintainedHenare Degan2013-01-18-10577/+0
| |
| * Merge remote-tracking branch 'openaustralia_github/rails_xss' into developLouise Crow2013-01-16-0/+2887
| |\
| * | Remove mongrel_proctitle plugin because the standard configuration now uses ↵Matthew Landauer2013-01-16-169/+0
| | | | | | | | | | | | passenger rather than mongrel
* | | Fix bug to allow updating attributes when using strip_attributes and globalize3Henare Degan2013-02-07-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this by making strip_attributes manipulate the unsaved object so that it doesn't interact with globalize3. Calling 'record.attributes' would invoke the globalize3 overridden method, which returns the stale translated attribute values. We now use the object's values instead which are the ones we have just assigned and want to update to.
* | | Update strip_attribute tests to work with our existing modificationsHenare Degan2013-02-07-3/+3
| | |
* | | Remove rails_xss pluginMatthew Landauer2013-01-25-2887/+0
| | |
* | | Merge branch 'rails_xss' into rails-3-spikeMatthew Landauer2013-01-25-0/+2887
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock config/environment.rb lib/i18n_fixes.rb
| * | Merge remote-tracking branch 'mysociety/develop' into rails_xssMatthew Landauer2013-01-15-6253/+0
| |\|
| * | Switch from unofficial rails_xss gem to official rails plugin for rails_xssMatthew Landauer2013-01-15-0/+2887
| | |
* | | Upgrade to latest version of acts_as_versionedMatthew Landauer2013-01-04-1536/+0
| | |
* | | Add more spec helper methods and update acts_as_xapian to make info_request ↵Henare Degan2012-12-12-1/+1
| | | | | | | | | | | | model specs pass
* | | REVERT ME: Disabling some things during the upgrade so the test server can bootHenare Degan2012-12-11-1/+2
| | |
* | | RAILS_ROOT is deprecatedHenare Degan2012-12-11-1/+1
| | |
* | | Remove interlock as it's not compatible with Rails 3 and is unmaintainedHenare Degan2012-12-11-10577/+0
| | |
* | | Upgrade globalizeHenare Degan2012-12-11-1895/+0
| |/ |/|
* | Remove vendored fakeweb gem. I think this was missed when we switched to BundlerHenare Degan2012-12-08-6253/+0
|/
* Allow Xapian db_path to be set directly.Louise Crow2012-11-21-44/+47
|
* Remove svn tags that are out of date as we are now using gitMatthew Landauer2012-10-09-2/+0
|
* Remove vendored `gettext_i18n_rails` (we now use bundled version)Seb Bacon2012-06-14-1194/+0
|
* Merge jpmckinney/bundlerSeb Bacon2012-02-15-173078/+0
|
* Revert small unintended changeRobin Houston2012-02-01-1/+1
| | | | | | Revert a small part of 33f8ef66084bbfb61bf0b4e0f53e1da5e7cc84dc, which was not intended, so that the behaviour is unchanged if a xapian database doesn’t exist, say.
* Close xapian db before opening it againRobin Houston2012-01-31-7/+10
| | | | | | This *ought* to fix the problem with the alert-tracks daemon opening more and more copies of the xapian db till it exhausts the available file descriptors.
* Do not require Xapian 1.2.7Robin Houston2012-01-19-1/+10
| | | | Work (with subtly reduced resilience) on earlier versions.
* Merge branch 'wdtk' of https://github.com/sebbacon/alaveteli into wdtkRobin Houston2012-01-19-1/+1
|\ | | | | | | | | Conflicts: app/controllers/application_controller.rb
| * Disable Xapian wildcardsRobin Houston2012-01-19-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do not use FLAG_WILDCARD or FLAG_PARTIAL anywhere, because wildcard searches can crash the whole server as per http://trac.xapian.org/ticket/350 (e.g. http://www.whatdotheyknow.com/body/search_ahead?query=app will crash the server prior to this commit.) This is a temporary fix while we investigate the possibilities of the set_max_wildcard_expansion() method, which should make it possible to alleviate this issue.
* | Limit Xapian wildcard expansionsRobin Houston2012-01-19-0/+1
|/ | | | | | | | | | | Wildcard searches in Xapian can expand uncontrollably, consuming all available RAM and crashing the server. This has been a real problem on WhatDoTheyKnow.com. The underlying issue is tracked in http://trac.xapian.org/ticket/350 This changeset imposes a limit on wildcard expansion. The type-ahead search will first try a wildcard query, and if that fails because of too much expansion will fall back to a plain non-wildcard search.
* Actually do a proper ORed and partial match query, rather than fix parsing ↵Seb Bacon2012-01-17-6/+9
| | | | errors ad hoc as I find them that result from the workaround code. Fixes #328 (for good, I hope).
* Fail silently if third party services are broken or unavailable. Fixes #354.Seb Bacon2012-01-17-0/+6253
|