mr_bump 0.2.1 → 0.2.2

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.
Files changed (36) hide show
  1. checksums.yaml +8 -8
  2. data/bin/mr_bump +65 -52
  3. data/lib/mr_bump/change.rb +4 -2
  4. data/lib/mr_bump.rb +10 -2
  5. data/spec/change_spec.rb +1 -0
  6. data/spec/config_spec.rb +1 -0
  7. data/spec/coverage/assets/0.10.0/application.css +799 -0
  8. data/spec/coverage/assets/0.10.0/application.js +1707 -0
  9. data/spec/coverage/assets/0.10.0/colorbox/border.png +0 -0
  10. data/spec/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  11. data/spec/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  12. data/spec/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  13. data/spec/coverage/assets/0.10.0/favicon_green.png +0 -0
  14. data/spec/coverage/assets/0.10.0/favicon_red.png +0 -0
  15. data/spec/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  16. data/spec/coverage/assets/0.10.0/loading.gif +0 -0
  17. data/spec/coverage/assets/0.10.0/magnify.png +0 -0
  18. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  19. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  20. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  21. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  22. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  23. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  24. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  25. data/spec/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  26. data/spec/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  27. data/spec/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  28. data/spec/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  29. data/spec/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  30. data/spec/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  31. data/spec/coverage/index.html +72 -0
  32. data/spec/git_config_spec.rb +28 -0
  33. data/spec/mr_bump_spec.rb +34 -0
  34. data/spec/slack_spec.rb +1 -0
  35. data/spec/spec_helper.rb +13 -0
  36. metadata +121 -1
@@ -0,0 +1,72 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>Code coverage for Spec</title>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <script src='./assets/0.10.0/application.js' type='text/javascript'></script>
7
+ <link href='./assets/0.10.0/application.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
8
+ <link rel="shortcut icon" type="image/png" href="./assets/0.10.0/favicon_green.png" />
9
+ <link rel="icon" type="image/png" href="./assets/0.10.0/favicon.png" />
10
+ </head>
11
+
12
+ <body>
13
+ <div id="loading">
14
+ <img src="./assets/0.10.0/loading.gif" alt="loading"/>
15
+ </div>
16
+ <div id="wrapper" style="display:none;">
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2016-10-04T18:24:29+01:00">2016-10-04T18:24:29+01:00</abbr></div>
18
+ <ul class="group_tabs"></ul>
19
+
20
+ <div id="content">
21
+ <div class="file_list_container" id="AllFiles">
22
+ <h2>
23
+ <span class="group_name">All Files</span>
24
+ (<span class="covered_percent"><span class="green">100.0%</span></span>
25
+ covered at
26
+ <span class="covered_strength">
27
+ <span class="red">
28
+ 0.0
29
+ </span>
30
+ </span> hits/line)
31
+ </h2>
32
+ <a name="AllFiles"></a>
33
+ <div>
34
+ <b>0</b> files in total.
35
+ <b>0.0</b> relevant lines.
36
+ <span class="green"><b>0.0</b> lines covered</span> and
37
+ <span class="red"><b>0.0</b> lines missed </span>
38
+ </div>
39
+ <table class="file_list">
40
+ <thead>
41
+ <tr>
42
+ <th>File</th>
43
+ <th>% covered</th>
44
+ <th>Lines</th>
45
+ <th>Relevant Lines</th>
46
+ <th>Lines covered</th>
47
+ <th>Lines missed</th>
48
+ <th>Avg. Hits / Line</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+
53
+ </tbody>
54
+ </table>
55
+ </div>
56
+
57
+
58
+
59
+ </div>
60
+
61
+ <div id="footer">
62
+ Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.11.2
63
+ and simplecov-html v0.10.0<br/>
64
+ using RSpec
65
+ </div>
66
+
67
+ <div class="source_files">
68
+
69
+ </div>
70
+ </div>
71
+ </body>
72
+ </html>
@@ -2,6 +2,7 @@
2
2
  # License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
+ require_relative 'spec_helper.rb'
5
6
  require 'mr_bump/git_config'
6
7
 
7
8
  describe MrBump::GitConfig do
@@ -9,6 +10,7 @@ describe MrBump::GitConfig do
9
10
 
10
11
  context 'Given https origin with no username' do
11
12
  let(:origin) { 'https://github.com/xulaus/mr_bump' }
13
+
12
14
  it 'correctly extracts the repository name' do
13
15
  expect(config.repo_name).to eq('mr_bump')
14
16
  end
@@ -21,6 +23,14 @@ describe MrBump::GitConfig do
21
23
  expect(config.username.nil?)
22
24
  end
23
25
 
26
+ it "doesn't provide a user icon url" do
27
+ expect(config.user_icon.nil?)
28
+ end
29
+
30
+ it "doesn't provide a user GitHub url" do
31
+ expect(config.user_link.nil?)
32
+ end
33
+
24
34
  it 'extracts correct host' do
25
35
  expect(config.host).to eq('https://github.com')
26
36
  end
@@ -32,9 +42,11 @@ describe MrBump::GitConfig do
32
42
 
33
43
  context 'Given https origin with username' do
34
44
  let(:origin) { 'https://xulaus@github.com/xulaus/mr_bump.git' }
45
+
35
46
  it 'correctly extracts the repository name' do
36
47
  expect(config.repo_name).to eq('mr_bump')
37
48
  end
49
+
38
50
  it 'correctly constructs github url' do
39
51
  expect(config.repo_url).to eq('https://github.com/xulaus/mr_bump/')
40
52
  end
@@ -43,6 +55,14 @@ describe MrBump::GitConfig do
43
55
  expect(config.username).to eq('xulaus')
44
56
  end
45
57
 
58
+ it 'provides a user icon url' do
59
+ expect(config.user_icon).to be_a(String)
60
+ end
61
+
62
+ it 'provides a user GitHub url' do
63
+ expect(config.user_link).to be_a(String)
64
+ end
65
+
46
66
  it 'extracts correct host' do
47
67
  expect(config.host).to eq('https://github.com')
48
68
  end
@@ -65,6 +85,14 @@ describe MrBump::GitConfig do
65
85
  expect(config.username.nil?)
66
86
  end
67
87
 
88
+ it "doesn't provide a user icon url" do
89
+ expect(config.user_icon.nil?)
90
+ end
91
+
92
+ it "doesn't provide a user GitHub url" do
93
+ expect(config.user_link.nil?)
94
+ end
95
+
68
96
  it 'extracts correct host' do
69
97
  expect(config.host).to eq('https://github.com')
70
98
  end
data/spec/mr_bump_spec.rb CHANGED
@@ -2,7 +2,9 @@
2
2
  # License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
+ require_relative 'spec_helper.rb'
5
6
  require 'mr_bump/version'
7
+ require 'mr_bump/change'
6
8
  require 'mr_bump'
7
9
 
8
10
  describe MrBump do
@@ -427,4 +429,36 @@ describe MrBump do
427
429
  end
428
430
  end
429
431
  end
432
+
433
+ describe '#' do
434
+ let(:log) do
435
+ [
436
+ 'Merge pull request #4 from mr_bump/hotfix/DEV-1261',
437
+ 'Comment',
438
+ 'Merge pull request #1376 from mr_bump/release/10.19.0',
439
+ 'Comment',
440
+ 'Over several',
441
+ 'Lines',
442
+ 'Merge pull request #1365 from mr_bump/revert_contact_fixes',
443
+ 'Merge pull request #1365 from mr_bump/develop',
444
+ 'Merge pull request #233 from mr_bump/bugfix/master',
445
+ 'asdasd',
446
+ 'Merge pull request #1336 from mr_bump/MDV-1261',
447
+ 'wqefqfqefqwefqef'
448
+ ]
449
+ end
450
+ before(:each) { allow(MrBump).to receive(:merge_logs).and_return(log) }
451
+
452
+ context 'when given output from git log' do
453
+ let(:changes) { MrBump.change_log_items_for_range('', '') }
454
+
455
+ it 'converts raw git log ouput to changlog objects' do
456
+ expect(changes).to all(be_a(MrBump::Change))
457
+ end
458
+
459
+ it 'filters out release and master branch merges' do
460
+ expect(changes.map(&:branch_name)).to eq(['DEV-1261', 'revert_contact_fixes', 'MDV-1261'])
461
+ end
462
+ end
463
+ end
430
464
  end
data/spec/slack_spec.rb CHANGED
@@ -2,6 +2,7 @@
2
2
  # License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
+ require_relative 'spec_helper.rb'
5
6
  require 'mr_bump/slack'
6
7
 
7
8
  describe MrBump::Slack do
data/spec/spec_helper.rb CHANGED
@@ -5,4 +5,17 @@
5
5
  require 'bundler/setup'
6
6
  Bundler.setup
7
7
 
8
+ require 'simplecov'
9
+ require 'coveralls'
10
+
11
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
12
+ SimpleCov::Formatter::HTMLFormatter,
13
+ Coveralls::SimpleCov::Formatter
14
+ ]
15
+ SimpleCov.start do
16
+ add_filter 'spec'
17
+ track_files '**/*.rb'
18
+ track_files 'bin/mr_bump'
19
+ end
20
+
8
21
  require 'mr_bump'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mr_bump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Fitzgerald
@@ -95,6 +95,76 @@ dependencies:
95
95
  - - ! '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: json
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ version: '1.8'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '1.8'
126
+ - !ruby/object:Gem::Dependency
127
+ name: tins
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 1.6.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ~>
138
+ - !ruby/object:Gem::Version
139
+ version: 1.6.0
140
+ - !ruby/object:Gem::Dependency
141
+ name: term-ansicolor
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ~>
145
+ - !ruby/object:Gem::Version
146
+ version: 1.3.1
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ~>
152
+ - !ruby/object:Gem::Version
153
+ version: 1.3.1
154
+ - !ruby/object:Gem::Dependency
155
+ name: coveralls
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
98
168
  description: Bump versions
99
169
  email: richard.fitzgerald36@gmail.com
100
170
  executables:
@@ -113,6 +183,31 @@ files:
113
183
  - lib/mr_bump/version.rb
114
184
  - spec/change_spec.rb
115
185
  - spec/config_spec.rb
186
+ - spec/coverage/assets/0.10.0/application.css
187
+ - spec/coverage/assets/0.10.0/application.js
188
+ - spec/coverage/assets/0.10.0/colorbox/border.png
189
+ - spec/coverage/assets/0.10.0/colorbox/controls.png
190
+ - spec/coverage/assets/0.10.0/colorbox/loading.gif
191
+ - spec/coverage/assets/0.10.0/colorbox/loading_background.png
192
+ - spec/coverage/assets/0.10.0/favicon_green.png
193
+ - spec/coverage/assets/0.10.0/favicon_red.png
194
+ - spec/coverage/assets/0.10.0/favicon_yellow.png
195
+ - spec/coverage/assets/0.10.0/loading.gif
196
+ - spec/coverage/assets/0.10.0/magnify.png
197
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
198
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
199
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
200
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
201
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png
202
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
203
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
204
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
205
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png
206
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png
207
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png
208
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png
209
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png
210
+ - spec/coverage/index.html
116
211
  - spec/git_config_spec.rb
117
212
  - spec/mr_bump_spec.rb
118
213
  - spec/slack_spec.rb
@@ -144,6 +239,31 @@ summary: BUMP!
144
239
  test_files:
145
240
  - spec/change_spec.rb
146
241
  - spec/config_spec.rb
242
+ - spec/coverage/assets/0.10.0/application.css
243
+ - spec/coverage/assets/0.10.0/application.js
244
+ - spec/coverage/assets/0.10.0/colorbox/border.png
245
+ - spec/coverage/assets/0.10.0/colorbox/controls.png
246
+ - spec/coverage/assets/0.10.0/colorbox/loading.gif
247
+ - spec/coverage/assets/0.10.0/colorbox/loading_background.png
248
+ - spec/coverage/assets/0.10.0/favicon_green.png
249
+ - spec/coverage/assets/0.10.0/favicon_red.png
250
+ - spec/coverage/assets/0.10.0/favicon_yellow.png
251
+ - spec/coverage/assets/0.10.0/loading.gif
252
+ - spec/coverage/assets/0.10.0/magnify.png
253
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
254
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
255
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
256
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
257
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png
258
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
259
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
260
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
261
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png
262
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png
263
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png
264
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png
265
+ - spec/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png
266
+ - spec/coverage/index.html
147
267
  - spec/git_config_spec.rb
148
268
  - spec/mr_bump_spec.rb
149
269
  - spec/slack_spec.rb