rake-n-bake 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/history.rdoc +6 -0
- data/lib/assistant_baker.rb +2 -2
- data/lib/version.rb +1 -1
- data/spec/assistant_baker_spec.rb +1 -1
- data/tasks/code_quality.rake +1 -1
- data/tasks/coverage.rake +28 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1481d06881b8e45bf1e6bda665ec18306194d584
|
4
|
+
data.tar.gz: 73d3d4afeb4f382a158005ca365f412b0b22e5a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76047402eae3aff52ebb4cd326a4f11d70896d995b33600f5c14af4f928ba6a27d3fc5c44e8904912f3b64ec6126a0c59c548e9a1d54310000d7f136e06a6fbe
|
7
|
+
data.tar.gz: 495c8a951a44125f23630413d960499a432e432d711bc710d9f540a1da87e686aca65551bb0259263067b58df018e8ae97e152864acafa26cbec302e6ab47150
|
data/.semver
CHANGED
data/history.rdoc
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
== v1.3.1 (25 September 2015)
|
2
|
+
|
3
|
+
* Fix SimpleCov task (was showing 100% coverage when report was missing; now fails with helpful error)
|
4
|
+
|
1
5
|
== v1.3.0 (17 August 2015)
|
2
6
|
|
7
|
+
* Add more metrics tasks (MetricFu, Rubocop, Fasterer, Brakeman, RubyCritic)
|
8
|
+
|
3
9
|
== v1.2.0 (28 June 2015)
|
4
10
|
|
5
11
|
* Remove deprecated versioning task
|
data/lib/assistant_baker.rb
CHANGED
data/lib/version.rb
CHANGED
@@ -19,7 +19,7 @@ describe RakeNBake::AssistantBaker do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'prints an attractive dot before the message' do
|
22
|
-
expect{described_class.log_warn 'Foo'}.to output(
|
22
|
+
expect{described_class.log_warn 'Foo'}.to output(/! Foo/).to_stdout
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
data/tasks/code_quality.rake
CHANGED
@@ -28,7 +28,7 @@ namespace :bake do
|
|
28
28
|
grep_for_console_log %w{app/assets/javascripts }
|
29
29
|
end
|
30
30
|
|
31
|
-
desc 'check for Time.now should use Time.
|
31
|
+
desc 'check for Time.now; should use Time.now.utc or Time.current'
|
32
32
|
task :time_check do
|
33
33
|
grep_for_time_now %w{app lib}
|
34
34
|
end
|
data/tasks/coverage.rake
CHANGED
@@ -1,24 +1,44 @@
|
|
1
1
|
begin
|
2
2
|
require "simplecov"
|
3
3
|
|
4
|
+
def set_coverage_dir coverage_dir
|
5
|
+
report = File.join(coverage_dir, 'index.html')
|
6
|
+
if File.exists?(report)
|
7
|
+
SimpleCov.coverage_dir coverage_dir
|
8
|
+
else
|
9
|
+
RakeNBake::AssistantBaker.log_warn "SimpleCov report could not be found at #{report}"
|
10
|
+
fail
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def check_coverage_level_above level
|
15
|
+
coverage = SimpleCov.result.covered_percent
|
16
|
+
if coverage >= level
|
17
|
+
RakeNBake::AssistantBaker.log_passed "Feature coverage is at #{coverage}%"
|
18
|
+
else
|
19
|
+
RakeNBake::AssistantBaker.log_warn "Spec coverage was only #{coverage}%"
|
20
|
+
fail
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
4
24
|
namespace :bake do
|
5
25
|
namespace :coverage do
|
26
|
+
COVERAGE_PERCENT = ENV['COVERAGE_PERCENT'] || 100.0
|
27
|
+
|
6
28
|
desc 'Check coverage from RSpec'
|
7
29
|
task :check_specs do
|
8
30
|
RakeNBake::AssistantBaker.log_step 'Checking spec coverage'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
RakeNBake::AssistantBaker.log_passed "Spec coverage is at #{coverage}%"
|
31
|
+
coverage_dir = 'log/coverage/spec'
|
32
|
+
set_coverage_dir(coverage_dir)
|
33
|
+
check_coverage_level_above COVERAGE_PERCENT
|
13
34
|
end
|
14
35
|
|
15
36
|
desc 'Check coverage from Cucumber'
|
16
37
|
task :check_cucumber do
|
17
38
|
RakeNBake::AssistantBaker.log_step 'Checking feature coverage'
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
RakeNBake::AssistantBaker.log_passed "Feature coverage is at #{coverage}%"
|
39
|
+
coverage_dir = 'log/coverage/features'
|
40
|
+
set_coverage_dir(coverage_dir)
|
41
|
+
check_coverage_level_above COVERAGE_PERCENT
|
22
42
|
end
|
23
43
|
end
|
24
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-n-bake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Vickerstaff
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|