aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Fix a small error in stats-graphs-improvementsMark Longair2013-11-03-2/+2
|
* Update the helpful model schema annotationsMark Longair2013-11-01-57/+66
| | | | These are regenerated with "bundle exec annotate"
* Merge branch 'stats-graphs-improvements' into rails-3-developMark Longair2013-10-31-14/+14
|\
| * Avoid an error when the statistics column hasn't been populatedMark Longair2013-10-31-14/+14
| | | | | | | | | | | | | | | | The 'if data' needs to be earlier to avoid an error if one of the statistics columns hasn't been filled in by the stats:update_public_bodies_stats rake task yet. Thanks to Louise Crow for pointing this out in code review.
* | More general ignoring of config files.Louise Crow2013-10-31-0/+1
| |
* | Merge remote-tracking branch 'origin/rails-3-develop' into rails-3-developLouise Crow2013-10-30-3/+151
|\ \
| * \ Merge branch 'switch-theme-script' into rails-3-developMark Longair2013-10-30-3/+151
| |\ \ | | | | | | | | | | | | | | | | Conflicts: config/initializers/alaveteli.rb
| | * | Add a script to help switch theme for local developmentMark Longair2013-10-30-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working locally, it's useful to be able to switch between themes quickly, which essentially involves: - Updating the general.yml symlink to point to a theme-specific one - Updating the public/alavetelitheme symlink - Making sure that the theme exists as vendor/plugins/<theme-name> This script lets you switch between themes kept in a directory which is by default called 'alaveteli-themes' at the same level as your Alaveteli git repository, or can be overriden by the environment variable ALAVETELI_THEMES_DIR.
| | * | Make theme URL to theme name mapping consistentMark Longair2013-10-15-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/stats-graphs-improvements' into ↵Louise Crow2013-10-30-105/+3711
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| rails-3-develop
| * | Add (and use) minified versions of the Flot JavascriptMark Longair2013-10-15-1/+5
| | |
| * | Work around a bug in yui-compressorMark Longair2013-10-15-3/+3
| | | | | | | | | | | | | | | | | | jquery.flot.axislabels.js fails to minify with yui-compressor due to a bug in it relating to delete being a keyword - we can work around this by using the ['delete'] syntax instead.
| * | Add a tooltip to each bar of the public body stats graphsMark Longair2013-10-15-1/+35
| | | | | | | | | | | | | | | Since the rotated public body names on the x-axis may be difficult to read, it's helpful to have them in a tooltip as well.
| * | Refactor to avoid repeating .each_with_index.mapMark Longair2013-10-15-4/+9
| | |
| * | Increase the number of public bodies per graph to 10Mark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | Now that there are rotated names on the x axis we shouldn't need to worry about them overlapping, which was the reason for limiting the number to 8 in the first place.
| * | Make bars in public body statistics charts clickableMark Longair2013-10-15-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now if you click on the bar representing statistics for a particular public body, it will take you to that public body's page. In addition, the bars are highlighted when you hover over them.
| * | Only include minimal information about public bodies in JSONMark Longair2013-10-15-1/+6
| | | | | | | | | | | | | | | | | | | | | Previously, the JSON included all the columns from the public body table, which was unnecessary and included the public body's email address. Instead, just include the name and URL of the public body.
| * | Rotate labels on the x-axis by 90 degreesMark Longair2013-10-15-2/+208
| | | | | | | | | | | | | | | | | | This commit adds the tickrotor extension to Flot, which allows rotated labels for public bodies. This extension is licensed under either MPL 1.1, GPL 2.0 or LGPL 2.1.
| * | Update flot to a development versionMark Longair2013-10-15-93/+3432
| |/ | | | | | | | | | | This updates flot to version 0c2f6e3, which should be shortly before the release of 0.8.2. This is required for the tickrotor extension (allowing rotated public body names on the x-axis).
* | Merge remote-tracking branch 'origin/command-line-csv-import' into ↵Louise Crow2013-10-30-0/+80
|\ \ | | | | | | | | | 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/+88
| |/ | | | | | | | | | | | | | | 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-1/+58
|\ \
| * | Monkey patch actionmailer for CVE-2013-43890.14.0.3hotfix/0.14.0.3Louise Crow2013-10-24-0/+16
| | | | | | | | | | | | http://seclists.org/oss-sec/2013/q4/118
| * | Add factory to support new specs.0.14.0.2hotfix/0.14.0.2Louise Crow2013-10-03-0/+7
| | |
| * | Don't allow redirects to another host.Louise Crow2013-10-02-1/+35
| | |
| * | Handle salutations with regexp special characters.0.14.0.1Louise Crow2013-09-30-1/+11
| | | | | | | | | | | | Fixes #1104.
| * | Merge branch 'release/0.14'0.14Louise Crow2013-09-24-11558/+8513
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: locale/bg/app.po locale/fr/app.po locale/fr_CA/app.po locale/he_IL/app.po locale/hr/app.po locale/it/app.po locale/nb_NO/app.po locale/pl/app.po locale/sv/app.po locale/vi/app.po
| * | | Latest translations from Transifex0.13.0.4hotfix/0.13.0.4Louise Crow2013-09-19-2046/+8923
| | | |
* | | | 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/fix-1143-utf-import-unidecode' into rails-3-developLouise Crow2013-10-22-14/+19
|\ \ \ \
| * | | | Switch to unidecoder gemLouise Crow2013-10-21-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | More maintained version has bugfixes for issue described in #1143. Closes #1143.
| * | | | Add data to test example given in #1143Louise Crow2013-10-21-11/+16
|/ / / / | | | | | | | | | | | | This causes several specs to fail.
* | | | Merge remote-tracking branch 'openaustralia_github/upgrade_new_relic_gem' ↵Louise Crow2013-10-21-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | into rails-3-develop
| * | | Upgrade new relic gem to get new tracing featuresMatthew Landauer2013-10-17-1/+1
|/ / /
* | | Merge remote-tracking branch 'origin/fix-aborted-transaction' into ↵Louise Crow2013-10-07-20/+35
|\ \ \ | | | | | | | | | | | | rails-3-develop
| * | | Fix for an aborted transaction not being rolled-backMark Longair2013-10-07-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were seeing errors in xapian_create_job that indicated that the current transaction had been aborted but not rolled-back. It seems that this happened because sometimes xapian_create_job was called from within another transaction (e.g. from the transaction block in AdminIncomingMessageController#redeliver). The default behaviour of nested transactions in Rails is for them to behave as if all but the outermost transaction blocks had no effect; this means that the exception thrown in the inner transaction block in xapian_create_job wasn't causing a rollback, and it was then being caught before propagating up to the outermost transaction. Thus the transaction was never being rolled-back so any subsequent operation on this database connection would error. This commit fixes this problem by using the :requires_new => true option to transaction, which asks ActiveRecord to fake genuinely nested transcations using SAVEPOINT. Fixes #1124.
| * | | Factor out a 'with_duplicate_xapian_job_creation' helperMark Longair2013-10-07-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a subsequent commit, we will want to wrap an additional section of code with the addition and removal of a hook that creates a duplicate xapian job, so it's useful for this to be factored out. This commit introduces a 'with_duplicate_xapian_job_creation' method that can be passed a block which will be run with the forced duplicate xapian job creation.
* | | | Merge branch 'feature/email-subject-cleanup' into rails-3-developLouise Crow2013-10-07-8/+12
|\ \ \ \
| * | | | Move special case to whatdotheyknow-themeLouise Crow2013-10-04-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Apart from anything else, we don't want translators to have to worry about the special case text. See https://github.com/mysociety/whatdotheyknow-theme/commit/2078febca5181ce3b1a9c0fae0123ae5f6448718 for the corresponding change to whatdotheyknow-theme.
* | | | | Merge branch 'feature/followup-translators-notes' into rails-3-developLouise Crow2013-10-07-2/+13
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add some translator's notes on the use of 'follow up'.Louise Crow2013-10-04-2/+13
| |/ / /
* | | | Merge remote-tracking branch 'origin/first-letter-unicode-fixes' into ↵Louise Crow2013-10-07-11/+60
|\ \ \ \ | |/ / / |/| | | | | | | rails-3-develop
| * | | Fix upcasing of a non-US-ASCII first letter under Ruby 1.8Mark Longair2013-10-04-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the rare circumstance that someone created a public body whose name started with a lower case letter outside [a-z] with Alaveteli running under Ruby 1.8, the letter would not be upcased correctly before saving to the first_letter column. This commit fixes that by using a Unicode-aware upcase function.
| * | | Allow public body listing based on first letter outside US-ASCIIMark Longair2013-10-04-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Ruby 1.8, it was previously impossible to use one of the "first letter" alphabet links on the public body listing page if the first letter was outside [A-Za-z] since the test for the parameter only being a single letter wasn't aware of the possibly of multi-byte characters. In addition, upcasing of letters outside [A-Za-z] didn't work because String#upcase in Ruby 1.8 isn't Unicode-aware. This commit fixes these two problems, so that non-US-ASCII first letter links will work under Ruby 1.8. (Fixes #1112.)
| * | | Add to fixtures a public body with an accented initial letterMark Longair2013-10-04-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a public body called "Åčçèñtéd Authority" in the Czech locale (cs) so that we can create tests that exercise, for example, searching based on an initial letter that has a multi-byte representation in UTF-8. An old test for "add mass tags" in the admin needed to be updated since it implicitly assumed that all the public bodies in the fixtures had translations in the :en locale. The tests for loading CSV files of public bodies also needed to be updated, since they were assuming that public body names only contained letters in [A-Za-z ]. Since Unicode character classes aren't easily available in Ruby 1.8 and it makes little difference to the test, the character class is replaced by '.'.
* | | | Merge remote-tracking branch 'origin/radio-button-fix' into rails-3-developLouise Crow2013-10-04-1/+1
|\ \ \ \
| * | | | Fix a radio button label when updating a request statusMark Longair2013-10-01-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clicking on the "This request requires administrator attention" label would actually select the "I've received an error message" option due to the label referring to the wrong input element. This change corrects the label. Thanks to Jedidiah Broadbent for spotting this bug. Fixes #1113
* | | | | Merge branch 'feature/fix-for-issue-1120' into rails-3-developLouise Crow2013-10-04-3/+0
|\ \ \ \ \ | |_|/ / / |/| | | |