rake-n-bake 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +1 -0
- data/README.md +5 -0
- data/Rakefile +1 -1
- data/bin/cc-tddium-post-worker +16 -0
- data/bin/cucumber +16 -0
- data/history.rdoc +2 -0
- data/lib/assistant_baker.rb +20 -0
- data/lib/rake_n_bake.rb +1 -0
- data/rake-n-bake.gemspec +1 -1
- data/spec/assistant_baker_spec.rb +25 -0
- data/spec/spec_helper.rb +2 -0
- data/tasks/bundler_audit.rake +1 -0
- data/tasks/check_external_deps.rake +1 -1
- data/tasks/coverage.rake +7 -0
- data/tasks/rspec.rake +1 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 952bb7568d12e64bc8bb2e92468daf1975e1ad88
|
4
|
+
data.tar.gz: eb3d3abd30e2d592029bf248e5394c19c87c1bdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e3b7fe8cfb0a2559d6cf479fbb50472f180ebea8de36221e49317ce5bff3f837df509ed218aa7744e3c4e2f14f1660270385f0f1d61eaea6be5522d44e3d67c
|
7
|
+
data.tar.gz: 90a3977c4c2f4b18ca87c3089d89d982bea9237479c75bfac8299d0e328be67d95c673ae14d797868de256587dc2b1684055ebbc276194c59f25bb2f4660d284
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -8,6 +8,7 @@ Commonly used Rake tasks
|
|
8
8
|
|
9
9
|
[![Build Status](https://travis-ci.org/RichardVickerstaff/rake-n-bake.svg?branch=master)](https://travis-ci.org/RichardVickerstaff/rake-n-bake)
|
10
10
|
[![Gem Version](https://badge.fury.io/rb/rake-n-bake.svg)](http://badge.fury.io/rb/rake-n-bake)
|
11
|
+
[![Code Climate](https://codeclimate.com/github/RichardVickerstaff/rake-n-bake/badges/gpa.svg)](https://codeclimate.com/github/RichardVickerstaff/rake-n-bake)
|
11
12
|
|
12
13
|
Rake-n-Bake is a collection of widely applicable Rake tasks used on many projects.
|
13
14
|
They have been extracted into a gem to allow them to easily be reused and maintained.
|
@@ -70,6 +71,10 @@ Useful at the end of any Rake tasks which test your application, it prints `****
|
|
70
71
|
### :ok_rainbow
|
71
72
|
Run this task last to print a more magical version of `:ok`
|
72
73
|
|
74
|
+
Handy Tips for new tasks
|
75
|
+
-----=------------------
|
76
|
+
- 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.
|
77
|
+
|
73
78
|
Contributing
|
74
79
|
------------
|
75
80
|
1. Make a fork
|
data/Rakefile
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'cc-tddium-post-worker' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('codeclimate-test-reporter', 'cc-tddium-post-worker')
|
data/bin/cucumber
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'cucumber' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('cucumber', 'cucumber')
|
data/history.rdoc
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'term/ansicolor'
|
3
|
+
|
4
|
+
module RakeNBake
|
5
|
+
class AssistantBaker
|
6
|
+
def self.log_step message
|
7
|
+
puts Term::ANSIColor.blue +
|
8
|
+
Term::ANSIColor.underline +
|
9
|
+
'● ' +
|
10
|
+
message +
|
11
|
+
Term::ANSIColor.reset
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.log_passed message
|
15
|
+
puts Term::ANSIColor.green +
|
16
|
+
message +
|
17
|
+
Term::ANSIColor.reset
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/rake_n_bake.rb
CHANGED
data/rake-n-bake.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "rake-n-bake"
|
7
|
-
spec.version = '1.0
|
7
|
+
spec.version = '1.1.0'
|
8
8
|
spec.authors = ["Richard Vickerstaff", "Adam Whittingham"]
|
9
9
|
spec.email = ["m3akq@btinternet.com", "adam.whittingham@gmail.com"]
|
10
10
|
spec.description = "Common rake tasks, baked to perfection and ready to serve!"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
require production_code
|
4
|
+
|
5
|
+
describe RakeNBake::AssistantBaker do
|
6
|
+
describe '#log_step' do
|
7
|
+
it 'puts the given message' do
|
8
|
+
expect{described_class.log_step 'Foo'}.to output(/Foo/).to_stdout
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'prints an attractive dot before the message' do
|
12
|
+
expect{described_class.log_step 'Foo'}.to output(/● Foo/).to_stdout
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#log_passed' do
|
17
|
+
it 'puts the given message' do
|
18
|
+
expect{described_class.log_passed 'Foo'}.to output(/Foo/).to_stdout
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'prints the message in green' do
|
22
|
+
expect{described_class.log_passed 'Foo'}.to output("#{Term::ANSIColor.green}Foo#{Term::ANSIColor.reset}\n").to_stdout
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/tasks/bundler_audit.rake
CHANGED
@@ -4,7 +4,7 @@ namespace :bake do
|
|
4
4
|
task :check_external_dependencies do
|
5
5
|
checker = RakeNBake::DependencyChecker.new(@external_dependencies)
|
6
6
|
|
7
|
-
|
7
|
+
RakeNBake::AssistantBaker.log_step 'Checking external dependencies'
|
8
8
|
checker.check
|
9
9
|
puts
|
10
10
|
|
data/tasks/coverage.rake
CHANGED
@@ -3,19 +3,26 @@ begin
|
|
3
3
|
|
4
4
|
namespace :bake do
|
5
5
|
namespace :coverage do
|
6
|
+
desc 'Check coverage from RSpec'
|
6
7
|
task :check_specs do
|
8
|
+
RakeNBake::AssistantBaker.log_step 'Checking spec coverage'
|
7
9
|
SimpleCov.coverage_dir 'log/coverage/spec'
|
8
10
|
coverage = SimpleCov.result.covered_percent
|
9
11
|
fail "Spec coverage was only #{coverage}%" if coverage < 100.0
|
12
|
+
RakeNBake::AssistantBaker.log_passed "Spec coverage is at #{coverage}%"
|
10
13
|
end
|
11
14
|
|
15
|
+
desc 'Check coverage from Cucumber'
|
12
16
|
task :check_cucumber do
|
17
|
+
RakeNBake::AssistantBaker.log_step 'Checking feature coverage'
|
13
18
|
SimpleCov.coverage_dir 'log/coverage/features'
|
14
19
|
coverage = SimpleCov.result.covered_percent
|
15
20
|
fail "Feature coverage was only #{coverage}%" if coverage < 100.0
|
21
|
+
RakeNBake::AssistantBaker.log_passed "Feature coverage is at #{coverage}%"
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
25
|
+
|
19
26
|
rescue LoadError
|
20
27
|
|
21
28
|
namespace :bake do
|
data/tasks/rspec.rake
CHANGED
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.0
|
4
|
+
version: 1.1.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: 2014-
|
12
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -58,9 +58,11 @@ files:
|
|
58
58
|
- bin/bundle-audit
|
59
59
|
- bin/bundler
|
60
60
|
- bin/byebug
|
61
|
+
- bin/cc-tddium-post-worker
|
61
62
|
- bin/cdiff
|
62
63
|
- bin/coderay
|
63
64
|
- bin/colortab
|
65
|
+
- bin/cucumber
|
64
66
|
- bin/decolor
|
65
67
|
- bin/htmldiff
|
66
68
|
- bin/ldiff
|
@@ -72,12 +74,14 @@ files:
|
|
72
74
|
- bin/term_mandel
|
73
75
|
- bin/thor
|
74
76
|
- history.rdoc
|
77
|
+
- lib/assistant_baker.rb
|
75
78
|
- lib/dependency_checker.rb
|
76
79
|
- lib/rake_n_bake.rb
|
77
80
|
- lib/semver_versioning.rb
|
78
81
|
- lib/version.rb
|
79
82
|
- rake-n-bake.gemspec
|
80
83
|
- spec/.keep
|
84
|
+
- spec/assistant_baker_spec.rb
|
81
85
|
- spec/dependency_checker_spec.rb
|
82
86
|
- spec/semver_versioning_spec.rb
|
83
87
|
- spec/spec_helper.rb
|