rivet 1.0.3 → 1.0.4

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.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Rivet CHANGELOG
2
2
  ===
3
3
 
4
+ 1.0.4 - Released 11/11/2013
5
+ ---
6
+ * Handles nil options in the launch_configuration gracefully.
7
+
4
8
  1.0.3 - Released 11/11/2013
5
9
  ---
6
10
  * Updates the Gemfile.lock as I failed to do that after changing the Gemfile
@@ -2,6 +2,7 @@ module Rivet
2
2
  module AwsUtils
3
3
 
4
4
  def self.verify_security_groups(groups)
5
+ return false if groups.nil?
5
6
  Rivet::Log.info("Verifying security groups: #{groups.join(",")}")
6
7
 
7
8
  security_groups_collection = AWS::EC2.new().security_groups
@@ -38,7 +38,11 @@ module Rivet
38
38
  if lc_collection[identity].exists?
39
39
  Rivet::Log.info("Launch configuration #{identity} already exists in AWS")
40
40
  else
41
- options = { :key_pair => key_name, :security_groups => security_groups, :user_data => user_data}
41
+ options = {}
42
+ options[:key_pair] = key_name unless key_name.nil?
43
+ options[:security_groups] = security_groups unless security_groups.nil?
44
+ options[:user_data] = user_data unless user_data.nil?
45
+
42
46
  Rivet::Log.info("Saving launch configuration #{identity} to AWS")
43
47
  Rivet::Log.debug("Launch Config options:\n #{options.inspect}")
44
48
  lc_collection.create(identity,image_id,instance_type, options)
@@ -82,7 +86,7 @@ module Rivet
82
86
  end
83
87
 
84
88
  def normalize_security_groups(groups)
85
- groups.sort
89
+ groups.nil? ? groups : groups.sort
86
90
  end
87
91
 
88
92
  end
data/lib/rivet/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Rivet
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rivet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: