workato-connector-sdk 1.3.1 → 1.3.3

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: 2a456929ee155b6a048f547defcb4f3ccfcdd2172c1e0539ca601d8268bc0060
4
- data.tar.gz: 588a1bae54828aa7fb750aaa53ca57336c14693478ac096b810b441008186fde
3
+ metadata.gz: '04149c3903c23d8e7e6a02b0f76928d08bd4aeeab5f6fa2602e039a3e1adcb92'
4
+ data.tar.gz: ad69735af0f602cc35a82507d2479cc5ae3057f0423322aaaa42e7f70c0ad2d2
5
5
  SHA512:
6
- metadata.gz: 5ab021777798644396d5d910c6d3c6f6ebf7ef23956ca7c3b5e79ec2d01d9f59776ea7afa4cbf8c9d501d18c4fc8142e1d4794e15bb3ade22692a3a95c94e4f4
7
- data.tar.gz: e101977c93f1d878cd27c7170e143fbaf7f1221b52d80c489c5ca37915783662bd8571041bae0d4ad75094851ad74f00e6434c331da902d580e9e13098eb21a5
6
+ metadata.gz: 9c9d9ecafec79226a203c838395303be2619d602be8d3645bdce7215397d19a628a946ac4ef87efbeb887183fe4fbdaf4ea74797a0a1063198c2c12a60186ce7
7
+ data.tar.gz: 28da7967c46441234a655bd32c498a04400ed6a26f7d7d5481154c7167ce18bf5f05f0a9e289805132c97b5cc45477eae7b4127a890aa331ee8f8ab04ee3c5c1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.3
@@ -1,3 +1,4 @@
1
+ # typed: false
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Workato
@@ -1,6 +1,7 @@
1
1
  # typed: false
2
2
  # frozen_string_literal: true
3
3
 
4
+ require 'thor'
4
5
  require 'securerandom'
5
6
  require 'workato/web/app'
6
7
  require_relative './multi_auth_selected_fallback'
@@ -70,7 +71,7 @@ module Workato
70
71
  end
71
72
 
72
73
  def require_gems
73
- require 'oauth2'
74
+ require 'rest-client'
74
75
  require 'launchy'
75
76
  require 'rack'
76
77
  end
@@ -79,7 +80,7 @@ module Workato
79
80
  @thread = Thread.start do
80
81
  Rack::Handler::WEBrick.run(
81
82
  Workato::Web::App.new,
82
- {
83
+ **{
83
84
  Port: port,
84
85
  BindAddress: options[:ip] || DEFAULT_ADDRESS,
85
86
  SSLEnable: https,
@@ -100,6 +101,7 @@ module Workato
100
101
  return unless @thread
101
102
 
102
103
  Rack::Handler::WEBrick.shutdown
104
+ @thread.join
103
105
  @thread.exit
104
106
  end
105
107
 
@@ -107,7 +109,7 @@ module Workato
107
109
  unless connector.connection.authorization.oauth2?
108
110
  raise 'Authorization type is not OAuth2. ' \
109
111
  'For multi-auth connector ensure correct auth type was used. ' \
110
- "Expected: 'oauth2', got: '#{connector.connection.authorization.type}''"
112
+ "Expected: 'oauth2', got: '#{connector.connection.authorization.type}'"
111
113
  end
112
114
  rescue Workato::Connector::Sdk::InvalidMultiAuthDefinition => e
113
115
  raise "#{e.message}. Please ensure:\n" \
@@ -116,16 +118,6 @@ module Workato
116
118
  'See more: https://docs.workato.com/developing-connectors/sdk/guides/authentication/multi_auth.html'
117
119
  end
118
120
 
119
- def client
120
- @client ||= OAuth2::Client.new(
121
- connector.connection.authorization.client_id,
122
- connector.connection.authorization.client_secret,
123
- site: connector.connection.base_uri,
124
- token_url: connector.connection.authorization.token_url,
125
- redirect_uri: redirect_url
126
- )
127
- end
128
-
129
121
  def authorize_url
130
122
  return @authorize_url if defined?(@authorize_url)
131
123
 
@@ -193,7 +185,15 @@ module Workato
193
185
  extra_settings ||= {}
194
186
  extra_settings.merge(tokens)
195
187
  else
196
- client.auth_code.get_token(code).to_hash
188
+ response = RestClient.post(
189
+ connector.connection.authorization.token_url,
190
+ code: code,
191
+ grant_type: :authorization_code,
192
+ client_id: connector.connection.authorization.client_id,
193
+ client_secret: connector.connection.authorization.client_secret,
194
+ redirect_uri: redirect_url
195
+ )
196
+ JSON.parse(response.body).to_hash
197
197
  end
198
198
  end
199
199
 
@@ -117,7 +117,7 @@ module Workato
117
117
  retry_on_response.each { |m| m.is_a?(::Integer) ? @retry_codes << m : @retry_matchers << m }
118
118
  @retry_codes = RETRY_DEFAULT_CODES if @retry_codes.empty?
119
119
  @retry_methods = (retry_on_request.presence || RETRY_DEFAULT_METHODS).map(&:to_s).map(&:downcase)
120
- @retries_left = [[(max_retries.is_a?(::Integer) && max_retries) || MAX_RETRIES, MAX_RETRIES].min, 0].max
120
+ @retries_left = ((max_retries.is_a?(::Integer) && max_retries) || MAX_RETRIES).clamp(0, MAX_RETRIES)
121
121
  end
122
122
 
123
123
  sig { params(exception: RequestFailedError).returns(T::Boolean) }
@@ -0,0 +1,4 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file is intentionally left blank. Do not remove
@@ -6,7 +6,7 @@ require 'csv'
6
6
  module Workato
7
7
  module Connector
8
8
  module Sdk
9
- CsvError = Class.new(Sdk::RuntimeError)
9
+ CsvError = Class.new(Sdk::Error)
10
10
 
11
11
  CsvFormatError = Class.new(CsvError)
12
12
 
@@ -65,6 +65,13 @@ module Workato
65
65
  end
66
66
  def parse(str, headers:, col_sep: nil, row_sep: nil, quote_char: nil, skip_blanks: nil,
67
67
  skip_first_line: false)
68
+ if headers.is_a?(FalseClass)
69
+ raise Sdk::ArgumentError,
70
+ 'Headers are required. ' \
71
+ 'Pass headers: true to implicitly use the first line or array/string for explicit headers'
72
+
73
+ end
74
+
68
75
  if str.bytesize > MAX_FILE_SIZE_FOR_PARSE
69
76
  raise CsvFileTooBigError.new(str.bytesize, MAX_FILE_SIZE_FOR_PARSE)
70
77
  end
@@ -88,8 +95,8 @@ module Workato
88
95
  end.to_a
89
96
  rescue CSV::MalformedCSVError => e
90
97
  raise CsvFormatError, e
91
- rescue ArgumentError => e
92
- raise Sdk::RuntimeError, e.message
98
+ rescue ::ArgumentError => e
99
+ raise Sdk::ArgumentError, e.message
93
100
  end
94
101
 
95
102
  sig do
@@ -111,8 +118,8 @@ module Workato
111
118
  options[:write_headers] = options[:headers].present?
112
119
 
113
120
  ::CSV.generate(str || String.new, **options, &blk)
114
- rescue ArgumentError => e
115
- raise Sdk::RuntimeError, e.message
121
+ rescue ::ArgumentError => e
122
+ raise Sdk::ArgumentError, e.message
116
123
  end
117
124
 
118
125
  private
@@ -0,0 +1,58 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require 'resolv'
5
+
6
+ module Workato
7
+ module Connector
8
+ module Sdk
9
+ NetLookupError = Class.new(Error)
10
+
11
+ module Dsl
12
+ class NetPackage
13
+ extend T::Sig
14
+
15
+ sig { params(name: String, record: String).returns(T::Array[T::Hash[Symbol, T.untyped]]) }
16
+ def lookup(name, record)
17
+ case record.upcase
18
+ when 'A'
19
+ records = dns_resolver.getresources(name, Resolv::DNS::Resource::IN::A)
20
+ records.map { |d| { address: d.address.to_s } }
21
+ when 'SRV'
22
+ records = dns_resolver.getresources(name, Resolv::DNS::Resource::IN::SRV)
23
+ records.map do |d|
24
+ {
25
+ port: d.port,
26
+ priority: d.priority,
27
+ target: d.target.to_s,
28
+ weight: d.weight
29
+ }
30
+ end
31
+ else
32
+ raise Sdk::ArgumentError, 'Record type not supported, Supported types: "A", "SRV"'
33
+ end
34
+ rescue Resolv::ResolvError, Resolv::ResolvTimeout => e
35
+ raise NetLookupError, e
36
+ end
37
+
38
+ private
39
+
40
+ sig { returns(Resolv::DNS) }
41
+ def dns_resolver
42
+ @dns_resolver ||= T.let(Resolv::DNS.new, T.nilable(Resolv::DNS))
43
+ end
44
+
45
+ T::Sig::WithoutRuntime.sig { params(symbol: T.any(String, Symbol), _args: T.untyped).void }
46
+ def method_missing(symbol, *_args)
47
+ raise UndefinedStdLibMethodError.new(symbol.to_s, 'workato.net')
48
+ end
49
+
50
+ T::Sig::WithoutRuntime.sig { params(_args: T.untyped).returns(T::Boolean) }
51
+ def respond_to_missing?(*_args)
52
+ false
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'jwt'
5
5
  require_relative './csv_package'
6
+ require_relative './net_package'
6
7
  require_relative './stream_package'
7
8
 
8
9
  using Workato::Extension::HashWithIndifferentAccess
@@ -10,14 +11,28 @@ using Workato::Extension::HashWithIndifferentAccess
10
11
  module Workato
11
12
  module Connector
12
13
  module Sdk
14
+ JSONParsingError = Class.new(Error)
15
+
13
16
  module Dsl
14
17
  class WorkatoPackage
15
- JWT_ALGORITHMS = %w[RS256 RS384 RS512].freeze
16
- private_constant :JWT_ALGORITHMS
18
+ JWT_RSA_ALGORITHMS = %w[RS256 RS384 RS512].freeze
19
+ private_constant :JWT_RSA_ALGORITHMS
17
20
 
18
21
  JWT_RSA_KEY_MIN_LENGTH = 2048
19
22
  private_constant :JWT_RSA_KEY_MIN_LENGTH
20
23
 
24
+ JWT_HMAC_ALGORITHMS = %w[HS256 HS384 HS512].freeze
25
+ private_constant :JWT_HMAC_ALGORITHMS
26
+
27
+ JWT_ECDSA_ALGORITHMS = %w[ES256 ES384 ES512].freeze
28
+ private_constant :JWT_ECDSA_ALGORITHMS
29
+
30
+ JWT_ECDSA_KEY_LENGTH_MAPPING = { 'ES256' => 256, 'ES384' => 384, 'ES512' => 521 }.freeze
31
+ private_constant :JWT_ECDSA_KEY_LENGTH_MAPPING
32
+
33
+ JWT_ALGORITHMS = (JWT_RSA_ALGORITHMS + JWT_HMAC_ALGORITHMS + JWT_ECDSA_ALGORITHMS).freeze
34
+ private_constant :JWT_ALGORITHMS
35
+
21
36
  VERIFY_RCA_ALGORITHMS = %w[SHA SHA1 SHA224 SHA256 SHA384 SHA512].freeze
22
37
  private_constant :VERIFY_RCA_ALGORITHMS
23
38
 
@@ -39,37 +54,75 @@ module Workato
39
54
  def jwt_encode(payload, key, algorithm, header_fields = {})
40
55
  algorithm = algorithm.to_s.upcase
41
56
  unless JWT_ALGORITHMS.include?(algorithm)
42
- raise "Unsupported signing method. Supports only #{JWT_ALGORITHMS.join(', ')}. Got: '#{algorithm}'"
57
+ raise Sdk::ArgumentError,
58
+ "Unsupported signing method. Supports only #{JWT_ALGORITHMS.join(', ')}. Got: '#{algorithm}'"
43
59
  end
44
60
 
45
- rsa_private = OpenSSL::PKey::RSA.new(key)
46
- if rsa_private.n.num_bits < JWT_RSA_KEY_MIN_LENGTH
47
- raise "A RSA key of size #{JWT_RSA_KEY_MIN_LENGTH} bits or larger MUST be used with JWT."
61
+ if JWT_RSA_ALGORITHMS.include?(algorithm)
62
+ key = OpenSSL::PKey::RSA.new(key)
63
+ if key.n.num_bits < JWT_RSA_KEY_MIN_LENGTH
64
+ raise Sdk::ArgumentError,
65
+ "A RSA key of size #{JWT_RSA_KEY_MIN_LENGTH} bits or larger MUST be used with JWT"
66
+ end
67
+ elsif JWT_ECDSA_ALGORITHMS.include?(algorithm)
68
+ key = OpenSSL::PKey::EC.new(key)
69
+ if key.group.order.num_bits != JWT_ECDSA_KEY_LENGTH_MAPPING[algorithm]
70
+ raise Sdk::ArgumentError,
71
+ "An ECDSA key of size #{JWT_ECDSA_KEY_LENGTH_MAPPING[algorithm]} bits MUST be used with JWT"
72
+ end
48
73
  end
49
74
 
50
75
  header_fields = HashWithIndifferentAccess.wrap(header_fields).except(:typ, :alg)
51
- ::JWT.encode(payload, rsa_private, algorithm, header_fields)
76
+ ::JWT.encode(payload, key, algorithm, header_fields)
77
+ rescue JWT::IncorrectAlgorithm
78
+ raise Sdk::ArgumentError, 'Mismatched algorithm and key'
79
+ rescue OpenSSL::PKey::PKeyError
80
+ raise Sdk::ArgumentError, 'Invalid key'
81
+ end
82
+
83
+ def jwt_decode(jwt, key, algorithm)
84
+ algorithm = algorithm.to_s.upcase
85
+
86
+ unless JWT_ALGORITHMS.include?(algorithm)
87
+ raise Sdk::ArgumentError,
88
+ 'Unsupported verification algorithm. ' \
89
+ "Supports only #{JWT_ALGORITHMS.join(', ')}. Got: '#{algorithm}'"
90
+ end
91
+
92
+ if JWT_RSA_ALGORITHMS.include?(algorithm)
93
+ key = OpenSSL::PKey::RSA.new(key)
94
+ elsif JWT_ECDSA_ALGORITHMS.include?(algorithm)
95
+ key = OpenSSL::PKey::EC.new(key)
96
+ end
97
+
98
+ payload, header = ::JWT.decode(jwt, key, true, { algorithm: algorithm })
99
+ { payload: payload, header: header }.with_indifferent_access
100
+ rescue JWT::IncorrectAlgorithm
101
+ raise Sdk::ArgumentError, 'Mismatched algorithm and key'
102
+ rescue OpenSSL::PKey::PKeyError
103
+ raise Sdk::ArgumentError, 'Invalid key'
52
104
  end
53
105
 
54
106
  def verify_rsa(payload, certificate, signature, algorithm = 'SHA256')
55
107
  algorithm = algorithm.to_s.upcase
56
108
  unless VERIFY_RCA_ALGORITHMS.include?(algorithm)
57
- raise "Unsupported signing method. Supports only #{VERIFY_RCA_ALGORITHMS.join(', ')}. Got: '#{algorithm}'"
109
+ raise Sdk::ArgumentError,
110
+ "Unsupported signing method. Supports only #{VERIFY_RCA_ALGORITHMS.join(', ')}. Got: '#{algorithm}'"
58
111
  end
59
112
 
60
113
  cert = OpenSSL::X509::Certificate.new(certificate)
61
114
  digest = OpenSSL::Digest.new(algorithm)
62
115
  cert.public_key.verify(digest, signature, payload)
63
116
  rescue OpenSSL::PKey::PKeyError
64
- raise 'An error occurred during signature verification. Check arguments'
117
+ raise Sdk::ArgumentError, 'An error occurred during signature verification. Check arguments'
65
118
  rescue OpenSSL::X509::CertificateError
66
- raise 'Invalid certificate format'
119
+ raise Sdk::ArgumentError, 'Invalid certificate format'
67
120
  end
68
121
 
69
122
  def parse_yaml(yaml)
70
123
  ::Psych.safe_load(yaml)
71
- rescue ::Psych::DisallowedClass => e
72
- raise e.message
124
+ rescue ::Psych::Exception => e
125
+ raise Sdk::ArgumentError, "YAML Parsing error. #{e}"
73
126
  end
74
127
 
75
128
  def render_yaml(obj)
@@ -79,7 +132,7 @@ module Workato
79
132
  def parse_json(source)
80
133
  JSON.parse(source)
81
134
  rescue JSON::ParserError => e
82
- raise JSONResponseFormatError, e
135
+ raise JSONParsingError, e
83
136
  end
84
137
 
85
138
  def uuid
@@ -88,7 +141,7 @@ module Workato
88
141
 
89
142
  def random_bytes(len)
90
143
  unless (len.is_a? ::Integer) && (len <= RANDOM_SIZE)
91
- raise "The requested length or random bytes sequence should be <= #{RANDOM_SIZE}"
144
+ raise Sdk::ArgumentError, "The requested length or random bytes sequence should be <= #{RANDOM_SIZE}"
92
145
  end
93
146
 
94
147
  Types::Binary.new(::OpenSSL::Random.random_bytes(len))
@@ -97,7 +150,7 @@ module Workato
97
150
  def aes_cbc_encrypt(string, key, init_vector = nil)
98
151
  key_size = key.bytesize * 8
99
152
  unless ALLOWED_KEY_SIZES.include?(key_size)
100
- raise 'Incorrect key size for AES'
153
+ raise Sdk::ArgumentError, 'Incorrect key size for AES'
101
154
  end
102
155
 
103
156
  cipher = ::OpenSSL::Cipher.new("AES-#{key_size}-CBC")
@@ -110,7 +163,7 @@ module Workato
110
163
  def aes_cbc_decrypt(string, key, init_vector = nil)
111
164
  key_size = key.bytesize * 8
112
165
  unless ALLOWED_KEY_SIZES.include?(key_size)
113
- raise 'Incorrect key size for AES'
166
+ raise Sdk::ArgumentError, 'Incorrect key size for AES'
114
167
  end
115
168
 
116
169
  cipher = ::OpenSSL::Cipher.new("AES-#{key_size}-CBC")
@@ -128,6 +181,10 @@ module Workato
128
181
  @csv ||= CsvPackage.new
129
182
  end
130
183
 
184
+ def net
185
+ @net ||= NetPackage.new
186
+ end
187
+
131
188
  def stream
132
189
  @stream ||= StreamPackage.new(streams: streams, connection: connection)
133
190
  end
@@ -10,6 +10,8 @@ module Workato
10
10
 
11
11
  RuntimeError = Class.new(Error)
12
12
 
13
+ ArgumentError = Class.new(Error)
14
+
13
15
  InvalidDefinitionError = Class.new(Error)
14
16
 
15
17
  class UnexpectedMethodDefinitionError < InvalidDefinitionError
@@ -156,8 +156,9 @@ module Workato
156
156
  self
157
157
  end
158
158
 
159
- def format_xml(root_element_name, namespaces = {}, **options)
160
- request_format_xml(root_element_name, namespaces).response_format_xml(**options)
159
+ def format_xml(root_element_name, namespaces = {}, strip_response_namespaces: false)
160
+ request_format_xml(root_element_name, namespaces)
161
+ .response_format_xml(strip_response_namespaces: strip_response_namespaces)
161
162
  end
162
163
 
163
164
  def request_format_xml(root_element_name, namespaces = {})
@@ -212,7 +212,7 @@ module Workato
212
212
  attr_reader :input
213
213
 
214
214
  class Chunk < T::Struct
215
- const :data, T.untyped
215
+ const :data, T.untyped # rubocop:disable Sorbet/ForbidUntypedStructProps
216
216
  const :from, Integer
217
217
  const :eof, T::Boolean
218
218
  const :next_from, T.nilable(Integer)
@@ -9,7 +9,14 @@ module Workato
9
9
  module Connector
10
10
  module Sdk
11
11
  module SorbetTypes
12
- WebhookSubscribeOutputHash = T.type_alias { T::Hash[T.any(String, Symbol), T.untyped] }
12
+ WebhookSubscribeClosureHash = T.type_alias { T::Hash[T.any(String, Symbol), T.untyped] }
13
+
14
+ WebhookSubscribeOutput = T.type_alias do
15
+ T.any(
16
+ WebhookSubscribeClosureHash,
17
+ [WebhookSubscribeClosureHash, T.nilable(T.any(Time, ActiveSupport::TimeWithZone))]
18
+ )
19
+ end
13
20
 
14
21
  WebhookNotificationPayload = T.type_alias { T.untyped }
15
22
 
@@ -121,7 +128,7 @@ module Workato
121
128
  headers: T::Hash[T.any(String, Symbol), T.untyped],
122
129
  params: T::Hash[T.any(String, Symbol), T.untyped],
123
130
  settings: T.nilable(SorbetTypes::SettingsHash),
124
- webhook_subscribe_output: T.nilable(SorbetTypes::WebhookSubscribeOutputHash)
131
+ webhook_subscribe_output: T.nilable(SorbetTypes::WebhookSubscribeClosureHash)
125
132
  ).returns(
126
133
  SorbetTypes::WebhookNotificationOutputHash
127
134
  )
@@ -161,9 +168,7 @@ module Workato
161
168
  settings: T.nilable(SorbetTypes::SettingsHash),
162
169
  input: SorbetTypes::OperationInputHash,
163
170
  recipe_id: String
164
- ).returns(
165
- SorbetTypes::WebhookSubscribeOutputHash
166
- )
171
+ ).returns(SorbetTypes::WebhookSubscribeOutput)
167
172
  end
168
173
  def webhook_subscribe(webhook_url = '', settings = nil, input = {}, recipe_id = recipe_id!)
169
174
  webhook_subscribe_proc = trigger[:webhook_subscribe]
@@ -178,7 +183,7 @@ module Workato
178
183
  end
179
184
  end
180
185
 
181
- sig { params(webhook_subscribe_output: SorbetTypes::WebhookSubscribeOutputHash).returns(T.untyped) }
186
+ sig { params(webhook_subscribe_output: SorbetTypes::WebhookSubscribeClosureHash).returns(T.untyped) }
182
187
  def webhook_unsubscribe(webhook_subscribe_output = {})
183
188
  webhook_unsubscribe_proc = trigger[:webhook_unsubscribe]
184
189
  execute(nil, webhook_subscribe_output) do |_connection, input|
@@ -192,7 +197,7 @@ module Workato
192
197
  payload: T::Hash[T.any(String, Symbol), T.untyped],
193
198
  headers: T::Hash[T.any(String, Symbol), T.untyped],
194
199
  params: T::Hash[T.any(String, Symbol), T.untyped],
195
- webhook_subscribe_output: T.nilable(SorbetTypes::WebhookSubscribeOutputHash)
200
+ webhook_subscribe_output: T.nilable(SorbetTypes::WebhookSubscribeClosureHash)
196
201
  ).returns(
197
202
  T.any(SorbetTypes::WebhookNotificationOutputHash, SorbetTypes::PollOutputHash)
198
203
  )
@@ -17,7 +17,7 @@ module Workato
17
17
  map { |r| r.to_csv(options) }.join
18
18
  else
19
19
  options.delete(:multi_line)
20
- super(options)
20
+ super(**options)
21
21
  end
22
22
  end
23
23
 
@@ -45,8 +45,6 @@ module Enumerable
45
45
  nil
46
46
  end
47
47
 
48
- private
49
-
50
48
  def transform_select(&block)
51
49
  map do |*items|
52
50
  result = block.call(*items)
@@ -12,10 +12,10 @@ module Workato
12
12
  attr_accessor :extra_chain_cert
13
13
 
14
14
  def self.included(base)
15
- ssl_ivnames = base.const_get('SSL_IVNAMES', false)
15
+ ssl_ivnames = base.const_get('SSL_IVNAMES', false) # rubocop:disable Sorbet/ConstantsFromStrings
16
16
  ssl_ivnames << :@extra_chain_cert unless ssl_ivnames.include?(:@extra_chain_cert)
17
17
 
18
- ssl_attributes = base.const_get('SSL_ATTRIBUTES', false)
18
+ ssl_attributes = base.const_get('SSL_ATTRIBUTES', false) # rubocop:disable Sorbet/ConstantsFromStrings
19
19
  ssl_attributes << :extra_chain_cert unless ssl_attributes.include?(:extra_chain_cert)
20
20
  end
21
21
  end
@@ -1,3 +1,4 @@
1
+ # typed: false
1
2
  # frozen_string_literal: true
2
3
 
3
4
  require 'active_support/messages/metadata'
@@ -45,8 +45,7 @@ module Workato
45
45
  end
46
46
 
47
47
  def strip_tags
48
- @html_full_sanitizer ||= Rails::Html::Sanitizer.full_sanitizer.new
49
- @html_full_sanitizer.sanitize(self)
48
+ Rails::Html::Sanitizer.full_sanitizer.new.sanitize(self)
50
49
  end
51
50
 
52
51
  def to_time(form = :local, format: nil)
@@ -1,3 +1,4 @@
1
+ # typed: false
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Workato
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.1
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Abolmasov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -154,30 +154,22 @@ dependencies:
154
154
  name: nokogiri
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '='
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: 1.13.10
160
+ - - "<"
161
+ - !ruby/object:Gem::Version
162
+ version: '1.15'
160
163
  type: :runtime
161
164
  prerelease: false
162
165
  version_requirements: !ruby/object:Gem::Requirement
163
166
  requirements:
164
- - - '='
167
+ - - ">="
165
168
  - !ruby/object:Gem::Version
166
169
  version: 1.13.10
167
- - !ruby/object:Gem::Dependency
168
- name: oauth2
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
170
+ - - "<"
172
171
  - !ruby/object:Gem::Version
173
- version: '1.0'
174
- type: :runtime
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '1.0'
172
+ version: '1.15'
181
173
  - !ruby/object:Gem::Dependency
182
174
  name: rack
183
175
  requirement: !ruby/object:Gem::Requirement
@@ -196,14 +188,14 @@ dependencies:
196
188
  name: rails-html-sanitizer
197
189
  requirement: !ruby/object:Gem::Requirement
198
190
  requirements:
199
- - - '='
191
+ - - "~>"
200
192
  - !ruby/object:Gem::Version
201
193
  version: 1.4.3
202
194
  type: :runtime
203
195
  prerelease: false
204
196
  version_requirements: !ruby/object:Gem::Requirement
205
197
  requirements:
206
- - - '='
198
+ - - "~>"
207
199
  - !ruby/object:Gem::Version
208
200
  version: 1.4.3
209
201
  - !ruby/object:Gem::Dependency
@@ -415,6 +407,7 @@ files:
415
407
  - lib/workato/connector/sdk.rb
416
408
  - lib/workato/connector/sdk/account_properties.rb
417
409
  - lib/workato/connector/sdk/action.rb
410
+ - lib/workato/connector/sdk/blank.rb
418
411
  - lib/workato/connector/sdk/block_invocation_refinements.rb
419
412
  - lib/workato/connector/sdk/connection.rb
420
413
  - lib/workato/connector/sdk/connector.rb
@@ -428,6 +421,7 @@ files:
428
421
  - lib/workato/connector/sdk/dsl/execution_context.rb
429
422
  - lib/workato/connector/sdk/dsl/http.rb
430
423
  - lib/workato/connector/sdk/dsl/lookup_table.rb
424
+ - lib/workato/connector/sdk/dsl/net_package.rb
431
425
  - lib/workato/connector/sdk/dsl/reinvoke_after.rb
432
426
  - lib/workato/connector/sdk/dsl/stream_package.rb
433
427
  - lib/workato/connector/sdk/dsl/time.rb