aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks
Commit message (Collapse)AuthorAgeLines
* Merge branch 'switch-theme-script' into rails-3-developMark Longair2013-10-30-1/+1
|\ | | | | | | | | Conflicts: config/initializers/alaveteli.rb
| * Make theme URL to theme name mapping consistentMark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / 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.
* Add simple task for updating theme translations.Louise Crow2013-09-12-0/+26
|
* Remove unused task.Louise Crow2013-09-12-22/+0
|
* 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.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 branch 'body-statistics' into rails-3-developLouise Crow2013-09-04-0/+21
|\ \ | |/ |/|
| * 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.
| * Add a page with experimental statistics on public bodiesMark Longair2013-08-20-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a rake task to re-extract any missing attachmentsMark Longair2013-06-12-0/+22
| | | | | | | | | | | | | | You can see the number of emails that would be reparsed by doing: bundle exec rake temp:reextract_missing_attachments To actually reparse the incoming emails and rextract attachments for any that were missing, you would do: bundle exec rake temp:reextract_missing_attachments[commit] (In fact, the 'commit' can be any non-empty string.)
* Merge branch 'hotfix/0.11.0.7' into rails-3-developLouise Crow2013-06-10-39/+69
|\ | | | | | | | | Conflicts: spec/models/info_request_spec.rb
| * Add extra debug linehotfix/0.11.0.7Louise Crow2013-06-10-0/+1
| |
| * Fix syntax errors, add some debug output.Louise Crow2013-06-10-8/+22
| |
| * Add a task for cleaning up user accounts that were created with a space in ↵Louise Crow2013-06-10-0/+65
| | | | | | | | the email address.
| * Remove old temp tasks.Louise Crow2013-06-10-50/+0
| |
* | Merge remote-tracking branch 'origin/themes-install-refactor' into ↵Louise Crow2013-06-05-5/+7
|\ \ | | | | | | | | | rails-3-develop
| * | themes:install: minor refactoring of checking out a refMark Longair2013-05-24-5/+7
| | |
* | | Merge remote-tracking branch ↵Louise Crow2013-06-04-7/+5
|\ \ \ | |_|/ |/| | | | | 'openaustralia_github/inline_search_method_refactor' into rails-3-develop
| * | Inline method InfoRequest.full_searchMatthew Landauer2013-03-25-7/+5
| | |
* | | Add rake tasks for checking the parsing of a random sample of emailsMark Longair2013-05-16-0/+150
| |/ |/| | | | | | | | | | | | | | | | | | | | | For the upgrade from Rails 2 to Rails 3, we want to check that existing emails are parsed correctly. One of these tasks (temp:random_attachments_hexdigests) is for dumping a CVS file of details about each attachment, and its hexdigest, and a list of the randomly selected raw emails. (It's intended that you run this on an old Rails 2 install of Alaveteli. The other task (temp:recompute_attachments_hexdigests) is intended to be run on a Rails 3 install of Alaveteli, with the previous files as input, to check that the same results are obtained.
* | No need to explicitly load the rake tasks in Rails 3.Louise Crow2013-05-07-4/+0
|/
* Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-6/+6
|
* create_ is deprecatedHenare Degan2013-02-25-22/+22
|
* Merge branch 'develop' into rails-3-spikeHenare Degan2013-02-15-3/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/general_controller.rb app/controllers/track_controller.rb app/models/outgoing_message.rb app/models/public_body.rb app/models/user.rb app/views/general/frontpage.rhtml config/environment.rb config/initializers/inflections.rb config/initializers/mime_types.rb db/migrate/094_remove_old_tags_foreign_key.rb lib/timezone_fixes.rb spec/models/request_mailer_spec.rb spec/views/request/list.rhtml_spec.rb
| * Simple task for converting .po files to a standard msgmerge format.Louise Crow2013-02-08-3/+12
| |
| * Merge remote-tracking branch ↵Louise Crow2013-02-01-1/+1
| |\ | | | | | | | | | 'openaustralia_github/backport_rails_3_mailer_fix' into develop
| | * Rename mailer method to avoid naming conflict in Rails 3Matthew Landauer2013-01-25-1/+1
| | |
| * | Calling TMail::Mail#base64_decode does not modify the mail object so doesn't ↵Matthew Landauer2013-01-28-2/+2
| |/ | | | | | | do anything as used here
| * If we're not going to run the commonlib tests (and I think that's correct - ↵Louise Crow2012-12-18-2/+0
| | | | | | | | they belong in commonlib and should only be run when commonlib is changed), then don't load them. Allows us not to include the rspec gem in production.
| * Include Rake::DSL module manually to avoid deprecation warnings as perLouise Crow2012-12-18-0/+3
| | | | | | | | https://github.com/dchelimsky/rspec-rails/commit/be52a9841dde0292c7bc7ecfe39e7214b4db1cab
* | Calling TMail::Mail#base64_decode does not modify the mail object so doesn't ↵Matthew Landauer2013-01-28-2/+2
| | | | | | | | do anything as used here
* | Rename mailer method to avoid naming conflict in Rails 3Matthew Landauer2013-01-25-1/+1
| |
* | RSpec Rake tasks now live in the gemHenare Degan2012-12-11-147/+0
| |
* | Run the Rails 3 generatorHenare Degan2012-12-11-0/+0
|/
* Use mail handler in translation task.Louise Crow2012-11-15-2/+2
|