rake-funnel 0.17.0 → 0.18.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af6a3384beef14d765b3deeb68f46bc6e9075753
4
- data.tar.gz: 56a85fbb32a083c02f329c2c379a46b91fd312b7
3
+ metadata.gz: 0e62b12985fc2bbeb76d573e7085d7baf9a3eae8
4
+ data.tar.gz: 95eadbea48e9d562e5247b2309422cfdc97e4e0b
5
5
  SHA512:
6
- metadata.gz: fcf794c4853b54485436d3d102d2edc58e61840de0e72965af8d6ef2d395c6afe49110b97a04c94ebab5d222f8f1ddcb6c46f251b63098a49a4e9b46494fd2db
7
- data.tar.gz: e3ae2368bd27d0c25b78eb46ba4d2ebf1c216623041629e93e91ce98dc34b10e937459c12e45338dbaf3a26d0e7617971da94b4d2dc2f9e5e268ecc4f058f9d6
6
+ metadata.gz: 098b0d7d52d681f269d25379f6512a3de25b223ceb27a1b87fb74592a4351249e3a30d36cfab132544ef4a2c4803633d1e95edccdd4890333b6944a5620e06a9
7
+ data.tar.gz: 399b67b3b78e6fe13ead61f39ec9d38a71120734e9e6a8841e025255aa11479ab5312870ddd6ee31908c569ec0a2319d8383fd95755e9a6bea6972df7512d333
@@ -38,7 +38,7 @@ module Rake
38
38
  end
39
39
 
40
40
  def paths
41
- @paths ||= @path_modifier.call(Dir[*search_pattern])
41
+ @paths ||= @path_modifier.call(Dir[*search_pattern].select { |path| File.directory?(path) })
42
42
  .map { |path| File.expand_path(path) }
43
43
  .sort
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module Funnel
3
- VERSION = '0.17.0'.freeze
3
+ VERSION = '0.18.0'.freeze
4
4
  end
5
5
  end
@@ -12,7 +12,11 @@ describe Rake::Funnel::Tasks::BinPath do
12
12
 
13
13
  describe 'execution' do
14
14
  let(:default_path) { 'default PATH contents' }
15
- let(:search_pattern) { %w(foo bar) }
15
+ let(:search_pattern) { %w(foo bar not-a-directory) }
16
+ let(:directories) { search_pattern.first(2)
17
+ .map { |path| File.expand_path(path) }
18
+ .sort
19
+ .join(File::PATH_SEPARATOR) }
16
20
  let(:path_modifier) { nil }
17
21
 
18
22
  before {
@@ -31,6 +35,8 @@ describe Rake::Funnel::Tasks::BinPath do
31
35
  context 'paths to add' do
32
36
  before {
33
37
  allow(Dir).to receive(:[]).with(*search_pattern).and_return(search_pattern)
38
+ allow(File).to receive(:directory?).and_return(true)
39
+ allow(File).to receive(:directory?).with(search_pattern.last).and_return(false)
34
40
  }
35
41
 
36
42
  before {
@@ -38,9 +44,11 @@ describe Rake::Funnel::Tasks::BinPath do
38
44
  }
39
45
 
40
46
  it 'should prepend sorted matching folders to the PATH environment variable' do
41
- paths = search_pattern.map { |path| File.expand_path(path) }.sort.join(File::PATH_SEPARATOR)
47
+ expect(ENV).to have_received(:[]=).with('PATH', /^#{directories}/)
48
+ end
42
49
 
43
- expect(ENV).to have_received(:[]=).with('PATH',/^#{paths}/)
50
+ it 'should reject files' do
51
+ expect(ENV).not_to have_received(:[]=).with('PATH', /#{search_pattern.last}/)
44
52
  end
45
53
 
46
54
  it 'should append original PATH environment variable' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-funnel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Groß
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
11
+ date: 2016-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  requirements: []
234
234
  rubyforge_project:
235
- rubygems_version: 2.4.5.1
235
+ rubygems_version: 2.6.7
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: A build pipeline targeted at .NET projects. Supports environment configuration
@@ -301,4 +301,3 @@ test_files:
301
301
  - spec/rake/funnel/tasks/timing_spec.rb
302
302
  - spec/rake/funnel/tasks/zip_spec.rb
303
303
  - spec/spec_helper.rb
304
- has_rdoc: