ruby-sfn-local 0.1.23 → 0.1.26
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 +4 -4
- data/lib/sfn/execution.rb +6 -4
- data/lib/sfn/state_machine.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff99b4bae62c62426875ba1648587694c067f1a6d75e93141f3db3cd190d7d77
|
4
|
+
data.tar.gz: eba01eca2c917702c83d9d41f76059895cda06e748789f0612f30ee84463f6a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c4aaa0b42443f7635d5bbd799fe53170f0ca1aea60025966242a5dfefdc7bbadde4d1e28367344b1c344975e3ec7fad1e2dde8aab14ea22270e4d29e0d090b1
|
7
|
+
data.tar.gz: f3486082711ed0e33608fecd9072c3cee367ccd8ec6eac75ddfcaffeae0d17cdd4bf08d4dc70de944c8880e6ccd8e410cca822671a5815d84c399ec8414fa401
|
data/lib/sfn/execution.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Sfn
|
4
4
|
class Execution
|
5
|
-
attr_accessor :id, :uuid, :state_machine, :test_case, :arn, :output, :profile
|
5
|
+
attr_accessor :id, :start_date, :uuid, :state_machine, :test_case, :arn, :output, :profile
|
6
6
|
|
7
7
|
def self.call(state_machine, test_case, mock_data, input, dry_run = false)
|
8
8
|
new(state_machine, test_case).exec(mock_data, input, dry_run)
|
@@ -17,12 +17,14 @@ module Sfn
|
|
17
17
|
|
18
18
|
def exec(mock_data, input, dry_run = false)
|
19
19
|
MockData.write_context(state_machine.name, test_case, mock_data)
|
20
|
-
|
20
|
+
out = AwsCli.run('stepfunctions', 'start-execution',
|
21
21
|
{ name: uuid,
|
22
22
|
'state-machine': "#{state_machine.arn}##{test_case}",
|
23
23
|
input: "'#{input.to_json}'"
|
24
|
-
}
|
25
|
-
|
24
|
+
})
|
25
|
+
decoded = JSON.parse(out)
|
26
|
+
self.arn = decoded["executionArn"]
|
27
|
+
self.start_date = decoded["startDate"].gsub("000+00:00", "Z")
|
26
28
|
self.output, self.profile = ExecutionLog.parse(arn, dry_run)
|
27
29
|
self
|
28
30
|
end
|
data/lib/sfn/state_machine.rb
CHANGED
@@ -75,10 +75,11 @@ module Sfn
|
|
75
75
|
local_definition = local_definition.gsub(/"Seconds": [0-9]+,*/, '')
|
76
76
|
local_definition = local_definition.gsub(/"Timestamp": "[0-9\-T:+]+",*/, '')
|
77
77
|
local_definition = local_definition.gsub(/"TimestampPath": "[^\"]+",*/, '')
|
78
|
-
local_definition = local_definition.gsub(/,[\s\n]+\}/, "\n}")
|
79
78
|
local_definition = local_definition.gsub("ItemProcessor", "Iterator")
|
80
79
|
local_definition = local_definition.gsub("ItemSelector", "Parameters")
|
81
|
-
local_definition = local_definition.gsub(/"ProcessorConfig":\s
|
80
|
+
local_definition = local_definition.gsub(/"ProcessorConfig":\s*{[\s"[A-Za-z:,]]+},*/, "")
|
81
|
+
local_definition = local_definition.gsub(/"Label": "[A-Za-z]+",*/, "")
|
82
|
+
local_definition = local_definition.gsub(/,[\s\n]+\}/, "\n}")
|
82
83
|
|
83
84
|
File.open(local_definition_path, 'w') { |file| file.puts local_definition }
|
84
85
|
"file://#{local_definition_path}"
|
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.
|
4
|
+
version: 0.1.26
|
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-02-
|
11
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-release
|