aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeLines
* Session keys are stored as strings in Rails 3.0.15.0.1hotfix/0.15.0.1Louise Crow2013-11-19-2/+2
| | | | Update our session-stripping code.
* Merge branch 'install-script' into rails-3-developMark Longair2013-11-07-6/+21
|\
| * Add a rake task to rewrite the crontab-example fileMark Longair2013-11-07-0/+18
| | | | | | | | | | | | As suggested by Louise Crow, this new rake task reuses the convert_ugly function to rewrite the crontab-example file into a usable crontab file.
| * Fix an undefined variable errorMark Longair2013-11-07-6/+2
| | | | | | | | | | I assume 'skip' must have been an argument to this function before it was introduced into our repository.
| * Add a config option for whether to use mailcatcher in developmentMark Longair2013-10-29-0/+1
| | | | | | | | | | Sometimes it's useful to be able to really send mail in development mode, so add a config option for that.
* | Merge branch 'rails-3-develop' of ↵Louise Crow2013-11-07-1/+5
|\ \ | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * | Update the calculation of the numerator for percentage statisticsMark Longair2013-11-05-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have changed the denominator of the proportion-based statistics to only include requests that are both visible and not 'awaiting_description'. This would mean, however, that the numerator could be larger than the denominator. This commit updates the calculation of those statistics to also exclude any hidden or unclassified requests.
* | | Allow start and end dates to be supplied to stats:showLouise Crow2013-11-07-2/+8
|/ / | | | | | | This is in the service of #1173 and #1174.
* | Merge branch 'switch-theme-script' into rails-3-developMark Longair2013-10-30-1/+4
|\ \ | | | | | | | | | | | | Conflicts: config/initializers/alaveteli.rb
| * | Make theme URL to theme name mapping consistentMark Longair2013-10-15-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that extracted the theme name from each entry in THEME_URLS (in order to require code from a directory whose leaf name is the theme name) only supported git URLs that ended in '.git'. However, the themes:install rake task usefully supports a wider range of git URLs - for example, all of the following were supported: /home/whoever/themes/blah-theme => blah-theme /home/whoever/themes/blah-theme/ => blah-theme git://wherever/blah-theme.git => blah-theme ssh://wherever/blah-theme.git// => blah-theme This commit factors out a theme_url_to_theme_name method, adds tests for it, and uses that method in both: lib/tasks/themes.rake config/initializers/theme_loader.rb ... so that a wider range of theme URLs are consistently supported.
* | Merge remote-tracking branch 'origin/command-line-csv-import' into ↵Louise Crow2013-10-30-0/+78
|\ \ | | | | | | | | | rails-3-develop
| * | Remove the confusing "time remaining" messageMark Longair2013-10-29-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The time estimates were confusing on two counts: - The messages mixed locales - The estimates were hugely inaccurate, since the import slows down as time goes on
| * | Make sure that the temporary file is closed before reading from itMark Longair2013-10-29-2/+5
| | | | | | | | | | | | Thanks to Louise Crow for pointing out this problem.
| * | Add a rake task to import public bodies from a CSV fileMark Longair2013-10-15-0/+86
| |/ | | | | | | | | | | | | | | For importing a very large number of public bodies, it's mostly likely less frustrating to import them from the CSV file using this rake task instead of using the form in the admin interface. Fixes #1132
* | Merge branch 'hotfix/0.14.0.3' into rails-3-developLouise Crow2013-10-24-0/+15
|\ \
| * | Monkey patch actionmailer for CVE-2013-43890.14.0.3hotfix/0.14.0.3Louise Crow2013-10-24-0/+15
| |/ | | | | | | http://seclists.org/oss-sec/2013/q4/118
* / Reduce the memory consumption of rake stats:update_public_bodies_statsMark Longair2013-10-23-2/+3
|/ | | | | | | | This task was taking a huge amount of memory, even when fetching the InfoRequest objects with find_each. With an additional find_each for public bodies (10 at a time) and reducing the batch size for info requests to 200 at a time, the memory size of this rake task is kept down to about 400MB.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-1/+38
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile app/views/admin_request/edit_outgoing.html.erb config/packages doc/CHANGES.md doc/INSTALL.md spec/models/info_request_spec.rb spec/models/public_body_spec.rb
| * Hide hidden outgoing messages in download.Louise Crow2013-09-16-0/+4
| |
| * Move indexed_by_search to MessageProminenceLouise Crow2013-09-16-0/+4
| | | | | | | | Add some tests that it's working on the outgoing message model.
| * Add hidden messages for outgoing message.Louise Crow2013-09-16-2/+2
| | | | | | | | | | | | Conflicts: app/views/request/_incoming_correspondence.html.erb
| * Create MessageProminence module.Louise Crow2013-09-16-0/+18
| | | | | | | | | | | | At least some of the logic for incoming and outgoing message prominence is going to be identical, so move it to a module they can both include and use.
| * Refactor common logic about prominence and access.Louise Crow2013-09-16-1/+12
| | | | | | | | Move it into the Ability module.
* | Add simple task for updating theme translations.Louise Crow2013-09-12-0/+26
| |
* | Remove unused task.Louise Crow2013-09-12-22/+0
| |
* | Merge branch 'public-body-locale-fallback' into rails-3-developLouise Crow2013-09-12-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/public_body_controller.rb config/general.yml-example lib/configuration.rb
| * | Make falling back to default locale in public body listings optionalMark Longair2013-09-10-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the code stood, the list method in PublicBodyController would only return results that had translations of the public body in the default locale. This has a variety of problems if you're viewing pages in the non-default locale - for example, the "first letter" links wouldn't bring up the public bodies that began with that letter in the current locale, only those that began with it in the default locale. Ideally, every public body would be translated into every available locale for the site, but there are cases where deployers wish to have public body listings also include those from the default locale, in case there are untralsated public bodies: https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ This commit makes the default behaviour to look for public body listings only in the current locale, but if the new configuration option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public body listings will be looked for in both the current locale and the default locale. Fixes #1000
* | | Don't save a public body version when updating the stats.Louise Crow2013-09-05-1/+3
| | |
* | | Don't re-index body when updating statsLouise Crow2013-09-05-0/+1
| | |
* | | Add a verbosity flag to public body stats taskLouise Crow2013-09-05-1/+3
| | |
* | | Merge branch 'hotfix/0.13.0.2' into rails-3-developLouise Crow2013-09-04-1/+1
|\ \ \
| * | | Add a timeout to document conversion with wvtext - it can hang.0.13.0.2hotfix/0.13.0.2Louise Crow2013-09-04-1/+1
| | | |
* | | | Merge branch 'hotfix/0.13.0.1' into rails-3-developLouise Crow2013-09-04-1/+1
|\| | |
| * | | Fix wrong method name.hotfix/0.13.0.1Louise Crow2013-08-28-1/+1
| |/ /
* | | Merge remote-tracking branch 'origin/remove-old-i18n-patches' into ↵Louise Crow2013-09-04-105/+0
|\ \ \ | | | | | | | | | | | | rails-3-develop
| * | | Remove apparently unneeded I18n customizationMark Longair2013-08-28-105/+0
| |/ / | | | | | | | | | | | | | | | The tests still pass with this code removed, so remove it - if it's still needed, it should be readded with tests that would fail without.
* | | Merge branch 'body-statistics' into rails-3-developLouise Crow2013-09-04-0/+54
|\ \ \ | |/ / |/| |
| * | Add a config option to enable the public body statistics pageMark Longair2013-08-20-0/+1
| | |
| * | Improve calculation of PublicBody statistics columnsMark Longair2013-08-20-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PublicBody, we don't need to update info_requests_count because that's already done with :counter_cache. On the other hand, info_requests_successful_count and info_requests_not_held_count can't be updated easily with counter_cache (since they need conditions to be attached). Instead we update them in post_save and post_destroy, as suggested here: http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions This also adds tests to ensure that the after_(save|destroy) callbacks are called and that they modify the counts correctly.
| * | Make the minimum requests for statistics configurableMark Longair2013-08-20-0/+1
| | | | | | | | | | | | This adds the MINIMUM_REQUESTS_FOR_STATISTICS config option.
| * | Add a page with experimental statistics on public bodiesMark Longair2013-08-20-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statistics on the status of the requests to a particular public body are too slow to calculate on-the-fly, so this commit adds: * Extra columns on public_bodies to store counts of the successful, not held, and overdue request counts for each public body. * A rake task which should be run periodically to update the overdue request count column. If Javascript is not available, the summary statistics are shown as tables. If Javascript is available, graphs are drawn with Flot.
* | | Mark all events for the fixed requests as needing a reindex.release/0.13Louise Crow2013-08-20-9/+16
|/ /
* | Merge branch 'feature/further-request-event-fixes' into rails-3-developLouise Crow2013-08-15-0/+30
|\ \
| * | Add task for cleaning up bad request histories.Louise Crow2013-08-15-0/+30
| |/
* | Only check commonlib, don't try to split the response into segments (as @mhl ↵Louise Crow2013-08-08-7/+8
| | | | | | | | points out, the case where the initial character is a space is somewhat confusing), just grab the first character of the whole string and check it against expected values.
* | Call it an error, not a warning.Louise Crow2013-07-30-4/+4
| |
* | Get first character in a way that will work in Ruby 1.8 and 1.9Louise Crow2013-07-30-1/+1
| |
* | Add a rake task to print a warning if the state of a submodule is not what ↵Louise Crow2013-07-30-0/+27
|/ | | | we expect it to be.
* Merge branch 'feature/localisation-fixes' into rails-3-developLouise Crow2013-07-29-7/+39
|\
| * Move some more config into AlaveteliLocalization so that it can be called ↵Louise Crow2013-07-24-0/+8
| | | | | | | | outside initialization e.g. in tests.