aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Encode parameters of Twitter linkMatthew Landauer2013-05-07-2/+2
| | | | | | | | (reapplication of 3e2b161944cc4419002831d54c6bdfcd6aa30a01 as it seems to have been lost in a merge). No casting to string as there don't appear to be problems with the ':' character. Conflicts: app/views/request/_sidebar.html.erb
* No need to explicitly load the rake tasks in Rails 3.Louise Crow2013-05-07-4/+0
|
* Add markup of string lost in merging develop to rails-3-develop.Louise Crow2013-05-07-1/+1
|
* Add a simple hook to allow theme tests to load the theme code in the context ↵Louise Crow2013-05-02-5/+16
| | | | of Alaveteli.
* 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
|
* All the tests in this group rely on having the xapian db - make it part of ↵Louise Crow2013-05-02-1/+1
| | | | the setup.
* The test "should work" relies on the xapian index existing - make sure this ↵Louise Crow2013-05-01-2/+4
| | | | is true for all tests in this group.
* Merge branch 'hotfix/0.9.0.1' into rails-3-developLouise Crow2013-05-01-0/+0
|\
| * Update commonlib to get ↵hotfix/0.9.0.1Louise Crow2013-05-01-0/+0
| | | | | | | | https://github.com/mysociety/commonlib/commit/735dbe574c63650e5d086eea9f7ad57bbd76927f, which should allow non-ascii config variable values.
| * Mark ban text as html safeLouise Crow2013-04-29-1/+1
| |
| * Merge branch 'release/0.9'0.9Louise Crow2013-04-24-4054/+3911
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: locale/cs/app.po locale/he_IL/app.po locale/id/app.po locale/it/app.po locale/ro_RO/app.po locale/uk/app.po
| * \ Merge branch 'hotfix/0.8.0.2'Louise Crow2013-04-23-437/+3827
| |\ \
| | * | Latest translations from Transifex.hotfix/0.8.0.2Louise Crow2013-04-23-437/+3827
| |/ /
| * | Merge branch 'hotfix/0.8.0.1'0.8.0.1Louise Crow2013-04-02-10/+33
| |\ \
* | | | Remove debian-specific require clause and use Gemfile to specify ↵Louise Crow2013-04-30-9/+50
| | | | | | | | | | | | | | | | non-standard require - bundler should be supplying the gem now.
* | | | Remove setting of internal and external encodings for ruby 1.9 - as per ↵Louise Crow2013-04-30-4/+0
| | | | | | | | | | | | | | | | 512d8e3d1845e327740acc2f7326e72b23d0d604, this is already the default in Rails 3.
* | | | Re-remove text removed in e0db6cf956e2270413143017baa7c1472b2e95f2 and ↵Louise Crow2013-04-30-13/+0
| | | | | | | | | | | | | | | | reinstated in subsequent merge.
* | | | Remove unused function.Louise Crow2013-04-30-18/+0
| | | |
* | | | Update reference to Configuration to reflect name change to ↵Louise Crow2013-04-30-1/+1
| | | | | | | | | | | | | | | | AlaveteliConfiguration
* | | | Update reference to Configuration to reflect name change to ↵Louise Crow2013-04-30-1/+1
| | | | | | | | | | | | | | | | AlaveteliConfiguration
* | | | Remove mailer patch methods that are no longer needed.Louise Crow2013-04-30-32/+0
| | | |
* | | | Ignore httpd.conf.Louise Crow2013-04-25-0/+1
| | | |
* | | | Remove spec.opts file - deprecated in favour of .rspec.Louise Crow2013-04-25-3/+0
| | | |
* | | | Remove softlink to vendor/rails-locales and reference to it.Louise Crow2013-04-25-2/+0
| | | |
* | | | Remove rails-locales from vendor directory in favour of rails-i18n gemLouise Crow2013-04-25-6/+6
| | | |
* | | | Remove memcache-client from Gemfile - was used by interlock, now not used.Louise Crow2013-04-25-3/+0
| | | |
* | | | Mark ban text as html safeLouise Crow2013-04-25-1/+1
| | | |
* | | | Trivial whitespace change.Louise Crow2013-04-24-1/+2
| | | |
* | | | Update license.Louise Crow2013-04-24-6/+6
| | | |
* | | | Results of running bundle install - reorder from merge.Louise Crow2013-04-24-3/+2
| | | |
* | | | Merge branch 'rails-3-develop' of ↵Louise Crow2013-04-24-5/+12
|\ \ \ \ | | | | | | | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * | | | Add encoding specifications to two files that use UTF-8Mark Longair2013-04-16-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Both of these files include multi-byte UTF-8 sequences, so should have a 'magic comment' specifying the encoding.
| * | | | Fix attachment downloading for attachments that have file extensionsMark Longair2013-04-16-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #912 The routing in Rails 3 by default extracts anything that looks like a file extension at the end of the URL and adds it as a format parameter. This meant that for the get_attachment and get_attachment_as_html views, the filename parameter would not include the file extension, and you'll end up with the error: please use same filename as original file has, display: 'foo.doc' old_display: 'foo.doc' original: 'foo' For particular routes, we can suppress this with :format => false so this commit adds that to both get_attachment and get_attachment_as_html.
| * | | | In the mailin script, run "rails runner" with "bundle exec"Mark Longair2013-04-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example usages in the documentation all refer to the mailin script without a "bundle exec" prefix, so with bundler-based installation these examples may not work without a "bundle exec" being used in the script.
| * | | | Fix the deadlock on dealing with incoming emailMark Longair2013-04-15-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #336 There was an occasional deadlock when two emails for the same request came in near-simultaneously; two processes would be started via script/mailin, each to deal with one email which are both updating the same InfoRequest. The error would look like: 2013-04-07 09:19:03 BST [13398]: [2-1] DETAIL: Process 13398 waits for ShareLock on transaction 36193647; blocked by process 13397. Process 13397 waits for ExclusiveLock on tuple (390,35) of relation 32918788 of database 32918687; blocked by process 13398. Process 13398: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.139515', "awaiting_description" = 't' WHERE "id" = 156200 Process 13397: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.143624', "awaiting_description" = 't' WHERE "id" = 156200 This arose from the following section of code: ActiveRecord::Base.transaction do raw_email = RawEmail.new incoming_message.raw_email = raw_email incoming_message.info_request = self incoming_message.save! raw_email.data = raw_email_data raw_email.save! self.awaiting_description = true params = { :incoming_message_id => incoming_message.id } if !rejected_reason.empty? params[:rejected_reason] = rejected_reason.to_str end self.log_event("response", params) self.save! end Matthew Somerville explained what was happening here in the issue report; to repeat his explanation from the bug report, both processes enter the transaction block and acquire a ShareLock on self with: incoming_message.info_request = self incoming_message.save! However, in order to update the self.awaiting_description field of the InfoRequest, with: self.awaiting_description = true [...] self.save! ... the ShareLock needs to be upgraded to an ExclusiveLock, but both will wait until the other's ShareLock is released, which would only happen at the end of the transaction. We can avoid this deadlock by using SELECT ... FOR UPDATE for the row in info_requests. In Rails 3.2.0 there is ActiveRecord support for this (via with_lock and lock! on a model instance) but so as not to require upgrading rails, I'm just using raw SQL.
| * | | | Add a RackEnv setting to httpd.conf-example and explain whyMark Longair2013-04-08-0/+5
| | | | |
| * | | | Rename httpd.conf to httpd.conf-exampleMark Longair2013-04-08-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The httpd.conf file needs to be customized before being deployed, and in mySociety's deploy system, a custom version is only looked for if a corresponding -example file exists. Also change httpd.conf to httpd.conf-example in INSTALL.md
* | | | | Merge branch 'release/0.9' into rails-3-developLouise Crow2013-04-24-4257/+7515
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/public_body_controller.rb app/mailers/track_mailer.rb app/views/request/_hidden_correspondence.html.erb app/views/request/_sidebar.html.erb app/views/request/hidden.html.erb app/views/request/new_please_describe.html.erb app/views/request/preview.html.erb app/views/user/show.html.erb config/environment.rb config/routes.rb spec/controllers/public_body_controller_spec.rb
| * | | Bump alaveteli versionrelease/0.9Louise Crow2013-04-24-1/+1
| | | |
| * | | Fix string interpolation param.Louise Crow2013-04-24-1/+1
| | | |
| * | | Make sure raw emails are loaded before running integration specLouise Crow2013-04-23-0/+1
| | | |
| * | | Translation files re-pulled from transifex.Louise Crow2013-04-23-145/+163
| | | |
| * | | Translation file format fixes.Louise Crow2013-04-23-3/+3
| | | |
| * | | Results of running bundle exec rake gettext:store_model_attributes, followed ↵Louise Crow2013-04-23-41/+34
| | | | | | | | | | | | | | | | by bundle exec rake gettext:find
| * | | Merge latest translations from Transifex with new interpolation format.Louise Crow2013-04-23-383/+3768
| | | |
| * | | Add changes for release 0.9Louise Crow2013-04-23-0/+10
| | | |
| * | | Restore call to N_Louise Crow2013-04-23-1/+1
| | | |
| * | | Remove method restriction on describe_state - as noted later in the ↵Louise Crow2013-04-23-1/+1
| | | | | | | | | | | | | | | | routes.rb file, the usual REST method expectations don't work with the post_redirect mechanism.
| * | | Fix the deadlock on dealing with incoming emailMark Longair2013-04-18-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #336 There was an occasional deadlock when two emails for the same request came in near-simultaneously; two processes would be started via script/mailin, each to deal with one email which are both updating the same InfoRequest. The error would look like: 2013-04-07 09:19:03 BST [13398]: [2-1] DETAIL: Process 13398 waits for ShareLock on transaction 36193647; blocked by process 13397. Process 13397 waits for ExclusiveLock on tuple (390,35) of relation 32918788 of database 32918687; blocked by process 13398. Process 13398: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.139515', "awaiting_description" = 't' WHERE "id" = 156200 Process 13397: UPDATE "info_requests" SET "updated_at" = '2013-04-07 08:19:02.143624', "awaiting_description" = 't' WHERE "id" = 156200 This arose from the following section of code: ActiveRecord::Base.transaction do raw_email = RawEmail.new incoming_message.raw_email = raw_email incoming_message.info_request = self incoming_message.save! raw_email.data = raw_email_data raw_email.save! self.awaiting_description = true params = { :incoming_message_id => incoming_message.id } if !rejected_reason.empty? params[:rejected_reason] = rejected_reason.to_str end self.log_event("response", params) self.save! end Matthew Somerville explained what was happening here in the issue report; to repeat his explanation from the bug report, both processes enter the transaction block and acquire a ShareLock on self with: incoming_message.info_request = self incoming_message.save! However, in order to update the self.awaiting_description field of the InfoRequest, with: self.awaiting_description = true [...] self.save! ... the ShareLock needs to be upgraded to an ExclusiveLock, but both will wait until the other's ShareLock is released, which would only happen at the end of the transaction. We can avoid this deadlock by using SELECT ... FOR UPDATE for the row in info_requests. In Rails 3.2.0 there is ActiveRecord support for this (via with_lock and lock! on a model instance) but so as not to require upgrading rails, I'm just using raw SQL.