ncore 3.6.0 → 3.6.2
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/CHANGELOG.md +5 -0
- data/lib/ncore/attributes.rb +2 -2
- data/lib/ncore/client_cache.rb +3 -2
- data/lib/ncore/rails/log_subscriber.rb +1 -0
- 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: 72b21510020d16c3b3867166bd04a2a7f36a10e81e53f3fffafe6ff65dfd58c3
|
|
4
|
+
data.tar.gz: 0abc02e39d688fd674fd6eabfc6f57de375b92ee6e037642ec80ab3dbc43345d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7602eb0f8a31448ea87b96c7d8838e91a1380e45b098fa0a8b7e44241c9bdf6b73330338083b20bbfec1e36c76104180a2681bb89cb7ac8493d1e0d676e2b165
|
|
7
|
+
data.tar.gz: e8faccd4fe7495644f6f3c1abeb616f7d57b7cab32bcbf24a2a72eb7334b97de551f7ac690d28cd760b78abe22d37db362a8c47b1a80db24ef1fadffc25a471e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
#### 3.6.1
|
|
2
|
+
|
|
3
|
+
- Restore usage of Resource.new(some_attr: 'value')
|
|
4
|
+
|
|
1
5
|
#### 3.6.0
|
|
2
6
|
|
|
3
7
|
- factory() - add :preload option; make available to resource instances
|
|
4
8
|
- Resource.new() - add :preload option
|
|
5
9
|
Hint: the first arg (attribs) must be a hash, not kwarg: `new({id: id})`
|
|
10
|
+
(no longer true as of 3.6.1)
|
|
6
11
|
|
|
7
12
|
#### 3.5.2
|
|
8
13
|
|
data/lib/ncore/attributes.rb
CHANGED
|
@@ -95,10 +95,10 @@ module NCore
|
|
|
95
95
|
attr_accessor :metadata, :errors
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
def initialize(attribs={}, api_creds=nil,
|
|
98
|
+
def initialize(attribs={}, api_creds=nil, options={})
|
|
99
99
|
@attribs = {}.with_indifferent_access
|
|
100
100
|
attribs = attribs.dup.with_indifferent_access
|
|
101
|
-
preload = preload.present? ? preload.dup.with_indifferent_access : nil
|
|
101
|
+
preload = options[:preload].present? ? options[:preload].dup.with_indifferent_access : nil
|
|
102
102
|
creds_attr = attribs.delete(:credentials)
|
|
103
103
|
@api_creds = api_creds || creds_attr
|
|
104
104
|
|
data/lib/ncore/client_cache.rb
CHANGED
|
@@ -37,10 +37,11 @@ module NCore
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def request_cache_key(url:, headers:)
|
|
40
|
+
hdrs = headers.reject{|k,v| k=='X-Request-Id'}.sort
|
|
40
41
|
[ 'ncore',
|
|
41
42
|
url.gsub(/[^a-zA-Z0-9]+/,'-'),
|
|
42
|
-
Digest::MD5.hexdigest(
|
|
43
|
-
].join
|
|
43
|
+
Digest::MD5.hexdigest(hdrs.to_s)
|
|
44
|
+
].join(':')
|
|
44
45
|
end
|
|
45
46
|
|
|
46
47
|
end
|
|
@@ -38,6 +38,7 @@ module NCore
|
|
|
38
38
|
res = " -> %d (%.1f ms)" % [http_status, event.duration]
|
|
39
39
|
|
|
40
40
|
msg = color(msg, :yellow)
|
|
41
|
+
# for rails≤70, must exclude :bold param entirely since a Hash is truthy
|
|
41
42
|
if (200..299).include? http_status
|
|
42
43
|
res = color(res, :green, bold: true)
|
|
43
44
|
else
|
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.6.
|
|
4
|
+
version: 3.6.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: 2023-
|
|
11
|
+
date: 2023-06-09 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.
|
|
145
|
+
rubygems_version: 3.4.10
|
|
146
146
|
signing_key:
|
|
147
147
|
specification_version: 4
|
|
148
148
|
summary: NCore - Gem for building REST API clients
|