facter 1.6.15 → 1.6.16

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of facter might be problematic. Click here for more details.

@@ -9,8 +9,8 @@ gpg_name: 'info@puppetlabs.com'
9
9
  gpg_key: '4BD6EC30'
10
10
  sign_tar: FALSE
11
11
  # a space separated list of mock configs
12
- final_mocks: 'pl-5-i386 pl-5-x86_64 pl-6-i386 pl-6-x86_64 fedora-15-i386 fedora-15-x86_64 fedora-16-i386 fedora-16-x86_64 fedora-17-i386 fedora-17-x86_64'
13
- rc_mocks: 'pl-5-i386-dev pl-5-x86_64-dev pl-6-i386-dev pl-6-x86_64-dev fedora-15-i386-dev fedora-15-x86_64-dev fedora-16-i386-dev fedora-16-x86_64-dev fedora-17-i386-dev fedora-17-x86_64-dev'
12
+ final_mocks: 'pl-5-i386 pl-5-x86_64 pl-6-i386 pl-6-x86_64 fedora-16-i386 fedora-16-x86_64 fedora-17-i386 fedora-17-x86_64'
13
+ rc_mocks: 'pl-5-i386-dev pl-5-x86_64-dev pl-6-i386-dev pl-6-x86_64-dev fedora-16-i386-dev fedora-16-x86_64-dev fedora-17-i386-dev fedora-17-x86_64-dev'
14
14
  yum_host: 'burji.puppetlabs.com'
15
15
  yum_repo_path: '/opt/repository/yum/'
16
16
  build_gem: TRUE
data/lib/facter/ec2.rb CHANGED
@@ -26,9 +26,8 @@ def userdata()
26
26
  end
27
27
  end
28
28
 
29
- if (Facter::Util::EC2.has_euca_mac? || Facter::Util::EC2.has_openstack_mac? ||
29
+ if (Facter::Util::EC2.has_euca_mac? || Facter::Util::EC2.has_openstack_mac? ||
30
30
  Facter::Util::EC2.has_ec2_arp?) && Facter::Util::EC2.can_connect?
31
-
32
31
  metadata
33
32
  userdata
34
33
  else
@@ -14,6 +14,8 @@ module Facter::Util::EC2
14
14
  url = "http://169.254.169.254:80/"
15
15
  Timeout::timeout(wait_sec) {open(url)}
16
16
  return true
17
+ rescue Timeout::Error
18
+ return false
17
19
  rescue
18
20
  return false
19
21
  end
@@ -1,6 +1,6 @@
1
1
  module Facter
2
2
  if not defined? FACTERVERSION then
3
- FACTERVERSION = '1.6.15'
3
+ FACTERVERSION = '1.6.16'
4
4
  end
5
5
 
6
6
  def self.version
@@ -170,5 +170,11 @@ describe "ec2 facts" do
170
170
 
171
171
  Facter.fact(:ec2_userdata).should == nil
172
172
  end
173
+
174
+ it "should rescue the exception" do
175
+ Facter::Util::EC2.expects(:open).with("#{api_prefix}:80/").raises(Timeout::Error)
176
+
177
+ Facter::Util::EC2.should_not be_can_connect
178
+ end
173
179
  end
174
180
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 15
10
- version: 1.6.15
9
+ - 16
10
+ version: 1.6.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Puppet Labs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-28 00:00:00 Z
18
+ date: 2012-12-01 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: You can prove anything with facts!