seam 2.2.0 → 2.3.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: 6dcceb277f2f271709aced25ddb9bc3b1f9e5b91169ac12791b2c462955509c7
4
- data.tar.gz: c99bbec793de9980b40b9d250babd8aa67eeafc96f82f3888cc595afa3451117
3
+ metadata.gz: 4fced77e112ee358ca721e54afcfc60a9ea76a6578d749fbcfc3993c4d4458e8
4
+ data.tar.gz: f70dec082ae18bfd07e93d84b86588efb77f30603d0db3ad8354774ff737428b
5
5
  SHA512:
6
- metadata.gz: 1826060dbd984eb5aca524c507736c04183845a81746ee5e219b04a4e917e9270b39b927add7a1ba864e35c98ddbd6e9a19b3d073df709d3d26c7f6784fae7cb
7
- data.tar.gz: 60fafbd7890b76bc99095c4fbeea40ae5c285dfea72fc6bc07d80cb2ba53ce60f1b68cb5daee86bf675fb5f30043be6b83e5d9f973bb77524cad9bb7d6e5fb5e
6
+ metadata.gz: 073ef3f1929e9f1d0b75b66c249cdeec61ecb37998a634bacc22b3fe7d65f7021f106a6bd000b6b42354647906d0ccf8563e65124e54142c0780900a1608b930
7
+ data.tar.gz: 256cfa6c4b3df7a11646e58a688dfe98827c2a8756bec9aa006ad81412891c300b434906b41048e10b9bad6f984993ff1995fbcf553213857e5c30d53beddd2f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.2.0)
4
+ seam (2.3.1)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
@@ -11,19 +11,12 @@ module Seam
11
11
  def initialize(data, client = nil)
12
12
  @data = data
13
13
  @client = client
14
-
15
- @data.each do |key, value|
16
- value = Seam::DeepHashAccessor.new(value) if value.is_a?(Hash)
17
- instance_variable_set(:"@#{key}", value)
18
- end
14
+ process_data_attributes(@data)
19
15
  end
20
16
 
21
17
  def update_from_response(data)
22
18
  @data = data
23
- @data.each do |key, value|
24
- value = Seam::DeepHashAccessor.new(value) if value.is_a?(Hash)
25
- instance_variable_set(:"@#{key}", value)
26
- end
19
+ process_data_attributes(@data)
27
20
  end
28
21
 
29
22
  def self.load_from_response(data, client = nil)
@@ -60,6 +53,21 @@ module Seam
60
53
  def parse_datetime(value)
61
54
  Time.parse(value)
62
55
  end
56
+
57
+ def process_data_attributes(data)
58
+ data.each do |key, value|
59
+ value = process_hash_value(value)
60
+ instance_variable_set(:"@#{key}", value)
61
+ end
62
+ end
63
+
64
+ def process_hash_value(value)
65
+ if value.is_a?(Hash) && !value.empty?
66
+ Seam::DeepHashAccessor.new(value)
67
+ else
68
+ value
69
+ end
70
+ end
63
71
  end
64
72
  end
65
73
  end
@@ -18,8 +18,8 @@ module Seam
18
18
  Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
19
19
  end
20
20
 
21
- def list(acs_encoder_ids: nil, acs_system_ids: nil, limit: nil)
22
- @client.post("/acs/encoders/list", {acs_encoder_ids: acs_encoder_ids, acs_system_ids: acs_system_ids, limit: limit}.compact)
21
+ def list(acs_system_id: nil, limit: nil, acs_system_ids: nil, acs_encoder_ids: nil)
22
+ @client.post("/acs/encoders/list", {acs_system_id: acs_system_id, limit: limit, acs_system_ids: acs_system_ids, acs_encoder_ids: acs_encoder_ids}.compact)
23
23
 
24
24
  nil
25
25
  end
data/lib/seam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seam
4
- VERSION = "2.2.0"
4
+ VERSION = "2.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2024-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday