rake-funnel 0.20.0 → 0.20.1

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: b99056aebd3a09e71ec855cade4b7f6264438eeb
4
- data.tar.gz: 48d023a394a4186fc41ddc5d0d23364130b17636
3
+ metadata.gz: efcb711ed0c28cb743403fe49b0f9e77e4be0f0b
4
+ data.tar.gz: 312ba1064c4efba5368d1e0ef3b1970c3fb9c9c5
5
5
  SHA512:
6
- metadata.gz: 98ebf19ad3366a58385c196c966b6c4d98f51dc3a258673893390a34a03af3ad3cc271fe2d691c349246e83c9167145589bcd8c25eb1621774557fa7120610f2
7
- data.tar.gz: 0e7958003263910ff6d441cfd62c8654c10885cd260ad4a27def148fecc3761a1f1bdb459b9512048b0766640491d0f1795dc0eaaa692898a2ecd391cdb9a3e3
6
+ metadata.gz: 7a4c201b91e54ca4370bd78b58d1e47599b93cf04e85ce716a8805122ec2f93d54837980d43fb5c740c2c8ad3b04292f44be3216b45604bf82390a5973bd17b2
7
+ data.tar.gz: 727d346345f4ec56c59a047fc1e27de71a47ce799059be672863fefc41b685fe7620b0498f3f1bd35f2d85a246dfa32b6e8820e9f88a08f1d9e1e368fe3117a7
@@ -7,7 +7,7 @@ module Rake
7
7
  class BuildTool
8
8
  class << self
9
9
  def find
10
- [mono_build, from_registry].compact.first
10
+ mono_build || from_registry.compact.first
11
11
  end
12
12
 
13
13
  private
@@ -17,9 +17,9 @@ module Rake
17
17
 
18
18
  begin
19
19
  out, status = Open3.capture2('mono', '--version')
20
- return nil unless status.success?
20
+ raise "Could not determine mono version: #{status}" unless status.success?
21
21
  rescue Errno::ENOENT
22
- return nil
22
+ raise 'mono is not installed'
23
23
  end
24
24
 
25
25
  return 'msbuild'.freeze if out[/^Mono JIT compiler version ([\d\.]+)/, 1] >= '5.0'
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module Funnel
3
- VERSION = '0.20.0'.freeze
3
+ VERSION = '0.20.1'.freeze
4
4
  end
5
5
  end
@@ -54,63 +54,58 @@ describe Rake::Funnel::Support::MSBuild::BuildTool do
54
54
  context 'not on Windows' do
55
55
  let(:windows?) { false }
56
56
 
57
- before do
58
- allow(Open3).to receive(:capture2).with('mono', '--version').and_return(mono_version)
59
- end
60
-
61
57
  context 'mono not installed' do
62
- let(:mono_version) do
63
- [
64
- 'mono crashed',
65
- OpenStruct.new(success?: false)
66
- ]
67
- end
68
-
69
58
  before do
70
59
  allow(Open3).to receive(:capture2).with('mono', '--version').and_raise(Errno::ENOENT)
71
60
  end
72
61
 
73
- it 'should find nothing' do
74
- expect(described_class.find).to be_nil
75
- end
76
- end
77
-
78
- context 'mono fails' do
79
- let(:mono_version) do
80
- [
81
- 'mono crashed',
82
- OpenStruct.new(success?: false)
83
- ]
84
- end
85
-
86
- it 'should find nothing' do
87
- expect(described_class.find).to be_nil
62
+ it 'fails' do
63
+ expect { described_class.find }.to raise_error('mono is not installed')
88
64
  end
89
65
  end
90
66
 
91
- context 'mono < 5.0' do
92
- let(:mono_version) do
93
- [
94
- 'Mono JIT compiler version 4.8.1 (mono-4.8.0-branch/22a39d7 Fri Apr 7 12:00:08 EDT 2017)',
95
- OpenStruct.new(success?: true)
96
- ]
67
+ context 'mono installed' do
68
+ before do
69
+ allow(Open3).to receive(:capture2).with('mono', '--version').and_return(mono_version)
97
70
  end
98
71
 
99
- it 'should find xbuild' do
100
- expect(described_class.find).to eq('xbuild')
72
+ context 'mono fails' do
73
+ let(:mono_version) do
74
+ [
75
+ 'mono crashed',
76
+ OpenStruct.new(success?: false)
77
+ ]
78
+ end
79
+
80
+ it 'should find nothing' do
81
+ expect { described_class.find }.to raise_error(/^Could not determine mono version:/)
82
+ end
101
83
  end
102
- end
103
84
 
104
- context 'mono >= 5.0' do
105
- let(:mono_version) do
106
- [
107
- 'Mono JIT compiler version 5.0.0.100 (2017-02/9667aa6 Fri May 5 09:12:57 EDT 2017)',
108
- OpenStruct.new(success?: true)
109
- ]
85
+ context 'mono < 5.0' do
86
+ let(:mono_version) do
87
+ [
88
+ 'Mono JIT compiler version 4.8.1 (mono-4.8.0-branch/22a39d7 Fri Apr 7 12:00:08 EDT 2017)',
89
+ OpenStruct.new(success?: true)
90
+ ]
91
+ end
92
+
93
+ it 'should find xbuild' do
94
+ expect(described_class.find).to eq('xbuild')
95
+ end
110
96
  end
111
97
 
112
- it 'should find msbuild' do
113
- expect(described_class.find).to eq('msbuild')
98
+ context 'mono >= 5.0' do
99
+ let(:mono_version) do
100
+ [
101
+ 'Mono JIT compiler version 5.0.0.100 (2017-02/9667aa6 Fri May 5 09:12:57 EDT 2017)',
102
+ OpenStruct.new(success?: true)
103
+ ]
104
+ end
105
+
106
+ it 'should find msbuild' do
107
+ expect(described_class.find).to eq('msbuild')
108
+ end
114
109
  end
115
110
  end
116
111
  end
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.20.0
4
+ version: 0.20.1
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-05-14 00:00:00.000000000 Z
11
+ date: 2017-05-17 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.6.11
236
+ rubygems_version: 2.5.2
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: A build pipeline targeted at .NET projects. Supports environment configuration