build-cloud 1.0.1 → 1.1.1

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
  SHA256:
3
- metadata.gz: 39aa180c26085846c7d4e2aaba7f84415d52cb47c2ec250cc492961c0f83188f
4
- data.tar.gz: a6caef57c83912476052187c9eecac72de9763bb30100bf7d92a245884332d3b
3
+ metadata.gz: c0c0da77facee8f1326602a5e1308d9b44a137dca74a394ffb617fef7715a85d
4
+ data.tar.gz: 487cf65ace7619dc8b874f0e3d815955dc5bb1f5326f7d8f84119dc948962f77
5
5
  SHA512:
6
- metadata.gz: ff2c446f7bee23d38d51b221da0cd6badc644eadfc6ca5fa32f4ed251eb97a91d4cc21fcdad315cc59a49bf808c5a99e34581350879c220299855f1303eed6f5
7
- data.tar.gz: 95dfa911a13abacfd75831add16fccacc2c21e717bba4633d910da984bb963e36bb6facccdf74076fbbb6924a278dcc69f25cf37830b1d55a66490489ea75603
6
+ metadata.gz: 5907f90f70b637540ad2c14f680c12908565eb1bc8a12f57ab119f86a4a24bcf4e7c6113d0872358fa8777b74aadcd83851bb78fee03dcdc5e7be8f7042e1c56
7
+ data.tar.gz: 691cb9b0bea5e38cbb945157e616326f2583c6229b9be4ba8abb5ac9c404198d3910e7a8a2388fd253a07ace53787e0fa1713d194d8366a80a263af9df20e0cb
data/CHANGELOG.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Changelog
2
2
 
3
- 2018-04-12 - version 1.0.1 - VPC's now lifecycle tags.
4
-
5
3
  2017-11-13 - version 0.0.24 - Fix a bug which prevented working with IAM roles in AWS accounts with more than 100 roles. Thank you @markchalloner!
6
4
 
7
5
  2017-03-01 - version 0.0.23 - Fix a bug where non-string values for interpolated variables caused a crash.
data/build-cloud.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "build-cloud"
7
- spec.version = "1.0.1"
7
+ spec.version = "1.1.1"
8
8
  spec.authors = ["The Scale Factory"]
9
9
  spec.email = ["info@scalefactory.com"]
10
10
  spec.summary = %q{Tools for building resources in AWS}
@@ -35,27 +35,19 @@ class BuildCloud::VPC
35
35
  end
36
36
 
37
37
  def create
38
+
39
+ return if exists?
38
40
 
39
- options = @options.dup
40
- tag_name = options.delete(:name)
41
-
42
- if !options[:tags]
43
- options[:tags] = { 'Name' => tag_name }
44
- end
45
-
46
- if exists?
47
- # If exists update tags
48
- create_tags(options[:tags])
49
- return
50
- end
41
+ @log.info( "Creating new VPC for #{@options[:cidr_block]}" )
51
42
 
43
+ options = @options.dup
52
44
 
53
- @log.info( "Creating new VPC for #{@options[:cidr_block]}" )
45
+ options[:tags] = { 'Name' => options.delete(:name) }
54
46
 
55
47
  vpc = @compute.vpcs.new( options )
56
48
  vpc.save
57
49
 
58
- create_tags(tags)
50
+ @compute.create_tags( vpc.id, options[:tags] )
59
51
 
60
52
  wait_until_ready
61
53
 
@@ -92,11 +84,5 @@ class BuildCloud::VPC
92
84
  @options[key]
93
85
  end
94
86
 
95
- def create_tags(tags)
96
- if tags != fog_object.tags
97
- @log.info("Updating tags")
98
- @compute.create_tags( fog_object.id, tags )
99
- end
100
- end
101
-
102
87
  end
88
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Scale Factory
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-20 00:00:00.000000000 Z
11
+ date: 2018-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler