ncore 3.5.0 → 3.5.1

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: f96f627fc2c860f1a647ac69f9c165319c6a79b4d5ddd2b9885e470d44f01e06
4
- data.tar.gz: 40497aeaee34ffc1b63ac3018b80ce0422800c0451acee3b3f3acfbe7495b920
3
+ metadata.gz: 16e01242ae632039f017faa4e3c51e6c885b05bb86ba0c53db9e6cf21b5e011b
4
+ data.tar.gz: 849bce6e876e202690601839d0b0012a70347aeb25fe0fff0c56006f180e5a61
5
5
  SHA512:
6
- metadata.gz: 565bbd2f26a065bcb4bb6eb8f15515109db6ae0ebd4a388a9ea1ae18050d5462c14c15178806f3927e98079c52f9fb091c7cdec659e212ecb796128737b569c5
7
- data.tar.gz: ab02acdb71d0fbc5006ef2bc071449f5cd3b1525e8a321b46c3b22c64aad3b99e6ea17fb6bcd0fb2a455d908885fdf4263ee6508779208e42607fcaf26563477
6
+ metadata.gz: ced939921588d62b7141fb481b1aa8638be6e297f0d355137c4aa155c8efde8d41198e4d76acdb9c574cf9bdefe7026df384dc84a70002153b38ded55cf9e80e
7
+ data.tar.gz: 2497400057a0229616f5d9771f141be8966e65ab7d9ab767c3c54c3efaeb13f15017d46d7da6c1f73f23b22032c093d2a3f93246f968fece9ade3372dc981a66
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### 3.5.1
2
+
3
+ - Preserve 'metadata' and 'errors' keys as attributes when inside a standard
4
+ data payload
5
+
1
6
  #### 3.5.0
2
7
 
3
8
  - Allow ActiveModel 7.1
@@ -168,7 +168,9 @@ module NCore
168
168
  self.metadata = args[:metadata] || {}.with_indifferent_access
169
169
  self.errors = parse_errors(args[:errors])
170
170
  args[:data].each do |k,v|
171
- if respond_to? "#{k}="
171
+ if k=='metadata' || k=='errors'
172
+ @attribs[k] = self.class.interpret_type(v, api_creds)
173
+ elsif respond_to?("#{k}=")
172
174
  send "#{k}=", self.class.interpret_type(v, api_creds)
173
175
  else
174
176
  @attribs[k] = self.class.interpret_type(v, api_creds)
data/lib/ncore/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NCore
2
- VERSION = '3.5.0'
2
+ VERSION = '3.5.1'
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.5.0
4
+ version: 3.5.1
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-01-07 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel