cap-ec2 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Cap-EC2 changelog
2
2
 
3
+ ## 0.0.7
4
+
5
+ * Removed monkey patching of `Capistrano::TaskEnhancements` [@rjocoleman](https://github.com/rjocoleman)
6
+ * Instances don't always have a name tag, would cause `ec2:status` to blow up [@rjocoleman](https://github.com/rjocoleman)
7
+
8
+ ## 0.0.6
9
+
10
+ * Unbreak listing instances
11
+
12
+ ## 0.0.5
13
+
14
+ * Don't return terminated instances when looking up instances from EC2
15
+ * Fix documentation to refer to correct tag for Stages [@shaneog](https://github.com/shaneog)
16
+
3
17
  ## 0.0.4
4
18
 
5
19
  * If you modified any of the tag names, the `ec2:status` table would blow up
@@ -12,24 +12,27 @@ require_relative 'instance'
12
12
  # Load extra tasks
13
13
  load File.expand_path("../tasks/ec2.rake", __FILE__)
14
14
 
15
- # Monkey patch into Capistrano v3
16
-
17
15
  module Capistrano
18
- module TaskEnhancements
16
+ module DSL
17
+ module Ec2
19
18
 
20
- def ec2_handler
21
- @ec2_handler ||= CapEC2::EC2Handler.new(env.fetch(:ec2_config, "config/ec2.yml"))
22
- end
19
+ def ec2_handler
20
+ @ec2_handler ||= CapEC2::EC2Handler.new(env.fetch(:ec2_config, "config/ec2.yml"))
21
+ end
23
22
 
24
- def ec2_role(name, options={})
25
- ec2_handler.get_servers_for_role(name).each do |server|
26
- env.role(name, server.contact_point, options)
23
+ def ec2_role(name, options={})
24
+ ec2_handler.get_servers_for_role(name).each do |server|
25
+ env.role(name, server.contact_point, options)
26
+ end
27
27
  end
28
- end
29
28
 
30
- def env
31
- Configuration.env
32
- end
29
+ def env
30
+ Configuration.env
31
+ end
33
32
 
33
+ end
34
34
  end
35
35
  end
36
+
37
+ self.extend Capistrano::DSL::Ec2
38
+
@@ -39,7 +39,7 @@ module CapEC2
39
39
  def instance_to_row(instance, index)
40
40
  [
41
41
  sprintf("%02d:", index),
42
- instance.tags["Name"].green,
42
+ (instance.tags["Name"] || '').green,
43
43
  instance.id.red,
44
44
  instance.instance_type.cyan,
45
45
  instance.contact_point.blue.bold,
@@ -1,3 +1,3 @@
1
1
  module CapEC2
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cap-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-03 00:00:00.000000000 Z
12
+ date: 2014-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: -3058574493266036746
147
+ hash: 1426469508856454138
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  segments:
155
155
  - 0
156
- hash: -3058574493266036746
156
+ hash: 1426469508856454138
157
157
  requirements: []
158
158
  rubyforge_project:
159
159
  rubygems_version: 1.8.23