aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Use SQL to find first resultGareth Rees2015-06-04-4/+4
| | | | No point loading all results if we're only ever going to return the first.
* Use string interpolationGareth Rees2015-06-04-1/+1
|
* Use Hash#fetch for nil fallbackGareth Rees2015-06-04-2/+2
| | | | | Easier to understand Removes explicit return
* Use database query to return unique resultsGareth Rees2015-06-04-5/+6
| | | | Use pluck to return only public_body_id instead of filtering in Ruby
* Remove explicit returnGareth Rees2015-05-29-1/+1
|
* Use arel queryGareth Rees2015-05-29-4/+5
|
* Remove unused variableGareth Rees2015-05-29-2/+1
|
* Minor tidyGareth Rees2015-05-29-1/+15
|
* Merge branch 'hotfix/0.21.0.34' into rails-3-developLouise Crow2015-05-28-1/+1
|\
| * Bump alaveteli version0.21.0.34hotfix/0.21.0.34Louise Crow2015-05-28-1/+1
| |
| * Fix encoding issue with searching for macronsCaleb2015-05-28-35/+48
| | | | | | | | Correct indentation to be consistent
* | Merge branch 'hotfix/0.21.0.33' into rails-3-developLouise Crow2015-05-28-106/+178
|\|
| * Bump alaveteli version0.21.0.33hotfix/0.21.0.33Louise Crow2015-05-28-1/+1
| |
| * Merge branch 'handle-unparsed-email-as-binary' into hotfix/0.21.0.33Louise Crow2015-05-28-33/+64
| |\
| | * Handle unparsed email contents as binary.Louise Crow2015-05-26-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think I was wrong in a83b379fd2d676172855825d0592937b234371e2 in assuming that all email gets properly encoded for transfer. Looking at the mail gem load method https://github.com/mikel/mail/blob/b159e0a542962fdd5e292a48cfffa560d7cf412e/lib/mail/mail.rb#L175a, it reads raw email content from a file in binary mode. So this commit makes both reading and writing the raw_email a binary mode operation and adds a data_as_text method for displaying the data in the admin interface that coerces it to valid utf-8.
| | * Cleanup spec.Louise Crow2015-05-22-13/+14
| | | | | | | | | | | | Move setup to spec - not in common with other specs.
| | * Remove obsolete testLouise Crow2015-05-22-19/+4
| | | | | | | | | | | | | | | We don't write the data for a raw email to the database anymore. It's written to a file.
| * | Add required setupLouise Crow2015-05-28-11/+18
| | |
| * | Make sure regexes used in highlight helper are UTF-8 encodedLouise Crow2015-05-28-0/+1
| | |
| * | 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
| | |
* | | Merge branch 'rails-3-develop' of ↵Louise Crow2015-05-28-17/+15
|\ \ \ | | | | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * \ \ Merge remote-tracking branch 'jpmckinney/js' into rails-3-developGareth Rees2015-05-28-1/+0
| |\ \ \
| | * | | Don't analyze JavaScript code qualityJames McKinney2015-05-27-1/+0
| | | | |
| * | | | Merge remote-tracking branch 'jpmckinney/truefalse' into rails-3-developGareth Rees2015-05-28-16/+15
| |\ \ \ \
| | * | | | Eliminate !! (bang bang)James McKinney2015-05-27-3/+3
| | | | | |
| | * | | | Avoid unnecessary ternary operationsJames McKinney2015-05-21-15/+15
| | | | | |
| | * | | | AdminUserController: remove unused instance variable and avoid unneeded ternaryJames McKinney2015-05-21-2/+1
| | | | | |
* | | | | | Merge branch 'force-filenames-to-utf8' into rails-3-developLouise Crow2015-05-28-2/+137
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Fix typoLouise Crow2015-05-15-1/+1
| | | | | |
| * | | | | Force attachment filenames to utf-8 before trying to save themLouise Crow2015-05-15-4/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a database with encoding SQL-ASCII, an invalid utf-8 filename can be saved but will cause an "invalid byte sequence in UTF-8" when the filename is prepared for display. In a database with a UTF-8 encoding, saving the string will cause an error like "ActiveRecord::StatementInvalid (PG::Error: ERROR: invalid byte sequence for encoding "UTF8""
| * | | | | Add method for forcing strings to valid utf-8Louise Crow2015-05-14-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try likely conversions but if that fails, just replace the characters that are invalid utf-8.
* | | | | | Merge branch 'rails-3-develop' of ↵Louise Crow2015-05-28-0/+6
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * | | | | Merge remote-tracking branch 'jpmckinney/codeclimate' into rails-3-developGareth Rees2015-05-27-0/+6
| |\ \ \ \ \
| | * | | | | Exclude "lib/strip_attributes/test/*" from CodeClimateJames McKinney2015-05-20-0/+6
| | | | | | |
* | | | | | | Merge branch 'locale-specific-language-name' into rails-3-developLouise Crow2015-05-28-0/+24
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Allow locale specific language names and add one for Hong Kong Chinese.Louise Crow2015-05-15-0/+24
| |/ / / / /
* | | | | | Merge remote-tracking branch 'jpmckinney_github/extract_method4' into ↵Louise Crow2015-05-26-18/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | rails-3-develop
| * | | | | | MailServerLog: Extract duplicate code into new methodJames McKinney2015-05-21-18/+14
| | |_|/ / / | |/| | | |
* | | | | | Merge branch 'scope-comments' into rails-3-developLouise Crow2015-05-26-5/+11
|\ \ \ \ \ \
| * | | | | | Restore methods with deprecation noticesLouise Crow2015-05-26-0/+12
| | | | | | |
| * | | | | | Replace visible_comments method with a scope on the Comment modelHenare Degan2015-05-22-7/+5
| | | | | | |
| * | | | | | Remove unused methodHenare Degan2015-05-22-4/+0
| | | | | | |
* | | | | | | Merge remote-tracking branch 'jpmckinney_github/class_methods' into ↵Louise Crow2015-05-26-74/+74
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | rails-3-develop
| * | | | | | | Declare class methods the idiomatic Ruby wayJames McKinney2015-05-21-74/+74
| | |/ / / / / | |/| | | | |
* | | | | | | Merge remote-tracking branch ↵Louise Crow2015-05-26-7/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'openaustralia_github/286-public-body-show-visible-requests' into rails-3-develop
| * | | | | | | Only include visible requests in count on body pageHenare Degan2015-05-22-7/+10
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | Fixes #286
* | | | | | | Merge remote-tracking branch 'schlos_github/patch-2' into rails-3-developLouise Crow2015-05-26-1/+5
|\ \ \ \ \ \ \
| * | | | | | | Adding Croatian AlaveteliMiroslav2015-05-24-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Added Croatian Alaveteli to the list of world FOI websites