bmp 1.2.0 → 1.3.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/.bmp.yml +3 -3
- data/.editorconfig +1 -2
- data/.rubocop.yml +8 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +15 -1
- data/README.md +42 -3
- data/Rakefile +5 -3
- data/TODO.md +9 -11
- data/bin/bmp +13 -1
- data/bump.gemspec +12 -13
- data/lib/bump.rb +0 -1
- data/lib/bump/application.rb +228 -217
- data/lib/bump/cli.rb +14 -34
- data/lib/bump/command.rb +12 -18
- data/lib/bump/domain.rb +0 -2
- data/lib/bump/domain/bump_info.rb +61 -120
- data/lib/bump/domain/bump_info_repository.rb +32 -42
- data/lib/bump/domain/file_update_rule.rb +41 -68
- data/lib/bump/domain/file_update_rule_factory.rb +19 -27
- data/lib/bump/domain/version_number.rb +39 -56
- data/lib/bump/domain/version_number_factory.rb +14 -20
- data/lib/bump/logger.rb +40 -46
- data/lib/bump/version.rb +1 -2
- data/spec/bump/application_spec.rb +119 -36
- data/spec/bump/cli_spec.rb +8 -1
- data/spec/bump/command_spec.rb +10 -17
- data/spec/bump/domain/bump_info_repository_spec.rb +17 -24
- data/spec/bump/domain/bump_info_spec.rb +50 -26
- data/spec/bump/domain/file_update_rule_factory_spec.rb +16 -26
- data/spec/bump/domain/file_update_rule_spec.rb +23 -33
- data/spec/bump/domain/version_number_factory_spec.rb +8 -31
- data/spec/bump/domain/version_number_spec.rb +46 -98
- data/spec/bump/logger_spec.rb +29 -1
- data/spec/fixture/bmp.yml +1 -1
- data/spec/fixture/bmp_invalid.yml +5 -0
- data/spec/fixture/bmp_invalid_pattern.yml +3 -0
- data/spec/fixture/bmp_tmp.yml +5 -0
- data/spec/spec_helper.rb +1 -4
- metadata +9 -2
data/spec/bump/logger_spec.rb
CHANGED
@@ -1,7 +1,35 @@
|
|
1
|
-
|
2
1
|
require 'bump'
|
3
2
|
require 'spec_helper'
|
4
3
|
|
5
4
|
describe Bump::Logger do
|
5
|
+
before :each do
|
6
|
+
@logger = Bump::Logger.new
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#log' do
|
10
|
+
it 'logs message' do
|
11
|
+
expect(@logger).to receive(:print).with('foo').once
|
12
|
+
expect(@logger).to receive(:print).with("\n").once
|
13
|
+
|
14
|
+
@logger.log 'foo'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#green' do
|
19
|
+
it 'returns green text' do
|
20
|
+
expect(@logger.green('text')).to eq "\e[32mtext\e[0m"
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'retruns no color text when the no_color option is true' do
|
24
|
+
@logger = Bump::Logger.new true
|
25
|
+
|
26
|
+
expect(@logger.green('text')).to eq 'text'
|
27
|
+
end
|
28
|
+
end
|
6
29
|
|
30
|
+
describe '#red' do
|
31
|
+
it 'returns red text' do
|
32
|
+
expect(@logger.red('text')).to eq "\e[31mtext\e[0m"
|
33
|
+
end
|
34
|
+
end
|
7
35
|
end
|
data/spec/fixture/bmp.yml
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshiya Hinosawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- ".bmp.yml"
|
64
64
|
- ".editorconfig"
|
65
65
|
- ".gitignore"
|
66
|
+
- ".rubocop.yml"
|
66
67
|
- ".travis.yml"
|
67
68
|
- Gemfile
|
68
69
|
- Gemfile.lock
|
@@ -96,6 +97,9 @@ files:
|
|
96
97
|
- spec/bump/domain/version_number_spec.rb
|
97
98
|
- spec/bump/logger_spec.rb
|
98
99
|
- spec/fixture/bmp.yml
|
100
|
+
- spec/fixture/bmp_invalid.yml
|
101
|
+
- spec/fixture/bmp_invalid_pattern.yml
|
102
|
+
- spec/fixture/bmp_tmp.yml
|
99
103
|
- spec/fixture/dummy.txt
|
100
104
|
- spec/spec_helper.rb
|
101
105
|
homepage: https://github.com/kt3k/bump
|
@@ -134,5 +138,8 @@ test_files:
|
|
134
138
|
- spec/bump/domain/version_number_spec.rb
|
135
139
|
- spec/bump/logger_spec.rb
|
136
140
|
- spec/fixture/bmp.yml
|
141
|
+
- spec/fixture/bmp_invalid.yml
|
142
|
+
- spec/fixture/bmp_invalid_pattern.yml
|
143
|
+
- spec/fixture/bmp_tmp.yml
|
137
144
|
- spec/fixture/dummy.txt
|
138
145
|
- spec/spec_helper.rb
|