chef-helpers 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,7 +41,9 @@ class Chef::Node
41
41
  # @param [Chef::Node] other_node Node, whose IP we need to know
42
42
  # @return [String] IP of `other_node`
43
43
  def ip_for(other_node)
44
- if other_node['ec2'] && self['ec2'] && self['ec2']['placement_availability_zone'] == other_node['ec2']['placement_availability_zone']
44
+ # Strip last letter from availability zone to get region.
45
+ if other_node['ec2'] && self['ec2'] &&
46
+ self['ec2']['placement_availability_zone'].sub(/[a-z]$/,'') == other_node['ec2']['placement_availability_zone'].sub(/[a-z]$/,'')
45
47
  other_node['ec2']['local_ipv4']
46
48
  elsif other_node['cloud']
47
49
  other_node['cloud']['public_ipv4']
@@ -1,3 +1,3 @@
1
1
  module ChefHelpers
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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: 2012-12-09 00:00:00.000000000 Z
12
+ date: 2012-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -57,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  segments:
59
59
  - 0
60
- hash: -4285428277886856679
60
+ hash: 921046716687327100
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  segments:
68
68
  - 0
69
- hash: -4285428277886856679
69
+ hash: 921046716687327100
70
70
  requirements: []
71
71
  rubyforge_project:
72
72
  rubygems_version: 1.8.24