rake-funnel 0.20.2 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rake/funnel/support/mono.rb +8 -1
- data/lib/rake/funnel/tasks/timing.rb +1 -1
- data/lib/rake/funnel/version.rb +1 -1
- data/spec/rake/funnel/support/mono_spec.rb +25 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6841ebbb9d8d034742f00ffb6249df517b003e65
|
4
|
+
data.tar.gz: e9c884b4db0309c9abbd2dea0500e39316d3c384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 941d28a728ca71c7b4127b992b821fd4124557887bce2abe0962361a4d1f2c202cf3d0262570c3fd5660c4409e15599aa26d6f270bfa35b4f1e5579f8ad3bdc0
|
7
|
+
data.tar.gz: 477e620f47de4991a81291d82195c43898a4c35a562a242f73d0e06e65614c7b5fea3e0d7f8dc3072f4d78bd2584e17dc2911d583ce3d05a99ebdf2ca9a756fc
|
@@ -6,12 +6,19 @@ module Rake
|
|
6
6
|
def invocation(executable, *args)
|
7
7
|
exe_args = ([executable] << args).flatten.compact
|
8
8
|
|
9
|
-
return exe_args if Rake::Win32.windows?
|
9
|
+
return exe_args if Rake::Win32.windows? || wsl?
|
10
10
|
|
11
11
|
executable = exe_args.shift
|
12
12
|
found = Which.which(executable) || executable
|
13
13
|
exe_args.unshift('mono', found)
|
14
14
|
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def wsl?
|
19
|
+
File.readable?('/proc/version') && \
|
20
|
+
File.read('/proc/version').include?('Microsoft')
|
21
|
+
end
|
15
22
|
end
|
16
23
|
end
|
17
24
|
end
|
data/lib/rake/funnel/version.rb
CHANGED
@@ -3,13 +3,7 @@ require 'tmpdir'
|
|
3
3
|
include Rake::Funnel::Support
|
4
4
|
|
5
5
|
describe Rake::Funnel::Support::Mono do
|
6
|
-
|
7
|
-
allow(Rake::Win32).to receive(:windows?).and_return(windows?)
|
8
|
-
end
|
9
|
-
|
10
|
-
context 'on Windows' do
|
11
|
-
let(:windows?) { true }
|
12
|
-
|
6
|
+
shared_examples 'on Windows' do
|
13
7
|
it 'should return executable' do
|
14
8
|
expect(described_class.invocation('executable.exe')).to eq(%w(executable.exe))
|
15
9
|
end
|
@@ -31,10 +25,34 @@ describe Rake::Funnel::Support::Mono do
|
|
31
25
|
end
|
32
26
|
end
|
33
27
|
|
28
|
+
before do
|
29
|
+
allow(Rake::Win32).to receive(:windows?).and_return(windows?)
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'on Windows' do
|
33
|
+
context 'plain Windows' do
|
34
|
+
let(:windows?) { true }
|
35
|
+
|
36
|
+
it_behaves_like 'on Windows'
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'Windows Subsystem for Linux' do
|
40
|
+
let(:windows?) { false }
|
41
|
+
|
42
|
+
before do
|
43
|
+
allow(File).to receive(:readable?).with('/proc/version').and_return(true)
|
44
|
+
allow(File).to receive(:read).with('/proc/version').and_return('Microsoft')
|
45
|
+
end
|
46
|
+
|
47
|
+
it_behaves_like 'on Windows'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
34
51
|
context 'not on Windows' do
|
35
52
|
let(:windows?) { false }
|
36
53
|
|
37
54
|
before do
|
55
|
+
allow(File).to receive(:readable?).with('/proc/version').and_return(false)
|
38
56
|
allow(Which).to receive(:which)
|
39
57
|
end
|
40
58
|
|
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.
|
4
|
+
version: 0.21.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: 2017-
|
11
|
+
date: 2017-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.
|
236
|
+
rubygems_version: 2.6.11
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: A build pipeline targeted at .NET projects. Supports environment configuration
|