chef-metal 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b141298163e702535479301b6c88044960e65cc0
4
- data.tar.gz: 64383c31616aa7fce1f7785d41134b6516d9b51d
3
+ metadata.gz: b55bda561c7c8ea4e4ee5634ad368dfb2c42f6ef
4
+ data.tar.gz: 03c66248dee33dc38e0c314fef3ea97ec6842212
5
5
  SHA512:
6
- metadata.gz: b86349e657a31e3594823b7036aac2c6fd2e5cf2e629da6d1db58a4069502a494bade45142d19db91533cfa66b698600c78f910955cf18a9d8ea0d5754c0e812
7
- data.tar.gz: 2dbcb57bdfac12bea0e67c0da47b05a6f9cdc77415d14169820244f4c1ec3172ddc227e19a91f686ae39cc134394fbe11d82d66db9501a3ddbe5ee2b0b3fcba3
6
+ metadata.gz: b235456d07ee75d0c30ee8f0b1686d54113d7c936ac057af916238ffc6c9abd4d137dababe6d394a4b017934ad46ceb8d2575f73bf8622ea2a977c7e0304041c
7
+ data.tar.gz: 509f41552724c0cdaeb3e8213fa2ae4ac6a7a6b07e308ebe5bf535f4a02ca0003683ec3236d6d98d43fed4243e9c4df7b135a9c5179776f5ef56a77857a4368e
@@ -16,7 +16,7 @@ module ChefMetal
16
16
  @package_cache = {}
17
17
  @tmp_dir = '/tmp'
18
18
  FileUtils.mkdir_p(@package_cache_path)
19
- @download_lock = Mutex.new
19
+ @package_cache_lock = Mutex.new
20
20
  end
21
21
 
22
22
  def setup_convergence(provider, machine, machine_resource)
@@ -78,15 +78,22 @@ module ChefMetal
78
78
  metadata_url << "&p=#{platform}"
79
79
  metadata_url << "&pv=#{platform_version}"
80
80
  metadata_url << "&m=#{machine_architecture}"
81
+ use_ssl = true
81
82
 
82
83
  # solaris 9 lacks openssl, solaris 10 lacks recent enough credentials - your base O/S is completely insecure, please upgrade
83
84
  if platform == 'solaris2' && (platform_version == '5.9' || platform_version == '5.10')
84
85
  metadata_url.sub(/^https/, 'http')
86
+ use_ssl = false
85
87
  end
86
88
 
87
89
  # Download and parse the metadata
88
90
  Chef::Log.debug("Getting metadata for machine #{machine.node['name']}: #{metadata_url}")
89
- metadata_str = Net::HTTP.get(URI(metadata_url))
91
+ uri = URI(metadata_url)
92
+ http = Net::HTTP.new(uri.host, uri.port)
93
+ http.use_ssl = use_ssl
94
+ request = Net::HTTP::Get.new(uri.request_uri)
95
+ response = http.request(request)
96
+ metadata_str = response.body
90
97
  metadata = {}
91
98
  metadata_str.each_line do |line|
92
99
  key, value = line.split("\t", 2)
@@ -274,7 +274,7 @@ module ChefMetal
274
274
  end
275
275
 
276
276
  def symbolize_keys(options)
277
- options.inject({}) { |result,key,value| result[key.to_sym] = value; result }
277
+ options.inject({}) { |result,(key,value)| result[key.to_sym] = value; result }
278
278
  end
279
279
 
280
280
  def server_for(node)
@@ -1,3 +1,3 @@
1
1
  module ChefMetal
2
- VERSION = '0.3'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser