rake-n-bake 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.semver +6 -0
- data/.travis.yml +2 -2
- data/Gemfile.lock +1 -1
- data/bin/byebug +16 -0
- data/bin/coderay +16 -0
- data/bin/pry +16 -0
- data/history.rdoc +4 -28
- data/lib/dependency_checker.rb +4 -3
- data/lib/rake_n_bake.rb +0 -3
- data/lib/semver_versioning.rb +3 -3
- data/lib/version.rb +1 -1
- data/rake-n-bake.gemspec +1 -1
- data/spec/dependency_checker_spec.rb +1 -2
- data/spec/semver_versioning_spec.rb +10 -1
- data/spec/spec_helper.rb +5 -2
- data/spec/version_spec.rb +1 -0
- data/tasks/check_external_deps.rake +1 -2
- data/tasks/ok.rake +22 -20
- data/tasks/rspec.rake +0 -1
- data/tasks/semver.rake +1 -1
- data/tasks/version.rake +2 -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: 85dd926b6901ddb75159e2a9839944100771cfc2
|
4
|
+
data.tar.gz: 0e8fbba86a6dcb5b271d4f292f8714e4dd6b9532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9708ecc039177c4a0410969459e1f7d6bab7fc752356532816a975a54e2fa705980a225ae3eedd5bd90fff9eee60582f717166810c10a6e74fe6b1b8f81b96e
|
7
|
+
data.tar.gz: af0915cbc44051baf2dd2a6e42a3b2999852541a5e9f8014504cb9c346e97e4231931c0c05af3fa6a97f43b34d031fb131657306280623bbf55fea406f14ac66
|
data/.semver
ADDED
data/.travis.yml
CHANGED
@@ -9,8 +9,8 @@ deploy:
|
|
9
9
|
provider: rubygems
|
10
10
|
api_key:
|
11
11
|
secure: RmGYn4yb1PPjZxdWxgwUWTENnRaqp/PXUMfieJoAE0Dw1JrwkjxI3qhy/I6p36KusLsrFxrh4UdATj78QsWdtZVLJ9tvjONOsrAUjIszBwRmOXDWRkH8eLGCCmIYfYMZaRYvlQhPR2t5CC6BwfHS6W1AU5YtU5SSpk0HT+SRzII=
|
12
|
-
gem:
|
12
|
+
gem: rake-n-bake
|
13
13
|
on:
|
14
14
|
tags: true
|
15
|
-
repo: RichardVickerstaff/
|
15
|
+
repo: RichardVickerstaff/rake-n-bake
|
16
16
|
all_branches: true
|
data/Gemfile.lock
CHANGED
data/bin/byebug
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'byebug' 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('byebug', 'byebug')
|
data/bin/coderay
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'coderay' 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('coderay', 'coderay')
|
data/bin/pry
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'pry' 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('pry', 'pry')
|
data/history.rdoc
CHANGED
@@ -1,41 +1,17 @@
|
|
1
|
-
== 1.1
|
1
|
+
== 1.0.1 (21 October 2014)
|
2
2
|
|
3
|
-
|
3
|
+
* Require libs in tasks and only require gems in them
|
4
|
+
* Import RakeRack
|
4
5
|
|
5
|
-
== 1.0.0 (
|
6
|
+
== 1.0.0 (20 October 2014)
|
6
7
|
|
7
8
|
* Remove broken Karma task
|
8
|
-
|
9
|
-
== 0.2.1 (05 September 2014)
|
10
|
-
|
11
9
|
* Change the way colours are used on term
|
12
10
|
* Add new Rainbow OK task
|
13
|
-
|
14
|
-
== 0.2.0 (04 September 2014)
|
15
|
-
|
16
11
|
* Add :check_external_dependencies for checking external dependencies are present
|
17
|
-
|
18
|
-
== 0.1.2 (20 August 2014)
|
19
|
-
|
20
12
|
* Suppress grep errors if no folder
|
21
|
-
|
22
|
-
== 0.1.1 (24 July 2014)
|
23
|
-
|
24
|
-
== 0.1.0 (18 July 2014)
|
25
|
-
|
26
|
-
== 0.0.6 (17 July 2014)
|
27
|
-
|
28
13
|
* Extract version logic into a class
|
29
14
|
* Allow all tags to push to RubyGems
|
30
|
-
|
31
|
-
== 0.0.5 (16 July 2014)
|
32
|
-
|
33
15
|
* Change version tack so it can update gem version
|
34
|
-
|
35
|
-
== 0.0.4 (16 July 2014)
|
36
|
-
|
37
16
|
* Allow Travis to push gem on tag
|
38
|
-
|
39
|
-
== 0.0.3 (14 July 2014)
|
40
|
-
|
41
17
|
* Introduce history file
|
data/lib/dependency_checker.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'term/ansicolor'
|
2
2
|
|
3
|
-
|
3
|
+
module RakeNBake
|
4
4
|
class DependencyChecker
|
5
|
-
|
5
|
+
|
6
|
+
C = Term::ANSIColor
|
6
7
|
|
7
8
|
def initialize dependencies
|
8
9
|
@dependencies = Array(dependencies)
|
@@ -12,7 +13,7 @@ class RakeNBake
|
|
12
13
|
@results = @dependencies.each_with_object({}) do |dep, results|
|
13
14
|
results[dep] = system "which #{dep} >/dev/null"
|
14
15
|
unless silent
|
15
|
-
results[dep] ? print(".".
|
16
|
+
results[dep] ? print(C.green, ".", C.clear) : print(C.red, "F", C.clear)
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
data/lib/rake_n_bake.rb
CHANGED
@@ -2,8 +2,5 @@ $:.unshift File.dirname(__FILE__)
|
|
2
2
|
|
3
3
|
require 'rake'
|
4
4
|
|
5
|
-
lib = File.expand_path("../lib", File.dirname(__FILE__))
|
6
|
-
Dir.glob("#{lib}/*.rb").each{|l| require l}
|
7
|
-
|
8
5
|
dir = File.expand_path("../tasks", File.dirname(__FILE__))
|
9
6
|
Dir.glob("#{dir}/*.rake").each { |r| import r}
|
data/lib/semver_versioning.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'semver'
|
2
|
-
|
2
|
+
module RakeNBake
|
3
3
|
class SemverVersioning
|
4
4
|
def self.current_version
|
5
5
|
if File.exist? SemVer.file_name
|
@@ -7,7 +7,7 @@ class RakeNBake
|
|
7
7
|
else
|
8
8
|
version = SemVer.new
|
9
9
|
version.save SemVer.file_name
|
10
|
-
|
10
|
+
SemVer.find
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -53,7 +53,7 @@ class RakeNBake
|
|
53
53
|
|
54
54
|
def self.tag
|
55
55
|
v = current_version.to_s
|
56
|
-
`git add .semver && git commit -m 'Increment version to #{v}' && git tag #{v}`
|
56
|
+
`git add .semver && git commit -m 'Increment version to #{v}' && git tag #{v} -a -m '#{Time.now}'`
|
57
57
|
branch = `git symbolic-ref HEAD`[%r{.*/(.*)}, 1]
|
58
58
|
puts "To push the new tag, use 'git push origin #{branch} --tags'"
|
59
59
|
end
|
data/lib/version.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.0.1'
|
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!"
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require production_code
|
2
3
|
require 'yaml'
|
3
4
|
|
4
5
|
describe RakeNBake::SemverVersioning do
|
@@ -108,12 +109,20 @@ describe RakeNBake::SemverVersioning do
|
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
112
|
+
describe '#update_history_file' do
|
113
|
+
context 'when there is no history file' do
|
114
|
+
it 'does nothing' do
|
115
|
+
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
111
120
|
describe 'tag' do
|
112
121
|
before do
|
113
122
|
File.write(File.join(File.dirname(__FILE__), '../.semver'), YAML.dump(version))
|
114
123
|
end
|
115
124
|
it 'tags with the curren semver release and outputs push instructions' do
|
116
|
-
expect(Object).to receive(:`).with("git add .semver && git commit -m 'Increment version to v1.2.3' && git tag v1.2.3")
|
125
|
+
expect(Object).to receive(:`).with("git add .semver && git commit -m 'Increment version to v1.2.3' && git tag v1.2.3 -a -m '#{Time.now}'")
|
117
126
|
expect(Object).to receive(:`).with('git symbolic-ref HEAD').and_return 'refs/heads/master'
|
118
127
|
expect(Object).to receive(:puts).with("To push the new tag, use 'git push origin master --tags'")
|
119
128
|
described_class.tag
|
data/spec/spec_helper.rb
CHANGED
@@ -2,10 +2,13 @@ require 'simplecov'
|
|
2
2
|
require 'timecop'
|
3
3
|
require 'tempfile'
|
4
4
|
|
5
|
+
def production_code
|
6
|
+
spec = caller[0][/spec.+\.rb/]
|
7
|
+
'./'+ spec.gsub('_spec','').gsub(/spec/, 'lib')
|
8
|
+
end
|
9
|
+
|
5
10
|
SimpleCov.start do
|
6
11
|
add_filter '/vendor/'
|
7
12
|
add_filter '/spec/'
|
8
13
|
coverage_dir 'log/coverage/spec'
|
9
14
|
end
|
10
|
-
|
11
|
-
require_relative '../lib/rake_n_bake'
|
data/spec/version_spec.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
|
1
|
+
require_relative '../lib/dependency_checker'
|
2
2
|
|
3
3
|
namespace :bake do
|
4
4
|
task :check_external_dependencies do
|
5
|
-
include Term::ANSIColor
|
6
5
|
checker = RakeNBake::DependencyChecker.new(@external_dependencies)
|
7
6
|
|
8
7
|
puts 'Checking external dependencies...'
|
data/tasks/ok.rake
CHANGED
@@ -1,23 +1,25 @@
|
|
1
1
|
require 'term/ansicolor'
|
2
2
|
|
3
3
|
namespace :bake do
|
4
|
-
|
4
|
+
C = Term::ANSIColor
|
5
5
|
|
6
6
|
desc 'Print the "ALL TESTS PASSED" message'
|
7
7
|
task :ok do
|
8
8
|
puts
|
9
9
|
print [
|
10
|
-
|
11
|
-
"*"
|
12
|
-
"*"
|
13
|
-
"*"
|
14
|
-
"*"
|
15
|
-
|
16
|
-
"
|
17
|
-
"*"
|
18
|
-
"*"
|
19
|
-
"*"
|
20
|
-
"*"
|
10
|
+
C.bold,
|
11
|
+
C.red, "*",
|
12
|
+
C.yellow, "*",
|
13
|
+
C.green, "*",
|
14
|
+
C.blue, "*",
|
15
|
+
C.magenta, "*",
|
16
|
+
C.green, " ALL TESTS PASSED ",
|
17
|
+
C.magenta, "*",
|
18
|
+
C.blue, "*",
|
19
|
+
C.green, "*",
|
20
|
+
C.yellow, "*",
|
21
|
+
C.red, "*",
|
22
|
+
C.clear
|
21
23
|
].join
|
22
24
|
puts
|
23
25
|
end
|
@@ -25,13 +27,13 @@ namespace :bake do
|
|
25
27
|
desc 'Print the "ALL TESTS PASSED" message WITH A SWEET RAINBOW!!!'
|
26
28
|
task :ok_rainbow do
|
27
29
|
puts
|
28
|
-
print " ",
|
29
|
-
print " ",
|
30
|
-
print " ",
|
31
|
-
print " ".
|
32
|
-
print " ".
|
33
|
-
print " "
|
34
|
-
print " ".
|
35
|
-
puts
|
30
|
+
print C.clear( " "), C.clear( " "), C.clear( " "), C.on_red( " "), C.clear( " "), C.clear( " "), C.clear( " "),"\n"
|
31
|
+
print C.clear( " "), C.clear( " "), C.on_red( " "), C.on_yellow( " "), C.on_red( " "), C.clear( " "), C.clear( " "),"\n"
|
32
|
+
print C.clear( " "), C.on_red( " "), C.on_yellow( " "), C.on_green( " "), C.on_yellow( " "), C.on_red( " "), C.clear( " "),"\n"
|
33
|
+
print C.on_red( " "), C.on_yellow( " "), C.on_green( " "), C.on_blue( " "), C.on_green( " "), C.on_yellow( " "), C.on_red( " "),"\n"
|
34
|
+
print C.on_yellow(" "), C.on_green( " "), C.on_blue( " "), C.on_magenta(" "), C.on_blue( " "), C.on_green( " "), C.on_yellow( " "),"\n"
|
35
|
+
print C.on_green( " "), C.on_blue( " "), C.on_magenta(" "), C.clear( " "), C.on_magenta(" "), C.on_blue( " "), C.on_green( " "),"\n"
|
36
|
+
print C.on_blue( " "), C.on_magenta(" "), C.clear( " "), C.bold, C.green( " ALL TESTS PASSED "), C.clear( " "), C.on_magenta(" "), C.on_blue( " "),"\n"
|
37
|
+
puts C.reset
|
36
38
|
end
|
37
39
|
end
|
data/tasks/rspec.rake
CHANGED
data/tasks/semver.rake
CHANGED
data/tasks/version.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.0.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: 2014-10-
|
12
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- ".bundle/config"
|
51
51
|
- ".gitignore"
|
52
52
|
- ".ruby-version"
|
53
|
+
- ".semver"
|
53
54
|
- ".travis.yml"
|
54
55
|
- Gemfile
|
55
56
|
- Gemfile.lock
|
@@ -57,11 +58,14 @@ files:
|
|
57
58
|
- Rakefile
|
58
59
|
- bin/bundle-audit
|
59
60
|
- bin/bundler
|
61
|
+
- bin/byebug
|
60
62
|
- bin/cdiff
|
63
|
+
- bin/coderay
|
61
64
|
- bin/colortab
|
62
65
|
- bin/decolor
|
63
66
|
- bin/htmldiff
|
64
67
|
- bin/ldiff
|
68
|
+
- bin/pry
|
65
69
|
- bin/rake
|
66
70
|
- bin/rspec
|
67
71
|
- bin/semver
|