ey_cloud_awareness 0.2.0 → 0.2.1

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/README.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This gem makes it a little easier to live on the EngineYard cloud:
4
4
 
5
- * allow your instances to get information about the app_master, db_master, utility workers, etc. in its EngineYard environment
5
+ * allow your instances to get information (metadata) about the app_master, db_master, utility workers, etc. in its EngineYard environment
6
6
  * automatically map cap tasks to all your instances
7
7
  * automatically update your ssh aliases
8
8
 
@@ -24,10 +24,20 @@ to your before_restart.rb hook.
24
24
 
25
25
  Running this command only works from EngineYard AppCloud Amazon EC2 instances.
26
26
 
27
+ seamus-absheres-macbook:~ $ ssh my_app_staging-app_master
28
+ Last login: Wed Sep 22 10:33:56 2010 from 9.9.9.9
29
+ deploy@ip-10-202-197-254 ~ $ sudo gem install ey_cloud_awareness --no-rdoc --no-ri
30
+ Successfully installed string_replacer-0.0.1
31
+ Successfully installed ey_cloud_awareness-0.2.0
32
+ 2 gems installed
33
+ deploy@ip-10-202-197-254 ~ $ sudo chmod a+r /etc/chef/dna.json
34
+ deploy@ip-10-202-197-254 ~ $ ey_cloud_awareness
35
+ {"apps":[{"name":"my_app","ebuilds":[{"name":"dev-libs/oniguruma"}],"repository_name":"git@github.com:seamusabshere/my_app.git","database_name":"my_app", [...]
36
+
27
37
  * SSH into one of your EngineYard AppCloud Amazon EC2 instances.
28
- * Run <tt>sudo gem install ey_cloud_awareness --no-rdoc --no-ri</tt> to make sure the gem binary is installed somewhere in your path.
29
- * Run <tt>sudo chmod a+r /etc/chef/dna.json</tt> to make sure everybody can read the EngineYard DNA information.
30
- * Run <tt>ey_cloud_awareness</tt> and you should get back a JSON-encoded hash of instance, environment, app, and other metadata.
38
+ * Running <tt>sudo gem install ey_cloud_awareness --no-rdoc --no-ri</tt> makes sure the gem binary is installed somewhere in your path.
39
+ * Running <tt>sudo chmod a+r /etc/chef/dna.json</tt> makes sure everybody can read the EngineYard DNA information.
40
+ * Running <tt>ey_cloud_awareness</tt>, you should get back a JSON-encoded hash of instance, environment, app, and other metadata.
31
41
 
32
42
  It returns a cleaned-up combination of Amazon EC2 and EngineYard metadata.
33
43
 
data/Rakefile CHANGED
@@ -18,9 +18,9 @@ begin
18
18
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
19
  end
20
20
  Jeweler::GemcutterTasks.new
21
- Jeweler::RubyforgeTasks.new do |rubyforge|
22
- rubyforge.doc_task = "rdoc"
23
- end
21
+ # Jeweler::RubyforgeTasks.new do |rubyforge|
22
+ # rubyforge.doc_task = "rdoc"
23
+ # end
24
24
  rescue LoadError
25
25
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
26
26
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ey_cloud_awareness}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Seamus Abshere"]
12
- s.date = %q{2010-09-22}
12
+ s.date = %q{2010-09-23}
13
13
  s.default_executable = %q{ey_cloud_awareness}
14
14
  s.description = %q{Pull metadata from EC2 and EngineYard so that your EngineYard Cloud instances know about each other.}
15
15
  s.email = %q{seamus@abshere.net}
@@ -167,8 +167,9 @@ class EngineYardCloudInstance
167
167
  def mixed_instances
168
168
  ec2_instances.inject(Hash.new) do |memo, ec2_instance|
169
169
  instance_id = ec2_instance['instance_id']
170
- mixed_instance = dna_instances.detect { |dna_instance| dna_instance['id'] == instance_id }.merge ec2_instance
171
- memo[instance_id] = mixed_instance
170
+ if dna_instance = dna_instances.detect { |i| i['id'] == instance_id }
171
+ memo[instance_id] = dna_instance.merge ec2_instance
172
+ end
172
173
  memo
173
174
  end
174
175
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_cloud_awareness
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-22 00:00:00 -05:00
18
+ date: 2010-09-23 00:00:00 -05:00
19
19
  default_executable: ey_cloud_awareness
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency