Skip to content

v1.0.0

Compare
Choose a tag to compare
@jsmestad jsmestad released this 13 Apr 19:21
· 22 commits to master since this release

Changes

Performance

Dynamic attribute definitions improvement (PR JsonApiClient/json_api_client#281)

Before:

       user     system      total        real
read:   1.090000   0.010000   1.100000 (  1.091464)
write:  1.130000   0.000000   1.130000 (  1.136750)

After:

       user     system      total        real
read:   0.020000   0.000000   0.020000 (  0.016366)
write:  0.690000   0.000000   0.690000 (  0.687914)

Features

  • Return a QueryBuilder from HasMany associations instead of an Array (PR JsonApiClient/json_api_client#274 and Issue JsonApiClient/json_api_client#270)
  • Support for custom header inheritance (PR JsonApiClient/json_api_client#280)
  • Add Authorization helpers to base Resource:
    • JSONAPI::Consumer::Resource.authorize_with= sets Authorization=Bearer #{val} header
    • JSONAPI::Consumer::Resource.authorize_with(jwt, &block) same as above, but for only a single request.
    • JSONAPI::Consumer::Resource.authorized? returns true/false if Authorization is not empty
    • JSONAPI::Consumer::Resource.clear_authorization! clears the Authorization header
    • JSONAPI::Consumer::Resource.authorized_as returns the Authorization header

Bugfixes