kumo_keisei 2.0.0 → 2.1.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
  SHA1:
3
- metadata.gz: 359900941b787e935e12301f79e9689e4c930fd1
4
- data.tar.gz: 1c4c3bf8d3341f174067f63ff7230ae3595d90c3
3
+ metadata.gz: 5a1997e94015e3b5c97915031183ea8945773e9b
4
+ data.tar.gz: 22f51402be0f01919a948b75410df280ce73898e
5
5
  SHA512:
6
- metadata.gz: b2f680a64a1f28a6322555182f81345f7aa168216ba60978e20490a9a7bf241bc560ef946747ec4ecbe0265079d60aafcca4e653c30203554d2ce406e1386db0
7
- data.tar.gz: 5f699f518da44562cd9ca1b004e456d877e038c7a322d78817e78f60c5e9e7f5335e4576ee0e110cbe28c89653ee2c254e06e528e231746b0a94a15552b83b57
6
+ metadata.gz: 57b9809c9d95b38b6d4d9459015d33695123ba819ece73dc900a188fbb249474a70a33d7a57ee9a6d9c1c00a3f6ffb4a2fa185c32f2b79433efdc75d318ba072
7
+ data.tar.gz: 60ba8b07cbae4502f2cdbb44f0b187fc122c86b1070515c6c911ec319aa65bd01799a44c8036604c8c89112348ceb4d456f2ec7e324e769398f22a59f9f34bba
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -2,6 +2,7 @@ require 'aws-sdk'
2
2
 
3
3
  require_relative "parameter_builder"
4
4
  require_relative "console_jockey"
5
+ require_relative "errors"
5
6
 
6
7
  module KumoKeisei
7
8
  class CloudFormationStack
@@ -31,6 +32,7 @@ module KumoKeisei
31
32
  end
32
33
 
33
34
  def initialize(stack_name, stack_template, stack_params_filepath = nil, confirmation_timeout=30)
35
+ raise StackValidationError.new("The stack name needs to be 32 characters or shorter") if stack_name.length > 32
34
36
  @stack_name = stack_name
35
37
  @stack_template = stack_template
36
38
  @stack_params_filepath = stack_params_filepath
@@ -0,0 +1,3 @@
1
+ module KumoKeisei
2
+ class StackValidationError < StandardError; end
3
+ end
data/lib/kumo_keisei.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require_relative "kumo_keisei/cloud_formation_stack"
2
2
  require_relative "kumo_keisei/environment_config"
3
+ require_relative "kumo_keisei/errors"
@@ -60,6 +60,20 @@ describe KumoKeisei::CloudFormationStack do
60
60
 
61
61
  end
62
62
 
63
+ describe "#initialize" do
64
+ it "accepts short stack names" do
65
+ instance
66
+ end
67
+
68
+ context "a stack name that is too long" do
69
+ let(:stack_name) { "long-stack-name-that-will-make-aws-barf" }
70
+
71
+ it "blows up since the ELB names have to be 32 or shorter" do
72
+ expect { instance }.to raise_error(KumoKeisei::StackValidationError, "The stack name needs to be 32 characters or shorter")
73
+ end
74
+ end
75
+ end
76
+
63
77
  describe "#apply!" do
64
78
  context "when the stack is updatable" do
65
79
  UPDATEABLE_STATUSES = ['UPDATE_ROLLBACK_COMPLETE', 'CREATE_COMPLETE', 'UPDATE_COMPLETE']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumo_keisei
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Redbubble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-16 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -100,6 +100,7 @@ files:
100
100
  - lib/kumo_keisei/cloud_formation_stack.rb
101
101
  - lib/kumo_keisei/console_jockey.rb
102
102
  - lib/kumo_keisei/environment_config.rb
103
+ - lib/kumo_keisei/errors.rb
103
104
  - lib/kumo_keisei/file_loader.rb
104
105
  - lib/kumo_keisei/parameter_builder.rb
105
106
  - script/build.sh
@@ -142,3 +143,4 @@ test_files:
142
143
  - spec/lib/kumo_keisei/file_loader_spec.rb
143
144
  - spec/lib/kumo_keisei/parameter_builder_spec.rb
144
145
  - spec/spec_helper.rb
146
+ has_rdoc: