capify-ec2 1.1.12 → 1.1.13

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 ADDED
@@ -0,0 +1,21 @@
1
+ ## 1.1.12 (Aug 09, 2011)
2
+
3
+ Features:
4
+
5
+ - Add ability to deploy to all similar roles in a region
6
+ - Add ability to cap ssh <ec2 index number>
7
+ - Add ability to cap ssh <instance name>
8
+ - Froze dependencies to known working gems
9
+ - Allow cap deploy with a server set as default
10
+ - Added descriptions (try cap -T)
11
+ - Fix gem dependencies for cap ec2_status
12
+ - Allows registering and deregistering of instances with an ELB
13
+ - Servers can have Role or Roles on ec2
14
+
15
+
16
+ Bugfixes:
17
+
18
+ - Allow options to be passed to ec2_roles
19
+ - Deregister and register server with elb
20
+ - Fixed server_names directive to display case insensitive names. Matches with ssh
21
+ - Defaults no longer break options
@@ -2,9 +2,20 @@ require File.join(File.dirname(__FILE__), '../capify-ec2')
2
2
  require 'colored'
3
3
 
4
4
  Capistrano::Configuration.instance(:must_exist).load do
5
- def ec2_role(role_name_or_hash)
6
- role = role_name_or_hash.is_a?(Hash) ? role_name_or_hash : {:name => role_name_or_hash,:options => {}}
5
+ def ec2_roles(*roles)
7
6
  server_type = variables[:logger].instance_variable_get("@options")[:actions].first unless variables[:logger].instance_variable_get("@options")[:actions][1].nil?
7
+
8
+ named_instance = CapifyEc2.get_instance_by_name(server_type)
9
+ task named_instance.name.to_sym do
10
+ named_instance.roles.each do |role|
11
+ define_role({:name => role, :options => {}}, named_instance)
12
+ end
13
+ end unless named_instance.nil?
14
+ roles.each {|role| ec2_role(role, server_type)}
15
+ end
16
+
17
+ def ec2_role(role_name_or_hash, server_type)
18
+ role = role_name_or_hash.is_a?(Hash) ? role_name_or_hash : {:name => role_name_or_hash,:options => {}}
8
19
  instances = CapifyEc2.get_instances_by_role(role[:name], server_type)
9
20
  if role[:options].delete(:default)
10
21
  instances.each do |instance|
@@ -19,9 +30,6 @@ Capistrano::Configuration.instance(:must_exist).load do
19
30
 
20
31
  define_instance_roles(role, instances)
21
32
  define_role_roles(role, instances)
22
-
23
- named_instance = CapifyEc2.get_instance_by_name(server_type)
24
- define_instance_roles(role, [named_instance]) unless named_instance.nil?
25
33
  end
26
34
 
27
35
  def define_regions(region, role)
@@ -60,11 +68,7 @@ Capistrano::Configuration.instance(:must_exist).load do
60
68
  role role[:name].to_sym, instance.dns_name
61
69
  end
62
70
  end
63
-
64
- def ec2_roles(*roles)
65
- roles.each {|role| ec2_role(role)}
66
- end
67
-
71
+
68
72
  def numeric?(object)
69
73
  true if Float(object) rescue false
70
74
  end
@@ -1,5 +1,5 @@
1
1
  module Capify
2
2
  module Ec2
3
- VERSION = "1.1.12"
3
+ VERSION = "1.1.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capify-ec2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 12
10
- version: 1.1.12
9
+ - 13
10
+ version: 1.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Noah Cantor
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-09 00:00:00 +01:00
19
+ date: 2011-08-10 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -78,6 +78,7 @@ extra_rdoc_files: []
78
78
 
79
79
  files:
80
80
  - .gitignore
81
+ - Changelog
81
82
  - Gemfile
82
83
  - Rakefile
83
84
  - capify-ec2.gemspec