Permalink
Switch branches/tags
Commits on Mar 29, 2017
  1. Merge pull request #44 from biow0lf/colorize-examples-in-readme-md

    rafaelfranca committed Mar 29, 2017
    Colorize examples in README.md [ci skip]
Commits on Jan 24, 2017
  1. 1.2.0 gem was actually released in 2017

    amatsuda committed Jan 24, 2017
    fixes #41
Commits on Jan 23, 2017
  1. Release v1.2.0

    pixeltrix committed Jan 23, 2017
Commits on Jan 4, 2017
  1. Add arel as a git source to Gemfile-edge

    pixeltrix committed Jan 4, 2017
    Active Record in Rails 5.1 will depend on the currently unreleased
    Arel 8.0 so we need to include it as a GitHub source entry.
  2. Break lambda arity test in to two parts

    pixeltrix committed Jan 4, 2017
    Looks like the test request object isn't being recycled properly and
    is leaking information from one request to the next about formats.
  3. Support proc options with zero args

    pixeltrix committed Jan 4, 2017
    Fixes #40.
Commits on Nov 18, 2016
  1. Unify the behavior of :layout and :cache_path options

    pixeltrix committed Nov 18, 2016
    Previously the :layout option would only work with a Proc or an
    object that responded to call and wasn't executed in the context
    of the controller instance whereas :cache_path would also accept
    a Symbol and was executed in the context of the controller.
Commits on Nov 17, 2016
  1. Use render_to_string :html when not caching layout

    pixeltrix committed Nov 17, 2016
    If a layout is using a format in it's name (e.g. layout.html.erb) then
    using render_to_string :plain breaks because it's looking for the text
    version of the layout (e.g. layout.text.erb).
    
    We can fix this by using render_to_string :layout, which restores the
    old behavior with render_to_string :text but there's still a bug with
    non-HTML layouts.
    
    Fixes #38.
Commits on Nov 12, 2016
  1. Respect Accept header when there is no :format

    pixeltrix committed Nov 12, 2016
    Previously when making a request to a URL without a format and a
    non-HTML Accept header the content type would be returned as
    `text/html` even if it was meant to be another type like JSON.
    
    To fix this people had to manually set a route default to whatever
    was their desired content type was but this workaround couldn't
    handle routes with multiple content types.
    
    This commit Fixes it by determining the extension from the request
    object if there is no `:format` parameter set in the params. For
    backwards compatibility if the Accept header indicates a HTML
    request then the fragment is saved without an extension - otherwise
    upgrading to this version of the gem would invalidate all existing
    cached actions and cause possible cache storms/thundering herds
    when deployed to production.
    
    Some consideration was given to expiring both extension-less paths
    and paths with `.html` when `expire_action` is called with a `"html"`
    format parameter but it's probably best left to the application
    developer as it could expire items from caches unexpectedly.
    
    Fixes #18.
  2. Merge pull request #33 from eileencodes/upgrade-to-rails-5

    pixeltrix committed Nov 12, 2016
    Upgrade to Rails 5
  3. Add rubocop and fix offenses

    pixeltrix committed Nov 12, 2016
  4. Handle positional vs. kwargs for get

    pixeltrix committed Nov 12, 2016
    In Rails 5.0 positional args for HTTP request methods were deprecated
    so conditionally override get to do the transition from kwargs to
    the older positional format.
  5. Send params as strings

    pixeltrix committed Nov 12, 2016
    In Rails 5.0 we changed to converting true/false to strings whereas
    previously they were passed to the controller action unchanged so
    send them as strings for consistency.
  6. Handle the deprecation of render :text

    pixeltrix committed Nov 12, 2016
    In 4.1 render :text was deprecated and replaced with :plain and :html so
    we need to conditional define a method to handle the difference.
  7. Move routing inline to test cases

    pixeltrix committed Nov 12, 2016
    As `/:controller/:action` routes are deprecated use explicit routes
    declared inline inside individual test cases.
  8. Set Ruby version to 2.2.2

    eileencodes committed with pixeltrix Jan 30, 2016
    Rack and Rails require Ruby 2.2.2 so we need to upgrade travis to use
    only Ruby 2.2.2 and set the minimum version in the gemspec.
    
    This means we'll have to split this peripheral gem into 2 releases. One
    for the 4 apps and one for the 5 apps because the changes required by
    Rails 5 won't work on older version.
  9. Replace use of assigns in test

    eileencodes committed with pixeltrix Jan 30, 2016
    `assigns` was removed from Rails and using `instance_variable_get` is
    the new correct way to assign an instance variable in tests.
  10. Check for false in proc

    eileencodes committed with pixeltrix Jan 30, 2016
    In rails/rails@394b7be parameters set were changed to query strings to
    behave more like a real browser. In a browser the parameters `false`
    will never get sent as `false` and will always be `"false"`. Because
    of this change the test for passing `false` into this `Proc` was
    failing. We need to change it to check if the layout is not false rather
    than relying on the value in the parameters.
  11. Fix render nothing deprecation warning

    eileencodes committed with pixeltrix Jan 10, 2016
    `render nothing:` is deprecated. If you want nothing rendered you should
    use `head :ok`.
  12. Fix keyword args dep notice

    eileencodes committed with pixeltrix Jan 10, 2016
    Rails now requires kwargs in test requests. This sets `params`,
    `format`, and `headers` accordingly to fix the deprecation warning.
  13. Fix render text deprecation warning

    eileencodes committed with pixeltrix Jan 10, 2016
    `render text:` is no longer a valid way to render just text content. The
    correct way is to use `render plain:`. `render text:` is deprecated.