jsonapi_compliable 0.11.17 → 0.11.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jsonapi_compliable/scope.rb +11 -7
- data/lib/jsonapi_compliable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ae4537ec81c633eb467154e5652f75ec7c67616
|
4
|
+
data.tar.gz: c6c9b4a8920411b3fb493a021c768ebaead6702f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9289db353d5542c7cd347ecaa875c3794d89ab1f49e67eea3b49ca8c176ba229c00834b16253644690a46c6f2580b2387c74961ad8039913c8e2aa67ce4c85ef
|
7
|
+
data.tar.gz: fa52bb8ced3115a8037ef8e9d97ab7180d373fde955c1aa5d812d7a5c4479586b217092cb164a21f30178df5792f2c0ebb4de8ebc622b5e40433eb81388c274b
|
@@ -118,13 +118,17 @@ module JsonapiCompliable
|
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
121
|
+
def apply_scoping(opts)
|
122
|
+
add_scoping(nil, JsonapiCompliable::Scoping::DefaultFilter, opts)
|
123
|
+
add_scoping(:filter, JsonapiCompliable::Scoping::Filter, opts)
|
124
|
+
add_scoping(:extra_fields, JsonapiCompliable::Scoping::ExtraFields, opts)
|
125
|
+
add_scoping(:sort, JsonapiCompliable::Scoping::Sort, opts)
|
126
|
+
add_scoping(:paginate, JsonapiCompliable::Scoping::Paginate, opts, default: opts[:default_paginate])
|
127
|
+
end
|
128
|
+
|
129
|
+
def add_scoping(key, scoping_class, opts, default = {})
|
130
|
+
@object = scoping_class.new(@resource, query_hash, @object, default).apply unless opts[key] == false
|
131
|
+
@unpaginated_object = @object unless key == :paginate
|
128
132
|
end
|
129
133
|
end
|
130
134
|
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.11.
|
4
|
+
version: 0.11.18
|
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: 2018-06-
|
12
|
+
date: 2018-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-serializable
|