build-cloud 0.0.21 → 0.0.22

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: a9680bce5369f6136331f066c50a5df61e71a95f
4
- data.tar.gz: a8f948cc45624a78d9a52aacb013c834733e4775
3
+ metadata.gz: 2c6d6f44935d6b297b2e74da6825243acb7135ce
4
+ data.tar.gz: ae1e2eba8f74c20c0d0c4d847a736466a15b0653
5
5
  SHA512:
6
- metadata.gz: 4f749a75d4ad5c186260f41efe4909ca475762de2a42487dbb433c55ab13d4766da153579e0dba272e744935bff7530b2beccdc7e81ded1e6db7f35c58c983f0
7
- data.tar.gz: 242db7ff37fa2a8c3e282424fd3faea53c32c3c865efec02053bb7bfd6f316a64f8c598cebb3827b824adef41dd6d44f1fe32a030dba8841b30f95157b1a791c
6
+ metadata.gz: c8b3ba340c841a46e0f925e850405aeaa1b35fbaba83abe934008587afca2e08fb5504c20eeedabc4cf7ce1d843cced62c5d7de1187466217a042eac0ab12fee
7
+ data.tar.gz: b2d671fa5215fc87ebeb889aba4a4f7084da453440f5a7a33b5b0a34dc298f814b1b58288e43d30ad38e09446a73580b17e6369887a7a5263b38d4a9b8f3d4bb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ 2016-10-18 - version 0.0.22 - Fix launch configuration error where drives are different in config to fog.
4
+
3
5
  2016-07-22 - version 0.0.21 - Add support for replacing changed ASG Launch Configurations
4
6
 
5
7
  2016-07-08 - version 0.0.20 - Add support for creating Users, Groups and lifecycle management of their policies. Add support for creating and deleting custom Managed Policies, no lifecycle support for policy versions. Improve IAM role support, lifecycle support for policies: now removes and updates role policies if they change/removed. Add policy lifecycle to S3 buckets.
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 = "0.0.21"
7
+ spec.version = "0.0.22"
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}
@@ -82,6 +82,7 @@ class BuildCloud::LaunchConfiguration
82
82
  launch_config = @as.configurations.new( options )
83
83
  launch_config.save
84
84
  else
85
+ @log.debug( "Assessing launch configuration #{@options[:id]}" )
85
86
  fog_options = {}
86
87
  fog_object.attributes.each do |k, v|
87
88
  if v.nil?
@@ -137,23 +138,26 @@ class BuildCloud::LaunchConfiguration
137
138
  munged_options[:instance_monitoring] = {:enabled => true}
138
139
  end
139
140
 
140
- differences = Hash[*(
141
- (fog_options.size > munged_options.size) \
142
- ? fog_options.to_a - munged_options.to_a \
143
- : munged_options.to_a - fog_options.to_a
144
- ).flatten]
145
-
146
141
  @log.debug("Fog options: #{fog_options.inspect}")
147
142
  @log.debug("Munged options: #{munged_options.inspect}")
148
143
 
144
+ differences = {}
145
+ removals = {}
146
+ munged_options.each {|k, v| differences[k] = fog_options[k] if fog_options[k] != v }
147
+ fog_options.each {|k, v| removals[k] = munged_options[k] if ! munged_options[k] }
148
+
149
149
  unless fog_options == munged_options
150
150
  @log.debug("Differences between fog and options is: #{differences}")
151
+ @log.debug("Removals between fog and options is: #{removals}")
151
152
 
152
153
  @log.info("Updating Launch Configuration #{fog_object.id}")
153
154
  # Now for some useful messaging
154
155
  differences.each do |k,v|
155
156
  @log.info(" ... updating #{k}")
156
157
  end
158
+ removals.each do |k,v|
159
+ @log.info(" ... removing #{k}")
160
+ end
157
161
 
158
162
  # create new configuration
159
163
  # update id to have current unix timestamp
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: 0.0.21
4
+ version: 0.0.22
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: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2016-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler