rake-funnel 0.3.2.pre → 0.4.0.pre
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/.rspec +2 -2
- data/Gemfile +4 -0
- data/README.md +2 -2
- data/lib/rake/funnel/ambiguous_file_error.rb +31 -29
- data/lib/rake/funnel/execution_error.rb +28 -26
- data/lib/rake/funnel/extensions/case/camel_case.rb +24 -19
- data/lib/rake/funnel/extensions/case/pascal_case.rb +24 -19
- data/lib/rake/funnel/extensions/case.rb +3 -3
- data/lib/rake/funnel/extensions/common_path.rb +60 -52
- data/lib/rake/funnel/extensions/disable_colors.rb +33 -27
- data/lib/rake/funnel/extensions/rexml.rb +27 -23
- data/lib/rake/funnel/extensions/shell.rb +92 -56
- data/lib/rake/funnel/extensions/windows_path.rb +15 -11
- data/lib/rake/funnel/framework.rb +11 -16
- data/lib/rake/funnel/integration/progress_report.rb +72 -70
- data/lib/rake/funnel/integration/sync_output.rb +12 -8
- data/lib/rake/funnel/integration/teamcity/nunit_plugin.rb +61 -55
- data/lib/rake/funnel/integration/teamcity/progress_report.rb +39 -33
- data/lib/rake/funnel/integration/teamcity/service_messages.rb +46 -40
- data/lib/rake/funnel/integration/teamcity/teamcity.rb +19 -15
- data/lib/rake/funnel/integration/teamcity.rb +3 -5
- data/lib/rake/funnel/support/argument_mapper/key_value_pair.rb +16 -10
- data/lib/rake/funnel/support/argument_mapper/styles/default.rb +39 -31
- data/lib/rake/funnel/support/argument_mapper/styles/msbuild.rb +41 -33
- data/lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb +55 -47
- data/lib/rake/funnel/support/argument_mapper/styles/nunit.rb +41 -33
- data/lib/rake/funnel/support/argument_mapper/styles.rb +3 -5
- data/lib/rake/funnel/support/argument_mapper/switch.rb +16 -10
- data/lib/rake/funnel/support/argument_mapper/value.rb +16 -10
- data/lib/rake/funnel/support/assembly_version/from_version_files.rb +39 -35
- data/lib/rake/funnel/support/assembly_version/languages/cs +5 -5
- data/lib/rake/funnel/support/assembly_version/languages/fs +12 -12
- data/lib/rake/funnel/support/assembly_version/languages/vb +5 -5
- data/lib/rake/funnel/support/assembly_version_writer.rb +56 -52
- data/lib/rake/funnel/support/binary_version_reader.rb +37 -32
- data/lib/rake/funnel/support/copier.rb +31 -27
- data/lib/rake/funnel/support/environments/loader.rb +46 -40
- data/lib/rake/funnel/support/environments.rb +3 -3
- data/lib/rake/funnel/support/internal/finder.rb +55 -51
- data/lib/rake/funnel/support/internal/instantiate_symbol.rb +38 -34
- data/lib/rake/funnel/support/mapper.rb +57 -53
- data/lib/rake/funnel/support/mono.rb +21 -17
- data/lib/rake/funnel/support/msbuild/build_tool.rb +30 -24
- data/lib/rake/funnel/support/msbuild.rb +3 -3
- data/lib/rake/funnel/support/msdeploy/registry_patch.rb +90 -84
- data/lib/rake/funnel/support/msdeploy.rb +3 -3
- data/lib/rake/funnel/support/patch.rb +41 -37
- data/lib/rake/funnel/support/specs_remover.rb +66 -62
- data/lib/rake/funnel/support/template_engine.rb +30 -26
- data/lib/rake/funnel/support/timing/report.rb +95 -89
- data/lib/rake/funnel/support/timing/statistics.rb +32 -26
- data/lib/rake/funnel/support/timing.rb +3 -3
- data/lib/rake/funnel/support/version_info.rb +103 -72
- data/lib/rake/funnel/support/which.rb +19 -15
- data/lib/rake/funnel/support/zipper.rb +53 -49
- data/lib/rake/funnel/tasks/assembly_version.rb +44 -40
- data/lib/rake/funnel/tasks/bin_path.rb +45 -41
- data/lib/rake/funnel/tasks/copy.rb +43 -39
- data/lib/rake/funnel/tasks/environments.rb +89 -89
- data/lib/rake/funnel/tasks/msbuild.rb +55 -51
- data/lib/rake/funnel/tasks/msdeploy.rb +54 -50
- data/lib/rake/funnel/tasks/nunit.rb +52 -48
- data/lib/rake/funnel/tasks/paket.rb +51 -47
- data/lib/rake/funnel/tasks/quick_template.rb +53 -49
- data/lib/rake/funnel/tasks/side_by_side_specs.rb +41 -37
- data/lib/rake/funnel/tasks/timing.rb +108 -104
- data/lib/rake/funnel/tasks/zip.rb +46 -42
- data/lib/rake/funnel/version.rb +1 -1
- data/lib/rake/funnel.rb +7 -7
- data/rake-funnel.gemspec +12 -3
- data/spec/rake/funnel/execution_error_spec.rb +67 -67
- data/spec/rake/funnel/extensions/case/camel_case_spec.rb +17 -17
- data/spec/rake/funnel/extensions/case/pascal_case_spec.rb +17 -17
- data/spec/rake/funnel/extensions/common_path_spec.rb +56 -56
- data/spec/rake/funnel/extensions/disable_colors_spec.rb +33 -33
- data/spec/rake/funnel/extensions/rexml_spec.rb +20 -20
- data/spec/rake/funnel/extensions/shell_spec.rb +237 -237
- data/spec/rake/funnel/extensions/windows_path_spec.rb +5 -5
- data/spec/rake/funnel/integration/progress_report_spec.rb +149 -149
- data/spec/rake/funnel/integration/sync_output_spec.rb +16 -16
- data/spec/rake/funnel/integration/teamcity/nunit_plugin_spec.rb +110 -110
- data/spec/rake/funnel/integration/teamcity/progress_report_spec.rb +174 -174
- data/spec/rake/funnel/integration/teamcity/service_messages_spec.rb +136 -136
- data/spec/rake/funnel/integration/teamcity/teamcity_spec.rb +34 -34
- data/spec/rake/funnel/support/argument_mapper/styles/msdeploy_spec.rb +222 -222
- data/spec/rake/funnel/support/argument_mapper/styles/nunit_spec.rb +25 -25
- data/spec/rake/funnel/support/argument_mapper/styles/styles_spec.rb +214 -214
- data/spec/rake/funnel/support/assembly_version/from_version_files_spec.rb +66 -61
- data/spec/rake/funnel/support/assembly_version_writer_spec.rb +140 -140
- data/spec/rake/funnel/support/binary_version_reader_spec.rb +29 -29
- data/spec/rake/funnel/support/copier_spec.rb +58 -58
- data/spec/rake/funnel/support/environments/loader_spec.rb +143 -143
- data/spec/rake/funnel/support/internal/finder_spec.rb +229 -229
- data/spec/rake/funnel/support/internal/instantiate_symbol_spec.rb +182 -183
- data/spec/rake/funnel/support/mapper_spec.rb +87 -87
- data/spec/rake/funnel/support/mono_spec.rb +57 -57
- data/spec/rake/funnel/support/msbuild/build_tool_spec.rb +21 -21
- data/spec/rake/funnel/support/msdeploy/registry_patch_spec.rb +139 -139
- data/spec/rake/funnel/support/patch_spec.rb +108 -108
- data/spec/rake/funnel/support/specs_remover/Sample.csproj +28 -28
- data/spec/rake/funnel/support/specs_remover_spec.rb +116 -116
- data/spec/rake/funnel/support/template_engine_spec.rb +65 -65
- data/spec/rake/funnel/support/timing/report_spec.rb +129 -129
- data/spec/rake/funnel/support/version_info_spec.rb +333 -228
- data/spec/rake/funnel/support/which_spec.rb +65 -65
- data/spec/rake/funnel/support/zipper_spec.rb +77 -77
- data/spec/rake/funnel/tasks/assembly_version_spec.rb +45 -45
- data/spec/rake/funnel/tasks/bin_path_spec.rb +52 -52
- data/spec/rake/funnel/tasks/copy_spec.rb +44 -44
- data/spec/rake/funnel/tasks/environments_spec.rb +249 -247
- data/spec/rake/funnel/tasks/msbuild_spec.rb +91 -91
- data/spec/rake/funnel/tasks/msdeploy_spec.rb +220 -220
- data/spec/rake/funnel/tasks/nunit_spec.rb +74 -74
- data/spec/rake/funnel/tasks/paket_spec.rb +140 -142
- data/spec/rake/funnel/tasks/quick_template_spec.rb +62 -62
- data/spec/rake/funnel/tasks/side_by_side_specs_spec.rb +58 -58
- data/spec/rake/funnel/tasks/timing_spec.rb +133 -133
- data/spec/rake/funnel/tasks/zip_spec.rb +50 -50
- data/spec/spec_helper.rb +43 -33
- metadata +2 -3
- data/lib/rake/funnel/support/side_by_side_specs.rb +0 -3
@@ -1,133 +1,133 @@
|
|
1
|
-
include Rake
|
2
|
-
|
3
|
-
describe Rake::Funnel::Tasks::Timing do
|
4
|
-
include DSL
|
5
|
-
|
6
|
-
before {
|
7
|
-
Rake.application = nil
|
8
|
-
Task.clear
|
9
|
-
|
10
|
-
expect(define_tasks).to be
|
11
|
-
expect(subject).to be
|
12
|
-
}
|
13
|
-
|
14
|
-
let(:define_tasks) { task :task }
|
15
|
-
|
16
|
-
after {
|
17
|
-
subject.reset!
|
18
|
-
}
|
19
|
-
|
20
|
-
describe 'defaults' do
|
21
|
-
its(:name) { should == :timing }
|
22
|
-
its(:stats) { should have(0).items }
|
23
|
-
end
|
24
|
-
|
25
|
-
describe 'task is automatically executed' do
|
26
|
-
it 'should add itself to the top level tasks' do
|
27
|
-
expect(Rake.application.top_level_tasks).to include(:timing)
|
28
|
-
end
|
29
|
-
|
30
|
-
it 'should append itself to the top level tasks' do
|
31
|
-
allow(Rake.application).to receive(:handle_options).and_return([])
|
32
|
-
Rake.application.init
|
33
|
-
|
34
|
-
described_class.new
|
35
|
-
|
36
|
-
expect(Rake.application.top_level_tasks).to have_at_least(2).items
|
37
|
-
expect(Rake.application.top_level_tasks.last).to eq(:timing)
|
38
|
-
end
|
39
|
-
|
40
|
-
context 'task defined in namespace' do
|
41
|
-
it 'should add namespaced top level task' do
|
42
|
-
allow(Rake.application).to receive(:handle_options).and_return([])
|
43
|
-
Rake.application.init
|
44
|
-
|
45
|
-
namespace :namespace do
|
46
|
-
described_class.new
|
47
|
-
end
|
48
|
-
|
49
|
-
expect(Rake.application.top_level_tasks).to include('namespace:timing')
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe 'execution' do
|
55
|
-
before {
|
56
|
-
allow(Rake.application).to receive(:init)
|
57
|
-
allow(Rake.application).to receive(:load_rakefile)
|
58
|
-
Rake.application.top_level_tasks.unshift(:task)
|
59
|
-
allow(Rake.application).to receive(:exit_because_of_exception)
|
60
|
-
|
61
|
-
allow($stdout).to receive(:puts)
|
62
|
-
allow($stderr).to receive(:puts)
|
63
|
-
# The 'rake aborted!' message is #printed on $stderr.
|
64
|
-
allow($stderr).to receive(:print)
|
65
|
-
|
66
|
-
Rake.application.run
|
67
|
-
}
|
68
|
-
|
69
|
-
context 'with task defined' do
|
70
|
-
let(:define_tasks) {
|
71
|
-
task :task do
|
72
|
-
puts 'hello'
|
73
|
-
end
|
74
|
-
}
|
75
|
-
|
76
|
-
it 'should execute tasks' do
|
77
|
-
expect($stdout).to have_received(:puts).with('hello')
|
78
|
-
end
|
79
|
-
|
80
|
-
it 'should record timing information for executed tasks' do
|
81
|
-
expect(subject.stats).to have(2).items
|
82
|
-
expect(subject.stats.first[:task].name).to eq('task')
|
83
|
-
expect(subject.stats.first[:time]).to be_a(Float)
|
84
|
-
end
|
85
|
-
|
86
|
-
it 'should record timing information for itself' do
|
87
|
-
expect(subject.stats).to have(2).items
|
88
|
-
|
89
|
-
# Ruby has no #last on Enumerable, WTF.
|
90
|
-
expect(subject.stats.reverse_each.first[:task].name).to eq('timing')
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
context 'with unreachable task defined' do
|
95
|
-
let(:define_tasks) {
|
96
|
-
task :task
|
97
|
-
task :not_executed
|
98
|
-
}
|
99
|
-
|
100
|
-
it 'should not record timing information for unexecuted tasks' do
|
101
|
-
expect(subject.stats.map { |s| s[:task].name }).not_to include('not_executed')
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
describe 'build finished' do
|
106
|
-
context 'when rake succeeded' do
|
107
|
-
it 'should print the report' do
|
108
|
-
expect($stdout).to have_received(:puts).with(/Build time report/)
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'should report success' do
|
112
|
-
expect($stdout).to have_received(:puts).with(/Status\s+OK/)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
context 'when rake failed' do
|
117
|
-
let(:define_tasks) {
|
118
|
-
task :task do
|
119
|
-
raise
|
120
|
-
end
|
121
|
-
}
|
122
|
-
|
123
|
-
it 'should print the report' do
|
124
|
-
expect($stdout).to have_received(:puts).with(/Build time report/)
|
125
|
-
end
|
126
|
-
|
127
|
-
it 'should report failure' do
|
128
|
-
expect($stderr).to have_received(:puts).with(/Status\s+Failed/)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
133
|
-
end
|
1
|
+
include Rake
|
2
|
+
|
3
|
+
describe Rake::Funnel::Tasks::Timing do
|
4
|
+
include DSL
|
5
|
+
|
6
|
+
before {
|
7
|
+
Rake.application = nil
|
8
|
+
Task.clear
|
9
|
+
|
10
|
+
expect(define_tasks).to be
|
11
|
+
expect(subject).to be
|
12
|
+
}
|
13
|
+
|
14
|
+
let(:define_tasks) { task :task }
|
15
|
+
|
16
|
+
after {
|
17
|
+
subject.reset!
|
18
|
+
}
|
19
|
+
|
20
|
+
describe 'defaults' do
|
21
|
+
its(:name) { should == :timing }
|
22
|
+
its(:stats) { should have(0).items }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe 'task is automatically executed' do
|
26
|
+
it 'should add itself to the top level tasks' do
|
27
|
+
expect(Rake.application.top_level_tasks).to include(:timing)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should append itself to the top level tasks' do
|
31
|
+
allow(Rake.application).to receive(:handle_options).and_return([])
|
32
|
+
Rake.application.init
|
33
|
+
|
34
|
+
described_class.new
|
35
|
+
|
36
|
+
expect(Rake.application.top_level_tasks).to have_at_least(2).items
|
37
|
+
expect(Rake.application.top_level_tasks.last).to eq(:timing)
|
38
|
+
end
|
39
|
+
|
40
|
+
context 'task defined in namespace' do
|
41
|
+
it 'should add namespaced top level task' do
|
42
|
+
allow(Rake.application).to receive(:handle_options).and_return([])
|
43
|
+
Rake.application.init
|
44
|
+
|
45
|
+
namespace :namespace do
|
46
|
+
described_class.new
|
47
|
+
end
|
48
|
+
|
49
|
+
expect(Rake.application.top_level_tasks).to include('namespace:timing')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'execution' do
|
55
|
+
before {
|
56
|
+
allow(Rake.application).to receive(:init)
|
57
|
+
allow(Rake.application).to receive(:load_rakefile)
|
58
|
+
Rake.application.top_level_tasks.unshift(:task)
|
59
|
+
allow(Rake.application).to receive(:exit_because_of_exception)
|
60
|
+
|
61
|
+
allow($stdout).to receive(:puts)
|
62
|
+
allow($stderr).to receive(:puts)
|
63
|
+
# The 'rake aborted!' message is #printed on $stderr.
|
64
|
+
allow($stderr).to receive(:print)
|
65
|
+
|
66
|
+
Rake.application.run
|
67
|
+
}
|
68
|
+
|
69
|
+
context 'with task defined' do
|
70
|
+
let(:define_tasks) {
|
71
|
+
task :task do
|
72
|
+
puts 'hello'
|
73
|
+
end
|
74
|
+
}
|
75
|
+
|
76
|
+
it 'should execute tasks' do
|
77
|
+
expect($stdout).to have_received(:puts).with('hello')
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'should record timing information for executed tasks' do
|
81
|
+
expect(subject.stats).to have(2).items
|
82
|
+
expect(subject.stats.first[:task].name).to eq('task')
|
83
|
+
expect(subject.stats.first[:time]).to be_a(Float)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'should record timing information for itself' do
|
87
|
+
expect(subject.stats).to have(2).items
|
88
|
+
|
89
|
+
# Ruby has no #last on Enumerable, WTF.
|
90
|
+
expect(subject.stats.reverse_each.first[:task].name).to eq('timing')
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
context 'with unreachable task defined' do
|
95
|
+
let(:define_tasks) {
|
96
|
+
task :task
|
97
|
+
task :not_executed
|
98
|
+
}
|
99
|
+
|
100
|
+
it 'should not record timing information for unexecuted tasks' do
|
101
|
+
expect(subject.stats.map { |s| s[:task].name }).not_to include('not_executed')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe 'build finished' do
|
106
|
+
context 'when rake succeeded' do
|
107
|
+
it 'should print the report' do
|
108
|
+
expect($stdout).to have_received(:puts).with(/Build time report/)
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'should report success' do
|
112
|
+
expect($stdout).to have_received(:puts).with(/Status\s+OK/)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
context 'when rake failed' do
|
117
|
+
let(:define_tasks) {
|
118
|
+
task :task do
|
119
|
+
raise
|
120
|
+
end
|
121
|
+
}
|
122
|
+
|
123
|
+
it 'should print the report' do
|
124
|
+
expect($stdout).to have_received(:puts).with(/Build time report/)
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'should report failure' do
|
128
|
+
expect($stderr).to have_received(:puts).with(/Status\s+Failed/)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -1,50 +1,50 @@
|
|
1
|
-
include Rake
|
2
|
-
include Rake::Funnel::Support
|
3
|
-
|
4
|
-
describe Rake::Funnel::Tasks::Zip do
|
5
|
-
before {
|
6
|
-
Task.clear
|
7
|
-
}
|
8
|
-
|
9
|
-
describe 'defaults' do
|
10
|
-
its(:name) { should == :package }
|
11
|
-
its(:source) { should eq([]) }
|
12
|
-
its(:target) { should be_nil }
|
13
|
-
its(:zip_root) { should be_nil }
|
14
|
-
end
|
15
|
-
|
16
|
-
describe 'execution' do
|
17
|
-
let(:source) { %w(bin/1 bin/2 bin/3/4) }
|
18
|
-
let(:finder) { instance_double(Finder).as_null_object }
|
19
|
-
|
20
|
-
before {
|
21
|
-
allow(finder).to receive(:all_or_default).and_return(source)
|
22
|
-
allow(Finder).to receive(:new).and_return(finder)
|
23
|
-
}
|
24
|
-
|
25
|
-
before {
|
26
|
-
allow(Zipper).to receive(:zip)
|
27
|
-
allow(Rake).to receive(:rake_output_message)
|
28
|
-
}
|
29
|
-
|
30
|
-
subject {
|
31
|
-
described_class.new do |t|
|
32
|
-
t.source = source
|
33
|
-
t.target = 'some path/file.zip'
|
34
|
-
t.zip_root = 'zip root'
|
35
|
-
end
|
36
|
-
}
|
37
|
-
|
38
|
-
before {
|
39
|
-
Task[subject.name].invoke
|
40
|
-
}
|
41
|
-
|
42
|
-
it 'should delegate to Zipper' do
|
43
|
-
expect(Zipper).to have_received(:zip).with(subject.source, subject.target, subject.zip_root)
|
44
|
-
end
|
45
|
-
|
46
|
-
it 'should report the created zip file' do
|
47
|
-
expect(Rake).to have_received(:rake_output_message).with("Created #{subject.target}")
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
1
|
+
include Rake
|
2
|
+
include Rake::Funnel::Support
|
3
|
+
|
4
|
+
describe Rake::Funnel::Tasks::Zip do
|
5
|
+
before {
|
6
|
+
Task.clear
|
7
|
+
}
|
8
|
+
|
9
|
+
describe 'defaults' do
|
10
|
+
its(:name) { should == :package }
|
11
|
+
its(:source) { should eq([]) }
|
12
|
+
its(:target) { should be_nil }
|
13
|
+
its(:zip_root) { should be_nil }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'execution' do
|
17
|
+
let(:source) { %w(bin/1 bin/2 bin/3/4) }
|
18
|
+
let(:finder) { instance_double(Finder).as_null_object }
|
19
|
+
|
20
|
+
before {
|
21
|
+
allow(finder).to receive(:all_or_default).and_return(source)
|
22
|
+
allow(Finder).to receive(:new).and_return(finder)
|
23
|
+
}
|
24
|
+
|
25
|
+
before {
|
26
|
+
allow(Zipper).to receive(:zip)
|
27
|
+
allow(Rake).to receive(:rake_output_message)
|
28
|
+
}
|
29
|
+
|
30
|
+
subject {
|
31
|
+
described_class.new do |t|
|
32
|
+
t.source = source
|
33
|
+
t.target = 'some path/file.zip'
|
34
|
+
t.zip_root = 'zip root'
|
35
|
+
end
|
36
|
+
}
|
37
|
+
|
38
|
+
before {
|
39
|
+
Task[subject.name].invoke
|
40
|
+
}
|
41
|
+
|
42
|
+
it 'should delegate to Zipper' do
|
43
|
+
expect(Zipper).to have_received(:zip).with(subject.source, subject.target, subject.zip_root)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should report the created zip file' do
|
47
|
+
expect(Rake).to have_received(:rake_output_message).with("Created #{subject.target}")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,33 +1,43 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
1
|
+
require 'rspec/its'
|
2
|
+
require 'rspec/collection_matchers'
|
3
|
+
require 'rake/funnel'
|
4
|
+
require 'simplecov'
|
5
|
+
require 'coveralls'
|
6
|
+
require 'codeclimate-test-reporter'
|
7
|
+
require 'bundler/setup'
|
8
|
+
require 'simplecov-teamcity-summary'
|
9
|
+
|
10
|
+
SimpleCov.start do
|
11
|
+
if Coveralls.will_run?
|
12
|
+
external_services = [
|
13
|
+
Coveralls::SimpleCov::Formatter,
|
14
|
+
CodeClimate::TestReporter::Formatter
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
formatter SimpleCov::Formatter::MultiFormatter[
|
19
|
+
SimpleCov::Formatter::HTMLFormatter,
|
20
|
+
*external_services
|
21
|
+
]
|
22
|
+
|
23
|
+
coverage_dir('build/coverage')
|
24
|
+
|
25
|
+
at_exit do
|
26
|
+
result = SimpleCov.result
|
27
|
+
result.format!
|
28
|
+
|
29
|
+
next unless Rake::Funnel::Integration::TeamCity.running?
|
30
|
+
|
31
|
+
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(result)
|
32
|
+
Rake::Funnel::Integration::TeamCity::ServiceMessages.build_status(text: "{build.status.text}, Code Coverage #{result.covered_percent.round(2)}%")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# When invoked via the rspec rake task, output needs to by synced.
|
37
|
+
Rake::Funnel::Integration::SyncOutput.new
|
38
|
+
|
39
|
+
RSpec.configure do |config|
|
40
|
+
config.expect_with :rspec do |c|
|
41
|
+
c.syntax = :expect
|
42
|
+
end
|
43
|
+
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.
|
4
|
+
version: 0.4.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Groß
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- lib/rake/funnel/support/msdeploy.rb
|
122
122
|
- lib/rake/funnel/support/msdeploy/registry_patch.rb
|
123
123
|
- lib/rake/funnel/support/patch.rb
|
124
|
-
- lib/rake/funnel/support/side_by_side_specs.rb
|
125
124
|
- lib/rake/funnel/support/specs_remover.rb
|
126
125
|
- lib/rake/funnel/support/template_engine.rb
|
127
126
|
- lib/rake/funnel/support/timing.rb
|