jsonapi_compliable 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5e5c78aa9e3fb47f421aa723a852f0a97d04fa1
4
- data.tar.gz: 3a6d7c822910618e0f0e902a94f88a1f05371187
3
+ metadata.gz: 3ca8f7bd490ad77437aa9e67049322e952bc176c
4
+ data.tar.gz: 73490ef46cbfac2635b228144bfecd52da2dfcaf
5
5
  SHA512:
6
- metadata.gz: 1c7cf84ac18754b532d3b2a572105e5e522e45b282a91b46b06cd04ae541191b877b5e88b0c2939cf5cc43e4850dfd6bd02187a14ce3397b011ce28e4e037958
7
- data.tar.gz: 55125d37e1249b70b9d3b703e8289815520088e33a78e062536be42725254e1079cf10be68d2ddb61c309dc100aa85e280073011079d526503a5442e1f149912
6
+ metadata.gz: 568d7b05bcb5ae22f43971f506cb6c945208359a7889c1369f70540c6d34ac1163ca99e795c2fb8dbb537f6f63e868f055283c56520d8b887868235e3b6dbf4f
7
+ data.tar.gz: 4f8331adf280a5263cc069a7dc2f54d015d40c68796ec19c513cbb4e60ecf2e83ec03f3d5377d3f4c42b94f6fdb3847d207dac88668df3b3a44c944b1084fc4f
data/Appraisals CHANGED
@@ -1,11 +1,11 @@
1
1
  appraise "rails-4" do
2
2
  gem "rails", "~> 4.1"
3
- gem 'jsonapi-rails', '~> 0.1.0', require: 'jsonapi/rails'
3
+ gem 'jsonapi-rails', '~> 0.2.0', require: 'jsonapi/rails'
4
4
  gem 'rspec-rails'
5
5
  end
6
6
 
7
7
  appraise "rails-5" do
8
8
  gem "rails", "~> 5.0"
9
- gem 'jsonapi-rails', '~> 0.1.0', require: 'jsonapi/rails'
9
+ gem 'jsonapi-rails', '~> 0.2.0', require: 'jsonapi/rails'
10
10
  gem 'rspec-rails'
11
11
  end
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.1"
6
- gem "jsonapi-rails", "~> 0.1.0", :require => "jsonapi/rails"
6
+ gem "jsonapi-rails", "~> 0.2.0", :require => "jsonapi/rails"
7
7
  gem "rspec-rails"
8
8
 
9
9
  group :test do
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0"
6
- gem "jsonapi-rails", "~> 0.1.0", :require => "jsonapi/rails"
6
+ gem "jsonapi-rails", "~> 0.2.0", :require => "jsonapi/rails"
7
7
  gem "rspec-rails"
8
8
 
9
9
  group :test do
@@ -190,7 +190,7 @@ module JsonapiCompliable
190
190
  # this, pass +scope: false+
191
191
  #
192
192
  # This builds relevant options and sends them to
193
- # +JSONAPI::Serializable::Renderer.render+from
193
+ # +JSONAPI::Serializable::SuccessRenderer#render+from
194
194
  # {http://jsonapi-rb.org jsonapi-rb}
195
195
  #
196
196
  # @example Build Scope by Default
@@ -247,7 +247,9 @@ module JsonapiCompliable
247
247
  end
248
248
 
249
249
  def perform_render_jsonapi(opts)
250
- JSONAPI::Serializable::Renderer.render(opts.delete(:jsonapi), opts)
250
+ # TODO(beauby): Reuse renderer.
251
+ JSONAPI::Serializable::SuccessRenderer.new
252
+ .render(opts.delete(:jsonapi), opts).to_json
251
253
  end
252
254
 
253
255
  def _persist
@@ -57,6 +57,12 @@ module JsonapiCompliable
57
57
  end
58
58
 
59
59
  JSONAPI::Serializable::Resource.class_eval do
60
- prepend JSONAPI::Serializable::Resource::ConditionalFields
60
+ def self.inherited(klass)
61
+ super
62
+ klass.class_eval do
63
+ extend JSONAPI::Serializable::Resource::ConditionalFields
64
+ end
65
+ end
66
+
61
67
  include JsonapiCompliable::Extensions::ExtraAttribute
62
68
  end
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond