-
Notifications
You must be signed in to change notification settings - Fork 77
Comparing changes
Open a pull request
base repository: alphagov/e-petitions
base: 1.0.30
head repository: alphagov/e-petitions
compare: master
Commits on Feb 2, 2016
-
The changes in rspec-rails 3.4.1 to fix the problems with Rails 4.2.5.1 introduced a performance regression due to template lookup not being cached. Timing tests show that it doesn't really affect our controller specs (probably due to the large amounts of factories created) but it's a minimal change so worth having.
Configuration menu - View commit details
-
Copy full SHA for 36bfadc - Browse repository at this point
Copy the full SHA 36bfadcView commit details
Commits on Feb 12, 2016
-
Use Ruby instead of SQL to migrate data
During testing on preview the migration took approximately 40 minutes to run during which time no inserts would be possible. Iterating over all of the rows in Ruby and updating them one by one is much slower but doesn't lock the whole table. Tests on a MacBook Pro showed the migration to take about 4-5 hours but can be left running in the background whilst petitions are still being signed.
Configuration menu - View commit details
-
Copy full SHA for fa3948a - Browse repository at this point
Copy the full SHA fa3948aView commit details
Commits on Feb 14, 2016
-
Merge pull request #438 from alphagov/migration-tasks
Use Ruby instead of SQL to migrate data
Configuration menu - View commit details
-
Copy full SHA for 8316246 - Browse repository at this point
Copy the full SHA 8316246View commit details -
Retry signature validation if the schema changes
When a schema change occurs on the signatures table the prepared statement cache for the lock becomes invalid and the PostgreSQL adapter will raise PG::InFailedSqlTransaction. Because the transaction is already invalid any attempt to deallocate the statement fails - see rails/rails#12330. Whilst any general approach that retries the transaction block after clearing the cache is not a workable solution it's one that can work in this instance. We only retry the once - if clearing the cache doesn't help then the cause of the transaction failure is somewhere else.
Configuration menu - View commit details
-
Copy full SHA for c0ed0e4 - Browse repository at this point
Copy the full SHA c0ed0e4View commit details
Commits on Feb 17, 2016
-
Don't load all petitions on the home page
The none? method on relations isn't optimised until Rails 5.0 so use the alternative method empty? which is optimised.
Configuration menu - View commit details
-
Copy full SHA for 13d6e32 - Browse repository at this point
Copy the full SHA 13d6e32View commit details -
Fix migrations task for country petition journals
A `TRUNCATE` followed by an `INSERT ... FROM` doesn't really work that well on a busy site like the petitions website because new journals will start to appear before the `INSERT` completes. Fix this by doing it in Ruby and locking the journals before calculating the signatures. To do this in a performant manner we need an index on the petition_id and location_code for the signatures table. We need to do this concurrently otherwise it will block writes to the table, preventing anyone from signing any petitions.
Configuration menu - View commit details
-
Copy full SHA for 53a8921 - Browse repository at this point
Copy the full SHA 53a8921View commit details -
Merge pull request #443 from alphagov/fix-journals-migration-task
Fix migrations task for country petition journals
Configuration menu - View commit details
-
Copy full SHA for 5f03442 - Browse repository at this point
Copy the full SHA 5f03442View commit details -
If there's no sitting MP hide the link
When the first MP in the API response has a non-empty `<EndDate>` element then either the MP has stepped down or passed away. In this scenario we should update the constituency record to clear the MP details and not show any link on the local search results page.
Configuration menu - View commit details
-
Copy full SHA for 11fc547 - Browse repository at this point
Copy the full SHA 11fc547View commit details
Commits on Feb 21, 2016
-
Merge pull request #432 from alphagov/update-rspec-rails-to-3-4-2
Update rspec-rails to 3.4.2
Configuration menu - View commit details
-
Copy full SHA for 41e7757 - Browse repository at this point
Copy the full SHA 41e7757View commit details -
Merge pull request #442 from alphagov/fix-petition-loading-on-home-page
Don't load all petitions on the home page
Configuration menu - View commit details
-
Copy full SHA for e7370b2 - Browse repository at this point
Copy the full SHA e7370b2View commit details -
Merge pull request #440 from alphagov/retry-validate-on-schema-change
Retry signature validation if the schema changes
Configuration menu - View commit details
-
Copy full SHA for c4dc5db - Browse repository at this point
Copy the full SHA c4dc5dbView commit details -
Merge pull request #444 from alphagov/fix-mp-passing-away
If there's no sitting MP hide the link
Configuration menu - View commit details
-
Copy full SHA for 261a33c - Browse repository at this point
Copy the full SHA 261a33cView commit details -
Promote feedback model to a full AR model for persistence
In #421 we moved email sending to custom jobs so that we could provide better error handling. However, the feedback email wasn't done since that was based on a custom Active Model model. To work around this change the model to an Active Record model so that it is persisted to the database and Active Job can serialize it via Global ID. This has the added benefit of storing the feedback should the email sent to the feedback address somehow get lost due to spam filtering, etc.
Configuration menu - View commit details
-
Copy full SHA for c666abb - Browse repository at this point
Copy the full SHA c666abbView commit details -
Revert "Update rspec-rails to 3.4.2"
This reverts commit 36bfadc. Upgrading rspec-core to 3.4.2 caused CodeDeploy to fail to find the gem during `bundle install` from vendor/cache in the AfterInstall phase.
Configuration menu - View commit details
-
Copy full SHA for 4573ced - Browse repository at this point
Copy the full SHA 4573cedView commit details -
Merge pull request #441 from alphagov/promote-feedback-to-ar-model
Promote feedback model to a full AR model for persistence
Configuration menu - View commit details
-
Copy full SHA for 63859fc - Browse repository at this point
Copy the full SHA 63859fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a57c7a - Browse repository at this point
Copy the full SHA 7a57c7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 175f1f2 - Browse repository at this point
Copy the full SHA 175f1f2View commit details -
Merge pull request #439 from alphagov/cleanup-country-columns-again
Cleanup country columns again
Configuration menu - View commit details
-
Copy full SHA for 46661c3 - Browse repository at this point
Copy the full SHA 46661c3View commit details
Commits on Feb 23, 2016
-
Configuration menu - View commit details
-
Copy full SHA for b0bfa90 - Browse repository at this point
Copy the full SHA b0bfa90View commit details -
Configuration menu - View commit details
-
Copy full SHA for d420d39 - Browse repository at this point
Copy the full SHA d420d39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75da6f4 - Browse repository at this point
Copy the full SHA 75da6f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09f6778 - Browse repository at this point
Copy the full SHA 09f6778View commit details -
Configuration menu - View commit details
-
Copy full SHA for abf0b5c - Browse repository at this point
Copy the full SHA abf0b5cView commit details -
Only use @javascript where necessary
The HTML that comes back from phantomjs isn't the HTML that was served so we can't check if it's valid XML.
Configuration menu - View commit details
-
Copy full SHA for 29fb82f - Browse repository at this point
Copy the full SHA 29fb82fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f0e6ef8 - Browse repository at this point
Copy the full SHA f0e6ef8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90e4528 - Browse repository at this point
Copy the full SHA 90e4528View commit details
Commits on Feb 24, 2016
-
Fix redirect to login for delayed-web gem
In 0bd5c2e the url helper used for authentication redirects was changed from admin_login_path to admin_login_url but as the delayed-web config was missed from that change it was generating a 500 error instead.
Configuration menu - View commit details
-
Copy full SHA for 6eebce5 - Browse repository at this point
Copy the full SHA 6eebce5View commit details
Commits on Feb 29, 2016
-
Update to Ruby on Rails 4.2.5.2
http://weblog.rubyonrails.org/2016/2/29/Rails-4-2-5-2-4-1-14-2-3-2-22-2-have-been-released/ CVE-2016-2097 Possible Information Leak Vulnerability in Action View https://groups.google.com/d/msg/rubyonrails-security/ddY6HgqB2z4/we0RasMZIAAJ CVE-2016-2098 Possible remote code execution vulnerability in Action Pack https://groups.google.com/d/msg/rubyonrails-security/ly-IH-fxr_Q/WLoOhcMZIAAJ
Configuration menu - View commit details
-
Copy full SHA for dbb533d - Browse repository at this point
Copy the full SHA dbb533dView commit details
Commits on Mar 1, 2016
-
Use HTML parser to validate document markup
As the status of polyglot markup is either deprecated or undefined it's better to use a HTML parser to validate the markup. The issue is that it seems that Nokogiri doesn't support any HTML5 tags so we need to filter out the errors created by those. Adding the tags to Nokogiri directly appears to be non-trivial.
Configuration menu - View commit details
-
Copy full SHA for 5cee223 - Browse repository at this point
Copy the full SHA 5cee223View commit details
Commits on Mar 2, 2016
-
Merge pull request #445 from alphagov/remove-be-valid-asset
Remove be_valid_asset gem
Configuration menu - View commit details
-
Copy full SHA for 10ea56b - Browse repository at this point
Copy the full SHA 10ea56bView commit details -
Merge pull request #446 from alphagov/fix-admin-login-redirect-in-dj-web
Fix redirect to login for delayed-web gem
Configuration menu - View commit details
-
Copy full SHA for 7074e7e - Browse repository at this point
Copy the full SHA 7074e7eView commit details -
Merge pull request #447 from alphagov/update-to-rails-4-2-5-2
Update to Ruby on Rails 4.2.5.2
Configuration menu - View commit details
-
Copy full SHA for 28681e1 - Browse repository at this point
Copy the full SHA 28681e1View commit details
Commits on Apr 11, 2016
-
Use round instead of floor to calculate number of days
If the time span covered the date when the clocks went forward then the number of days was off by one.
Configuration menu - View commit details
-
Copy full SHA for 4faaba1 - Browse repository at this point
Copy the full SHA 4faaba1View commit details -
Make session cookie last for two weeks to work around iOS bug
Mobile Safari has a tendency to use cached form values even when the cache control headers tell it otherwise. However the session cookie has expired so when the form is submitted the CSRF token is invalid. See rails/rails#21948 for further details. Fixes #451.
Configuration menu - View commit details
-
Copy full SHA for fe9db94 - Browse repository at this point
Copy the full SHA fe9db94View commit details
Commits on Apr 12, 2016
-
Merge pull request #453 from alphagov/fix-422-errors-on-ios
Fix 422 errors on iOS
Configuration menu - View commit details
-
Copy full SHA for a335379 - Browse repository at this point
Copy the full SHA a335379View commit details
Commits on Apr 13, 2016
-
Enable CSRF protection in test mode
The default is to disable CSRF protection in test mode but without it enabled we can't test what the session cookie expiry date is set to.
Configuration menu - View commit details
-
Copy full SHA for a5749c7 - Browse repository at this point
Copy the full SHA a5749c7View commit details -
There may be multiple Set-Cookie headers so we need to split them on the new line character and find the right one.
Configuration menu - View commit details
-
Copy full SHA for e4de47e - Browse repository at this point
Copy the full SHA e4de47eView commit details -
Add test for #453 session cookie expiry date change
This is somewhat akin to testing Rails functionality but it's here so that it doesn't get changed back again as it's not the Rails default.
Configuration menu - View commit details
-
Copy full SHA for 73af0d3 - Browse repository at this point
Copy the full SHA 73af0d3View commit details -
Merge pull request #454 from alphagov/really-fix-422-errors
Add tests for #453
Configuration menu - View commit details
-
Copy full SHA for e3696eb - Browse repository at this point
Copy the full SHA e3696ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for e07ce24 - Browse repository at this point
Copy the full SHA e07ce24View commit details
Commits on Apr 14, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 2cae76e - Browse repository at this point
Copy the full SHA 2cae76eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5094590 - Browse repository at this point
Copy the full SHA 5094590View commit details -
Response for `/records` resource from country register will be changed very soon. It will start returning new map based response specified in register specification (https://openregister.github.io/specification/#records-resource) rather than current array based response. Changes in the PR confirms that the e-petitions is forward compatible with the new-schema from country register. This will keep e-petitions code working for both new and old schema. It allow allows country register to publish new response independently. Same set of tests are added for the new schema and implemented the solution to support both schemas. The old-schema tests/code can be deleted after country register starts publishing the new-schema.
Configuration menu - View commit details
-
Copy full SHA for eff28f6 - Browse repository at this point
Copy the full SHA eff28f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8db8df9 - Browse repository at this point
Copy the full SHA 8db8df9View commit details
Commits on Apr 18, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 4700c6f - Browse repository at this point
Copy the full SHA 4700c6fView commit details
Commits on Apr 22, 2016
-
Merge pull request #457 from om-sharma/forward-compatible
Support new `/records` resource schema from country register
Configuration menu - View commit details
-
Copy full SHA for e868405 - Browse repository at this point
Copy the full SHA e868405View commit details -
Merge pull request #455 from om-sharma/document-user-creation
Documentation to create `epets` user to setup development environment
Configuration menu - View commit details
-
Copy full SHA for dd800e2 - Browse repository at this point
Copy the full SHA dd800e2View commit details -
Merge pull request #456 from leandroalemao/add_debate_date_to_awaitin…
…g_debate_petitions_view Add scheduled debate date to awaiting debate petitions view
Configuration menu - View commit details
-
Copy full SHA for 077ced0 - Browse repository at this point
Copy the full SHA 077ced0View commit details -
Change 'To be debated on' to 'Scheduled for debate on'
Sometimes things change at the last minute due to emergencies, etc. so clarify that the debate is scheduled and not a cast-iron guarantee that it will actually take place.
Configuration menu - View commit details
-
Copy full SHA for d3f69e6 - Browse repository at this point
Copy the full SHA d3f69e6View commit details -
Merge pull request #459 from alphagov/change-debate-wording
Change 'To be debated on' to 'Scheduled for debate on'
Configuration menu - View commit details
-
Copy full SHA for 5e0e785 - Browse repository at this point
Copy the full SHA 5e0e785View commit details
There are no files selected for viewing