ruby-sfn-local 0.1.27 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hash.rb +16 -0
- data/lib/sfn/state_machine.rb +2 -2
- data/lib/sfn.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be57c78578b7ddee065c2bcd524f3a8a76fbee4c8f55010fcb2ed08c9daae437
|
4
|
+
data.tar.gz: '072679be3d8981e2831a27ba5e47bb7b8ca588b779e6aab5ba2a38673e72918e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c62f2e9b6c359688ac144d19b2f0816839e95bd3249683f0df2b5abdedea609638c0238e9d90867792340a1ad159fae0397c3b065a38a520ed54f4d958c1e2c7
|
7
|
+
data.tar.gz: ae4203012bb56dca90fc2a771e9da7988dc0296995d5db402106da4b70a8230a3bb55078bb230598d45fe0e1b468760fc066da57bc4b78beed0c4f1a4e3968a9
|
data/lib/hash.rb
ADDED
data/lib/sfn/state_machine.rb
CHANGED
@@ -30,7 +30,7 @@ module Sfn
|
|
30
30
|
def initialize(name, variables = {}, arn = nil)
|
31
31
|
self.path = "#{Sfn.configuration.definition_path}/#{name}.json"
|
32
32
|
self.name = name.split('/').last
|
33
|
-
self.variables = variables
|
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 = {}
|
36
36
|
end
|
@@ -83,7 +83,7 @@ module Sfn
|
|
83
83
|
local_definition = local_definition.gsub(/,[\s\n]+\}/, "\n}")
|
84
84
|
local_definition = local_definition.gsub(/(\${[a-z_]+})/) do |variable|
|
85
85
|
key = variable.gsub(/[${}]/, '')
|
86
|
-
variables[key]
|
86
|
+
(self.variables[key] || variable).to_s
|
87
87
|
end
|
88
88
|
File.open(local_definition_path, 'w') { |file| file.puts local_definition }
|
89
89
|
"file://#{local_definition_path}"
|
data/lib/sfn.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gianni Mazza
|
@@ -58,6 +58,7 @@ executables: []
|
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
60
60
|
files:
|
61
|
+
- lib/hash.rb
|
61
62
|
- lib/sfn.rb
|
62
63
|
- lib/sfn/aws_cli.rb
|
63
64
|
- lib/sfn/collection.rb
|