aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeLines
* Add link to http://rosotvet.ru/Louise Crow2015-06-25-2/+5
|
* Merge branch 'add-rbenv-shims' into developLouise Crow2015-06-23-0/+16
|\
| * Add conversion task for config/run-with-rbenv-path.exampleLouise Crow2015-06-23-0/+16
| |
* | Add script to detect poorly encoded UTF-8 in existing data.Louise Crow2015-06-23-0/+96
| |
* | Add body_as_text, default_body.Louise Crow2015-06-22-1/+1
| | | | | | | | | | | | Main intent here is to be more explicit about what form you're getting the attachment body in - valid UTF-8 or binary, and has it been cleaned up in order to be UTF-8?
* | convert_string_to_utf8 returns struct of string and scrubbing status.Louise Crow2015-06-22-2/+7
| |
* | Clearly separate text attachments and binary.Louise Crow2015-06-22-1/+16
| | | | | | | | | | Text type attachments will always have a UTF-8 body (even if it has to be scrubbed).
* | Round trip through utf-16 to clean utf-8 stringLouise Crow2015-06-22-6/+10
| | | | | | | | | | As noted in the ruby docs (http://ruby-doc.org/core-1.9.3/String.html#method-i-encode), any conversion from an encoding to the same encoding is a no-op, covert it first to utf-16.
* | Use ASCII-8BIT for replacement patterns when handling binary data.Louise Crow2015-06-22-2/+2
|/ | | | Also be explicit about using UTF-8 when handling text data.
* Merge branch '2288-public-body-page-performance' into developGareth Rees2015-06-04-2/+2
|\
| * Use Hash#fetch for nil fallbackGareth Rees2015-06-04-2/+2
| | | | | | | | | | Easier to understand Removes explicit return
* | Merge branch 'hotfix/0.21.0.35' into rails-3-developrails-3-developLouise Crow2015-05-29-3/+3
|\ \ | |/ |/|
| * Address#to_s changes the input passed to it - dup before calling.Louise Crow2015-05-28-3/+3
| | | | | | | | Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
| * Fix encoding issue with searching for macronsCaleb2015-05-28-35/+37
| | | | | | | | Correct indentation to be consistent
* | Merge branch 'hotfix/0.21.0.33' into rails-3-developLouise Crow2015-05-28-1/+4
|\|
| * Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-1/+4
| |
* | Merge branch 'rails-3-develop' of ↵Louise Crow2015-05-28-2/+2
|\ \ | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * \ Merge remote-tracking branch 'jpmckinney/truefalse' into rails-3-developGareth Rees2015-05-28-2/+2
| |\ \
| | * | Eliminate !! (bang bang)James McKinney2015-05-27-2/+2
| | | |
| | * | Avoid unnecessary ternary operationsJames McKinney2015-05-21-2/+2
| | | |
* | | | Merge branch 'force-filenames-to-utf8' into rails-3-developLouise Crow2015-05-28-1/+20
|\ \ \ \ | |/ / / |/| | |
| * | | Force attachment filenames to utf-8 before trying to save themLouise Crow2015-05-15-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+11
| | | | | | | | | | | | | | | | | | | | Try likely conversions but if that fails, just replace the characters that are invalid utf-8.
* | | | Merge branch 'locale-specific-language-name' into rails-3-developLouise Crow2015-05-28-0/+2
|\ \ \ \
| * | | | Allow locale specific language names and add one for Hong Kong Chinese.Louise Crow2015-05-15-0/+2
| | | | |
* | | | | Merge remote-tracking branch 'jpmckinney_github/class_methods' into ↵Louise Crow2015-05-26-29/+29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | rails-3-develop
| * | | | | Declare class methods the idiomatic Ruby wayJames McKinney2015-05-21-29/+29
| | |_|/ / | |/| | |
* | | | | 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
* | | | | | Merge branch 'hotfix/0.21.0.32' into rails-3-developLouise Crow2015-05-26-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | / | | |_|_|/ | |/| | |
| * | | | Handle invalid 'to' addresses.Louise Crow2015-05-22-1/+1
| | | | |
* | | | | Merge remote-tracking branch 'jpmckinney_github/parentheses' into ↵Louise Crow2015-05-22-10/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | rails-3-develop
| * | | | | Remove all optional parentheses for method calls in RubyJames McKinney2015-05-21-10/+10
| | |/ / / | |/| | |
* / | | | Simplify HealthCheckable APIJames McKinney2015-05-21-7/+3
|/ / / /
* | / / Move common AttachmentToHTML methods to a superclassJames McKinney2015-05-20-202/+87
| |/ / |/| |
* | | Add source file encoding for all ruby files.Louise Crow2015-05-15-5/+48
| |/ |/| | | | | | | | | This is important under ruby 1.9 in order to determine the encoding that will be used for new strings created in the code in the file.
* | Merge branch 'html-relative-path' into rails-3-developLouise Crow2015-05-12-2/+2
|\|
| * 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.
* | Send mail import errors to exception notification address.Louise Crow2015-05-11-2/+2
| | | | | | | | | | Usually these are going to require some technical action. There's not much regular admins can do about them.
* | Merge branch 'remove-obsolete-code' into rails-3-developLouise Crow2015-05-07-8/+0
|\ \
| * | Remove monkeypatch required when running Rails 2.3 under Ruby 1.9Louise Crow2015-05-07-8/+0
| | | | | | | | | | | | | | | | | | This was added because TMail calls String#is_binary_data? which does not exist in Ruby 1.9.2 onwards. We don't use TMail anymore so this is no longer needed.
* | | Add bulletGareth Rees2015-05-07-1/+2
|/ / | | | | | | Help to kill N+1 queries and unused eager loading
* | Merge branch 'xapian-refactor' into rails-3-developLouise Crow2015-04-30-84/+91
|\ \
| * | Refactor for idiomatic ruby.Louise Crow2015-04-30-15/+18
| | | | | | | | | | | | | | | | | | Use of each rather than for, case statement for multi-clause if, variable interpolation rather than concatenation. Also use inline variables in the each for clarity.
| * | Factor out initialisation of values into its own methodLouise Crow2015-04-29-26/+28
| | |
| * | Factor out term initialisation into its own method.Louise Crow2015-04-29-18/+20
| | |
| * | Use each, identify variables for readability, break up long lines.Louise Crow2015-04-29-13/+16
| | |
| * | Use variable interpolation.Louise Crow2015-04-29-1/+1
| | |
| * | Extract running a job to its own method.Louise Crow2015-04-29-24/+28
| | |
| * | Cleanup spacing.Louise Crow2015-04-29-1/+1
| | |