workato-connector-sdk 1.3.13 → 1.3.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4ce0ac0fb27a4b966c584e9fa48a2f6db5057aad828c9d2ae4a48ab4552da3f
4
- data.tar.gz: 94a9d6d640ff10912dcba6c82042bd3c8c973eb845dd3b08f7d019b67ab3672f
3
+ metadata.gz: 03a19696fc45ea878de13447e2bd0a7b9f9b8c8a1cf17e69135601dd7dbbaa52
4
+ data.tar.gz: 621cec1d6a13ad9764234b01d3dfe3dc520f00a67a99ed6370ffb2d5e06722f3
5
5
  SHA512:
6
- metadata.gz: ec47dc30414b2dfeb009d01e0b1f088107266dfed681bf66c2f0bda4e488e4098cf19ecc6dc3d9edabcc9597a92718582a2d0f8c641fe311a991f303d0bec511
7
- data.tar.gz: 0ee80e316f0e034bd8f5ecad010de827619de84bfb0ba041e13796f5469b6a4333211ac0384de5efd0cf6438a99eacfae0b3e854296db2c0ad93a68dcfbdb51c
6
+ metadata.gz: 38669dc6635c19c3ff71e0b8a658172d21c9f3d8e5e1968a57757515c14d3c9d32e9f95b97366cd02531efd6479e2b609171b65aa380e91df22c8f632b222b96
7
+ data.tar.gz: 0b54b628a315a370d60ced4f274650ab22dfa9b8720e088f0e07357fb67a9660ce02702d7aba70c37e6714be8c0c06fec68ad4b66cf781045a40b9467b9e6aad
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.13
1
+ 1.3.15
@@ -46,7 +46,7 @@ module Workato
46
46
 
47
47
  tokens = acquire_token(code)
48
48
  say_status :success, 'Receive OAuth2 tokens'
49
- jj tokens if verbose?
49
+ say JSON.pretty_generate(tokens) if verbose?
50
50
 
51
51
  settings_store.update(tokens)
52
52
  say_status :success, 'Update settings file'
@@ -9,7 +9,7 @@ module Workato
9
9
  module Sdk
10
10
  class Action < Operation
11
11
  extend T::Sig
12
- using BlockInvocationRefinements
12
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
13
13
 
14
14
  include Dsl::ReinvokeAfter
15
15
 
@@ -30,10 +30,13 @@ module Workato
30
30
  RefreshOutput = T.type_alias do
31
31
  T.any(
32
32
  [
33
- ActiveSupport::HashWithIndifferentAccess,
34
- T.nilable(String)
33
+ ActiveSupport::HashWithIndifferentAccess, # tokens
34
+ T.nilable(ActiveSupport::HashWithIndifferentAccess) # settings
35
35
  ],
36
- ActiveSupport::HashWithIndifferentAccess
36
+ [
37
+ ActiveSupport::HashWithIndifferentAccess # tokens
38
+ ],
39
+ ActiveSupport::HashWithIndifferentAccess # tokens
37
40
  )
38
41
  end
39
42
  end
@@ -42,7 +45,7 @@ module Workato
42
45
  extend T::Sig
43
46
  include MonitorMixin
44
47
 
45
- using BlockInvocationRefinements
48
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
46
49
 
47
50
  # @api private
48
51
  sig { returns(ActiveSupport::HashWithIndifferentAccess) }
@@ -48,7 +48,6 @@ module Workato
48
48
  params: {},
49
49
  headers: {},
50
50
  payload: '')
51
-
52
51
  credentials = if connection[:aws_assume_role].present?
53
52
  role_based_auth(settings: connection)
54
53
  else
@@ -95,7 +95,7 @@ module Workato
95
95
 
96
96
  include Global
97
97
 
98
- using BlockInvocationRefinements
98
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
99
99
 
100
100
  sig { params(connection: Connection, streams: Streams).void }
101
101
  def initialize(connection = Connection.new, streams = ProhibitedStreams.new)
@@ -13,7 +13,7 @@ module Workato
13
13
  class ObjectDefinitions
14
14
  extend T::Sig
15
15
 
16
- using BlockInvocationRefinements
16
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
17
17
 
18
18
  sig do
19
19
  params(
@@ -48,7 +48,7 @@ module Workato
48
48
  include Dsl::Error
49
49
  include Dsl::ExecutionContext
50
50
 
51
- using BlockInvocationRefinements
51
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
52
52
 
53
53
  sig { override.returns(Streams) }
54
54
  attr_reader :streams
@@ -19,7 +19,7 @@ module Workato
19
19
  class Request < SimpleDelegator
20
20
  extend T::Sig
21
21
 
22
- using BlockInvocationRefinements
22
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
23
23
 
24
24
  ALLOWED_URI_TYPES = [URI::Generic, String].freeze
25
25
  private_constant :ALLOWED_URI_TYPES
@@ -34,7 +34,7 @@ module Workato
34
34
 
35
35
  DEFAULT_FRAME_SIZE = T.let(10.megabytes, Integer)
36
36
 
37
- using BlockInvocationRefinements
37
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
38
38
  include Dsl::ReinvokeAfter
39
39
 
40
40
  sig do
@@ -32,7 +32,7 @@ module Workato
32
32
  end
33
33
 
34
34
  class Trigger < Operation
35
- using BlockInvocationRefinements
35
+ using BlockInvocationRefinements # rubocop:disable Sorbet/Refinement core SDK feature
36
36
 
37
37
  sig do
38
38
  params(
@@ -47,7 +47,7 @@ module Workato
47
47
  end
48
48
 
49
49
  def to_state_name(country_name = 'US')
50
- to_state(country_name)&.last&.name&.upcase
50
+ to_state(country_name)&.last&.name&.upcase # rubocop:disable Style/SafeNavigationChainLength
51
51
  end
52
52
 
53
53
  private
@@ -155,22 +155,30 @@ module Workato
155
155
  end
156
156
 
157
157
  def hmac_sha256(key)
158
+ assert_string_argument!(key, 'key')
159
+
158
160
  digest = ::OpenSSL::Digest.new('sha256')
159
161
  Types::Binary.new(::OpenSSL::HMAC.digest(digest, key, self))
160
162
  end
161
163
 
162
164
  def hmac_sha512(key)
165
+ assert_string_argument!(key, 'key')
166
+
163
167
  digest = ::OpenSSL::Digest.new('sha512')
164
168
  Types::Binary.new(::OpenSSL::HMAC.digest(digest, key, self))
165
169
  end
166
170
 
167
171
  def rsa_sha256(key)
172
+ assert_string_argument!(key, 'key')
173
+
168
174
  digest = ::OpenSSL::Digest.new('sha256')
169
175
  private_key = ::OpenSSL::PKey::RSA.new(key)
170
176
  Types::Binary.new(private_key.sign(digest, self))
171
177
  end
172
178
 
173
179
  def rsa_sha512(key)
180
+ assert_string_argument!(key, 'key')
181
+
174
182
  digest = ::OpenSSL::Digest.new('sha512')
175
183
  private_key = ::OpenSSL::PKey::RSA.new(key)
176
184
  Types::Binary.new(private_key.sign(digest, self))
@@ -187,11 +195,15 @@ module Workato
187
195
  end
188
196
 
189
197
  def hmac_sha1(key)
198
+ assert_string_argument!(key, 'key')
199
+
190
200
  digest = ::OpenSSL::Digest.new('sha1')
191
201
  Types::Binary.new(::OpenSSL::HMAC.digest(digest, key, self))
192
202
  end
193
203
 
194
204
  def hmac_md5(key)
205
+ assert_string_argument!(key, 'key')
206
+
195
207
  digest = ::OpenSSL::Digest.new('md5')
196
208
  Types::Binary.new(::OpenSSL::HMAC.digest(digest, key, self))
197
209
  end
@@ -199,6 +211,17 @@ module Workato
199
211
  def from_xml
200
212
  Workato::Utilities::Xml.parse_xml_to_hash(self)
201
213
  end
214
+
215
+ private
216
+
217
+ def assert_string_argument!(value, arg_name)
218
+ return if value.is_a?(String)
219
+
220
+ Kernel.raise(
221
+ Workato::Connector::Sdk::ArgumentError,
222
+ "Expected a String for '#{arg_name}' parameter, given #{value.class.name}"
223
+ )
224
+ end
202
225
  end
203
226
  end
204
227
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workato-connector-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.13
4
+ version: 1.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Abolmasov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-11 00:00:00.000000000 Z
11
+ date: 2025-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -84,6 +84,26 @@ dependencies:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 0.7.7
87
+ - !ruby/object:Gem::Dependency
88
+ name: concurrent-ruby
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.0'
94
+ - - "!="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.3.5
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ - - "!="
105
+ - !ruby/object:Gem::Version
106
+ version: 1.3.5
87
107
  - !ruby/object:Gem::Dependency
88
108
  name: em-http-request
89
109
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +215,7 @@ dependencies:
195
215
  version: 1.13.10
196
216
  - - "<"
197
217
  - !ruby/object:Gem::Version
198
- version: '1.16'
218
+ version: '1.19'
199
219
  type: :runtime
200
220
  prerelease: false
201
221
  version_requirements: !ruby/object:Gem::Requirement
@@ -205,7 +225,7 @@ dependencies:
205
225
  version: 1.13.10
206
226
  - - "<"
207
227
  - !ruby/object:Gem::Version
208
- version: '1.16'
228
+ version: '1.19'
209
229
  - !ruby/object:Gem::Dependency
210
230
  name: public_suffix
211
231
  requirement: !ruby/object:Gem::Requirement
@@ -495,7 +515,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
495
515
  - !ruby/object:Gem::Version
496
516
  version: '0'
497
517
  requirements: []
498
- rubygems_version: 3.4.10
518
+ rubygems_version: 3.2.33
499
519
  signing_key:
500
520
  specification_version: 4
501
521
  summary: Gem for running adapter's code outside Workato infrastructure