chef 12.2.0.rc.2 → 12.2.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: 3ea305c755fa5cef3a842361bb147d8d03b07427
4
- data.tar.gz: 26b1edcb011726b2af6a10e88554d067ce37d4ad
3
+ metadata.gz: 91f1920d1c2e0863500a9e71845388856c621dc3
4
+ data.tar.gz: 1ded9282d859bca75cffd03654cfeec71a676b4e
5
5
  SHA512:
6
- metadata.gz: a41204b66077987c43344f8cbf8a33ce83c664c440cc1177497201b612b8d76ce846ba30f858e76d1f5d74e8bcacd924d8449bcbd19961d67ef7c454b322a24c
7
- data.tar.gz: 66ec7538188e5c0b6c4f00cb50572aac1a874ef6692d52a144ffe815216c2f494eb6285bd85361568f595bdd97e77e21aabf781708459d33ad446dfda5095f8e
6
+ metadata.gz: f4f3f95775aba6c9a129db77b7ae7a1b708db9c16a553673a4c6275f02bba0fabae76dc5b259c1ee71085da2f842f0cd4dedcf6e45439e20334cac06e540715f
7
+ data.tar.gz: ec7d0ad336743697fcb95f0d139ec8d8f7c364f324cf191311abece9ea1efada824504d3513117fa328d0671e6a5463bc217a097e153ad89ea264deedbcc8008
@@ -196,7 +196,7 @@ class Chef
196
196
  paths << ENV['HOMESHARE'] + ENV['HOMEPATH'] if ENV['HOMESHARE'] && ENV['HOMEPATH']
197
197
  paths << ENV['USERPROFILE']
198
198
  end
199
- paths << Dir.home
199
+ paths << Dir.home if ENV['HOME']
200
200
 
201
201
  # Depending on what environment variables we're using, the slashes can go in any which way.
202
202
  # Just change them all to / to keep things consistent.
@@ -204,11 +204,11 @@ class Chef
204
204
  # the particular brand of kool-aid you consume. This code assumes that \ and / are both
205
205
  # path separators on any system being used.
206
206
  paths = paths.map { |home_path| home_path.gsub(path_separator, ::File::SEPARATOR) if home_path }
207
-
207
+
208
208
  # Filter out duplicate paths and paths that don't exist.
209
209
  valid_paths = paths.select { |home_path| home_path && Dir.exists?(home_path) }
210
210
  valid_paths = valid_paths.uniq
211
-
211
+
212
212
  # Join all optional path elements at the end.
213
213
  # If a block is provided, invoke it - otherwise just return what we've got.
214
214
  joined_paths = valid_paths.map { |home_path| File.join(home_path, *args) }
@@ -17,7 +17,7 @@
17
17
 
18
18
  class Chef
19
19
  CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
20
- VERSION = '12.2.0.rc.2'
20
+ VERSION = '12.2.1'
21
21
  end
22
22
 
23
23
  #
@@ -230,4 +230,26 @@ describe Chef::Util::PathHelper do
230
230
  end
231
231
  end
232
232
  end
233
+
234
+ describe "all_homes" do
235
+ before do
236
+ stub_const('ENV', env)
237
+ allow(Chef::Platform).to receive(:windows?).and_return(is_windows)
238
+ end
239
+
240
+ context "on windows" do
241
+ let (:is_windows) { true }
242
+ end
243
+
244
+ context "on unix" do
245
+ let (:is_windows) { false }
246
+
247
+ context "when HOME is not set" do
248
+ let (:env) { {} }
249
+ it "returns an empty array" do
250
+ expect(PathHelper.all_homes).to eq([])
251
+ end
252
+ end
253
+ end
254
+ end
233
255
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.0.rc.2
4
+ version: 12.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-config
@@ -2033,9 +2033,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2033
2033
  version: 2.0.0
2034
2034
  required_rubygems_version: !ruby/object:Gem::Requirement
2035
2035
  requirements:
2036
- - - ">"
2036
+ - - ">="
2037
2037
  - !ruby/object:Gem::Version
2038
- version: 1.3.1
2038
+ version: '0'
2039
2039
  requirements: []
2040
2040
  rubyforge_project:
2041
2041
  rubygems_version: 2.4.4