aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-1/+33
|
* Cleanup spec.Louise Crow2015-05-26-52/+54
| | | | Remove unneeded setup, fixtures are not used in these specs.
* Move acts_as_xapian specs to own file.Louise Crow2015-05-26-71/+73
|
* Bump alaveteli version0.21.0.32hotfix/0.21.0.32Louise Crow2015-05-26-1/+1
|
* Handle invalid 'to' addresses.Louise Crow2015-05-22-1/+11
|
* Bump Alaveteli version0.21.0.31Louise Crow2015-05-15-1/+1
|
* Use mb_chars to prevent slicing multibyte chars under ruby 1.8Louise Crow2015-05-15-1/+13
| | | | | | | | | | mb_chars provides a multibyte-aware wrapper for strings. It should have no effect on ruby 1.9.3 and above. Although ruby 1.8.7 wouldn't raise errors on a badly sliced multibyte string, on upgrading to ruby 1.9.3 and above, string operations such as gsub, match and join may produce ArgumentErrors with the message "invalid byte sequence in UTF-8". Additionally, a database with 'UTF-8' encoding may produce the error "PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8""
* Bump alaveteli version0.21.0.30hotfix/0.21.0.30Louise Crow2015-05-15-1/+1
|
* Merge branch 'master' of ssh://git.mysociety.org/data/git/public/alaveteli ↵Louise Crow2015-05-15-4/+33
|\ | | | | | | into hotfix/0.21.0.30
| * Merge branch 'hotfix/0.21.0.29'0.21.0.29Gareth Rees2015-05-13-4/+1
| |\
| | * Bump alaveteli versionGareth Rees2015-05-13-1/+1
| | |
| | * Remove mistakenly committed specGareth Rees2015-05-13-3/+0
| |/ | | | | | | | | Mistakenly committed from previous version of da6c11531a761847ee129f92677a44fdb02de04e
| * Merge branch 'hotfix/0.21.0.28'0.21.0.28Gareth Rees2015-05-13-4/+36
| |\
| | * Bump alaveteli versionhotfix/0.21.0.28Gareth Rees2015-05-13-1/+1
| | |
| | * Discard rejected responses with malformed From:Gareth Rees2015-05-13-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Stops the RequestMailer trying to send a stopped_responses mail if the To: address can’t be parsed from the incoming message. ArgumentError: An SMTP To address is required to send a message. Set the message smtp_envelope_to, to, cc, or bcc address.
| | * Add explaining commentsGareth Rees2015-05-13-0/+2
| | |
| | * Sensible error messageGareth Rees2015-05-13-1/+1
| | |
| | * Put emails with malformed To: field in holding penGareth Rees2015-05-13-1/+7
| | | | | | | | | | | | | | | Prevents mailin exiting with an error code of 75 and sending error reports to the team@ email address.
| | * Use each instead of forGareth Rees2015-05-13-1/+2
| |/ | | | | | | Extract email collection to explaining variable
* / Add UTF-8 encoding line.hotfix/0.29.0.30Louise Crow2015-05-15-0/+1
|/ | | | | | | Without this line, strings created in the file will use the default external encoding set by the ENV variable LANG. When processes are forked or run in cron, this may not be preserved, so better to set explicitly.
* Bump alaveteli version0.21.0.27hotfix/0.21.0.27Louise Crow2015-05-12-1/+1
|
* Use a relative path in call to pdftohtml.Louise Crow2015-05-11-2/+2
| | | | | | | | pdftohtml will use the file path as the basis for generating the image links in the generated HTML, so we want them to be relative, not absolute. Ruby 1.9 tempfile.path will generate an absolute path when given the current directory as the tmpdir, whilst 2.0 and 1.8 will use a relative one.
* Merge branch 'hotfix/0.21.0.26'0.21.0.26Gareth Rees2015-05-06-4/+4
|\
| * Bump alavetli versionGareth Rees2015-05-06-1/+1
| |
| * Update Nicaragua translattionsGareth Rees2015-05-06-3/+3
|/
* Bump alaveteli version0.21.0.25Gareth Rees2015-04-30-1/+1
| | | | | Bumping to .25 because I forgot before I merged hotfix 0.21.0.24; treating this as a new hotfix.
* Merge branch 'hotfix/0.21.0.24'0.21.0.24Gareth Rees2015-04-30-8/+26
|\
| * Rescue from Holidays::UnknownRegionErrorhotfix/0.21.0.24Gareth Rees2015-04-29-4/+15
| | | | | | | | | | If you run an Alaveteli in a region where we can’t show holiday suggestions the holiday import page breaks. This commit rescues from an unavailable region so that we display a friendly error message.
| * Remove confusing before blockGareth Rees2015-04-29-4/+11
|/ | | | | | Next commit adds a new spec; this before block was affecting the behaviour of the new spec. https://robots.thoughtbot.com/lets-not
* Merge branch 'hotfix/0.21.0.23'0.21.0.23Gareth Rees2015-04-27-24/+32
|\
| * Bump alaveteli versionhotfix/0.21.0.23Gareth Rees2015-04-27-1/+1
| |
| * Tidy InfoRequest#initial_request_textGareth Rees2015-04-27-5/+2
| |
| * Only load the outgoing messages that will be usedGareth Rees2015-04-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents loading of all outgoing messages related to the info request. Before OutgoingMessage Load (1.5ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at After OutgoingMessage Load (0.8ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at LIMIT 1
| * Improve performance initializing OutgoingMessageGareth Rees2015-04-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces the amount of queries to associated objects by directly checking the database before setting the default body content. Before > info_request.outgoing_messages OutgoingMessage Load (0.4ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at InfoRequest Load (0.5ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" = 137 LIMIT 1 PublicBody Load (0.5ms) SELECT "public_bodies".* FROM "public_bodies" WHERE "public_bodies"."id" = 16 LIMIT 1 HasTagString::HasTagStringTag Load (0.4ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = 16 AND (model = 'PublicBody') CensorRule Load (0.4ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IS NULL AND "censor_rules"."public_body_id" IS NULL AND "censor_rules"."user_id" IS NULL User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 1 (0.5ms) SELECT COUNT(*) FROM "censor_rules" WHERE "censor_rules"."user_id" = 13 CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" = 137 ORDER BY created_at desc CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."public_body_id" = 16 ORDER BY created_at desc InfoRequest Load (0.5ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" = 137 LIMIT 1 PublicBody Load (0.5ms) SELECT "public_bodies".* FROM "public_bodies" WHERE "public_bodies"."id" = 16 LIMIT 1 HasTagString::HasTagStringTag Load (0.6ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = 16 AND (model = 'PublicBody') CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IS NULL AND "censor_rules"."public_body_id" IS NULL AND "censor_rules"."user_id" IS NULL User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 1 (0.5ms) SELECT COUNT(*) FROM "censor_rules" WHERE "censor_rules"."user_id" = 13 CensorRule Load (0.4ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" = 137 ORDER BY created_at desc CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."public_body_id" = 16 ORDER BY created_at desc => [#<OutgoingMessage id: 36, info_request_id: 137, body: "Some information please", status: "sent", message_type: "initial_request", created_at: "2015-04-17 10:50:21", updated_at: "2015-04-17 10:50:21", last_sent_at: "2015-04-17 10:50:21", incoming_message_followup_id: nil, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>, #<OutgoingMessage id: 37, info_request_id: 137, body: "Dear Example Public Body 6,\r\n\r\nc'mooooooonnnnnn\r\n\r\n...", status: "sent", message_type: "followup", created_at: "2015-04-20 12:18:30", updated_at: "2015-04-20 12:18:30", last_sent_at: "2015-04-20 12:18:30", incoming_message_followup_id: 30, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>] After > info_request.outgoing_messages OutgoingMessage Load (0.8ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at => [#<OutgoingMessage id: 36, info_request_id: 137, body: "Some information please", status: "sent", message_type: "initial_request", created_at: "2015-04-17 10:50:21", updated_at: "2015-04-17 10:50:21", last_sent_at: "2015-04-17 10:50:21", incoming_message_followup_id: nil, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>, #<OutgoingMessage id: 37, info_request_id: 137, body: "Dear Example Public Body 6,\r\n\r\nc'mooooooonnnnnn\r\n\r\n...", status: "sent", message_type: "followup", created_at: "2015-04-20 12:18:30", updated_at: "2015-04-20 12:18:30", last_sent_at: "2015-04-20 12:18:30", incoming_message_followup_id: 30, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>]
| * Reduce N+1 queries in RequestGameController#playGareth Rees2015-04-27-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates the following Bullet warnings: 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:public_body] Add to your finder: :includes => [:public_body] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:16:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call' 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:user] Add to your finder: :includes => [:user] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:17:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call'
| * Minor tidy upGareth Rees2015-04-27-16/+26
|/
* Merge branch 'hotfix/0.21.0.22'0.21.0.22Gareth Rees2015-04-24-4/+4
|\
| * Bump alaveteli versionhotfix/0.21.0.22Gareth Rees2015-04-24-1/+1
| |
| * Update Nicaragua translationsGareth Rees2015-04-24-3/+3
|/
* Bump alaveteli version0.21.0.21hotfix/0.21.0.21Louise Crow2015-04-23-1/+1
|
* Don't redirect to signin on expiration of a non remember-me sessionLouise Crow2015-04-23-2/+0
| | | | In practice, it's just confusing if you've been away from the site.
* Merge branch 'hotfix/0.21.0.20'0.21.0.20Gareth Rees2015-04-17-13/+11
|\
| * Bump alaveteli versionhotfix/0.21.0.20Gareth Rees2015-04-17-1/+1
| |
| * Update Nicaragua translationsGareth Rees2015-04-17-12/+10
|/
* Merge branch 'hotfix/0.21.0.19'0.21.0.19Gareth Rees2015-04-16-4/+4
|\
| * Bump alaveteli versionhotfix/0.21.0.19Gareth Rees2015-04-16-1/+1
| |
| * Update nicaragua translationsGareth Rees2015-04-16-3/+3
|/
* Merge branch 'hotfix/0.21.0.18'0.21.0.18Gareth Rees2015-04-16-3/+3
|\
| * Bump alaveteli versionhotfix/0.21.0.18Gareth Rees2015-04-16-1/+1
| |
| * Update Nicaragua translationsGareth Rees2015-04-16-2/+2
|/