ncore 3.3.1 → 3.3.2

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
  SHA256:
3
- metadata.gz: 07e96bdc957fc537987137e4029761a2783ddc947de794cf95e90234fa9adda3
4
- data.tar.gz: eace234486547704df6dcdad2963fb4f2d7cab5de6effbdb7f47a9889fc73737
3
+ metadata.gz: e01099b869ce4be69bdcd101bfa51241372f3618074547f58b417140505468d1
4
+ data.tar.gz: 762499cfa2d0527e628f54acf3c541850dfc430cc96b8ed45d6a7fe2e813dea4
5
5
  SHA512:
6
- metadata.gz: 6cff9f32d5f2eb0c79bb15e05e1e60384e4a13ebb9eaf8dc750ada0cb4d49e093ffb0692ef6530f8be672bf53280816f725095496911c00453fefcc19d771309
7
- data.tar.gz: c4099d3db77792c8775e3ce1ba215203f896f03ca549401c70d3f95ee0bf4877eaa3b9a6404929b55f2d48dfafb6f562c64cf3f85b19f7cd3a9b26084b58fc86
6
+ metadata.gz: bac55e24257dbfc697ff3c529aab817d851aa89e3439ccf74b79d4c199ec1877c5aadf93d1c50bb0e44bfed21c2ad29b5a411f13ff8282f4f9869db147639c30
7
+ data.tar.gz: df661b5e833cbcb166d737515888de893e829984be45b760e3b6bcd99d1a0215f269fa6f1b971b3ec7542b0a40c91a9d22e606e6f70840c82a7f045dfc09ea0a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 3.3.2
2
+
3
+ - Ruby 3.0 compatibility
4
+
1
5
  #### 3.3.1
2
6
 
3
7
  - Fix module_parent when using ActiveSupport 5.2
@@ -160,10 +160,14 @@ module NCore
160
160
  end
161
161
 
162
162
 
163
- def load(data:, errors: nil, metadata: nil)
164
- self.metadata = metadata || {}.with_indifferent_access
165
- self.errors = parse_errors(errors)
166
- data.each do |k,v|
163
+ def load(args={})
164
+ raise ArgumentError, "Missing :data" unless args.key?(:data)
165
+ extra_keys = args.keys - %i(data errors metadata)
166
+ raise ArgumentError, "Unexpected keys: #{extra_keys.inpsect}" if extra_keys.any?
167
+
168
+ self.metadata = args[:metadata] || {}.with_indifferent_access
169
+ self.errors = parse_errors(args[:errors])
170
+ args[:data].each do |k,v|
167
171
  if respond_to? "#{k}="
168
172
  send "#{k}=", self.class.interpret_type(v, api_creds)
169
173
  else
data/lib/ncore/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NCore
2
- VERSION = '3.3.1'
2
+ VERSION = '3.3.2'
3
3
  end
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.3.1
4
+ version: 3.3.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: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2021-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel