rake-n-bake 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.semver +1 -1
- data/.travis.yml +7 -3
- data/Gemfile +1 -0
- data/README.md +29 -11
- data/Rakefile +0 -1
- data/history.rdoc +2 -0
- data/lib/version.rb +1 -1
- data/spec/dependency_checker_spec.rb +12 -12
- data/spec/spec_helper.rb +15 -1
- data/tasks/rspec.rake +26 -0
- data/tasks/semver.rake +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e6b3c19ad4d0a859560c57bf029c01705c4ba88
|
4
|
+
data.tar.gz: 437044342ae1c3f1297feac26f97670dce8f7fc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e524432b46dea8a1de773a499bae797847dff5af5356b4857eee03ae2d113a17444f7f220f596108a203b8ac92a23b6b0aedd2d8ac2e1f5e10e64a1387f4033a
|
7
|
+
data.tar.gz: 619df3d26e027408b3cb43f52ffd8d2b67f803725efd4120a66759bbb9b003b4a2ce0f8d74980aaa961a74a90948eefe214409ad0fd5ebfa3895f5d512fdf64d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2.2
|
data/.semver
CHANGED
data/.travis.yml
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
+
- 2.2.2
|
3
4
|
- 2.1.0
|
4
5
|
- 2.0.0
|
5
6
|
- 1.9.3
|
6
7
|
- jruby-1.7.12
|
7
8
|
- ruby-head
|
9
|
+
jdk:
|
10
|
+
- openjdk7
|
8
11
|
matrix:
|
9
12
|
allow_failures:
|
10
13
|
- rvm: ruby-head
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
- rvm: jruby-1.7.12
|
15
|
+
addons:
|
16
|
+
code_climate:
|
17
|
+
repo_token: 6e1cff9fab6a2878c20e9935e9fbe551bb056ad03347f05faef813c058fc6f8f
|
14
18
|
deploy:
|
15
19
|
provider: rubygems
|
16
20
|
api_key:
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -28,17 +28,22 @@ Usage
|
|
28
28
|
-----
|
29
29
|
1. Add `require "rake-n-bake"` to your Rakefile
|
30
30
|
2. Call the tasks that you want, just as with your usual Rake tasks (examples below!).
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
|
32
|
+
For example:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require "rake-n-bake"
|
36
|
+
|
37
|
+
task :default => [
|
38
|
+
:clean,
|
39
|
+
:"bake:code_quality:all",
|
40
|
+
:"bake:rspec",
|
41
|
+
:"bake:coverage:check_specs",
|
42
|
+
:"bake:bundler_audit",
|
43
|
+
:"bake:ok_rainbow",
|
44
|
+
]
|
45
|
+
|
46
|
+
```
|
42
47
|
|
43
48
|
Tasks
|
44
49
|
-----
|
@@ -87,6 +92,19 @@ Run this task last to print a more magical version of `:ok`
|
|
87
92
|
### :rails_best_practices
|
88
93
|
Run this task to run the [Rails Best Practices](https://github.com/railsbp/rails_best_practices) metrics against your Rails project.
|
89
94
|
|
95
|
+
### :rspec
|
96
|
+
Run all the tests in the spec directory with rspec
|
97
|
+
#### :rspec:unit
|
98
|
+
Run all the specs not in a features or integration directory
|
99
|
+
#### :rspec:integration
|
100
|
+
Run all the specs in the integration directory
|
101
|
+
#### :rspec:requests
|
102
|
+
Run all the specs in the requests directory
|
103
|
+
#### :rspec:features
|
104
|
+
Run all the specs in the features directory
|
105
|
+
#### :rspec:tag[mytag]
|
106
|
+
Run all the specs tagged using `mytag: true`
|
107
|
+
|
90
108
|
Handy Tips for new tasks
|
91
109
|
------------------------
|
92
110
|
- 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/Rakefile
CHANGED
data/history.rdoc
CHANGED
data/lib/version.rb
CHANGED
@@ -2,20 +2,20 @@ require 'spec_helper'
|
|
2
2
|
require production_code
|
3
3
|
|
4
4
|
describe RakeNBake::DependencyChecker do
|
5
|
-
|
6
|
-
|
7
|
-
let(:missing) {'jajfjfjosojfnbje3nknq'}
|
8
|
-
let(:present) {'rspec'}
|
9
|
-
let(:list){ [present, missing] }
|
5
|
+
let(:silent) { true }
|
6
|
+
let(:list){ ['present', 'missing'] }
|
10
7
|
|
11
8
|
subject{RakeNBake::DependencyChecker.new list}
|
12
9
|
|
13
|
-
|
14
|
-
|
10
|
+
before do
|
11
|
+
double_cmd('which present', exit: 0)
|
12
|
+
double_cmd('which missing', exit: 1)
|
13
|
+
end
|
15
14
|
|
15
|
+
describe '#check' do
|
16
16
|
it 'returns a hash of dependencies => presence' do
|
17
|
-
result = subject.check
|
18
|
-
expect(result).to eq({present => true, missing => false})
|
17
|
+
result = subject.check(silent)
|
18
|
+
expect(result).to eq({'present' => true, 'missing' => false})
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'prints a dot for dependencies which are present' do
|
@@ -27,13 +27,13 @@ describe RakeNBake::DependencyChecker do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'can be run without printing anything out' do
|
30
|
-
expect{subject.check(
|
30
|
+
expect{subject.check(silent)}.to_not output.to_stdout
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
describe '#
|
34
|
+
describe '#missing' do
|
35
35
|
it 'returns only missing dependencies' do
|
36
|
-
expect(subject.missing).to eq [missing]
|
36
|
+
expect(subject.missing).to eq ['missing']
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'timecop'
|
3
3
|
require 'tempfile'
|
4
|
-
require
|
4
|
+
require 'codeclimate-test-reporter'
|
5
|
+
require 'aruba/rspec'
|
6
|
+
|
5
7
|
CodeClimate::TestReporter.start
|
6
8
|
|
7
9
|
def production_code
|
@@ -14,3 +16,15 @@ SimpleCov.start do
|
|
14
16
|
add_filter '/spec/'
|
15
17
|
coverage_dir 'log/coverage/spec'
|
16
18
|
end
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
config.include ArubaDoubles
|
22
|
+
|
23
|
+
config.before :each do
|
24
|
+
Aruba::RSpec.setup
|
25
|
+
end
|
26
|
+
|
27
|
+
config.after :each do
|
28
|
+
Aruba::RSpec.teardown
|
29
|
+
end
|
30
|
+
end
|
data/tasks/rspec.rake
CHANGED
@@ -6,6 +6,32 @@ begin
|
|
6
6
|
RakeNBake::AssistantBaker.log_step 'Running specs'
|
7
7
|
end
|
8
8
|
|
9
|
+
RSPEC_SUBDIRS = %w[integration features requests]
|
10
|
+
|
11
|
+
RSPEC_SUBDIRS.each do |subdir|
|
12
|
+
RSpec::Core::RakeTask.new(:"bake:rspec:#{subdir}") do |t|
|
13
|
+
t.verbose = false
|
14
|
+
t.pattern = "spec/#{subdir}/**/*_spec.rb"
|
15
|
+
RakeNBake::AssistantBaker.log_step "Running #{subdir} specs"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
RSpec::Core::RakeTask.new(:"bake:rspec:unit") do |t|
|
20
|
+
t.verbose = false
|
21
|
+
file_list = FileList['spec/**/*_spec.rb']
|
22
|
+
RSPEC_SUBDIRS.each do |subdir|
|
23
|
+
file_list = file_list.exclude "spec/#{subdir}/**/*_spec.rb"
|
24
|
+
end
|
25
|
+
t.pattern = file_list
|
26
|
+
RakeNBake::AssistantBaker.log_step 'Running unit specs'
|
27
|
+
end
|
28
|
+
|
29
|
+
RSpec::Core::RakeTask.new(:"bake:rspec:tag", :tag) do |t, task_args|
|
30
|
+
t.verbose = false
|
31
|
+
t.rspec_opts = "--tag #{task_args[:tag]}"
|
32
|
+
RakeNBake::AssistantBaker.log_step "Running specs tagged #{task_args[:tag]}"
|
33
|
+
end
|
34
|
+
|
9
35
|
RSpec::Core::RakeTask.new(:"bake:rspec_test_prepare" => :"test:prepare") do |t|
|
10
36
|
t.verbose = false
|
11
37
|
end
|
data/tasks/semver.rake
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require_relative '../lib/semver_versioning'
|
3
|
+
require_relative '../lib/assistant_baker'
|
4
|
+
|
3
5
|
namespace :bake do
|
4
6
|
namespace :semver do
|
5
7
|
|
@@ -63,7 +65,7 @@ rescue LoadError
|
|
63
65
|
tasks.each do |t|
|
64
66
|
desc 'SemVer rake tasks are not available (gem not installed)'
|
65
67
|
task t do
|
66
|
-
RakeNBake::AssistantBaker 'semver2'
|
68
|
+
RakeNBake::AssistantBaker.log_missing_gem 'semver2'
|
67
69
|
abort
|
68
70
|
end
|
69
71
|
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.1.
|
4
|
+
version: 1.1.5
|
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-
|
12
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.4.5
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Common rake tasks, baked to perfection and ready to serve!
|