aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
Commit message (Collapse)AuthorAgeLines
* convert_string_to_utf8 returns struct of string and scrubbing status.Louise Crow2015-06-22-8/+15
|
* Round trip through utf-16 to clean utf-8 stringLouise Crow2015-06-22-3/+2
| | | | | 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/+5
| | | | Also be explicit about using UTF-8 when handling text data.
* Merge branch 'hotfix/0.21.0.35' into rails-3-developrails-3-developLouise Crow2015-05-29-4/+23
|\
| * Go back to setting up xapian index with fixturesLouise Crow2015-05-29-4/+6
| | | | | | | | | | | | Skipping this seems to have some unexpected interaction with fixture data. https://travis-ci.org/mysociety/alaveteli/jobs/64446161
| * Address#to_s changes the input passed to it - dup before calling.Louise Crow2015-05-28-0/+17
| | | | | | | | Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
* | Merge branch 'hotfix/0.21.0.33' into rails-3-developLouise Crow2015-05-28-0/+110
|\|
| * Add required setupLouise Crow2015-05-28-11/+17
| |
| * Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-0/+29
| |
| * 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-0/+73
| |
* | Merge branch 'force-filenames-to-utf8' into rails-3-developLouise Crow2015-05-28-1/+65
|\ \
| * | Fix typoLouise Crow2015-05-15-1/+1
| | |
| * | Force attachment filenames to utf-8 before trying to save themLouise Crow2015-05-15-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+55
| | | | | | | | | | | | | | | 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/+22
|\ \ \
| * | | Allow locale specific language names and add one for Hong Kong Chinese.Louise Crow2015-05-15-0/+22
| | | |
* | | | Merge branch 'hotfix/0.21.0.32' into rails-3-developLouise Crow2015-05-26-0/+10
|\ \ \ \ | | |_|/ | |/| |
| * | | Handle invalid 'to' addresses.Louise Crow2015-05-22-0/+10
| | | |
* | | | Merge remote-tracking branch 'jpmckinney_github/parentheses' into ↵Louise Crow2015-05-22-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | rails-3-develop
| * | | | Remove all optional parentheses for method calls in RubyJames McKinney2015-05-21-1/+1
| | |/ / | |/| |
* / | | Simplify HealthCheckable APIJames McKinney2015-05-21-24/+10
|/ / /
* | / Add source file encoding for all ruby files.Louise Crow2015-05-15-7/+25
| |/ |/| | | | | | | | | 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.
* | Refactor a bit to allow testing of logic branches.Louise Crow2015-04-16-0/+17
| | | | | | | | | | Add specs for current behaviour on failure to uncompress, failure to compress.
* | Remove presumably accidentally committed RSpec focus tagsHenare Degan2015-04-11-2/+2
|/
* Handle the expected case where conversion fails and returns nil.Louise Crow2015-04-02-0/+5
|
* Merge branch 'hotfix/0.20.0.11' into rails-3-developLouise Crow2015-02-13-2/+15
|\
| * Set binary mode to false in call to pdftohtmlLouise Crow2015-02-13-2/+15
| | | | | | | | | | We want the HTML to be encoding in the default encoding so that it can be combined with other strings.
* | Refactor the application of masks and censor rules to messages.Louise Crow2014-12-15-0/+146
|/ | | | | | | | | | Seems more logical to make this one method that figures out what to do based on file type. Plus, incoming message does so many things, it seemed like having these related methods be separate would make them easier to read and understand. Also, email, mobile and login substitution texts weren't being translated. Finally, I think passing the censor rules and masks as arguments is a first step in some more decoupling of models.
* Add fix for Apple Mail with attachments Gareth Rees2014-11-04-0/+6
|
* Add some specs to MailBackendGareth Rees2014-11-04-0/+145
|
* Merge branch 'issues/222-category-editing-add-order-interface' into ↵Louise Crow2014-10-14-42/+0
|\ | | | | | | rails-3-develop
| * Replace existing PublicBodyCategories functionality with db models ↵lizconlan2014-09-22-42/+0
| | | | | | | | PublicBodyCategory and PublicBodyHeading
* | Replace initial checks with DaysAgoCheckGareth Rees2014-09-25-84/+66
| |
* | Add some initial health checksGareth Rees2014-09-25-0/+84
| |
* | Add HealthCheck and HealthCheckableGareth Rees2014-09-25-0/+205
|/ | | | | | | HealthCheck is a basic library for creating health checks. HealthCheck works with any class so long as it includes HealthCheckable and defines the `check` method.
* Add charset to view-as-html templateGareth Rees2014-08-19-0/+1
|
* Merge branch 'issues/1415-bulk-update-public-bodies' into rails-3-developGareth Rees2014-06-25-0/+114
|\
| * Extract public body CSV export to its own classGareth Rees2014-06-06-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - SRP: Do one thing. PublicBodyCSV converts a collection of bodies in to a CSV formatted String - Adds some parenthesis around parameters in PublicBodyController#list_all_csv - Let the controller handle what records to pull out for the CSV export Arguably this doesn't really need to be anything to do with PublicBody, but it allows us to set nice defaults.
* | Handle converting empty RTF fileshotfix/0.18.0.3Gareth Rees2014-06-06-0/+11
|/ | | | Fixes https://github.com/mysociety/alaveteli/issues/1563
* Work around bug#77932 in pdftohtmlGareth Rees2014-05-06-0/+37
| | | | | | | | | Sometimes pdftohtml will generate thousands of images when converting an image embedded in a PDF. This causes a request spike when a user tries to view the converted PDF as HTML. See https://bugs.freedesktop.org/show_bug.cgi?id=77932 for the bug report.
* Remove dependency on timezone in configLouise Crow2014-05-02-10/+12
|
* Merge branch 'issues/1390-james-cheshire-infographic' into rails-3-developGareth Rees2014-05-01-0/+29
|\
| * Extract quarters_between to DateQuarter libGareth Rees2014-05-01-0/+29
| |
* | Merge branch 'hotfix/0.17.0.1' into rails-3-developLouise Crow2014-04-25-0/+5
|\ \ | |/ |/|
| * Fix for badly-formed content-disposition header.Louise Crow2014-04-25-0/+5
| | | | | | | | Taken from https://github.com/mikel/mail/pull/602
* | Dynamically inject AttachmentToHTML::View contentGareth Rees2014-04-07-0/+5
| |
* | Remove redundant AttachmentToHTML::HTMLGareth Rees2014-04-07-24/+0
| |
* | Update AttachmentToHTML for new View classGareth Rees2014-04-07-6/+24
| |
* | Simpler AttachmentToHTML::Adapters::CouldNotConvert interfaceGareth Rees2014-04-07-40/+9
| |