rake-n-bake 1.4.2 → 1.4.3
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/.rubocop-https---raw-githubusercontent-com-dvmtn-house-style-master-rubocop-yml +73 -0
- data/.rubocop.yml +7 -0
- data/.semver +1 -1
- data/Gemfile +1 -0
- data/Rakefile +1 -1
- data/history.rdoc +2 -0
- data/lib/baker.rb +14 -11
- data/lib/dependency_checker.rb +2 -2
- data/lib/semver_versioning.rb +9 -9
- data/lib/version.rb +1 -1
- data/spec/baker_spec.rb +9 -9
- data/spec/dependency_checker_spec.rb +6 -7
- data/spec/semver_versioning_spec.rb +26 -29
- data/spec/spec_helper.rb +8 -8
- data/tasks/check_external_deps.rake +2 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 049ce86cee71aaffcb57eea2882c7bfcfe049565
|
4
|
+
data.tar.gz: d08e71bb5bce7fa32ad8affe346ac92dac41a5b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7deaa3c2067be7deb0f7165edf6172c8a7fe3e91e682f9650fda094463194a64d5c9e567fac43057224310c798a75a70424c808d7301fe6ea36d40ce7cb90709
|
7
|
+
data.tar.gz: c5bac1be478dcfc8e11c14c9e326f82bddeb288246457469b5d6b706409d3a87af10de6b4be11eb356474541afb627073d906720e02bee57b5e130f378eaa78c
|
@@ -0,0 +1,73 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- '**/Rakefile'
|
4
|
+
- '**/config.ru'
|
5
|
+
Exclude:
|
6
|
+
- 'db/**/*'
|
7
|
+
- 'config/**/*'
|
8
|
+
- 'script/**/*'
|
9
|
+
- 'tmp/**/*'
|
10
|
+
- 'vendor/**/*'
|
11
|
+
- 'bin/**/*'
|
12
|
+
- 'log/**/*'
|
13
|
+
- 'node_modules/**/*'
|
14
|
+
|
15
|
+
Style/AlignHash:
|
16
|
+
EnforcedHashRocketStyle: table
|
17
|
+
EnforcedColonStyle: table
|
18
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
19
|
+
SupportedLastArgumentHashStyles: ignore_implicit
|
20
|
+
|
21
|
+
Style/DefWithParentheses:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Style/MethodDefParentheses:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/Encoding:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
Style/SingleLineBlockParams:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/EmptyCaseCondition:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/PercentLiteralDelimiters:
|
40
|
+
PreferredDelimiters:
|
41
|
+
'%': '""'
|
42
|
+
'%i': '[]'
|
43
|
+
'%q': '[]'
|
44
|
+
'%Q': '[]'
|
45
|
+
'%r': '[]'
|
46
|
+
'%s': '[]'
|
47
|
+
'%w': '[]'
|
48
|
+
'%W': '[]'
|
49
|
+
'%x': '[]'
|
50
|
+
|
51
|
+
Style/PredicateName:
|
52
|
+
NamePrefixBlacklist:
|
53
|
+
- is_
|
54
|
+
- has_
|
55
|
+
- have_
|
56
|
+
- the_
|
57
|
+
- a_
|
58
|
+
- should_
|
59
|
+
|
60
|
+
Style/SignalException:
|
61
|
+
EnforcedStyle: only_raise
|
62
|
+
|
63
|
+
Style/EmptyLinesAroundClassBody:
|
64
|
+
EnforcedStyle: empty_lines
|
65
|
+
|
66
|
+
Style/TrailingCommaInLiteral:
|
67
|
+
EnforcedStyleForMultiline: comma
|
68
|
+
|
69
|
+
Metrics/LineLength:
|
70
|
+
Exclude:
|
71
|
+
- 'spec/**/*'
|
72
|
+
Max: 140
|
73
|
+
AllowURI: true
|
data/.rubocop.yml
ADDED
data/.semver
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/history.rdoc
CHANGED
data/lib/baker.rb
CHANGED
@@ -3,26 +3,28 @@ require 'term/ansicolor'
|
|
3
3
|
|
4
4
|
module RakeNBake
|
5
5
|
class Baker
|
6
|
+
|
6
7
|
def self.log_step message
|
7
|
-
puts
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
puts "\n" +
|
9
|
+
Term::ANSIColor.blue +
|
10
|
+
Term::ANSIColor.underline +
|
11
|
+
'● ' +
|
12
|
+
message +
|
13
|
+
Term::ANSIColor.reset
|
12
14
|
end
|
13
15
|
|
14
16
|
def self.log_warn message
|
15
17
|
puts Term::ANSIColor.red +
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
Term::ANSIColor.bold +
|
19
|
+
'! ' +
|
20
|
+
message +
|
21
|
+
Term::ANSIColor.reset
|
20
22
|
end
|
21
23
|
|
22
24
|
def self.log_passed message
|
23
25
|
puts Term::ANSIColor.green +
|
24
|
-
|
25
|
-
|
26
|
+
message +
|
27
|
+
Term::ANSIColor.reset
|
26
28
|
end
|
27
29
|
|
28
30
|
def self.log_missing_gem gem_name, tool_name = gem_name
|
@@ -36,5 +38,6 @@ module RakeNBake
|
|
36
38
|
"Try adding \"gem '#{gem_name}'\" to your Gemfile or run `gem install #{gem_name}` and try again." +
|
37
39
|
Term::ANSIColor.reset
|
38
40
|
end
|
41
|
+
|
39
42
|
end
|
40
43
|
end
|
data/lib/dependency_checker.rb
CHANGED
@@ -13,14 +13,14 @@ module RakeNBake
|
|
13
13
|
@results = @dependencies.each_with_object({}) do |dep, results|
|
14
14
|
results[dep] = system "which #{dep} >/dev/null"
|
15
15
|
unless silent
|
16
|
-
results[dep] ? print(C.green,
|
16
|
+
results[dep] ? print(C.green, '.', C.clear) : print(C.red, 'F', C.clear)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def missing
|
22
22
|
@results ||= check(true)
|
23
|
-
@results.select{|_, present| present == false}.keys
|
23
|
+
@results.select { |_, present| present == false }.keys
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
data/lib/semver_versioning.rb
CHANGED
@@ -2,14 +2,13 @@ require 'semver'
|
|
2
2
|
|
3
3
|
module RakeNBake
|
4
4
|
class SemverVersioning
|
5
|
+
|
5
6
|
def self.current_version
|
6
|
-
|
7
|
-
SemVer.find
|
8
|
-
else
|
7
|
+
unless File.exist? SemVer.file_name
|
9
8
|
version = SemVer.new
|
10
9
|
version.save SemVer.file_name
|
11
|
-
SemVer.find
|
12
10
|
end
|
11
|
+
SemVer.find
|
13
12
|
end
|
14
13
|
|
15
14
|
def self.inc_major
|
@@ -53,8 +52,8 @@ module RakeNBake
|
|
53
52
|
end
|
54
53
|
|
55
54
|
def self.update_history_file
|
56
|
-
%w[
|
57
|
-
.select {|file| File.exist? file}
|
55
|
+
%w[history.rdoc CHANGELOG.md]
|
56
|
+
.select { |file| File.exist? file }
|
58
57
|
.each do |file|
|
59
58
|
add_version_to_top(file)
|
60
59
|
`git add #{file}`
|
@@ -66,7 +65,7 @@ module RakeNBake
|
|
66
65
|
return unless version_files.size == 1
|
67
66
|
version_file = version_files[0]
|
68
67
|
|
69
|
-
version = current_version.to_s.sub(/^v/,'')
|
68
|
+
version = current_version.to_s.sub(/^v/, '')
|
70
69
|
version_string = "VERSION = '#{version}'"
|
71
70
|
version_file_content = File.read(version_file).sub(/VERSION = .*$/, version_string)
|
72
71
|
|
@@ -77,17 +76,18 @@ module RakeNBake
|
|
77
76
|
def self.tag
|
78
77
|
v = current_version.to_s
|
79
78
|
`git add .semver && git commit -m 'Increment version to #{v}' && git tag #{v} -a -m '#{Time.now}'`
|
80
|
-
branch = `git symbolic-ref HEAD`[%r
|
79
|
+
branch = `git symbolic-ref HEAD`[%r[.*/(.*)], 1]
|
81
80
|
puts "To push the new tag, use 'git push origin #{branch} --tags'"
|
82
81
|
end
|
83
82
|
|
84
83
|
def self.add_version_to_top file
|
85
84
|
current_history = File.read file
|
86
85
|
File.open file, 'w' do |f|
|
87
|
-
f.puts "== #{current_version} (#{Time.now.strftime
|
86
|
+
f.puts "== #{current_version} (#{Time.now.strftime '%d %B %Y'})"
|
88
87
|
f.puts
|
89
88
|
f.print current_history
|
90
89
|
end
|
91
90
|
end
|
91
|
+
|
92
92
|
end
|
93
93
|
end
|
data/lib/version.rb
CHANGED
data/spec/baker_spec.rb
CHANGED
@@ -5,42 +5,42 @@ require production_code
|
|
5
5
|
describe RakeNBake::Baker do
|
6
6
|
describe '#log_step' do
|
7
7
|
it 'puts the given message' do
|
8
|
-
expect{described_class.log_step 'Foo'}.to output(/Foo/).to_stdout
|
8
|
+
expect { described_class.log_step 'Foo' }.to output(/Foo/).to_stdout
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'prints an attractive dot before the message' do
|
12
|
-
expect{described_class.log_step 'Foo'}.to output(/● Foo/).to_stdout
|
12
|
+
expect { described_class.log_step 'Foo' }.to output(/● Foo/).to_stdout
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
describe '#log_warn' do
|
17
17
|
it 'puts the given message' do
|
18
|
-
expect{described_class.log_warn 'Foo'}.to output(/Foo/).to_stdout
|
18
|
+
expect { described_class.log_warn 'Foo' }.to output(/Foo/).to_stdout
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'prints an attractive dot before the message' do
|
22
|
-
expect{described_class.log_warn 'Foo'}.to output(/! Foo/).to_stdout
|
22
|
+
expect { described_class.log_warn 'Foo' }.to output(/! Foo/).to_stdout
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
describe '#log_passed' do
|
27
27
|
it 'puts the given message' do
|
28
|
-
expect{described_class.log_passed 'Foo'}.to output(/Foo/).to_stdout
|
28
|
+
expect { described_class.log_passed 'Foo' }.to output(/Foo/).to_stdout
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'prints the message in green' do
|
32
|
-
expect{described_class.log_passed 'Foo'}.to output("#{Term::ANSIColor.green}Foo#{Term::ANSIColor.reset}\n").to_stdout
|
32
|
+
expect { described_class.log_passed 'Foo' }.to output("#{Term::ANSIColor.green}Foo#{Term::ANSIColor.reset}\n").to_stdout
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe '#log_missing_gem' do
|
37
37
|
it 'puts a message asking for the gem to be installed' do
|
38
|
-
expect{described_class.log_missing_gem 'foo'}.to output(/Try adding "gem 'foo'"/).to_stderr
|
38
|
+
expect { described_class.log_missing_gem 'foo' }.to output(/Try adding "gem 'foo'"/).to_stderr
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'can optionally take a different name for the tool' do
|
42
|
-
expect{described_class.log_missing_gem 'foo', 'Bar'}.to output(/'Bar' is not available/).to_stderr
|
43
|
-
expect{described_class.log_missing_gem 'foo', 'Bar'}.to output(/Try adding "gem 'foo'"/).to_stderr
|
42
|
+
expect { described_class.log_missing_gem 'foo', 'Bar' }.to output(/'Bar' is not available/).to_stderr
|
43
|
+
expect { described_class.log_missing_gem 'foo', 'Bar' }.to output(/Try adding "gem 'foo'"/).to_stderr
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -3,9 +3,9 @@ require production_code
|
|
3
3
|
|
4
4
|
describe RakeNBake::DependencyChecker do
|
5
5
|
let(:silent) { true }
|
6
|
-
let(:list){ [
|
6
|
+
let(:list) { %w[present missing] }
|
7
7
|
|
8
|
-
subject{RakeNBake::DependencyChecker.new list}
|
8
|
+
subject { RakeNBake::DependencyChecker.new list }
|
9
9
|
|
10
10
|
before do
|
11
11
|
double_cmd('which present', exit: 0)
|
@@ -15,19 +15,19 @@ describe RakeNBake::DependencyChecker do
|
|
15
15
|
describe '#check' do
|
16
16
|
it 'returns a hash of dependencies => presence' do
|
17
17
|
result = subject.check(silent)
|
18
|
-
expect(result).to eq(
|
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
|
22
|
-
expect{subject.check}.to output(/\./).to_stdout
|
22
|
+
expect { subject.check }.to output(/\./).to_stdout
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'prints a F for missing dependencies' do
|
26
|
-
expect{subject.check}.to output(/F/).to_stdout
|
26
|
+
expect { subject.check }.to output(/F/).to_stdout
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'can be run without printing anything out' do
|
30
|
-
expect{subject.check(silent)}.to_not output.to_stdout
|
30
|
+
expect { subject.check(silent) }.to_not output.to_stdout
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -36,5 +36,4 @@ describe RakeNBake::DependencyChecker do
|
|
36
36
|
expect(subject.missing).to eq ['missing']
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
40
39
|
end
|
@@ -3,7 +3,7 @@ require production_code
|
|
3
3
|
require 'yaml'
|
4
4
|
|
5
5
|
describe RakeNBake::SemverVersioning do
|
6
|
-
before(:example) { SEMVER_FILES.map{|f| remove_file f} }
|
6
|
+
before(:example) { SEMVER_FILES.map { |f| remove_file f } }
|
7
7
|
|
8
8
|
let(:changelog) { project_root_file 'CHANGELOG.md' }
|
9
9
|
let(:history_rdoc) { project_root_file 'history.rdoc' }
|
@@ -11,11 +11,11 @@ describe RakeNBake::SemverVersioning do
|
|
11
11
|
|
12
12
|
let(:version) do
|
13
13
|
{
|
14
|
-
major:
|
15
|
-
minor:
|
16
|
-
patch:
|
17
|
-
special:
|
18
|
-
metadata: ''
|
14
|
+
major: '1',
|
15
|
+
minor: '2',
|
16
|
+
patch: '3',
|
17
|
+
special: '',
|
18
|
+
metadata: '',
|
19
19
|
}
|
20
20
|
end
|
21
21
|
|
@@ -81,11 +81,11 @@ describe RakeNBake::SemverVersioning do
|
|
81
81
|
end
|
82
82
|
|
83
83
|
describe 'release' do
|
84
|
-
before { File.write(semver, YAML.dump(
|
84
|
+
before { File.write(semver, YAML.dump(version.merge(special: 'rc5'))) }
|
85
85
|
|
86
86
|
it 'removes the prerelease' do
|
87
|
-
expect{ described_class.release }
|
88
|
-
.to change{ described_class.current_version.to_s}
|
87
|
+
expect { described_class.release }
|
88
|
+
.to change { described_class.current_version.to_s }
|
89
89
|
.from('v1.2.3-rc5')
|
90
90
|
.to('v1.2.3')
|
91
91
|
end
|
@@ -94,8 +94,8 @@ describe RakeNBake::SemverVersioning do
|
|
94
94
|
describe '#update_history_file' do
|
95
95
|
context 'when there is no history file' do
|
96
96
|
it 'does nothing' do
|
97
|
-
expect{ described_class.update_history_file }
|
98
|
-
.to_not change{ [history_rdoc, changelog].any?{|file| File.
|
97
|
+
expect { described_class.update_history_file }
|
98
|
+
.to_not change { [history_rdoc, changelog].any? { |file| File.exist? file } }
|
99
99
|
.from(false)
|
100
100
|
end
|
101
101
|
end
|
@@ -111,7 +111,7 @@ describe RakeNBake::SemverVersioning do
|
|
111
111
|
it 'Adds the version number and date to the top of the file and adds it to git' do
|
112
112
|
expect(Object).to receive(:`).with('git add history.rdoc')
|
113
113
|
described_class.update_history_file
|
114
|
-
expect(File.read(history_rdoc).lines.first).to eq "== v1.2.3 (#{Time.now.strftime
|
114
|
+
expect(File.read(history_rdoc).lines.first).to eq "== v1.2.3 (#{Time.now.strftime '%d %B %Y'})\n"
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
@@ -126,7 +126,7 @@ describe RakeNBake::SemverVersioning do
|
|
126
126
|
it 'Adds the version number and date to the top of the file and adds it to git' do
|
127
127
|
expect(Object).to receive(:`).with('git add CHANGELOG.md')
|
128
128
|
described_class.update_history_file
|
129
|
-
expect(File.read(changelog).lines.first).to eq "== v1.2.3 (#{Time.now.strftime
|
129
|
+
expect(File.read(changelog).lines.first).to eq "== v1.2.3 (#{Time.now.strftime '%d %B %Y'})\n"
|
130
130
|
end
|
131
131
|
end
|
132
132
|
end
|
@@ -143,22 +143,22 @@ describe RakeNBake::SemverVersioning do
|
|
143
143
|
end
|
144
144
|
|
145
145
|
it 'writes the version into lib/version.rb' do
|
146
|
-
expect{ described_class.update_version_rb }
|
147
|
-
.to change{ File.read('lib/version.rb').include? "VERSION = '1.2.3'" }
|
146
|
+
expect { described_class.update_version_rb }
|
147
|
+
.to change { File.read('lib/version.rb').include? "VERSION = '1.2.3'" }
|
148
148
|
.from(false)
|
149
149
|
.to(true)
|
150
150
|
end
|
151
151
|
|
152
152
|
it 'does nothing if lib/version.rb does not exist' do
|
153
153
|
FileUtils.rm 'lib/version.rb'
|
154
|
-
expect{ described_class.update_version_rb }
|
155
|
-
.to_not change{ File.
|
154
|
+
expect { described_class.update_version_rb }
|
155
|
+
.to_not change { File.exist? 'lib/version.rb' }
|
156
156
|
.from(false)
|
157
157
|
end
|
158
158
|
|
159
159
|
it 'stages to change lib/version.rb to git' do
|
160
|
-
expect{ described_class.update_version_rb }
|
161
|
-
.to change{ `git status`.include? 'lib/version.rb' }
|
160
|
+
expect { described_class.update_version_rb }
|
161
|
+
.to change { `git status`.include? 'lib/version.rb' }
|
162
162
|
.from(false)
|
163
163
|
.to(true)
|
164
164
|
end
|
@@ -177,22 +177,22 @@ describe RakeNBake::SemverVersioning do
|
|
177
177
|
end
|
178
178
|
|
179
179
|
it 'writes the version into lib/gemname/version.rb' do
|
180
|
-
expect{ described_class.update_version_rb }
|
181
|
-
.to change{ File.read('lib/gemname/version.rb').include? "VERSION = '1.2.3'" }
|
180
|
+
expect { described_class.update_version_rb }
|
181
|
+
.to change { File.read('lib/gemname/version.rb').include? "VERSION = '1.2.3'" }
|
182
182
|
.from(false)
|
183
183
|
.to(true)
|
184
184
|
end
|
185
185
|
|
186
186
|
it 'does nothing if lib/gemname/version.rb does not exist' do
|
187
187
|
FileUtils.rm 'lib/gemname/version.rb'
|
188
|
-
expect{ described_class.update_version_rb }
|
189
|
-
.to_not change{ File.
|
188
|
+
expect { described_class.update_version_rb }
|
189
|
+
.to_not change { File.exist? 'lib/gemname/version.rb' }
|
190
190
|
.from(false)
|
191
191
|
end
|
192
192
|
|
193
193
|
it 'stages changes to lib/gemname/version.rb to git' do
|
194
|
-
expect{ described_class.update_version_rb }
|
195
|
-
.to change{ `git status`.include? 'lib/gemname/version.rb' }
|
194
|
+
expect { described_class.update_version_rb }
|
195
|
+
.to change { `git status`.include? 'lib/gemname/version.rb' }
|
196
196
|
.from(false)
|
197
197
|
.to(true)
|
198
198
|
end
|
@@ -200,9 +200,8 @@ describe RakeNBake::SemverVersioning do
|
|
200
200
|
it 'does nothing if there are multiple version.rb files found' do
|
201
201
|
FileUtils.cp 'lib/version.rb.orig', 'lib/version.rb'
|
202
202
|
described_class.update_version_rb
|
203
|
-
expect(`git status`).to_not match
|
203
|
+
expect(`git status`).to_not match(/version.rb/)
|
204
204
|
end
|
205
|
-
|
206
205
|
end
|
207
206
|
end
|
208
207
|
|
@@ -216,6 +215,4 @@ describe RakeNBake::SemverVersioning do
|
|
216
215
|
described_class.tag
|
217
216
|
end
|
218
217
|
end
|
219
|
-
|
220
218
|
end
|
221
|
-
|
data/spec/spec_helper.rb
CHANGED
@@ -4,11 +4,12 @@ require 'tempfile'
|
|
4
4
|
require 'codeclimate-test-reporter'
|
5
5
|
require 'aruba/rspec'
|
6
6
|
|
7
|
-
|
7
|
+
require 'simplecov'
|
8
|
+
SimpleCov.start
|
8
9
|
|
9
10
|
def production_code
|
10
11
|
spec = caller[0][/spec.+\.rb/]
|
11
|
-
'./'+ spec.gsub('_spec','').gsub(/spec/, 'lib')
|
12
|
+
'./' + spec.gsub('_spec', '').gsub(/spec/, 'lib')
|
12
13
|
end
|
13
14
|
|
14
15
|
def project_root_file name
|
@@ -22,31 +23,31 @@ end
|
|
22
23
|
def backup_file name
|
23
24
|
file = project_root_file(name)
|
24
25
|
backup = backup_file_name(name)
|
25
|
-
FileUtils.mv file, backup if File.
|
26
|
+
FileUtils.mv file, backup if File.exist?(file)
|
26
27
|
end
|
27
28
|
|
28
29
|
def restore_file name
|
29
30
|
file = project_root_file(name)
|
30
31
|
backup = backup_file_name(name)
|
31
|
-
FileUtils.mv backup, file if File.
|
32
|
+
FileUtils.mv backup, file if File.exist?(backup)
|
32
33
|
end
|
33
34
|
|
34
35
|
def remove_file name
|
35
36
|
FileUtils.rm project_root_file(name), force: true
|
36
37
|
end
|
37
38
|
|
38
|
-
SEMVER_FILES = [
|
39
|
+
SEMVER_FILES = ['.semver', 'history.rdoc', 'CHANGELOG.md'].freeze
|
39
40
|
|
40
41
|
RSpec.configure do |config|
|
41
42
|
config.include ArubaDoubles
|
42
43
|
|
43
44
|
config.before :suite do
|
44
45
|
Aruba::RSpec.setup
|
45
|
-
SEMVER_FILES.map{|f| backup_file f}
|
46
|
+
SEMVER_FILES.map { |f| backup_file f }
|
46
47
|
end
|
47
48
|
|
48
49
|
config.after :suite do
|
49
|
-
SEMVER_FILES.map{|f| restore_file f}
|
50
|
+
SEMVER_FILES.map { |f| restore_file f }
|
50
51
|
Aruba::RSpec.teardown
|
51
52
|
end
|
52
53
|
end
|
@@ -56,4 +57,3 @@ SimpleCov.start do
|
|
56
57
|
add_filter '/spec/'
|
57
58
|
coverage_dir 'log/coverage/spec'
|
58
59
|
end
|
59
|
-
|
@@ -2,6 +2,8 @@ require_relative '../lib/dependency_checker'
|
|
2
2
|
|
3
3
|
namespace :bake do
|
4
4
|
task :check_external_dependencies do
|
5
|
+
next if @external_dependencies.nil? || @external_dependencies.size == 0
|
6
|
+
|
5
7
|
checker = RakeNBake::DependencyChecker.new(@external_dependencies)
|
6
8
|
|
7
9
|
RakeNBake::Baker.log_step 'Checking external dependencies'
|
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.4.
|
4
|
+
version: 1.4.3
|
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: 2016-
|
12
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -50,6 +50,8 @@ files:
|
|
50
50
|
- ".bundle/config"
|
51
51
|
- ".gitignore"
|
52
52
|
- ".rspec"
|
53
|
+
- ".rubocop-https---raw-githubusercontent-com-dvmtn-house-style-master-rubocop-yml"
|
54
|
+
- ".rubocop.yml"
|
53
55
|
- ".ruby-version"
|
54
56
|
- ".semver"
|
55
57
|
- ".travis.yml"
|
@@ -123,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
125
|
version: '0'
|
124
126
|
requirements: []
|
125
127
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.4.
|
128
|
+
rubygems_version: 2.4.5
|
127
129
|
signing_key:
|
128
130
|
specification_version: 4
|
129
131
|
summary: Common rake tasks, baked to perfection and ready to serve!
|