ncore 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE +1 -1
- data/example/lib/my_api/rails/railtie.rb +6 -1
- data/lib/ncore/client_cache.rb +2 -1
- data/lib/ncore/methods/all.rb +1 -1
- data/lib/ncore/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e05865527c77bbb27e9a70c0b880db847160b8904fa7c0693dac8e84be15870f
|
4
|
+
data.tar.gz: f10b8e34df3e7a95d2994e533c45d70671f5ea479e585ac7b3ff89f8ceea9226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82dbca21c895a10441d08fd7390af765d397966ec90d528f7caf988d8bc9485b5f128ba6c766361c90fbb8eb1ddc47525a7d27366f29e29a3a7dcb552e811b0f
|
7
|
+
data.tar.gz: 0f9971e5d56859937c5b21e0dcacdfdeacab3049e327bf727ff28c9e47ec13ee7c36ab7f5b55786924508fb6ccca56187080b79d82bb98019e1eb8c71b0aa60b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
#### 3.4.2
|
2
|
+
|
3
|
+
- Fix SomeResource.all when payload includes 'data' attribute
|
4
|
+
|
1
5
|
#### 3.4.1
|
2
6
|
|
3
7
|
- Allow ActiveModel 7.0
|
@@ -84,6 +88,10 @@ Other changes
|
|
84
88
|
- #i18n_scope, config via Api.i18n_scope=
|
85
89
|
- #cache_key, #cache_version, #cache_key_with_version
|
86
90
|
|
91
|
+
#### 2.3.2
|
92
|
+
|
93
|
+
- Allow ActiveSupport 7.0
|
94
|
+
|
87
95
|
#### 2.3.1
|
88
96
|
|
89
97
|
- Allow ActiveModel 6.1
|
data/LICENSE
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
module MyApi
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
|
4
|
-
config.
|
4
|
+
config.action_dispatch.rescue_responses.merge!(
|
5
|
+
'MyApi::RecordInvalid' => :unprocessable_entity, # 422
|
6
|
+
'MyApi::RecordNotFound' => :not_found, # 404
|
7
|
+
)
|
8
|
+
|
9
|
+
initializer "my_api.cache_store" do |app|
|
5
10
|
MyApi::Api.cache_store = Rails.cache
|
6
11
|
end
|
7
12
|
|
data/lib/ncore/client_cache.rb
CHANGED
@@ -6,11 +6,12 @@ module NCore
|
|
6
6
|
|
7
7
|
private
|
8
8
|
|
9
|
+
# only caches GET requests with 200..299, 409, 422 responses
|
9
10
|
# cache_opts: true
|
10
11
|
# use *::Api.cache_store
|
11
12
|
# cache_opts: {...}
|
12
13
|
# use: *::Api.cache_store, with options: {...}
|
13
|
-
# hint: add force: true execute the query and rewrite the cache
|
14
|
+
# hint: add force: true to execute the query and rewrite the cache
|
14
15
|
# cache_opts: Store.new
|
15
16
|
# use Store.new as-is
|
16
17
|
def execute_request(req, cache_opts=nil)
|
data/lib/ncore/methods/all.rb
CHANGED
@@ -12,7 +12,7 @@ module NCore
|
|
12
12
|
Collection.new.tap do |coll|
|
13
13
|
coll.metadata = parsed[:metadata]
|
14
14
|
parsed[:data].each do |hash|
|
15
|
-
coll << factory(hash
|
15
|
+
coll << factory({data: hash, metadata: parsed[:metadata]}, creds)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/ncore/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ncore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Notioneer Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubygems_version: 3.2.
|
145
|
+
rubygems_version: 3.2.22
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: NCore - Gem for building REST API clients
|