convection 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67bf51eb16483fd69d3076cddb1dd2e78dace915
4
- data.tar.gz: 7bb593969be4f0f776d4129c9435408180a79a9e
3
+ metadata.gz: 6eb0cecf4e873a75c7abf850b795786837b85cb2
4
+ data.tar.gz: b2704f598ff92807862d823806328c539e89b52a
5
5
  SHA512:
6
- metadata.gz: 0120c0fc5b9a7bd2bac857823cf77fa0910d30b464cb18d6e5bade366ff55935e24d0d771acdd00aa0c7d1402a8d8da3e8ae1ceea01254f9b42b4db36ed1a514
7
- data.tar.gz: 9333ef1c307dc39f36542e878aae36911728d0d8cfda403dc4d93f5cfc499444bfcaf5fee0e8438366b8fce21af3ae01a2fe61e4292d304dc1b875f9ecb84a2f
6
+ metadata.gz: 20866250ab205d749bd82acf22ed8524a45304dfab396a36a1cc40ec61fe7fd22fe18451cbc1d8e76390afe47cdb13e0d1b7595e543611c617b89179faad867a
7
+ data.tar.gz: 8f1594eca1eb71c617be8a90e70e2502c584346c88b5c00575cb9b408fdb7ffd823f9203a49df6ca63ecd36378a2328e3fda2a466f8dc6bd9c5c6dcf1bbeebb5
@@ -33,7 +33,7 @@ module Convection
33
33
  # @see Convection::Control::Stack#initialize
34
34
  def stack(stack_name, template, options = {}, &block)
35
35
  options[:region] ||= region
36
- options[:exclude_availability_zones] = exclude_availability_zones
36
+ options[:exclude_availability_zones] = exclude_availability_zones unless exclude_availability_zones.nil?
37
37
  options[:cloud] = name
38
38
  options[:attributes] = attributes
39
39
  options[:retry_limit] = retry_limit
@@ -57,6 +57,10 @@ module Convection::Control
57
57
  it 'can get default availability_zones' do
58
58
  expect(subject.availability_zones).to contain_exactly('eu-central-1a', 'eu-central-1b')
59
59
  end
60
+
61
+ it 'can get default exclude_availability_zones' do
62
+ expect(subject.exclude_availability_zones).to match_array([])
63
+ end
60
64
  end
61
65
  end
62
66
  end
@@ -3,11 +3,32 @@ require 'stringio'
3
3
 
4
4
  module Convection::Model
5
5
  describe Cloudfile do
6
+ let(:template) do
7
+ Convection.template do
8
+ description 'EC2 VPC Test Template'
9
+
10
+ ec2_vpc 'TargetVPC' do
11
+ network '10.0.0.0'
12
+ subnet_length 24
13
+ enable_dns
14
+ end
15
+ end
16
+ end
17
+
6
18
  describe 'stack' do
7
19
  subject do
8
- klass = Class.new
9
- klass.extend(Convection::DSL::Cloudfile)
10
- klass
20
+ # initialize does too much to call that directly
21
+ # setup only what we need for testing... :/
22
+ class TestCloudfile < Convection::Model::Cloudfile
23
+ def initialize(_)
24
+ @attributes = Convection::Model::Attributes.new
25
+ @stacks = {}
26
+ @deck = []
27
+ @stack_groups = {}
28
+ @thread_count ||= 2
29
+ end
30
+ end
31
+ TestCloudfile.new(nil)
11
32
  end
12
33
 
13
34
  it 'can get cloud name' do
@@ -24,6 +45,12 @@ module Convection::Model
24
45
  subject.exclude_availability_zones %w(eu-central-1a)
25
46
  expect(subject.exclude_availability_zones).to contain_exactly('eu-central-1a')
26
47
  end
48
+
49
+ it 'can get default exclude_availability_zones' do
50
+ subject.stack('test-stack', template, :region => 'us-east-1')
51
+ stack = subject.stacks['test-stack']
52
+ expect(stack.exclude_availability_zones).to match_array([])
53
+ end
27
54
  end
28
55
  end
29
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-19 00:00:00.000000000 Z
11
+ date: 2017-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  version: '0'
330
330
  requirements: []
331
331
  rubyforge_project:
332
- rubygems_version: 2.4.5
332
+ rubygems_version: 2.4.3
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: A fully generic, modular DSL for AWS CloudFormation