rake-n-bake 1.4.3 → 2.0.0

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: 049ce86cee71aaffcb57eea2882c7bfcfe049565
4
- data.tar.gz: d08e71bb5bce7fa32ad8affe346ac92dac41a5b7
3
+ metadata.gz: 4d7cf1122d6f3c6e074e72dc9f982177aeaad669
4
+ data.tar.gz: 35deb0087deb8f23f31ec4b07a05460cc2262bc1
5
5
  SHA512:
6
- metadata.gz: 7deaa3c2067be7deb0f7165edf6172c8a7fe3e91e682f9650fda094463194a64d5c9e567fac43057224310c798a75a70424c808d7301fe6ea36d40ce7cb90709
7
- data.tar.gz: c5bac1be478dcfc8e11c14c9e326f82bddeb288246457469b5d6b706409d3a87af10de6b4be11eb356474541afb627073d906720e02bee57b5e130f378eaa78c
6
+ metadata.gz: e83e1e44c433652d321e5e78a0ac948e31ad27ab0a4918d1ec229e448f213e0c739bfb5968ac52f25593b3d85929dee182400b33db94aed2aeab4851ab8cb3e9
7
+ data.tar.gz: 2e472ccc2b81879a66afb5001e5866697d814ae98b79f4acaf09cb1f728a0e928bff9628ac7dc78fa7d877f0b52b9f424f0fa1e8679b8d34c8b0fa043132990a
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
- :major: 1
3
- :minor: 4
4
- :patch: 3
2
+ :major: 2
3
+ :minor: 0
4
+ :patch: 0
5
5
  :special: ''
6
6
  :metadata: ''
data/README.md CHANGED
@@ -34,15 +34,14 @@ Usage
34
34
  ```ruby
35
35
  require "rake-n-bake"
36
36
 
37
- task :default => [
38
- :clean,
39
- :"bake:code_quality:all",
40
- :"bake:rspec",
41
- :"bake:coverage:check_specs",
42
- :"bake:bundle-audit",
43
- :"bake:rubocop",
44
- :"bake:rubycritic",
45
- :"bake:ok_rainbow",
37
+ task :default => %i[
38
+ clean
39
+ bake:rubocop
40
+ bake:rspec
41
+ bake:coverage:check_specs
42
+ bake:bundle-audit
43
+ bake:rubycritic
44
+ bake:ok_rainbow
46
45
  ]
47
46
 
48
47
  ```
@@ -71,23 +70,6 @@ For example:
71
70
  ```
72
71
  You can also use the underlying checker object by creating an instance of `RakeNBake::DependencyChecker` with your array of dependencies and calling `#check` or `#missing` on it.
73
72
 
74
- ### :code_quality
75
- #### :all
76
- Runs `[:trailing_spaces, :shoulds, :debugger, :pry, :console_log]` tasks. It does not run `:time_check`
77
- ##### :trailing_spaces
78
- Check for trailing spaces in `[spec, features, lib, app, factories, db]`.
79
- ##### :shoulds
80
- Check for legacy 'it "should blah"' style specs
81
- ##### :debugger
82
- Check for debugger statements in `[lib, app, spec, features]`.
83
- ##### :pry
84
- Check for binding.pry statements in `[lib, app, spec, features]`.
85
- ##### :console_log
86
- Check for console.log statements in `app/assets/javascripys`.
87
- ##### :time_check
88
- Check for `Time.now` statements in `[lib, app]` (Time.zone.now is more reliable for servers wanting to use UTC).
89
- This check is NOT part of :all as `Time.zone.now` is an ActiveSupport method.
90
-
91
73
  ### :coverage
92
74
  #### :check_specs
93
75
  Look at SimpleCov results for spec coverage in `log/coverage/spec` and fail the build if not 100%
data/Rakefile CHANGED
@@ -6,7 +6,6 @@ require './lib/rake-n-bake'
6
6
  task default: [
7
7
  :clean,
8
8
  :"bake:check_external_dependencies",
9
- :"bake:code_quality:all",
10
9
  :"bake:rspec",
11
10
  :"bake:ok_rainbow",
12
11
  ]
data/history.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == v2.0.0 (17 November 2016)
2
+
3
+ * Remove code quality tasks (Rubocop now does all of this)
4
+
1
5
  == v1.4.3 (17 November 2016)
2
6
 
3
7
  == v1.4.2 (12 October 2016)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RakeNBake
2
- VERSION = '1.4.3'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -1,85 +1,38 @@
1
1
  namespace :bake do
2
2
  namespace :code_quality do
3
- desc 'Runs all code quality checks'
4
- task :all => [:trailing_spaces, :shoulds, :debugger, :pry, :console_log]
3
+ desc 'Deprecated - Runs all code quality checks'
4
+ task :all do
5
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
6
+ end
5
7
 
6
- desc 'check for trailing spaces'
8
+ desc 'Deprecated - check for trailing spaces'
7
9
  task :trailing_spaces do
8
- grep_for_trailing_space %w{spec features lib app factories db}
10
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
9
11
  end
10
12
 
11
- desc %(check for legacy 'it "should blah"' style specs)
13
+ desc %(Deprecated - check for legacy 'it "should blah"' style specs)
12
14
  task :shoulds do
13
- grep_for_shoulds %w{spec}
15
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
14
16
  end
15
17
 
16
- desc 'check for debugger statements'
18
+ desc 'Deprecated - check for debugger statements'
17
19
  task :debugger do
18
- grep_for_debugger %w{lib app spec features}
20
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
19
21
  end
20
22
 
21
- desc 'check for binding.pry statements'
23
+ desc 'Deprecated - check for binding.pry statements'
22
24
  task :pry do
23
- grep_for_pry %w{lib app spec features}
25
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
24
26
  end
25
27
 
26
- desc 'check for console.log'
28
+ desc 'Deprecated - check for console.log'
27
29
  task :console_log do
28
- grep_for_console_log %w{app/assets/javascripts }
30
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
29
31
  end
30
32
 
31
- desc 'check for Time.now; should use Time.now.utc or Time.current'
33
+ desc 'Deprecated - check for Time.now; should use Time.now.utc or Time.current'
32
34
  task :time_check do
33
- grep_for_time_now %w{app lib}
34
- end
35
-
36
- def grep_for_trailing_space *file_patterns
37
- grep '^.*[[:space:]]+$', file_patterns, 'trailing spaces', ['*.yml', '*.csv']
38
- end
39
-
40
- def grep_for_shoulds *file_patterns
41
- grep '^[[:space:]]*it "should.*$',
42
- file_patterns,
43
- 'it block description starting with should'
44
- end
45
-
46
- def grep_for_pry *file_patterns
47
- grep 'binding.pry',
48
- file_patterns,
49
- 'binding.pry statement found',
50
- %w[common_spec_helper.rb code_quality.rake]
51
- end
52
-
53
- def grep_for_debugger *file_patterns
54
- grep 'debugger',
55
- file_patterns,
56
- 'debugger statement found',
57
- %w[common_spec_helper.rb code_quality.rake angular.js]
58
- end
59
-
60
- def grep_for_console_log *file_patterns
61
- grep 'console.log',
62
- file_patterns,
63
- 'console.log statement found',
64
- %w[angular.js jquery.flot-0.8.1.js]
65
- end
66
-
67
- def grep_for_time_now *file_patterns
68
- grep "Time.now",
69
- file_patterns,
70
- "Time.now found, use Time.zone.now to prevent timezone conflicts",
71
- %w{*.rake}
72
- end
73
-
74
- def grep regex, file_patterns, error_message, exclude_patterns=[], perl_regex=false
75
- files_found = ""
76
- command = "grep -r -n -s --binary-files=without-match '#{regex}' #{file_patterns.join(' ')}"
77
- exclude_patterns.each do |exclude_pattern|
78
- command << " --exclude '#{exclude_pattern}'"
79
- end
80
- command << (perl_regex ? ' -P' : ' -E')
81
- files_found << `#{command}`
82
- abort("#{error_message} found:\n#{files_found}") unless files_found.empty?
35
+ RakeNBake::Baker.log_warn "This has been deprecated, use the rubocop task instead"
83
36
  end
84
37
  end
85
38
  end
data/tasks/rubocop.rake CHANGED
@@ -4,6 +4,12 @@ begin
4
4
  namespace :bake do
5
5
  require 'rubocop/rake_task'
6
6
  RuboCop::RakeTask.new
7
+
8
+ task :rubocop_announce do
9
+ RakeNBake::Baker.log_step "Running Rubocop"
10
+ end
11
+
12
+ task :rubocop => :rubocop_announce
7
13
  end
8
14
 
9
15
  rescue LoadError
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.4.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Vickerstaff
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.4.5
128
+ rubygems_version: 2.4.8
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Common rake tasks, baked to perfection and ready to serve!