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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 718e9ceaea1d3ec8a5ad3f5087947e8d99b0acbc9d9cf00a7b9195a6c527bd9c
4
- data.tar.gz: e22b0c545568097c3f94eea29453e3020436e14ec002a3c1653d39a38028a268
3
+ metadata.gz: 4717f389bdab361b692bbd63ec811403579d15fa9eb90b1def698324dcd4c418
4
+ data.tar.gz: 5d453b1439f8f23a23140cfdab3a1f37b349ac2c15fba59df7338088a0a3712b
5
5
  SHA512:
6
- metadata.gz: b5d481814fbfbe8dc7e1474802c38eb0740ebe51b3112c5c5b12ec728c3e0dc0a71a41b61de2a27475f93589cafa0782f44c928889e8ecfe17a6ed5a36647eaf
7
- data.tar.gz: d0f72299b00a8abf372c64247b0c5552fce38050e65db1aa6a52721859bb8d0e56b289f0f430730bad794d2b829900ecff52d5db8e3dd86f83354d3bb2e083b3
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
@@ -1,3 +1,3 @@
1
1
  module StackMaster
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -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(/^[a-zA-Z][-a-zA-Z0-9]*$/)
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.0
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-04-19 00:00:00.000000000 Z
12
+ date: 2018-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler