ruby-sfn-local 0.1.31 → 0.1.33

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: b1963aa6575f9ccf4b9d0f85dc5d0eb0dc322a30b530b0799e5054ed9dfe8f6d
4
- data.tar.gz: 94e3c5a1f3d67448fa0fac5c3e2577df9bfd49e00cd4c764c4b1ebc7335e31bb
3
+ metadata.gz: 8b59ef356b7beac13ca2099b87f02ae53a0926fb2435eaf873816dc6819d874d
4
+ data.tar.gz: ced914931b321fd700a86016f5f72a4f373fb5ee3ee9b04991e161cfbc9dba2f
5
5
  SHA512:
6
- metadata.gz: 7d89503a3a5c85660c9d24e241c1935b8b0892ad691b1b55a43c262a4e296c30f64274d82a60da1915f41af00f5644502fc26a0154fa86059c25ebb2b96c64f4
7
- data.tar.gz: 83eeeab810e932884757cf8efa799a6858ac820528be23bfb35414d6439fcdbe35c0717950a035b8ce3257369b04878f0f9d8c6efa01828842641c4ef28aa738
6
+ metadata.gz: f2c0c6d71e2f32e6875322218092b7aab0b697f53214d0e1177f8431fb648afa617ea32a0bd1ba5913021952d6140ba11d5a968ed5725d9948f478689bc18f07
7
+ data.tar.gz: c3219514cde0d4c26c9f446d50480dcb63baa3d82f3adf4073cf0962f4a61433ca6c0fd7e0ea99bd934ea8d6768636ccfe5e5d72786494b385c269d0d386429f
@@ -5,7 +5,7 @@ module Sfn
5
5
  module ApiGateway
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -16,7 +16,7 @@ module Sfn
16
16
  end
17
17
  end
18
18
  out = {}
19
- data.each_with_index do |val, idx|
19
+ out_data.each_with_index do |val, idx|
20
20
  out[idx.to_s] = val
21
21
  end
22
22
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module Lambda
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module NativeIntegration
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -13,7 +13,7 @@ module Sfn
13
13
  end
14
14
  end
15
15
  out = {}
16
- data.each_with_index do |val, idx|
16
+ out_data.each_with_index do |val, idx|
17
17
  out[idx.to_s] = val
18
18
  end
19
19
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module OptimisedStepFunction
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -5,11 +5,11 @@ module Sfn
5
5
  module SdkIntegration
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  { Return: val.to_json }
10
10
  end
11
11
  out = {}
12
- data.each_with_index do |val, idx|
12
+ out_data.each_with_index do |val, idx|
13
13
  out[idx.to_s] = val
14
14
  end
15
15
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module SecretsManager
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module Sns
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module Sqs
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Throw: { Error: val[:error], Cause: val[:cause] } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -5,7 +5,7 @@ module Sfn
5
5
  module StepFunction
6
6
  def self.response(data)
7
7
  data = [data] if data.is_a?(Hash)
8
- data.map! do |val|
8
+ out_data = data.map do |val|
9
9
  if val.key?(:error)
10
10
  { Return: { Error: val[:error], Cause: val[:cause], Status: 'FAILED' } }
11
11
  else
@@ -15,7 +15,7 @@ module Sfn
15
15
  end
16
16
  end
17
17
  out = {}
18
- data.each_with_index do |val, idx|
18
+ out_data.each_with_index do |val, idx|
19
19
  out[idx.to_s] = val
20
20
  end
21
21
  out
@@ -29,7 +29,7 @@ module Sfn
29
29
 
30
30
  def initialize(name, variables = {}, arn = nil)
31
31
  self.path = "#{Sfn.configuration.definition_path}/#{name}.json"
32
- self.name = name.split('/').last
32
+ self.name = name.gsub('/','-')
33
33
  self.variables = (variables || {}).stringify_keys
34
34
  self.arn = arn || self.class.find_by_name(self.name)&.arn || create_state_machine
35
35
  self.executions = {}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-sfn-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gianni Mazza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-release
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.1.2
101
+ rubygems_version: 3.1.6
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Step Functions local ruby wrapper!