rake-n-bake 1.1.3 → 1.1.4

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: 92a5a6d2cd5ee6afb4e6d32f05dfc1da3f3eb8bf
4
- data.tar.gz: 12b024ec3c832705ab94b305d3936eb41501e5c8
3
+ metadata.gz: 1243bf5b247113e256bd942c777715a8a0cd4b70
4
+ data.tar.gz: d5ebe99924fc9a94a4b0f4fc599aab3afdbf62d6
5
5
  SHA512:
6
- metadata.gz: 9557db029a9e12ec3ea8a47ffc21d2275dfa455af6828b9cdea93a57352e53f17d05080f9011f25cad8b7f0462e1d5c9d0cc41f9440e72189c42e1b78fccad30
7
- data.tar.gz: e401bfa7fe772314f586423ec93fabaeec16b03181f06b2bb66105ee0c99bbfd9e47f543db313d9834a61b8ec50cdd33937c17b5b9cb197a2580404a54d35448
6
+ metadata.gz: 310ce3a2af1d257c9c3d2f578adfe710bfdf56d1f586ddf6218a229d62f424b12b82e07263a13a95980099e756af75dd7fc3e54e0db705fb5881696b6369f27a
7
+ data.tar.gz: 98be3550eb38f18d2d9f072efbd9400a3d5b5df0003718f0166a767cb424904fcca0909954818ff5665d07ca079efbfcf521d61dd6a83129f2f1a602ad7af82b
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 1
4
- :patch: 3
4
+ :patch: 4
5
5
  :special: ''
6
6
  :metadata: ''
data/.travis.yml CHANGED
@@ -3,8 +3,11 @@ rvm:
3
3
  - 2.1.0
4
4
  - 2.0.0
5
5
  - 1.9.3
6
- - ruby-head
7
6
  - jruby-1.7.12
7
+ - ruby-head
8
+ matrix:
9
+ allow_failures:
10
+ - rvm: ruby-head
8
11
  env:
9
12
  global:
10
13
  - CODECLIMATE_REPO_TOKEN=6e1cff9fab6a2878c20e9935e9fbe551bb056ad03347f05faef813c058fc6f8f
data/README.md CHANGED
@@ -84,6 +84,9 @@ Useful at the end of any Rake tasks which test your application, it prints `****
84
84
  ### :ok_rainbow
85
85
  Run this task last to print a more magical version of `:ok`
86
86
 
87
+ ### :rails_best_practices
88
+ Run this task to run the [Rails Best Practices](https://github.com/railsbp/rails_best_practices) metrics against your Rails project.
89
+
87
90
  Handy Tips for new tasks
88
91
  ------------------------
89
92
  - 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,7 @@
1
+ == v1.1.4 (24 March 2015)
2
+
3
+ * Deprecate version task
4
+
1
5
  == v1.1.3 (22 March 2015)
2
6
  * Extract missing gem messages for consistant styling.
3
7
 
@@ -11,6 +11,14 @@ module RakeNBake
11
11
  Term::ANSIColor.reset
12
12
  end
13
13
 
14
+ def self.log_warn message
15
+ puts Term::ANSIColor.red +
16
+ Term::ANSIColor.underline +
17
+ '● ' +
18
+ message +
19
+ Term::ANSIColor.reset
20
+ end
21
+
14
22
  def self.log_passed message
15
23
  puts Term::ANSIColor.green +
16
24
  message +
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RakeNBake
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
@@ -13,6 +13,16 @@ describe RakeNBake::AssistantBaker do
13
13
  end
14
14
  end
15
15
 
16
+ describe '#log_warn' do
17
+ it 'puts the given message' do
18
+ expect{described_class.log_warn 'Foo'}.to output(/Foo/).to_stdout
19
+ end
20
+
21
+ it 'prints an attractive dot before the message' do
22
+ expect{described_class.log_warn 'Foo'}.to output(/● Foo/).to_stdout
23
+ end
24
+ end
25
+
16
26
  describe '#log_passed' do
17
27
  it 'puts the given message' do
18
28
  expect{described_class.log_passed 'Foo'}.to output(/Foo/).to_stdout
@@ -0,0 +1,20 @@
1
+ begin
2
+ require 'rails_best_practices'
3
+
4
+ namespace :bake do
5
+ desc 'A code metric tool to check the quality of rails code'
6
+ task :rails_best_practices do
7
+ RakeNBake::AssistantBaker.log_step 'Running Rails Best Practices'
8
+ fail unless system('bundle exec rails_best_practices')
9
+ end
10
+ end
11
+
12
+ rescue LoadError
13
+ namespace :bake do
14
+ desc 'Rails Best Practices is not available (gem not installed)'
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"
18
+ end
19
+ end
20
+ end
data/tasks/version.rake CHANGED
@@ -2,6 +2,7 @@ require_relative '../lib/versioning'
2
2
 
3
3
  desc "Display the latest version (from history.rdoc)"
4
4
  task :"bake:version" do
5
+ RakeNBake::AssistantBaker.log_warn "[DEPRECATION] `bake:version` is deprecated. Please use `bake:semver` instead."
5
6
  puts "Latest version is #{RakeNBake::Versioning.latest_version}"
6
7
  end
7
8
 
@@ -9,6 +10,7 @@ namespace :bake do
9
10
  namespace :version do
10
11
  desc "Increment the major version in history.rdoc (eg 1.2.3 => 2.0.0)"
11
12
  task :major do
13
+ RakeNBake::AssistantBaker.log_warn "[DEPRECATION] `bake:version` is deprecated. Please use `bake:semver` instead."
12
14
  new_version = RakeNBake::Versioning.latest_version
13
15
  new_version[0] += 1
14
16
  new_version[1,2] = 0, 0
@@ -17,6 +19,7 @@ namespace :bake do
17
19
 
18
20
  desc "Increment the minor version in history.rdoc (eg 1.2.3 => 1.3.0)"
19
21
  task :minor do
22
+ RakeNBake::AssistantBaker.log_warn "[DEPRECATION] `bake:version` is deprecated. Please use `bake:semver` instead."
20
23
  new_version = RakeNBake::Versioning.latest_version
21
24
  new_version[1] += 1
22
25
  new_version[2] = 0
@@ -25,6 +28,7 @@ namespace :bake do
25
28
 
26
29
  desc "Increment the patch version in history.rdoc (eg 1.2.3 => 1.2.4)"
27
30
  task :patch do
31
+ RakeNBake::AssistantBaker.log_warn "[DEPRECATION] `bake:version` is deprecated. Please use `bake:semver` instead."
28
32
  new_version = RakeNBake::Versioning.latest_version
29
33
  new_version[2] += 1
30
34
  RakeNBake::Versioning.update_to new_version
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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Vickerstaff
@@ -93,6 +93,7 @@ files:
93
93
  - tasks/code_quality.rake
94
94
  - tasks/coverage.rake
95
95
  - tasks/ok.rake
96
+ - tasks/rails_best_practices.rake
96
97
  - tasks/rspec.rake
97
98
  - tasks/semver.rake
98
99
  - tasks/version.rake