jsonapi_compliable 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +3 -1
- data/gemfiles/rails_4.gemfile +1 -1
- data/gemfiles/rails_4.gemfile.lock +3 -3
- data/gemfiles/rails_5.gemfile +1 -1
- data/gemfiles/rails_5.gemfile.lock +3 -3
- data/jsonapi_compliable.gemspec +1 -1
- data/lib/jsonapi_compliable.rb +2 -0
- data/lib/jsonapi_compliable/base.rb +1 -1
- data/lib/jsonapi_compliable/railtie.rb +18 -0
- data/lib/jsonapi_compliable/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0e9bc14ee283f01edb3d645f2d06f15c63964b1
|
4
|
+
data.tar.gz: 2aa0f79d71daf3a3e29a2af76309a4b81c0ffc21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdd62b729def2042d05df80e50068ead32567170c3c3fcefa500b6fdbefa73af9c0aacdae27b21ff49916210300109b0d293cfeeb2da54e4d831c8a987b83508
|
7
|
+
data.tar.gz: 0d4f1e1d7f43a1fef11c7c4b47c56cdd9bc42dd0f1a5359186c1d03b368fc2eddd6dcdb16793445fde8b4b182efbe048d62f5a5a824789b3e7844fa17234ea80
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
### JsonapiCompliable
|
2
2
|
|
3
|
-
[
|
3
|
+
[![Build Status](https://travis-ci.org/jsonapi-suite/jsonapi_compliable.svg?branch=master)](https://travis-ci.org/jsonapi-suite/jsonapi_compliable)
|
4
|
+
|
5
|
+
[official documentation](https://jsonapi-suite.github.io/jsonapi_compliable)
|
4
6
|
|
5
7
|
Supported Rails versions: >= 4.1
|
6
8
|
|
data/gemfiles/rails_4.gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This file was generated by Appraisal
|
2
2
|
|
3
|
-
source "
|
3
|
+
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gem "active_model_serializers", :git => "https://github.com/richmolj/active_model_serializers.git"
|
6
6
|
gem "rails", "~> 4.1"
|
@@ -11,14 +11,14 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: ../
|
13
13
|
specs:
|
14
|
-
jsonapi_compliable (0.3.
|
14
|
+
jsonapi_compliable (0.3.4)
|
15
15
|
active_model_serializers (~> 0.10)
|
16
16
|
jsonapi (~> 0.1.1.beta2)
|
17
17
|
jsonapi_ams_extensions (~> 0.1)
|
18
18
|
rails (>= 4.1, < 6)
|
19
19
|
|
20
20
|
GEM
|
21
|
-
remote:
|
21
|
+
remote: https://rubygems.org/
|
22
22
|
specs:
|
23
23
|
actionmailer (4.2.7.1)
|
24
24
|
actionpack (= 4.2.7.1)
|
@@ -89,7 +89,7 @@ GEM
|
|
89
89
|
json (1.8.3)
|
90
90
|
jsonapi (0.1.1.beta2)
|
91
91
|
json (~> 1.8)
|
92
|
-
jsonapi_ams_extensions (0.1.
|
92
|
+
jsonapi_ams_extensions (0.1.1)
|
93
93
|
active_model_serializers (~> 0.10.x)
|
94
94
|
jsonapi_spec_helpers (0.2.0)
|
95
95
|
kaminari (0.17.0)
|
data/gemfiles/rails_5.gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This file was generated by Appraisal
|
2
2
|
|
3
|
-
source "
|
3
|
+
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gem "active_model_serializers", :git => "https://github.com/richmolj/active_model_serializers.git"
|
6
6
|
gem "rails", "~> 5.0"
|
@@ -11,14 +11,14 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: ../
|
13
13
|
specs:
|
14
|
-
jsonapi_compliable (0.3.
|
14
|
+
jsonapi_compliable (0.3.4)
|
15
15
|
active_model_serializers (~> 0.10)
|
16
16
|
jsonapi (~> 0.1.1.beta2)
|
17
17
|
jsonapi_ams_extensions (~> 0.1)
|
18
18
|
rails (>= 4.1, < 6)
|
19
19
|
|
20
20
|
GEM
|
21
|
-
remote:
|
21
|
+
remote: https://rubygems.org/
|
22
22
|
specs:
|
23
23
|
actioncable (5.0.0.1)
|
24
24
|
actionpack (= 5.0.0.1)
|
@@ -91,7 +91,7 @@ GEM
|
|
91
91
|
json (1.8.3)
|
92
92
|
jsonapi (0.1.1.beta2)
|
93
93
|
json (~> 1.8)
|
94
|
-
jsonapi_ams_extensions (0.1.
|
94
|
+
jsonapi_ams_extensions (0.1.1)
|
95
95
|
active_model_serializers (~> 0.10.x)
|
96
96
|
jsonapi_spec_helpers (0.2.0)
|
97
97
|
kaminari (0.17.0)
|
data/jsonapi_compliable.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Lee Richmond", "Venkata Pasupuleti"]
|
10
10
|
spec.email = ["richmolj@gmail.com", "spasupuleti4@bloomberg.net"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
12
|
+
spec.summary = %q{Easily build jsonapi.org-compatible APIs}
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
data/lib/jsonapi_compliable.rb
CHANGED
@@ -17,6 +17,8 @@ require "jsonapi_compliable/util/include_params"
|
|
17
17
|
require "jsonapi_compliable/util/field_params"
|
18
18
|
require "jsonapi_compliable/util/scoping"
|
19
19
|
|
20
|
+
require 'jsonapi_compliable/railtie' if defined?(::Rails)
|
21
|
+
|
20
22
|
module JsonapiCompliable
|
21
23
|
autoload :Base, 'jsonapi_compliable/base'
|
22
24
|
autoload :Deserializable, 'jsonapi_compliable/deserializable'
|
@@ -50,7 +50,7 @@ module JsonapiCompliable
|
|
50
50
|
scope = jsonapi_scope(scope) if Util::Scoping.apply?(self, scope, opts.delete(:scope))
|
51
51
|
options = default_ams_options
|
52
52
|
options[:include] = forced_includes || Util::IncludeParams.scrub(self)
|
53
|
-
options[:
|
53
|
+
options[:jsonapi] = scope
|
54
54
|
options[:fields] = Util::FieldParams.fieldset(params, :fields) if params[:fields]
|
55
55
|
options[:extra_fields] = Util::FieldParams.fieldset(params, :extra_fields) if params[:extra_fields]
|
56
56
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rails/railtie'
|
2
|
+
require 'action_controller'
|
3
|
+
require 'action_controller/railtie'
|
4
|
+
require 'action_controller/serialization'
|
5
|
+
|
6
|
+
module ActiveModelSerializers
|
7
|
+
class Railtie < Rails::Railtie
|
8
|
+
initializer 'jsonapi_compliable.register_renderer' do
|
9
|
+
require 'active_model_serializers/register_jsonapi_renderer'
|
10
|
+
end
|
11
|
+
|
12
|
+
initializer 'jsonapi_compliable.configure_ams' do
|
13
|
+
if ActiveModelSerializers.config.respond_to?(:include_data_default)
|
14
|
+
ActiveModelSerializers.config.include_data_default = :if_sideloaded
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
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.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- lib/jsonapi_compliable/deserializable.rb
|
220
220
|
- lib/jsonapi_compliable/dsl.rb
|
221
221
|
- lib/jsonapi_compliable/errors.rb
|
222
|
+
- lib/jsonapi_compliable/railtie.rb
|
222
223
|
- lib/jsonapi_compliable/scope/base.rb
|
223
224
|
- lib/jsonapi_compliable/scope/default_filter.rb
|
224
225
|
- lib/jsonapi_compliable/scope/extra_fields.rb
|
@@ -254,5 +255,6 @@ rubyforge_project:
|
|
254
255
|
rubygems_version: 2.5.1
|
255
256
|
signing_key:
|
256
257
|
specification_version: 4
|
257
|
-
summary:
|
258
|
+
summary: Easily build jsonapi.org-compatible APIs
|
258
259
|
test_files: []
|
260
|
+
has_rdoc:
|