Permalink
Commits on Oct 18, 2016
  1. Merge pull request #548 from alphagov/add-gathering-support-page

    Add gathering support page
    alanth committed on GitHub Oct 18, 2016
Commits on Oct 17, 2016
  1. Reload site instance before performing a job

    We reload the site instance on every request so we should reload the
    site model on every job execution to make sure that the site settings
    are consistent between the webservers and the workers.
    pixeltrix committed Oct 17, 2016
Commits on Oct 16, 2016
  1. Add gathering support page for a petition

    Some people were navigating to a petition page before it had gathered
    enough sponsors for moderation and getting confused because we did not
    discern between the two states and presented the same page for both
    that said 5 people had supported the petition. To clarify this this
    commit adds a 'Gathering Support' page for the situation where a
    petition has yet to receive 5 signatures from sponsors.
    
    https://www.pivotaltracker.com/story/show/120107273
    pixeltrix committed Oct 16, 2016
  2. Remove tests that are not realistic

    The tests for a petition having the maximum number of sponsors and
    being in the validated or pending states don't reflect realistic
    situations that a petition can be in - they would require the database
    to have partially applied transactions and not rolled back when it
    received an error.
    pixeltrix committed Oct 16, 2016
  3. Ensure that signature count is consistent

    Manually building signatures can leave the petition in an inconsistent
    state so call update_signature_count! to ensure count is correct.
    pixeltrix committed Oct 16, 2016
  4. Update jasmine-rails to version 0.14.1

    Version 0.12.2 exhibited the problem described here:
    searls/jasmine-rails#191
    pixeltrix committed Oct 16, 2016
  5. Update phantomjs to 2.1.1

    Version 1.9.x of phantomjs is no longer supported and crashes
    on macOS Sierra: ariya/phantomjs#14558
    pixeltrix committed Oct 16, 2016
  6. Run specs on Ruby 2.2.5

    Match CI version to server version
    pixeltrix committed Oct 16, 2016
Commits on Oct 11, 2016
  1. Merge pull request #546 from alphagov/tidy-admin

    Tidy up administration area
    alanth committed on GitHub Oct 11, 2016
Commits on Oct 7, 2016
  1. Make link appear as a button for consistency

    pixeltrix committed Oct 7, 2016
  2. Add logout warning functionality

    So that a moderator isn't surprised when their session times out on
    the server add a two minute warning with the option to continue for
    another thirty minutes.
    pixeltrix committed Oct 7, 2016
  3. Protect against logging out stale sessions

    If logout gets called on a stale session then the record is
    present at stale_record and not at record.
    pixeltrix committed Oct 7, 2016
  4. Login inside do_patch method

    Because the auto logout gets confused by all the time travel.
    pixeltrix committed Oct 7, 2016
  5. Destroy stale sessions

    Since the login timeout is now configurable we should logout any stale
    sessions so that they don't become fresh again should the login timeout
    be increased at any point.
    pixeltrix committed Oct 7, 2016
Commits on Oct 6, 2016
Commits on Oct 5, 2016
  1. Reset persistence token on login/logout

    To minimise the possibility of an admin user credentials cookie being
    replayed after a MITM SSL attack reset them on login/logout.
    pixeltrix committed Oct 5, 2016
  2. Move admin flash messages to locale file

    To streamline the translation of the I18n keys override redirect_to so
    that symbol keys are translated. If substitution is required then pass
    an array with the last element being the substitution hash.
    
    Also override render so that we can use :alert and :notice in a similar
    fashion to how redirect_to uses them with the exception that they go
    into flash.now and not the standard flash.
    
    As part of this some logic around admin users was pushed down into the
    model instead of the controller so that we can use model based I18n.
    pixeltrix committed Aug 9, 2016
Commits on Oct 3, 2016
  1. Refactor before action filters to be more granular

    Having a single monolithic before action that does everthing makes it
    harder to skip the right functionality when editing your profile or
    signing in so by splitting it up into two parts we can only override
    the parts we need to.
    pixeltrix committed Aug 8, 2016
  2. Switch from flash[:error] to flash[:alert]

    Using flash[:alert] is more in line with 'The Rails Way' in that you
    can pass it to redirect and it will automatically be assigned.
    pixeltrix committed Aug 8, 2016
  3. Remove flash[:error] block from public messages template

    The app doesn't generate flash[:error] messages for public consumption
    so there's no need to have this code in the messages template.
    pixeltrix committed Aug 8, 2016
  4. Remove unused method

    pixeltrix committed Aug 8, 2016
  5. Use AS::Concern style

    Migrate to using the ActiveSupport::Concern style so that we can use
    an included block to define our helper methods instead of using send.
    pixeltrix committed Aug 8, 2016
  6. Don't expose controller-only methods to views

    Only methods that are likely to be used in views should be exposed as
    helper methods - before action methods and redirects will never be used.
    pixeltrix committed Aug 8, 2016
  7. Remove helper method declaration

    The method `require_account` does not exist so there's no need
    for it to be declared a helper method.
    pixeltrix committed Aug 8, 2016
Commits on Sep 29, 2016
  1. Merge pull request #536 from alphagov/fix-edge-cases-in-closing-petit…

    …ions
    
    Fix edge cases when closing petitions
    alanth committed on GitHub Sep 29, 2016
  2. Merge pull request #540 from alphagov/drop-email-sent-receipts

    Drop email_sent_receipts table
    alanth committed on GitHub Sep 29, 2016
  3. Merge pull request #544 from alphagov/fix-encoding-exceptions

    Fix encoding exceptions
    alanth committed on GitHub Sep 29, 2016
  4. Merge pull request #545 from alphagov/increase-size-of-response

    Increase allowed size of government responses
    alanth committed on GitHub Sep 29, 2016