| Commit message (Collapse) | Author | Age | Lines |
|\
| |
| |
| |
| | |
Conflicts:
config/initializers/alaveteli.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | | |
rails-3-develop
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
Thanks to Louise Crow for pointing out this problem.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
|/
|
|
| |
we expect it to be.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|\
| |
| |
| |
| | |
Conflicts:
spec/models/info_request_spec.rb
|
| | |
|
| | |
|
| |
| |
| |
| | |
the email address.
|
| | |
|
|\ \
| | |
| | |
| | | |
rails-3-develop
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | | |
'openaustralia_github/inline_search_method_refactor' into rails-3-develop
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |\
| | |
| | |
| | | |
'openaustralia_github/backport_rails_3_mailer_fix' into develop
|
| | | |
|
| |/
| |
| |
| | |
do anything as used here
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
https://github.com/dchelimsky/rspec-rails/commit/be52a9841dde0292c7bc7ecfe39e7214b4db1cab
|
| |
| |
| |
| | |
do anything as used here
|
| | |
|
| | |
|
|/ |
|
| |
|