Permalink
Commits on Mar 4, 2016
  1. v1.13.0

    derekprior committed Mar 4, 2016
  2. Remove Rails 5 from allowed failures

    derekprior committed Mar 4, 2016
  3. Use available betas for Rails 5 testing

    derekprior committed Mar 4, 2016
    We no longer need to point at master.
Commits on Feb 26, 2016
  1. Always use inline adapter in feature specs

    derekprior committed Feb 26, 2016
    Rails 5 defaults the ActiveJob adapter to `async` which makes it
    difficult to test the password reset feature in a manner that supports
    Rails 4.2 and 5.0 (and older versions as well, of course).
    
    The simplest fix, for now, is to use the inline adapter in our tests so
    we can observe the side effects we care about.
  2. Use latest Capybara for Rack 2 support

    derekprior committed Feb 26, 2016
    Rails 5 uses Rack 2, which required an upgrade to Capybara. The upgrade
    addresses this error in tests:
    
    > undefined method `normalize_params' for Rack::Utils:Module
  3. Use versioned migrations when possible

    derekprior committed Feb 26, 2016
    Rails 5 deprecates inheriting directly from `ActiveRecord::Migration` in
    favor of inheriting from `ActiveRecord::Migration[5.0]` where `5.0` is
    the `major.minor` version of Rails that the migration was originally
    written to support.
    
    If we detect we are using a version of rails that supports this
    nomenclature then we pass the current `major.minor` version to use.
  4. Test against Rails 5 master

    derekprior committed Feb 26, 2016
    Master includes a fix for rails/rails#23645,
    which is not yet included in a beta release.
    
    When updating to master, I also had to explicitly set the ActiveJob
    queue adapter to `inline` in tests, as it now defaults to `async`.
    
    With these changes, the non-acceptance test suite is now green and has
    no deprecations. Next up - the acceptance tests.
Commits on Feb 12, 2016
  1. Use proper param name for overridden user model

    jeffreyguenther committed with derekprior Feb 12, 2016
    The users controller was hard-coded to grab parameters from
    `params[:user]`, but if you have changed your user model the key will be
    something other than `:user`. We now get this key from configuration,
    which derives it from the model name.
  2. Eliminate HTTP method deprecations from tests

    derekprior committed Feb 12, 2016
    Rails 5 deprecates calling HTTP action methods with positional arguments
    in favor of keyword arguments. However, the keyword argument form is
    only supported in Rails 5+. Since we support back to 3.1, we need some
    sort of shim to avoid super noisy deprecations when running tests.
    
    I tried to shim this the other way - update tests to the new format, and
    shim older versions of rails, but that causes failures in older versions
    of Rails. Meanwhile, shimming in this direction actually fixed failures
    I was seeing on Rails 5. It appears the Rails 5 code for rewriting
    positional arguments to keyword arguments is broken. See: rails/rails#23643
  3. Handle deprecation of `render text:` in Rails 5

    derekprior committed Feb 12, 2016
    In most cases we can render nothing and be just fine. In order for us to
    continue supporting Rails back to 3.1, we can't `render html:` or
    `render plain:` as the Rails 5 deprecation encourages because those
    older versions do not support that.
  4. Use `data_source_exists?` if available

    derekprior committed Jan 11, 2016
    Rails 5.0 deprecates the previous use of `table_exists?`, which checked
    both tables and views, in favor of `data_source_exists?`.
  5. Use `before_action` where it is supported

    derekprior committed Jan 11, 2016
    Rails 5 logs deprecation warnings when using `before_filter`. We knew
    this day was coming. Unfortunately, we still support rails 3, so we need
    to handle the case where `before_action` doe not exist.
  6. Allow testing `assigns` under Rails 5

    derekprior committed Jan 11, 2016
    Testing assigned instance variables is deprecated in Rails 5. This is
    the quickest way to remove the deprecation from our test suite, but we
    should also investigate whether we can test effectively without it.
  7. Include explicit install instructions

    estelleccl committed with derekprior Feb 12, 2016
    This is helpful to newcomers to Rails.
Commits on Feb 3, 2016
  1. Remove use of `hide_action`

    derekprior committed Jan 11, 2016
    We were previously relying on `hide_action` to hide clearance helpers,
    which are public in their own modules, from appearing as routable
    actions in the controllers they are mixed into.
    
    `hide_action` has been removed from Rails. We can use `private` instead.
Commits on Jan 18, 2016
  1. Don't rely on RSpec monkey patching for feature method

    mikeastock committed Jan 18, 2016
    The default spec_helper's suggested config sets `disable_monkey_patching!`.
    This causes specs generated by Clearance to fail out of the box. This change
    should be backwards compatible with older versions of RSpec as well.
    
    [This](rspec/rspec-core#1647) PR added the
    `disable_monkey_patching!` config as a suggested default.
Commits on Jan 11, 2016
  1. Add middleware at the bottom

    GCorbel committed with derekprior Jan 11, 2016
    Rails 5 eliminates the `ParamsParser` middleware. The Clearance
    middleware itself seems to have no dependency on certain middleware
    running after it.
  2. Prevent `skip_before_filter` errors in Rails 5

    j-dexx committed with derekprior Jan 11, 2016
    Rails 5 will error if `skip_before_filter` is called with a filter name
    that has not yet been added. We can't always control if the `authorize`
    filter is in the inheritance chain, but we always want to be sure if it
    is, we skip it.
    
    Adding `raise: false` allows us to opt out of the new behavior without
    impacting older versions of rails.
Commits on Jan 8, 2016
  1. Fix compare link

    derekprior committed Jan 8, 2016
  2. v1.12.1

    derekprior committed Jan 8, 2016
Commits on Jan 7, 2016
  1. Start testing against Rails 5 beta 1

    derekprior committed Jan 6, 2016
    We know it's going to fail, but I'd like to have Travis start running it
    for us so we can monitor progress as we make changes.
    
    This also changes the Travis build so it does not use appraisal
    directly, but rather uses the gemfiles appraisal generates in the Travis
    matrix. This will make it clear what builds are in error.
  2. Make create_users migration Rails 3.2 compatible

    derekprior committed Jan 7, 2016
    This reverts commit d080a5b. The
    `index` method was introduced to `ActiveRecord::TableDefinition` in
    Rails 4.0, but Clearance 1.x supports back to 3.2.
    
    This should have been a test failure, but it seems our tests are not
    executing in the environment we think they are. I'm working through that
    issue in some changes to the test suite in PR #623.
Commits on Jan 6, 2016
  1. Test against Ruby 2.3

    derekprior committed Jan 6, 2016
Commits on Dec 11, 2015
  1. Make generated code follow the current style guide

    teoljungberg committed Dec 11, 2015
    Since these migrations are generated, we want them to follow the current
    style guide. So when opening a PR, there will be no violations reported
    from [Hound].
    
    [Hound]: https://houndci.com
Commits on Nov 24, 2015
Commits on Nov 18, 2015
  1. v1.12.0

    derekprior committed Nov 18, 2015
  2. Ignore the railsrc if present

    imtayadeway committed with derekprior Nov 18, 2015
    A railsrc may make unwanted configurations when generating the test app,
    so this change adds the `--no-rc` flag which will ignore it.
  3. Add flash message when require_login denies access

    rodrigodealer committed with derekprior Oct 17, 2015
    This message is displayed when a non-authenticated user is accessing a
    resource that needs an authenticated user.
  4. Update .travis.yml

    pisaacs committed with derekprior Nov 8, 2015
Commits on Nov 13, 2015
  1. Fix mailer delivery expectation

    imtayadeway committed Nov 13, 2015
    3ca7a6b introduced a change in
    `visitor_resets_password_spec.rb.tt` to break up the expectation on the
    email's body into an `html_part` and `text_part`. The block that finds
    the email however was only considering the match to the `text_part`
    because it was not chained to the other conditions, so the subject and
    html part were effectively ignored.
    
    This commit chains all the conditions together to ensure they are
    finding the right thing.
Commits on Nov 6, 2015
  1. Correct indentation for existing user class

    derekprior committed Nov 6, 2015
    When injecting the `Clearance::User` include in a previously existing
    `User` class, the indentation was incorrect.
Commits on Nov 5, 2015
  1. Clean up indentation of generated routes

    derekprior committed Nov 5, 2015
    The `route` generator action provided by rails assumes a single line
    route injection. The first line is automatically indented, but the
    following lines are not.
    
    I thought about injecting the routes one line at a time, but that
    results in weird output from the generator because we format some long
    lines in the routes to avoid going over 80 characters.
    
    I decided to override the `route` action provided by default rails
    generators to do exactly what we need. This also has the benefit of
    cleaning up the output of the generator as well.
Commits on Oct 28, 2015
  1. Fixed typo in comment

    RyanNielson committed Oct 28, 2015
    Changed `request.env[:clearane]` to `request.env[:clearance]`