stack_master 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stack_master/change_set.rb +3 -3
- data/lib/stack_master/version.rb +1 -1
- data/spec/stack_master/change_set_spec.rb +1 -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: 4717f389bdab361b692bbd63ec811403579d15fa9eb90b1def698324dcd4c418
|
4
|
+
data.tar.gz: 5d453b1439f8f23a23140cfdab3a1f37b349ac2c15fba59df7338088a0a3712b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abe8716b51a8a14bdd7ce809c9a221c33c89045b82e93a1eddacd566997600300411a5679ffc6820d8dd4a832bb71b68bd4514afe493bf60c18a21899d3a8bdf
|
7
|
+
data.tar.gz: f7d37b519f8867b287d454ad006b95c0a7c851eecf967e43ff3ef1b5f939f17a0a5036390b10e4fa53220e265aa61cbfb0e011b7c43415e553dab3053b16ee9f
|
@@ -6,13 +6,13 @@ module StackMaster
|
|
6
6
|
'FAILED'
|
7
7
|
]
|
8
8
|
|
9
|
-
def self.generate_change_set_name
|
10
|
-
'StackMaster' + Time.now.strftime('%Y-%m-%d-%H%M-%s')
|
9
|
+
def self.generate_change_set_name(stack_name)
|
10
|
+
stack_name + '-StackMaster' + Time.now.strftime('%Y-%m-%d-%H%M-%s')
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.create(create_options)
|
14
14
|
cf = StackMaster.cloud_formation_driver
|
15
|
-
change_set_name = generate_change_set_name
|
15
|
+
change_set_name = generate_change_set_name(create_options.fetch(:stack_name))
|
16
16
|
change_set_id = cf.create_change_set(create_options.merge(change_set_name: change_set_name)).id
|
17
17
|
find(change_set_id)
|
18
18
|
end
|
data/lib/stack_master/version.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe StackMaster::ChangeSet do
|
|
7
7
|
describe '.generate_change_set_name' do
|
8
8
|
context 'valid name' do
|
9
9
|
it 'creates a valid name' do
|
10
|
-
expect(StackMaster::ChangeSet.generate_change_set_name).to match(/^
|
10
|
+
expect(StackMaster::ChangeSet.generate_change_set_name('foobar')).to match(/^foobar-StackMaster[-a-zA-Z0-9]*$/)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Hodgkiss
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|