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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ca8f7bd490ad77437aa9e67049322e952bc176c
|
4
|
+
data.tar.gz: 73490ef46cbfac2635b228144bfecd52da2dfcaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
9
|
+
gem 'jsonapi-rails', '~> 0.2.0', require: 'jsonapi/rails'
|
10
10
|
gem 'rspec-rails'
|
11
11
|
end
|
data/gemfiles/rails_4.gemfile
CHANGED
data/gemfiles/rails_5.gemfile
CHANGED
@@ -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::
|
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
|
-
|
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
|
-
|
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
|