payload-api 0.2.2 → 0.2.4

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: 38980b3bd2036f9866edb037fb8f818fdf7e898f135d5455a215b8bee17015c4
4
- data.tar.gz: af087a2972eb1c1e364686dba0322b578b4d9d303fef51a12aa55d9ec0b64420
3
+ metadata.gz: bbb1f9ed364eb3e8d721aa2e52e3998097e764c5efdb650b7c1ab840b792197d
4
+ data.tar.gz: 17e0e956231c7ae5ccfb0c63ca1a50061d4ed1812b7c8871c3d54f38e7254a05
5
5
  SHA512:
6
- metadata.gz: '068855eba39ba1fb7ee3f62fba3b156652a313952a4eda6e1bf2cbfe42d7a853a51ffae1bf95cf693d54e12fded3df126cca590d91a27509824b34ef9cffe4bd'
7
- data.tar.gz: 0ce14cf0fbf7caa90907d709267b05af5838f664f8130b8c34cc3bbbdafb2233921723a7f625e6db298d8536588f86705223f94417067f088a7482d752d5a68b
6
+ metadata.gz: 32dc9421316afd86f9df392613d2f6c4b5ef793c0a82e5256718bf3740408ec3b055f3916d8e9a5c06d792eb5cf589338452dec6b46ad5bf0e14ab15ce8ac81b
7
+ data.tar.gz: cd79ebdffa7156488217896c5b6ae37379f9efbe9781cfcdfcd6690ae9acd21eb70c4debabd48bf0e99c45a704303df5702717c510dcfe2c6ffd672efabeed55
data/README.md CHANGED
@@ -7,7 +7,7 @@ A RubyGem for integrating [Payload](https://payload.co).
7
7
  To install using [Bundler](https://bundler.io):
8
8
 
9
9
  ```ruby
10
- gem 'payload-api', '~> 0.1.0'
10
+ gem 'payload-api', '~> 0.2.4'
11
11
  ```
12
12
 
13
13
  To install using gem:
@@ -125,7 +125,14 @@ module Payload
125
125
 
126
126
  if response.code == '200'
127
127
  if data['object'] == 'list'
128
- return data['values'].map {|obj| Payload::get_cls(obj).new(obj) }
128
+ return data['values'].map do |obj|
129
+ cls = Payload::get_cls(obj)
130
+ if cls.nil?
131
+ obj
132
+ else
133
+ cls.new(obj)
134
+ end
135
+ end
129
136
  else
130
137
  return Payload::get_cls(data).new(data)
131
138
  end
data/lib/payload/utils.rb CHANGED
@@ -7,7 +7,7 @@ module Payload
7
7
  def self.get_cls(data)
8
8
  match = nil
9
9
  for cls in subclasses(Payload::ARMObject)
10
- if cls.spec['object'] != data['object']
10
+ if cls.spec&.fetch('object') != data['object']
11
11
  next
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Payload
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payload-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Payload
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-14 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple library to interface with the Payload API. See https://docs.payload.co
14
14
  for details.
@@ -31,7 +31,7 @@ homepage: https://docs.payload.co
31
31
  licenses:
32
32
  - MIT
33
33
  metadata: {}
34
- post_install_message:
34
+ post_install_message:
35
35
  rdoc_options: []
36
36
  require_paths:
37
37
  - lib
@@ -46,8 +46,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubygems_version: 3.2.5
50
- signing_key:
49
+ rubygems_version: 3.3.15
50
+ signing_key:
51
51
  specification_version: 4
52
52
  summary: Payload ruby library
53
53
  test_files: []