ruby-sfn-local 0.1.17 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfn/execution.rb +2 -1
- data/lib/sfn/state_machine.rb +7 -1
- 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: 6bd6e4900461c1cd42b5143325c540781314111197b76ae27b4768eb19bd1a50
|
4
|
+
data.tar.gz: 85c3a15791c5e40840e39c7ee56ad4beb5d47c07d141c9a8b1492d374336ad57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e48fa25f3ab80421f1e5412cd4dd30a85952a6375f6f13b96490e4a1346fc088ee952810f2eb038bd254c3ead6665fff92a70c49afc47ec0a60e9b8060a2764a
|
7
|
+
data.tar.gz: 49b30270ef15c4ce668c895a6cff508959405a6cbcb730f2e373e22832251ebbf7dfc091e8b1d61a802b89ec9fe70975161f4594eb32cf16815e4fcf17248733
|
data/lib/sfn/execution.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Sfn
|
4
4
|
class Execution
|
5
|
-
attr_accessor :uuid, :state_machine, :test_case, :arn, :output, :profile
|
5
|
+
attr_accessor :id, :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)
|
@@ -11,6 +11,7 @@ module Sfn
|
|
11
11
|
def initialize(state_machine, test_case)
|
12
12
|
self.uuid = SecureRandom.uuid
|
13
13
|
self.state_machine = state_machine
|
14
|
+
self.id = "#{self.state_machine.arn.gsub("stateMachine","execution")}:#{self.uuid}"
|
14
15
|
self.test_case = test_case.camelize
|
15
16
|
end
|
16
17
|
|
data/lib/sfn/state_machine.rb
CHANGED
@@ -69,7 +69,13 @@ module Sfn
|
|
69
69
|
local_definition_path = Tempfile.new(['name', '.json']).path
|
70
70
|
|
71
71
|
definition = File.read(path)
|
72
|
-
local_definition = definition
|
72
|
+
local_definition = definition
|
73
|
+
local_definition = local_definition.gsub(/"MaxConcurrency": [0-9]+/, '"MaxConcurrency": 1')
|
74
|
+
local_definition = local_definition.gsub(/"Type": "Wait"/, '"Type": "Pass"')
|
75
|
+
local_definition = local_definition.gsub(/"Seconds": [0-9]+,*/, '')
|
76
|
+
local_definition = local_definition.gsub(/"Timestamp": "[0-9\-T:+]+",*/, '')
|
77
|
+
local_definition = local_definition.gsub(/"TimestampPath": "[^\"]+",*/, '')
|
78
|
+
local_definition = local_definition.gsub(/,[\s\n]+\}/, "\n}")
|
73
79
|
|
74
80
|
File.open(local_definition_path, 'w') { |file| file.puts local_definition }
|
75
81
|
"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.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gianni Mazza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-release
|