Please Note: This change log only covers v1.3 forwards - apologies for anything missing prior to that.
- Bug fix to bugsnag, thanks to DamirSvrtan.
- Support for Bugsnag and documentation tweaks around notifications.
- Fix for scopes and nested serialization working correctly (change Array check to
#to_ary
, as we should).
- RSpec 3.0 Differ fixes, Thanks to newdark.
- Fix deprecation warning for
path_parameters
in 4.2, Thanks to davidpdrsn. - Travis CI fixes, Thanks to DamirSvrtan.
- Support for
:each_serializer
.
- Support for RSpec >= 3.0
- Remove .rvmrc because is deprecated in favor of .ruby-version and .ruby-gemset
- 'expose' method now validates invalid single objects
next
on kaminari with an empty result set should return the correct value.
- Support for Rails 4.1.0's changed Record Identifier class.
encode_to_json
hook for internal refactoring.
- Bump hashie version to support 1.0 and 2.0 versions. Note I've bumped to 1.9.0 to avoid accidentally breaking anyone who requires 1.0 and doesn't specify it directly (dudes...)
- Remove test deprecation notice on Rails 4.
- Fix the test helper on Rails 3.0.
- Get travis working again.
- Strong Parameter and test tweaks, thanks to joergschiller.
- Better explanation for error handling, thanks to ahegyi.
- Change the order of Instrumentation in RocketPants so it correct logs the error results.
- Make RocketPants work with Rails 4.0.0.beta1, Test against Ruby 2.0.0.
Note: This is a rather large change to the dependencies, hence the minor version bump.
- ActiveModel Serializer Support
- Fix to avoid exposing exception messages in production.
- Add in
RocketPants::Forbidden
at the request of @dangalipo.
- Add in support for messages on
RocketPants::InvalidResource
toRocketPants::Client
, thanks to @fredwu
- Map
ActiveRecord::RecordNotUnique
toRocketPants::Conflict
.
- Merge in a fix from nagash that prevents reusing decoded / parsed responses in the test helper.
- Add in a built in
:invalid_resource
error, with support for passing through error messages. - Support for ActiveRecord exceptions out of the box (See the README).
- Don't hide errors by default in
development
andtest
, respectconfig.rocket_pants.pass_through_errors
andRocketPants.pass_through_errors
. - Allow specifying
:metadata
in context on errors / expose and add it directly to the response. - Allow specifying
:metadata
in expose on objects. RocketPants::Base.map_error!
now accepts lambdas as the target value / convertor.
- Add in a built in
:bad_request
error. - Provide
:base
onRocketPants::Errors.register!
will set the base class. - Fixed integration with
will_paginate
and expanded our integration specs to be better.
- Fixed a bug where any request with an etag would return
304 Not Modified
when the caching middleware was enabled. - Support for header metadata - Simply set
RocketPants.header_metadata = true
orconfig.rocket_pants.header_metadata = true
and rocket pants will mirror the response metadata toX-Api-*
headers, e.g.X-Api-Count: 2
for a collection response with two items. This makes it suitable for use inHEAD
requests. Please note, the client doesn't currently support this. - Support for automatically generating the
Link:
header for paginated responses. Simply implementpage_url(page_number)
in your controller, returning nil when it's a valid page, and rocket pants will add the headers for you. Also, you can use thelink(rel, href, attributes = {})
andlinks(ref => type)
to manually add header links.