aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/foi_attachment.rb
Commit message (Collapse)AuthorAgeLines
* Rename XXX comments with TODO:Gareth Rees2014-06-10-1/+1
| | | | Picks these up in `rake notes` and adds semantic meaning
* Update gubbins to call AttachmentToHTMLGareth Rees2014-04-07-1/+2
|
* Minor change to FoiAttachment#body_as_htmlGareth Rees2014-04-07-2/+1
| | | | AttachmentToHTML#to_html already returns the raw html now
* Use AttachmentToHTML to generate FoiAttachment#body_as_htmlGareth Rees2014-03-28-77/+4
|
* Use HTTPS Google docs viewer where using HTTPS for alaveteliLouise Crow2014-02-17-1/+2
|
* Use a block to automatically close file.Louise Crow2013-11-12-1/+1
|
* Re-annotate models with database fieldsLouise Crow2013-09-16-3/+1
|
* Make efforts to ensure that we're usually dealing with UTF-8 stringsMark Longair2013-05-16-1/+6
| | | | | | | | | One of these changes is to make sure that the Mail backend, like the TMail backend it replaces, will return text parts encoded in UTF-8 if possible. The other change is to ensure that when text attachments are reloaded from disk, we attempt to convert them to UTF-8.
* Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-1/+1
|
* Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * Make view as html display as html5Matthew Landauer2013-03-07-2/+1
| |
* | Fix calculation of attachment sizes in Ruby 1.9.3Henare Degan2013-02-27-14/+0
| | | | | | | | | | | | | | | | force_encoding is generally not a good idea and I can't see what it's trying to achieve here so... Revert "Use the character set of the attachment to encode the string that we're pulling out of the file before converting it to our default encoding." This reverts commit 3729f2053d4c04396d440a9c368bed174e9c9605.
* | Rails.env should never not be set, I think this is a relic of RAILS_ENVHenare Degan2013-02-20-5/+1
|/
* As we're validating filename with validates_presence_of, which doesn't allow ↵Louise Crow2013-01-14-1/+1
| | | | blanks, ensure_filename! should populate a default filename on a blank filename, as well as on nil.
* Only make a tempfile etc if we're actually going to use it. Keep the body ↵Louise Crow2012-12-06-20/+30
| | | | | | | | call outside the Chdir block - sometimes getting the body may involve opening files too. Conflicts: app/models/foi_attachment.rb
* Use the character set of the attachment to encode the string that we're ↵Louise Crow2012-12-05-0/+14
| | | | pulling out of the file before converting it to our default encoding.
* Use Rails.env as a more reliable way of determining environment - it may not ↵Louise Crow2012-11-29-2/+2
| | | | have come from ENV.
* Time out pdftohtml after 30 secondsRobin Houston2012-08-01-8/+15
| | | | | | | | We have a PDF document that appears to send pdftohtml into a loop where it creates millions of tiny PDF files and consumes ever-increasing amounts of memory. (This document: http://www.whatdotheyknow.com/request/119267/response/296719/attach/5/Document%203.pdf)
* File.dirname(__FILE__) is not necessarily absoluteRobin Houston2012-06-03-1/+1
| | | | | | | It’s weird that there’s so much code here that implicitly assumes File.dirname(__FILE__) is an absolute path, because really in general it very much is not! This assumption was invalidated by the recent bundler-awareness changes.
* Further annotation correctionsSeb Bacon2012-05-24-1/+1
|
* Remove trailing whitespace (to make a cleaner forthcoming merge with ↵Seb Bacon2012-05-15-10/+10
| | | | wombleton:feature/440_sparkly_admin_css)
* Raise exception if $RAILS_ENV is unsetRobin Houston2012-01-29-1/+5
| | | | | If $RAILS_ENV is unset, raise an exception rather than just blithely creating a directory called cache/attachments_.
* Use AlaveteliExternalCommand for unrtfRobin Houston2012-01-17-3/+1
|
* Do not hard-code the path to pdftohtmlRobin Houston2012-01-17-3/+1
|
* To get around occasional race conditions, instead of forcing an fsync, retry ↵Seb Bacon2012-01-13-1/+15
| | | | getting the body a few times before failing. May be related to issue #333 and #339
* Changes to attempt to ensure we always get a consistent state for an ↵Seb Bacon2012-01-12-0/+1
| | | | incoming message's attachments. May fix #339.
* Attempt to fix #333 ('attempt' because hard to test!)Seb Bacon2012-01-11-0/+1
|
* Ensure model schema documentation is up to date.Seb Bacon2012-01-09-0/+16
|
* Ensure we regenerate cache if for some reason it's missingSeb Bacon2012-01-09-1/+7
|
* Don't give error when viewing HTML versions. Fixes issue #321Seb Bacon2012-01-08-2/+2
|
* Further improvements to attachment cachingSeb Bacon2011-12-13-17/+16
|
* WIP on caching attachmentsSeb Bacon2011-12-12-0/+322