rake-n-bake 1.2.0 → 1.3.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: b27f8375fc4e4be7856074896c4dd5f41b5952d7
4
- data.tar.gz: e5b15d34fada459e6e410ae8ba095c1794342062
3
+ metadata.gz: f9ba8f6e5975e1994e15865164b6ebf1ecb4b833
4
+ data.tar.gz: b7f421418f2ed2af59271466404388e7a18a7c8b
5
5
  SHA512:
6
- metadata.gz: b6b9c69af6d973c43efaaef31e83339ec502579d5bbd81f500969bed2cc722f1cb18b9923fe1647aa4420776a932d16e655029b2ac717b50eb95a4274b789349
7
- data.tar.gz: 522d28a77818545db8f3e2598b4805359c1db4fa1ac31fbea4cdb194f04276a95a2c833832fe5b4191d12bae168e13108c24b0cb1ef396f189f854432474abaa
6
+ metadata.gz: 656ea891b95a351ac02c2a1b2cfd27943afa8acd787d845eeb4c134df5aaf18cce20d34cff60f7f84e9a3cbe44917810de39171d59f591f7796fc2553d103f14
7
+ data.tar.gz: 3426ae9941c91b31bf1c65ce2499e991f7f4134b29cc0dead86cb85c2381b14b21672cddf1896f4c1210cc69f646e8a1410118d5db609ec1826a8d69ca041cef
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /log/*
2
+ /tmp/*
2
3
  *.gem
3
4
  *.sw?
4
5
  Gemfile.lock
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 2
3
+ :minor: 3
4
4
  :patch: 0
5
5
  :special: ''
6
6
  :metadata: ''
data/Gemfile CHANGED
@@ -5,10 +5,15 @@ gemspec
5
5
  group :development, :test do
6
6
  gem 'aruba-rspec'
7
7
  gem "codeclimate-test-reporter", require: nil
8
+ gem 'brakeman'
8
9
  gem 'bundler-audit'
9
10
  gem 'cucumber'
11
+ gem 'fasterer'
12
+ gem 'metric_fu'
10
13
  gem 'rake'
11
14
  gem 'rspec'
15
+ gem 'rubocop'
16
+ gem 'rubycritic'
12
17
  gem 'semver2'
13
18
  gem 'simplecov'
14
19
  gem 'term-ansicolor', '~> 1.3'
data/README.md CHANGED
@@ -40,6 +40,8 @@ task :default => [
40
40
  :"bake:rspec",
41
41
  :"bake:coverage:check_specs",
42
42
  :"bake:bundler_audit",
43
+ :"bake:rubocop",
44
+ :"bake:rubycritic",
43
45
  :"bake:ok_rainbow",
44
46
  ]
45
47
 
@@ -49,6 +51,9 @@ Tasks
49
51
  -----
50
52
  Tasks are namespaced under `:bake` to prevent clashes. For example, the `:ok` task is called by invoking `:bake:ok`
51
53
 
54
+ ### :brakeman
55
+ Run [Brakeman](http://brakemanscanner.org/) to look for security issues on a Rails project
56
+
52
57
  ### :bundler_audit
53
58
  Check the current Gemfile.lock for gem versions with known security issues, courtesy of [Bundler Audit](https://github.com/rubysec/bundler-audit#readme)
54
59
 
@@ -83,6 +88,9 @@ Look at SimpleCov results for spec coverage in `log/coverage/spec` and fail the
83
88
  #### :check_cucumber
84
89
  Look at SimpleCov results for Cucumber coverage in `log/coverage/features` and fail the build if not 100%
85
90
 
91
+ ### :fasterer
92
+ Run the [fasterer](https://github.com/DamirSvrtan/fasterer) tool to spot performance improvements in your code
93
+
86
94
  ### :ok
87
95
  Useful at the end of any Rake tasks which test your application, it prints `***** ALL TESTS PASSED *****`.
88
96
 
@@ -105,6 +113,12 @@ Run all the specs in the features directory
105
113
  #### :rspec:tag[mytag]
106
114
  Run all the specs tagged using `mytag: true`
107
115
 
116
+ ### :rubocop
117
+ Runs [Rubocop](https://github.com/bbatsov/rubocop) over the project and lists violations/warnings
118
+
119
+ ### :rubycritic
120
+ Runs the [RubyCritic](https://github.com/whitesmith/rubycritic) tool and generates a report about the health of your code
121
+
108
122
  Handy Tips for new tasks
109
123
  ------------------------
110
124
  - All tasks loaded by `lib/rake_n_bake.rb` will have access to the `RakeNBake::AssistantBaker`. This is intended for truely common things, like logging out when a particular step runs or passes.
data/history.rdoc CHANGED
@@ -1,3 +1,5 @@
1
+ == v1.3.0 (17 August 2015)
2
+
1
3
  == v1.2.0 (28 June 2015)
2
4
 
3
5
  * Remove deprecated versioning task
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RakeNBake
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -0,0 +1,27 @@
1
+ begin
2
+ require 'brakeman'
3
+
4
+ namespace :bake do
5
+
6
+ desc "Run Brakeman"
7
+ task :brakeman, :output_files do |t, args|
8
+ RakeNBake::AssistantBaker.log_step 'Running Brakeman'
9
+
10
+ files = args[:output_files].split(' ') if args[:output_files]
11
+ Brakeman.run :app_path => ".", :output_files => files, :print_report => true
12
+ end
13
+ end
14
+
15
+ rescue LoadError
16
+ tasks = %w[ brakeman ]
17
+
18
+ namespace :bake do
19
+ tasks.map(&:to_sym).each do |t|
20
+ desc 'brakeman is not available (gem not installed)'
21
+ task t do
22
+ RakeNBake::AssistantBaker.log_missing_gem 'brakeman'
23
+ abort
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,23 @@
1
+ begin
2
+ require 'fasterer'
3
+
4
+ namespace :bake do
5
+ task :fasterer do
6
+ RakeNBake::AssistantBaker.log_step 'Running Fasterer'
7
+ system('fasterer')
8
+ end
9
+ end
10
+
11
+ rescue LoadError
12
+ tasks = %w[ fasterer ]
13
+
14
+ namespace :bake do
15
+ tasks.map(&:to_sym).each do |t|
16
+ desc 'fasterer is not available (gem not installed)'
17
+ task t do
18
+ RakeNBake::AssistantBaker.log_missing_gem 'fasterer'
19
+ abort
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,16 @@
1
+ begin
2
+ require 'metric_fu'
3
+
4
+ rescue LoadError
5
+
6
+ namespace :metrics do
7
+ %w[all cane churn flay flog hotspots only reek roodi saikuro stats].map(&:to_sym).each do |t|
8
+ desc 'metric_fu rake tasks are not available (gem not installed)'
9
+ task t do
10
+ RakeNBake::AssistantBaker.log_missing_gem 'metric_fu'
11
+ abort
12
+ end
13
+ end
14
+ end
15
+
16
+ end
@@ -2,19 +2,19 @@ begin
2
2
  require 'rails_best_practices'
3
3
 
4
4
  namespace :bake do
5
- desc 'A code metric tool to check the quality of rails code'
5
+ desc 'a code metric tool to check the quality of rails code'
6
6
  task :rails_best_practices do
7
- RakeNBake::AssistantBaker.log_step 'Running Rails Best Practices'
7
+ RakeNBake::AssistantBaker.log_step 'Running Rails best practices'
8
8
  fail unless system('bundle exec rails_best_practices')
9
9
  end
10
10
  end
11
11
 
12
12
  rescue LoadError
13
13
  namespace :bake do
14
- desc 'Rails Best Practices is not available (gem not installed)'
14
+ desc 'rails best practices is not available (gem not installed)'
15
15
  task :rails_best_practices do
16
- $stdout.puts 'This task is not avaialble because the Rails Best Practices gem is not installed'
17
- $stderr.puts "Try adding \"gem 'rails_best_practices'\" to your Gemfile and try again"
16
+ RakeNBake::AssistantBaker.log_missing_gem 'rails_best_practices'
17
+ abort
18
18
  end
19
19
  end
20
20
  end
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'rubocop'
3
+
4
+ namespace :bake do
5
+ require 'rubocop/rake_task'
6
+ RuboCop::RakeTask.new
7
+ end
8
+
9
+ rescue LoadError
10
+ tasks = %w[ rubocop ]
11
+
12
+ namespace :bake do
13
+ tasks.map(&:to_sym).each do |t|
14
+ desc 'rubocop is not available (gem not installed)'
15
+ task t do
16
+ RakeNBake::AssistantBaker.log_missing_gem 'rubocop'
17
+ abort
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,23 @@
1
+ begin
2
+ require "rubycritic"
3
+
4
+ namespace :bake do
5
+ task :rubycritic do
6
+ RakeNBake::AssistantBaker.log_step 'Running rubycritic'
7
+ system('rubycritic')
8
+ end
9
+ end
10
+
11
+ rescue LoadError
12
+ tasks = %w[ rubycritic ]
13
+
14
+ namespace :bake do
15
+ tasks.map(&:to_sym).each do |t|
16
+ desc 'rubycritic is not available (gem not installed)'
17
+ task t do
18
+ RakeNBake::AssistantBaker.log_missing_gem 'rubycritic'
19
+ abort
20
+ end
21
+ end
22
+ end
23
+ 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.2.0
4
+ version: 1.3.0
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-06-28 00:00:00.000000000 Z
12
+ date: 2015-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -86,13 +86,18 @@ files:
86
86
  - spec/dependency_checker_spec.rb
87
87
  - spec/semver_versioning_spec.rb
88
88
  - spec/spec_helper.rb
89
+ - tasks/brakeman.rake
89
90
  - tasks/bundler_audit.rake
90
91
  - tasks/check_external_deps.rake
91
92
  - tasks/code_quality.rake
92
93
  - tasks/coverage.rake
94
+ - tasks/fasterer.rake
95
+ - tasks/metric_fu.rake
93
96
  - tasks/ok.rake
94
97
  - tasks/rails_best_practices.rake
95
98
  - tasks/rspec.rake
99
+ - tasks/rubocop.rake
100
+ - tasks/ruby_critic.rake
96
101
  - tasks/semver.rake
97
102
  homepage: https://github.com/RichardVickerstaff/rake-n-bake
98
103
  licenses: