rake-funnel 0.21.0 → 0.21.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 +4 -4
- data/lib/rake/funnel/extensions/rexml.rb +4 -2
- data/lib/rake/funnel/extensions/shell.rb +2 -2
- data/lib/rake/funnel/integration/progress_report.rb +1 -1
- data/lib/rake/funnel/integration/sync_output.rb +1 -1
- data/lib/rake/funnel/support/timing/report.rb +2 -2
- data/lib/rake/funnel/tasks/msbuild.rb +2 -2
- data/lib/rake/funnel/version.rb +1 -1
- data/rake-funnel.gemspec +1 -1
- data/spec/rake/funnel/extensions/rexml_spec.rb +2 -2
- data/spec/rake/funnel/extensions/shell_spec.rb +8 -10
- data/spec/rake/funnel/integration/progress_report_spec.rb +11 -14
- data/spec/rake/funnel/integration/sync_output_spec.rb +2 -2
- data/spec/rake/funnel/integration/teamcity/nunit_plugin_spec.rb +9 -10
- data/spec/rake/funnel/integration/teamcity/progress_report_spec.rb +34 -30
- data/spec/rake/funnel/integration/teamcity/service_messages_spec.rb +1 -3
- data/spec/rake/funnel/support/argument_mapper/styles/msdeploy_spec.rb +1 -3
- data/spec/rake/funnel/support/argument_mapper/styles/nunit_spec.rb +1 -1
- data/spec/rake/funnel/support/argument_mapper/styles/styles_spec.rb +4 -6
- data/spec/rake/funnel/support/assembly_version/from_version_files_spec.rb +9 -10
- data/spec/rake/funnel/support/assembly_version_writer_spec.rb +7 -9
- data/spec/rake/funnel/support/internal/finder_spec.rb +3 -5
- data/spec/rake/funnel/support/internal/instantiate_symbol_spec.rb +1 -1
- data/spec/rake/funnel/support/mono_spec.rb +3 -4
- data/spec/rake/funnel/support/msdeploy/registry_patch_spec.rb +11 -11
- data/spec/rake/funnel/support/template_engine_spec.rb +4 -4
- data/spec/rake/funnel/support/timing/report_spec.rb +7 -10
- data/spec/rake/funnel/support/version_info_spec.rb +2 -2
- data/spec/rake/funnel/support/zipper_spec.rb +0 -2
- data/spec/rake/funnel/tasks/assembly_version_spec.rb +6 -8
- data/spec/rake/funnel/tasks/bin_path_spec.rb +3 -5
- data/spec/rake/funnel/tasks/copy_spec.rb +6 -12
- data/spec/rake/funnel/tasks/environments_spec.rb +12 -14
- data/spec/rake/funnel/tasks/msbuild_spec.rb +17 -21
- data/spec/rake/funnel/tasks/msdeploy_spec.rb +10 -15
- data/spec/rake/funnel/tasks/nunit_spec.rb +11 -16
- data/spec/rake/funnel/tasks/paket_spec.rb +16 -15
- data/spec/rake/funnel/tasks/quick_template_spec.rb +5 -8
- data/spec/rake/funnel/tasks/side_by_side_specs_spec.rb +5 -8
- data/spec/rake/funnel/tasks/timing_spec.rb +6 -6
- data/spec/rake/funnel/tasks/zip_spec.rb +11 -13
- data/spec/spec_helper.rb +2 -0
- metadata +17 -17
@@ -1,13 +1,8 @@
|
|
1
1
|
# rubocop:disable RSpec/FilePath
|
2
2
|
|
3
|
-
include Rake
|
4
|
-
include Rake::Funnel
|
5
|
-
include Rake::Funnel::Integration::TeamCity
|
6
|
-
include Rake::Funnel::Support
|
7
|
-
|
8
3
|
describe Rake::Funnel::Tasks::NUnit do
|
9
4
|
before do
|
10
|
-
Task.clear
|
5
|
+
Rake::Task.clear
|
11
6
|
end
|
12
7
|
|
13
8
|
describe 'defaults' do
|
@@ -20,23 +15,23 @@ describe Rake::Funnel::Tasks::NUnit do
|
|
20
15
|
describe 'execution' do
|
21
16
|
let(:args) { {} }
|
22
17
|
|
23
|
-
let(:mapper) { instance_double(Mapper).as_null_object }
|
24
|
-
let(:finder) { instance_double(Finder).as_null_object }
|
18
|
+
let(:mapper) { instance_double(Rake::Funnel::Support::Mapper).as_null_object }
|
19
|
+
let(:finder) { instance_double(Rake::Funnel::Support::Finder).as_null_object }
|
25
20
|
|
26
21
|
before do
|
27
22
|
allow(subject).to receive(:sh)
|
28
23
|
|
29
|
-
allow(Mapper).to receive(:new).and_return(mapper)
|
30
|
-
allow(Finder).to receive(:new).and_return(finder)
|
31
|
-
allow(NUnitPlugin).to receive(:setup)
|
24
|
+
allow(Rake::Funnel::Support::Mapper).to receive(:new).and_return(mapper)
|
25
|
+
allow(Rake::Funnel::Support::Finder).to receive(:new).and_return(finder)
|
26
|
+
allow(Rake::Funnel::Integration::TeamCity::NUnitPlugin).to receive(:setup)
|
32
27
|
|
33
|
-
allow(Mono).to receive(:invocation).and_wrap_original do |_original_method, *args, &_block|
|
28
|
+
allow(Rake::Funnel::Support::Mono).to receive(:invocation).and_wrap_original do |_original_method, *args, &_block|
|
34
29
|
args.compact
|
35
30
|
end
|
36
31
|
end
|
37
32
|
|
38
33
|
before do
|
39
|
-
Task[subject.name].invoke
|
34
|
+
Rake::Task[subject.name].invoke
|
40
35
|
end
|
41
36
|
|
42
37
|
it 'should use test assembly finder' do
|
@@ -44,11 +39,11 @@ describe Rake::Funnel::Tasks::NUnit do
|
|
44
39
|
end
|
45
40
|
|
46
41
|
it 'should set up TeamCity plugin' do
|
47
|
-
expect(NUnitPlugin).to have_received(:setup).with(subject.nunit)
|
42
|
+
expect(Rake::Funnel::Integration::TeamCity::NUnitPlugin).to have_received(:setup).with(subject.nunit)
|
48
43
|
end
|
49
44
|
|
50
45
|
it 'should use NUnit mapper' do
|
51
|
-
expect(Mapper).to have_received(:new).with(:NUnit)
|
46
|
+
expect(Rake::Funnel::Support::Mapper).to have_received(:new).with(:NUnit)
|
52
47
|
end
|
53
48
|
|
54
49
|
it 'should map arguments' do
|
@@ -56,7 +51,7 @@ describe Rake::Funnel::Tasks::NUnit do
|
|
56
51
|
end
|
57
52
|
|
58
53
|
it 'should use mono invocation' do
|
59
|
-
expect(Mono).to have_received(:invocation).with(subject.nunit)
|
54
|
+
expect(Rake::Funnel::Support::Mono).to have_received(:invocation).with(subject.nunit)
|
60
55
|
end
|
61
56
|
|
62
57
|
it 'should run with sh' do
|
@@ -1,9 +1,6 @@
|
|
1
|
-
include Rake
|
2
|
-
include Rake::Funnel::Support
|
3
|
-
|
4
1
|
describe Rake::Funnel::Tasks::Paket do
|
5
2
|
before do
|
6
|
-
Task.clear
|
3
|
+
Rake::Task.clear
|
7
4
|
end
|
8
5
|
|
9
6
|
describe 'defaults' do
|
@@ -17,7 +14,7 @@ describe Rake::Funnel::Tasks::Paket do
|
|
17
14
|
describe 'execution' do
|
18
15
|
before do
|
19
16
|
allow(subject).to receive(:sh)
|
20
|
-
allow(Mono).to receive(:invocation).and_wrap_original do |_original_method, *args, &_block|
|
17
|
+
allow(Rake::Funnel::Support::Mono).to receive(:invocation).and_wrap_original do |_original_method, *args, &_block|
|
21
18
|
args.compact
|
22
19
|
end
|
23
20
|
end
|
@@ -38,7 +35,7 @@ describe Rake::Funnel::Tasks::Paket do
|
|
38
35
|
end
|
39
36
|
|
40
37
|
before do
|
41
|
-
Task[subject.name].invoke
|
38
|
+
Rake::Task[subject.name].invoke
|
42
39
|
end
|
43
40
|
|
44
41
|
it 'should use custom bootstrapper' do
|
@@ -52,15 +49,19 @@ describe Rake::Funnel::Tasks::Paket do
|
|
52
49
|
|
53
50
|
describe 'mono invocation' do
|
54
51
|
before do
|
55
|
-
Task[subject.name].invoke
|
52
|
+
Rake::Task[subject.name].invoke
|
56
53
|
end
|
57
54
|
|
58
55
|
it 'should use mono invocation for bootstrapper' do
|
59
|
-
expect(Mono).to have_received(:invocation)
|
56
|
+
expect(Rake::Funnel::Support::Mono).to have_received(:invocation)
|
57
|
+
.with(subject.bootstrapper,
|
58
|
+
subject.bootstrapper_args)
|
60
59
|
end
|
61
60
|
|
62
61
|
it 'should use mono invocation for paket' do
|
63
|
-
expect(Mono).to have_received(:invocation)
|
62
|
+
expect(Rake::Funnel::Support::Mono).to have_received(:invocation)
|
63
|
+
.with(subject.paket,
|
64
|
+
subject.paket_args)
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
@@ -72,7 +73,7 @@ describe Rake::Funnel::Tasks::Paket do
|
|
72
73
|
|
73
74
|
context 'success' do
|
74
75
|
before do
|
75
|
-
Task[subject.name].invoke
|
76
|
+
Rake::Task[subject.name].invoke
|
76
77
|
end
|
77
78
|
|
78
79
|
context 'paket.exe exists' do
|
@@ -110,7 +111,7 @@ describe Rake::Funnel::Tasks::Paket do
|
|
110
111
|
end
|
111
112
|
|
112
113
|
it 'should fail' do
|
113
|
-
expect { Task[subject.name].invoke }.to raise_error(RuntimeError)
|
114
|
+
expect { Rake::Task[subject.name].invoke }.to raise_error(RuntimeError)
|
114
115
|
end
|
115
116
|
end
|
116
117
|
end
|
@@ -120,13 +121,13 @@ describe Rake::Funnel::Tasks::Paket do
|
|
120
121
|
|
121
122
|
context 'bootstrapper failed' do
|
122
123
|
before do
|
123
|
-
allow(subject).to receive(:sh).with(subject.bootstrapper).and_raise
|
124
|
+
allow(subject).to receive(:sh).with(subject.bootstrapper).and_raise(RuntimeError)
|
124
125
|
end
|
125
126
|
|
126
127
|
it 'should not run paket' do
|
127
128
|
begin
|
128
|
-
Task[subject.name].invoke
|
129
|
-
rescue
|
129
|
+
Rake::Task[subject.name].invoke
|
130
|
+
rescue RuntimeError
|
130
131
|
nil
|
131
132
|
end
|
132
133
|
|
@@ -134,7 +135,7 @@ describe Rake::Funnel::Tasks::Paket do
|
|
134
135
|
end
|
135
136
|
|
136
137
|
it 'should fail' do
|
137
|
-
expect { Task[subject.name].invoke }.to raise_error(RuntimeError)
|
138
|
+
expect { Rake::Task[subject.name].invoke }.to raise_error(RuntimeError)
|
138
139
|
end
|
139
140
|
end
|
140
141
|
end
|
@@ -1,11 +1,8 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
|
3
|
-
include Rake
|
4
|
-
include Rake::Funnel::Support
|
5
|
-
|
6
3
|
describe Rake::Funnel::Tasks::QuickTemplate do
|
7
4
|
before do
|
8
|
-
Task.clear
|
5
|
+
Rake::Task.clear
|
9
6
|
end
|
10
7
|
|
11
8
|
describe 'defaults' do
|
@@ -17,12 +14,12 @@ describe Rake::Funnel::Tasks::QuickTemplate do
|
|
17
14
|
describe 'execution' do
|
18
15
|
let(:templates) { %w(1.template two/2.template) }
|
19
16
|
|
20
|
-
let(:finder) { instance_double(Finder).as_null_object }
|
21
|
-
let(:engine) { TemplateEngine }
|
17
|
+
let(:finder) { instance_double(Rake::Funnel::Support::Finder).as_null_object }
|
18
|
+
let(:engine) { Rake::Funnel::Support::TemplateEngine }
|
22
19
|
|
23
20
|
before do
|
24
21
|
allow(finder).to receive(:all_or_default).and_return(templates)
|
25
|
-
allow(Finder).to receive(:new).and_return(finder)
|
22
|
+
allow(Rake::Funnel::Support::Finder).to receive(:new).and_return(finder)
|
26
23
|
allow(engine).to receive(:render).and_return('file content')
|
27
24
|
allow(Rake).to receive(:rake_output_message)
|
28
25
|
allow(File).to receive(:read).and_return('template content')
|
@@ -32,7 +29,7 @@ describe Rake::Funnel::Tasks::QuickTemplate do
|
|
32
29
|
subject! { described_class.new }
|
33
30
|
|
34
31
|
before do
|
35
|
-
Task[subject.name].invoke
|
32
|
+
Rake::Task[subject.name].invoke
|
36
33
|
end
|
37
34
|
|
38
35
|
it 'should report created files' do
|
@@ -1,11 +1,8 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
|
3
|
-
include Rake
|
4
|
-
include Rake::Funnel::Support
|
5
|
-
|
6
3
|
describe Rake::Funnel::Tasks::SideBySideSpecs do
|
7
4
|
before do
|
8
|
-
Task.clear
|
5
|
+
Rake::Task.clear
|
9
6
|
end
|
10
7
|
|
11
8
|
describe 'defaults' do
|
@@ -29,18 +26,18 @@ describe Rake::Funnel::Tasks::SideBySideSpecs do
|
|
29
26
|
end
|
30
27
|
|
31
28
|
before do
|
32
|
-
allow(SpecsRemover).to receive(:remove)
|
29
|
+
allow(Rake::Funnel::Support::SpecsRemover).to receive(:remove)
|
33
30
|
end
|
34
31
|
|
35
32
|
before do
|
36
|
-
Task[subject.name].invoke
|
33
|
+
Rake::Task[subject.name].invoke
|
37
34
|
end
|
38
35
|
|
39
36
|
context 'enabled' do
|
40
37
|
let(:enabled) { true }
|
41
38
|
|
42
39
|
it 'should use remover' do
|
43
|
-
expect(SpecsRemover).to have_received(:remove)
|
40
|
+
expect(Rake::Funnel::Support::SpecsRemover).to have_received(:remove)
|
44
41
|
.with(projects: subject.projects,
|
45
42
|
references: subject.references,
|
46
43
|
specs: subject.specs,
|
@@ -52,7 +49,7 @@ describe Rake::Funnel::Tasks::SideBySideSpecs do
|
|
52
49
|
let(:enabled) { false }
|
53
50
|
|
54
51
|
it 'should do nothing' do
|
55
|
-
expect(SpecsRemover).not_to have_received(:remove)
|
52
|
+
expect(Rake::Funnel::Support::SpecsRemover).not_to have_received(:remove)
|
56
53
|
end
|
57
54
|
end
|
58
55
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
include Rake
|
2
|
-
|
3
1
|
describe Rake::Funnel::Tasks::Timing do
|
4
|
-
include DSL
|
2
|
+
include Rake::DSL
|
5
3
|
|
6
4
|
before do
|
7
5
|
Rake.application = nil
|
8
|
-
Task.clear
|
6
|
+
Rake::Task.clear
|
9
7
|
|
8
|
+
# rubocop:disable RSpec/ExpectInHook
|
10
9
|
expect(define_tasks).to be
|
11
10
|
expect(subject).to be
|
11
|
+
# rubocop:enable RSpec/ExpectInHook
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:define_tasks) { task :task }
|
@@ -59,7 +59,7 @@ describe Rake::Funnel::Tasks::Timing do
|
|
59
59
|
allow(Rake.application).to receive(:exit_because_of_exception)
|
60
60
|
|
61
61
|
allow($stdout).to receive(:puts)
|
62
|
-
allow(
|
62
|
+
allow(Kernel).to receive(:warn)
|
63
63
|
# The 'rake aborted!' message is #printed on $stderr.
|
64
64
|
allow($stderr).to receive(:print)
|
65
65
|
|
@@ -125,7 +125,7 @@ describe Rake::Funnel::Tasks::Timing do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
it 'should report failure' do
|
128
|
-
expect(
|
128
|
+
expect(Kernel).to have_received(:warn).with(/Status\s+Failed/)
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
@@ -1,9 +1,6 @@
|
|
1
|
-
include Rake
|
2
|
-
include Rake::Funnel::Support
|
3
|
-
|
4
1
|
describe Rake::Funnel::Tasks::Zip do
|
5
2
|
before do
|
6
|
-
Task.clear
|
3
|
+
Rake::Task.clear
|
7
4
|
end
|
8
5
|
|
9
6
|
describe 'defaults' do
|
@@ -16,15 +13,15 @@ describe Rake::Funnel::Tasks::Zip do
|
|
16
13
|
|
17
14
|
describe 'execution' do
|
18
15
|
let(:source) { %w(bin/1 bin/2 bin/3/4) }
|
19
|
-
let(:finder) { instance_double(Finder).as_null_object }
|
16
|
+
let(:finder) { instance_double(Rake::Funnel::Support::Finder).as_null_object }
|
20
17
|
|
21
18
|
before do
|
22
19
|
allow(finder).to receive(:all_or_default).and_return(source)
|
23
|
-
allow(Finder).to receive(:new).and_return(finder)
|
20
|
+
allow(Rake::Funnel::Support::Finder).to receive(:new).and_return(finder)
|
24
21
|
end
|
25
22
|
|
26
23
|
before do
|
27
|
-
allow(Zipper).to receive(:zip)
|
24
|
+
allow(Rake::Funnel::Support::Zipper).to receive(:zip)
|
28
25
|
allow(Rake).to receive(:rake_output_message)
|
29
26
|
end
|
30
27
|
|
@@ -37,11 +34,12 @@ describe Rake::Funnel::Tasks::Zip do
|
|
37
34
|
end
|
38
35
|
|
39
36
|
before do
|
40
|
-
Task[subject.name].invoke
|
37
|
+
Rake::Task[subject.name].invoke
|
41
38
|
end
|
42
39
|
|
43
40
|
it 'should delegate to Zipper' do
|
44
|
-
expect(Zipper).to have_received(:zip)
|
41
|
+
expect(Rake::Funnel::Support::Zipper).to have_received(:zip)
|
42
|
+
.with(subject.source, subject.target, subject.zip_root)
|
45
43
|
end
|
46
44
|
|
47
45
|
it 'should report the created zip file' do
|
@@ -63,11 +61,11 @@ describe Rake::Funnel::Tasks::Zip do
|
|
63
61
|
let(:allow_empty) { true }
|
64
62
|
|
65
63
|
before do
|
66
|
-
Task[subject.name].invoke
|
64
|
+
Rake::Task[subject.name].invoke
|
67
65
|
end
|
68
66
|
|
69
67
|
it 'should invoker Zipper' do
|
70
|
-
expect(Zipper).to have_received(:zip)
|
68
|
+
expect(Rake::Funnel::Support::Zipper).to have_received(:zip)
|
71
69
|
end
|
72
70
|
end
|
73
71
|
|
@@ -76,11 +74,11 @@ describe Rake::Funnel::Tasks::Zip do
|
|
76
74
|
let(:allow_empty) { false }
|
77
75
|
|
78
76
|
before do
|
79
|
-
Task[subject.name].invoke
|
77
|
+
Rake::Task[subject.name].invoke
|
80
78
|
end
|
81
79
|
|
82
80
|
it 'should not invoker Zipper' do
|
83
|
-
expect(Zipper).not_to have_received(:zip)
|
81
|
+
expect(Rake::Funnel::Support::Zipper).not_to have_received(:zip)
|
84
82
|
end
|
85
83
|
|
86
84
|
it 'should warn' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-funnel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.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-10-
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: configatron
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.5'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,20 +72,6 @@ dependencies:
|
|
58
72
|
- - ">="
|
59
73
|
- !ruby/object:Gem::Version
|
60
74
|
version: '0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: configatron
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '4.5'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '4.5'
|
75
75
|
description: A standardized build pipeline
|
76
76
|
email:
|
77
77
|
- agross@therightstuff.de
|
@@ -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.
|
236
|
+
rubygems_version: 2.6.13
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: A build pipeline targeted at .NET projects. Supports environment configuration
|