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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9ba8f6e5975e1994e15865164b6ebf1ecb4b833
4
- data.tar.gz: b7f421418f2ed2af59271466404388e7a18a7c8b
3
+ metadata.gz: 1481d06881b8e45bf1e6bda665ec18306194d584
4
+ data.tar.gz: 73d3d4afeb4f382a158005ca365f412b0b22e5a7
5
5
  SHA512:
6
- metadata.gz: 656ea891b95a351ac02c2a1b2cfd27943afa8acd787d845eeb4c134df5aaf18cce20d34cff60f7f84e9a3cbe44917810de39171d59f591f7796fc2553d103f14
7
- data.tar.gz: 3426ae9941c91b31bf1c65ce2499e991f7f4134b29cc0dead86cb85c2381b14b21672cddf1896f4c1210cc69f646e8a1410118d5db609ec1826a8d69ca041cef
6
+ metadata.gz: 76047402eae3aff52ebb4cd326a4f11d70896d995b33600f5c14af4f928ba6a27d3fc5c44e8904912f3b64ec6126a0c59c548e9a1d54310000d7f136e06a6fbe
7
+ data.tar.gz: 495c8a951a44125f23630413d960499a432e432d711bc710d9f540a1da87e686aca65551bb0259263067b58df018e8ae97e152864acafa26cbec302e6ab47150
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 3
4
- :patch: 0
4
+ :patch: 1
5
5
  :special: ''
6
6
  :metadata: ''
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
@@ -13,8 +13,8 @@ module RakeNBake
13
13
 
14
14
  def self.log_warn message
15
15
  puts Term::ANSIColor.red +
16
- Term::ANSIColor.underline +
17
- ' ' +
16
+ Term::ANSIColor.bold +
17
+ '! ' +
18
18
  message +
19
19
  Term::ANSIColor.reset
20
20
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RakeNBake
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -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(/● Foo/).to_stdout
22
+ expect{described_class.log_warn 'Foo'}.to output(/! Foo/).to_stdout
23
23
  end
24
24
  end
25
25
 
@@ -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.zone.now'
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
- SimpleCov.coverage_dir 'log/coverage/spec'
10
- coverage = SimpleCov.result.covered_percent
11
- fail "Spec coverage was only #{coverage}%" if coverage < 100.0
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
- SimpleCov.coverage_dir 'log/coverage/features'
19
- coverage = SimpleCov.result.covered_percent
20
- fail "Feature coverage was only #{coverage}%" if coverage < 100.0
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.0
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-08-17 00:00:00.000000000 Z
12
+ date: 2015-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake