Commit message (Collapse) | Author | Age | Lines | |
---|---|---|---|---|
* | Merge branch 'binary-or-utf8-attachment-bodies' into develop | Louise Crow | 2015-06-23 | -98/+55 |
|\ | ||||
| * | Use existing UTF-8 conversion method. | Louise Crow | 2015-06-22 | -10/+1 |
| | | ||||
| * | Remove redundant UTF-8 conversion. | Louise Crow | 2015-06-22 | -65/+1 |
| | | | | | | | | body_as_text has already been converted and scrubbed if needed. | |||
| * | Add body_as_text, default_body. | Louise Crow | 2015-06-22 | -15/+26 |
| | | | | | | | | | | | | 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 Crow | 2015-06-22 | -1/+1 |
| | | ||||
| * | Clearly separate text attachments and binary. | Louise Crow | 2015-06-22 | -2/+9 |
| | | | | | | | | | | Text type attachments will always have a UTF-8 body (even if it has to be scrubbed). | |||
| * | Use ASCII-8BIT for replacement patterns when handling binary data. | Louise Crow | 2015-06-22 | -8/+20 |
| | | | | | | | | Also be explicit about using UTF-8 when handling text data. | |||
* | | Add some TODOs | Gareth Rees | 2015-06-15 | -2/+11 |
| | | ||||
* | | Use alias_method to define duplicate method | Gareth Rees | 2015-06-15 | -4/+2 |
| | | ||||
* | | Group similar methods | Gareth Rees | 2015-06-15 | -18/+19 |
| | | ||||
* | | Privatise PublicBody#reindex_requested_from | Gareth Rees | 2015-06-15 | -13/+19 |
| | | | | | | | | Only used in a callback | |||
* | | Code tidy | Gareth Rees | 2015-06-15 | -40/+44 |
| | | ||||
* | | Add markers for deprecated and privatised methods | Gareth Rees | 2015-06-15 | -0/+6 |
| | | | | | | | | Just to aid current cleanup | |||
* | | Prevent PublicBody#set_api_key call if unrequired | Gareth Rees | 2015-06-15 | -2/+6 |
| | | | | | | | | | | Don't call the method unless we need to. Adds #set_api_key! to set a new API key even if there's an existing one. | |||
* | | Privatise PublicBody#set_default_publication_scheme | Gareth Rees | 2015-06-15 | -6/+15 |
| | | | | | | | | Only used in a callback | |||
* | | Deprecate PublicBody.set_first_letter | Gareth Rees | 2015-06-15 | -13/+14 |
| | | | | | | | | Unused since 1524f83baa3b93a506dbefe7def0c4c304f93745 | |||
* | | Deprecate PublicBody#calculate_cached_fields | Gareth Rees | 2015-06-15 | -8/+10 |
| | | | | | | | | | | Not used anywhere. Moved it to the bottom of the file out of the way. | |||
* | | Explicitly define each callback | Gareth Rees | 2015-06-15 | -2/+2 |
| | | | | | | | | | | Just not worth using an Array. Prevents easily adding conditionals and reordering. | |||
* | | Tidy alignments | Gareth Rees | 2015-06-15 | -7/+9 |
| | | ||||
* | | Group macros and move inner classes to top of file | Gareth Rees | 2015-06-15 | -66/+82 |
| | | | | | | | | https://github.com/bbatsov/ruby-style-guide#consistent-classes | |||
* | | Update comment - no longer using external uudecode | Louise Crow | 2015-06-12 | -1/+1 |
| | | ||||
* | | Move updating of derived attributes to a concern. | Louise Crow | 2015-06-12 | -32/+55 |
|/ | | | | | | Add spec to demonstrate that admin-added bodies aren't getting derived attributes. Add a spec to demonstrate the problem setting the first letter for translations. Demonstrate failure to update derived attributes in translations. | |||
* | Merge branch 'format-admin-form-from-address' into develop | Louise Crow | 2015-06-08 | -1/+1 |
|\ | ||||
| * | Use address_from_name_and_email to correctly format from field. | Louise Crow | 2015-06-08 | -1/+1 |
| | | | | | | | | | | | | | | Prior to this, a name with commas in it plus email address would have been treated as several separate addresses, some of which would have just consisted of the bits of the name between the commas, and would have been invalid. | |||
* | | Merge branch 'develop' of ssh://git.mysociety.org/data/git/public/alaveteli ↵ | Louise Crow | 2015-06-04 | -130/+131 |
|\ \ | | | | | | | | | | into develop | |||
| * \ | Merge branch '2288-public-body-page-performance' into develop | Gareth Rees | 2015-06-04 | -119/+126 |
| |\ \ | ||||
| | * | | Avoid loading associations to check existence | Gareth Rees | 2015-06-04 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling InfoRequestEvent#is_X? loads the associated model from the database. We don't need to do this to check what 'type' the event is. This commit first checks whether there is an association_id – if there is then we know it's that 'type'. If there's no association_id, call the association to check whether one has been added but not yet persisted. Only check association if the object is a new record. This avoids checking the association on a persisted record when we know it isn't that type of event due to the database record not existing. | |||
| | * | | Only use and/or for control flow | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | ||||
| | * | | Directly return the associated IncomingMessage | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | InfoRequestEvent#incoming_message_selective_columns ends up returning the same thing. | |||
| | * | | Simplify InfoRequestEvent#is_incoming_message? | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just check if there's an associated InfoRequest. user system total real old 0.010000 0.000000 0.010000 ( 0.012269) new 0.000000 0.000000 0.000000 ( 0.000101) | |||
| | * | | Pass existing track to _tracking_links | Gareth Rees | 2015-06-04 | -3/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing track is already found in PublicBodyController#show. Really, the partial shouldn't attempt to find one in the fallback case, but keeping for now for compatibility. | |||
| | * | | Fix indentation | Gareth Rees | 2015-06-04 | -18/+16 |
| | | | | ||||
| | * | | Fix alignment | Gareth Rees | 2015-06-04 | -15/+15 |
| | | | | ||||
| | * | | Remove unused code | Gareth Rees | 2015-06-04 | -13/+1 |
| | | | | ||||
| | * | | Idiomatic ruby | Gareth Rees | 2015-06-04 | -4/+3 |
| | | | | ||||
| | * | | Indentation tidy | Gareth Rees | 2015-06-04 | -10/+11 |
| | | | | ||||
| | * | | Use ARel syntax | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | ||||
| | * | | Extract logic in view to controller | Gareth Rees | 2015-06-04 | -3/+4 |
| | | | | ||||
| | * | | Minor tidy up | Gareth Rees | 2015-06-04 | -20/+22 |
| | | | | ||||
| | * | | No longer need to compact types | Gareth Rees | 2015-06-04 | -2/+0 |
| | | | | ||||
| | * | | Use each_with_index rather than state variable | Gareth Rees | 2015-06-04 | -5/+2 |
| | | | | ||||
| | * | | Speed up PublicBodyHelper#type_of_authority | Gareth Rees | 2015-06-04 | -8/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously loaded all PublicBodyHeading and associated PublicBodyCategory records. Now only loads the PublicBodyCategory records that relate to the PublicBody. user system total real old 0.320000 0.000000 0.320000 ( 0.356155) new 0.010000 0.000000 0.010000 ( 0.010077) | |||
| | * | | Fix typo | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | | | | | | | | | | | | | Types should be CamelCase | |||
| | * | | Use SQL to find first result | Gareth Rees | 2015-06-04 | -4/+4 |
| | | | | | | | | | | | | | | | | No point loading all results if we're only ever going to return the first. | |||
| | * | | Use string interpolation | Gareth Rees | 2015-06-04 | -1/+1 |
| | | | | ||||
| | * | | Use database query to return unique results | Gareth Rees | 2015-06-04 | -5/+6 |
| | | | | | | | | | | | | | | | | Use pluck to return only public_body_id instead of filtering in Ruby | |||
| | * | | Remove explicit return | Gareth Rees | 2015-05-29 | -1/+1 |
| | | | | ||||
| | * | | Use arel query | Gareth Rees | 2015-05-29 | -4/+5 |
| | | | | ||||
| | * | | Remove unused variable | Gareth Rees | 2015-05-29 | -2/+1 |
| | | | | ||||
| | * | | Minor tidy | Gareth Rees | 2015-05-29 | -1/+15 |
| | |/ |