build-cloud 1.1.4 → 1.1.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 +4 -4
- data/CHANGELOG.md +2 -0
- data/build-cloud.gemspec +1 -1
- data/lib/build-cloud/securitygroup.rb +15 -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: 6bcf14843354c6ea7a7c8a0deef9ccc1c35ffb560b6f9cda99043279f3a0a781
|
|
4
|
+
data.tar.gz: 5b01a023db2efe5018899afd3832746fc37679090f93f004fc21fb6cc11ee17d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbfe670bd630c4df82d1d1a6cb72ec7ef65c013fc517e9a0c6594ce73a1b26b709d6059ca9368a09454e360377625c17b95d3fa1cc0a6e492fc060a672ca2ef4
|
|
7
|
+
data.tar.gz: df224f150e62d3460caa920c770ad10d8673c47bf3b1c10be4cd464259c3bf6a933b49103cd0fed7893aa4db35b16c4b50457d2b474df5b24e2856a156550fa7
|
data/CHANGELOG.md
CHANGED
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.1.
|
|
7
|
+
spec.version = "1.1.5"
|
|
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}
|
|
@@ -45,7 +45,12 @@ class BuildCloud::SecurityGroup
|
|
|
45
45
|
options.delete(:authorized_ranges)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
if exists?
|
|
49
|
+
# If exists update tags
|
|
50
|
+
if options[:tags]
|
|
51
|
+
create_tags(options[:tags])
|
|
52
|
+
end
|
|
53
|
+
else
|
|
49
54
|
|
|
50
55
|
@log.info( "Creating security group #{@options[:name]}" )
|
|
51
56
|
|
|
@@ -210,5 +215,14 @@ class BuildCloud::SecurityGroup
|
|
|
210
215
|
|
|
211
216
|
end
|
|
212
217
|
|
|
218
|
+
def create_tags(tags)
|
|
219
|
+
# force symbols to strings in yaml tags
|
|
220
|
+
resolved_tags = fog_object.tags.dup.merge(tags.collect{|k,v| [k.to_s, v]}.to_h)
|
|
221
|
+
if resolved_tags != fog_object.tags
|
|
222
|
+
@log.info("Updating tags for security group #{fog_object.name}")
|
|
223
|
+
@compute.create_tags( fog_object.group_id.to_s, tags )
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
213
227
|
end
|
|
214
228
|
|
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.1.
|
|
4
|
+
version: 1.1.5
|
|
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-
|
|
11
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|