bummr 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5dd7644bf0a0114c46bc070883c5917b665fab8
4
- data.tar.gz: 42614a3aa050830b0aa6af5b1518bcbb6e724abd
3
+ metadata.gz: 5f30f548b39e6f3124501b0408ee062380074d09
4
+ data.tar.gz: 6e7740872ead38b07b91426f65fe67a623e1de54
5
5
  SHA512:
6
- metadata.gz: 7c28d9632c83b0f018ca671a2b342235dd0d17473c22d96b61c2a5ded43ac6cc90663f36666cdb204b3a539c75c4d67f346180838fa5ca8d7bf10401b513ff00
7
- data.tar.gz: ee07ffb8ec3fcfb0482befce8b516cec6bcec9a789c5e7dcc6e0c627f72e8c950d8497cd001b180ee390aab9e2ebf45185a4220b0e4a59236a418f621d9a8854
6
+ metadata.gz: 3aba5630386853fd5d46c021ace68cf0777828ac65c7f347a8a1df0baf4ff0107c895e913c83fa485b9023ead25c3dd778d6a96f7fdd3d9998453a36fbba3dbc
7
+ data.tar.gz: b7d5ae9de74c88d18673a45d105496100052f1c42b0e4dd4bddbb6b7bcd975ae41f68a09e8fd611bb9c47e216d4dc02df6afae76fa24db839405402eebcc4cd8
data/bummr.gemspec CHANGED
@@ -19,10 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'thor'
22
- spec.add_dependency 'colorize'
22
+ spec.add_dependency 'rainbow'
23
23
 
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_development_dependency "rspec-nc"
26
+ spec.add_development_dependency "simplecov"
26
27
  spec.add_development_dependency "spring"
27
28
  spec.add_development_dependency "bundler"
28
29
  spec.add_development_dependency "rake"
@@ -30,5 +31,5 @@ Gem::Specification.new do |spec|
30
31
  spec.add_development_dependency "pry"
31
32
  spec.add_development_dependency "pry-remote"
32
33
  spec.add_development_dependency "pry-nav"
33
- spec.add_development_dependency "codeclimate-test-reporter"
34
+ spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
34
35
  end
data/circle.yml ADDED
@@ -0,0 +1,3 @@
1
+ test:
2
+ post:
3
+ - bundle exec codeclimate-test-reporter
@@ -3,7 +3,7 @@ module Bummr
3
3
  include Singleton
4
4
 
5
5
  def bisect
6
- puts "Bad commits found! Bisecting...".red
6
+ puts "Bad commits found! Bisecting...".color(:red)
7
7
 
8
8
  system("bundle")
9
9
  system("git bisect start")
data/lib/bummr/check.rb CHANGED
@@ -14,11 +14,11 @@ module Bummr
14
14
  end
15
15
 
16
16
  if @errors.any?
17
- unless yes? "Bummr found errors! Do you want to continue anyway?".red
17
+ unless yes? "Bummr found errors! Do you want to continue anyway?".color(:red)
18
18
  exit 0
19
19
  end
20
20
  else
21
- puts "Ready to run bummr.".green
21
+ puts "Ready to run bummr.".color(:green)
22
22
  end
23
23
  end
24
24
 
@@ -27,7 +27,7 @@ module Bummr
27
27
  def check_master
28
28
  if `git rev-parse --abbrev-ref HEAD` == "master\n"
29
29
  message = "Bummr is not meant to be run on master"
30
- puts message.red
30
+ puts message.color(:red)
31
31
  puts "Please checkout a branch with 'git checkout -b update-gems'"
32
32
  @errors.push message
33
33
  end
@@ -36,7 +36,7 @@ module Bummr
36
36
  def check_log
37
37
  unless File.directory? "log"
38
38
  message = "There is no log directory or you are not in the root"
39
- puts message.red
39
+ puts message.color(:red)
40
40
  @errors.push message
41
41
  end
42
42
  end
@@ -54,7 +54,7 @@ module Bummr
54
54
  end
55
55
 
56
56
  message += "Make sure `git status` is clean"
57
- puts message.red
57
+ puts message.color(:red)
58
58
  @errors.push message
59
59
  end
60
60
  end
@@ -62,7 +62,7 @@ module Bummr
62
62
  def check_diff
63
63
  unless `git diff master`.empty?
64
64
  message = "Please make sure that `git diff master` returns empty"
65
- puts message.red
65
+ puts message.color(:red)
66
66
  @errors.push message
67
67
  end
68
68
  end
data/lib/bummr/cli.rb CHANGED
@@ -21,7 +21,7 @@ module Bummr
21
21
  outdated_gems = Bummr::Outdated.instance.outdated_gems
22
22
 
23
23
  if outdated_gems.empty?
24
- puts "No outdated gems to update".green
24
+ puts "No outdated gems to update".color(:green)
25
25
  else
26
26
  Bummr::Updater.new(outdated_gems).update_gems
27
27
 
@@ -29,7 +29,7 @@ module Bummr
29
29
  test
30
30
  end
31
31
  else
32
- puts "Thank you!".green
32
+ puts "Thank you!".color(:green)
33
33
  end
34
34
  end
35
35
 
@@ -37,13 +37,13 @@ module Bummr
37
37
  def test
38
38
  check(false)
39
39
  system "bundle"
40
- puts "Testing the build!".green
40
+ puts "Testing the build!".color(:green)
41
41
 
42
42
  if system(TEST_COMMAND) == false
43
43
  bisect
44
44
  else
45
- puts "Passed the build!".green
46
- puts "See log/bummr.log for details".yellow
45
+ puts "Passed the build!".color(:green)
46
+ puts "See log/bummr.log for details".color(:yellow)
47
47
  system("cat log/bummr.log")
48
48
  end
49
49
  end
data/lib/bummr/rebaser.rb CHANGED
@@ -4,17 +4,17 @@ module Bummr
4
4
  include Log
5
5
 
6
6
  def remove_commit(sha)
7
- log "Bad commit: #{commit_message_for(sha)}, #{sha}".red
7
+ log "Bad commit: #{commit_message_for(sha)}, #{sha}".color(:red)
8
8
  log "Resetting..."
9
9
  system("git bisect reset")
10
10
 
11
11
  log "Removing commit..."
12
12
  if system("git rebase -X ours --onto #{sha}^ #{sha}")
13
- log "Successfully removed bad commit...".green
14
- log "Re-testing build...".green
13
+ log "Successfully removed bad commit...".color(:green)
14
+ log "Re-testing build...".color(:green)
15
15
  system("bummr test")
16
16
  else
17
- log "Could not automatically remove this commit!".red
17
+ log "Could not automatically remove this commit!".color(:red)
18
18
  log "Please resolve conflicts, then 'git rebase --continue'."
19
19
  log "Run 'bummr test' again once the rebase is complete"
20
20
  end
data/lib/bummr/updater.rb CHANGED
@@ -7,7 +7,7 @@ module Bummr
7
7
  end
8
8
 
9
9
  def update_gems
10
- puts "Updating outdated gems".green
10
+ puts "Updating outdated gems".color(:green)
11
11
 
12
12
  @outdated_gems.each_with_index do |gem, index|
13
13
  update_gem(gem, index)
@@ -30,7 +30,7 @@ module Bummr
30
30
  log("#{gem[:name]} not updated from #{gem[:installed]} to latest: #{gem[:newest]}")
31
31
  end
32
32
 
33
- log "Commit: #{message}".green
33
+ log "Commit: #{message}".color(:green)
34
34
  system("git commit -am '#{message}'")
35
35
  end
36
36
 
data/lib/bummr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bummr
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/bummr.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # grouped by dependency order than alpha
2
2
  require "bummr/log"
3
- require 'colorize'
3
+ require 'rainbow/ext/string'
4
4
  require 'open3'
5
5
  require 'singleton'
6
6
  require 'thor'
data/spec/check_spec.rb CHANGED
@@ -23,7 +23,7 @@ describe Bummr::Check do
23
23
  it "returns 'Ready to run bummr.' and proceeds" do
24
24
  check.check
25
25
 
26
- expect(check).to have_received(:puts).with("Ready to run bummr.".green)
26
+ expect(check).to have_received(:puts).with("Ready to run bummr.".color(:green))
27
27
  end
28
28
  end
29
29
 
@@ -31,7 +31,7 @@ describe Bummr::Check do
31
31
  it "returns 'Ready to run bummr.' and proceeds" do
32
32
  check.check(true)
33
33
 
34
- expect(check).to have_received(:puts).with("Ready to run bummr.".green)
34
+ expect(check).to have_received(:puts).with("Ready to run bummr.".color(:green))
35
35
  end
36
36
  end
37
37
  end
@@ -46,7 +46,7 @@ describe Bummr::Check do
46
46
  check.check
47
47
 
48
48
  expect(check).to have_received(:puts)
49
- .with("Bummr is not meant to be run on master".red)
49
+ .with("Bummr is not meant to be run on master".color(:red))
50
50
  expect(check).to have_received(:yes?)
51
51
  expect(check).to have_received(:exit).with(0)
52
52
  end
@@ -62,7 +62,7 @@ describe Bummr::Check do
62
62
  check.check
63
63
 
64
64
  expect(check).to have_received(:puts)
65
- .with("There is no log directory or you are not in the root".red)
65
+ .with("There is no log directory or you are not in the root".color(:red))
66
66
  expect(check).to have_received(:yes?)
67
67
  expect(check).to have_received(:exit).with(0)
68
68
  end
@@ -81,7 +81,7 @@ describe Bummr::Check do
81
81
  check.check
82
82
 
83
83
  expect(check).to have_received(:puts)
84
- .with("You are already bisecting. Make sure `git status` is clean".red)
84
+ .with("You are already bisecting. Make sure `git status` is clean".color(:red))
85
85
  expect(check).to have_received(:yes?)
86
86
  expect(check).to have_received(:exit).with(0)
87
87
  end
@@ -98,7 +98,7 @@ describe Bummr::Check do
98
98
  check.check
99
99
 
100
100
  expect(check).to have_received(:puts)
101
- .with("You are already rebasing. Make sure `git status` is clean".red)
101
+ .with("You are already rebasing. Make sure `git status` is clean".color(:red))
102
102
  expect(check).to have_received(:yes?)
103
103
  expect(check).to have_received(:exit).with(0)
104
104
  end
@@ -116,7 +116,7 @@ describe Bummr::Check do
116
116
  check.check(true)
117
117
 
118
118
  expect(check).to have_received(:puts)
119
- .with("Please make sure that `git diff master` returns empty".red)
119
+ .with("Please make sure that `git diff master` returns empty".color(:red))
120
120
  expect(check).to have_received(:yes?)
121
121
  expect(check).to have_received(:exit).with(0)
122
122
  end
data/spec/lib/cli_spec.rb CHANGED
@@ -35,7 +35,7 @@ describe Bummr::CLI do
35
35
  expect(cli).to receive(:check)
36
36
  expect(cli).to receive(:log)
37
37
  expect(cli).to receive(:system).with("bundle")
38
- expect(cli).to receive(:puts).with("No outdated gems to update".green)
38
+ expect(cli).to receive(:puts).with("No outdated gems to update".color(:green))
39
39
 
40
40
  cli.update
41
41
  end
@@ -17,7 +17,7 @@ describe Bummr::Rebaser do
17
17
  rebaser.remove_commit(sha)
18
18
 
19
19
  expect(rebaser).to have_received(:log).with(
20
- "Bad commit: commit message, #{sha}".red
20
+ "Bad commit: commit message, #{sha}".color(:red)
21
21
  )
22
22
  end
23
23
 
@@ -36,7 +36,7 @@ describe Bummr::Rebaser do
36
36
  rebaser.remove_commit(sha)
37
37
 
38
38
  expect(rebaser).to have_received(:log).with(
39
- "Successfully removed bad commit...".green
39
+ "Successfully removed bad commit...".color(:green)
40
40
  )
41
41
  end
42
42
 
@@ -56,7 +56,7 @@ describe Bummr::Rebaser do
56
56
  rebaser.remove_commit(sha)
57
57
 
58
58
  expect(rebaser).to have_received(:log).with(
59
- "Could not automatically remove this commit!".red
59
+ "Could not automatically remove this commit!".color(:red)
60
60
  )
61
61
  end
62
62
  end
@@ -97,7 +97,7 @@ describe Bummr::Updater do
97
97
 
98
98
  it "logs the commit" do
99
99
  commit_message =
100
- "Commit: Update #{gem[:name]} from #{gem[:installed]} to #{gem[:newest]}".green
100
+ "Commit: Update #{gem[:name]} from #{gem[:installed]} to #{gem[:newest]}".color(:green)
101
101
  allow(updater).to receive(:system)
102
102
  allow(updater).to receive(:log)
103
103
 
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,6 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
1
+ require "simplecov"
2
+ SimpleCov.start
3
+
3
4
  require 'pry'
4
5
  require 'bummr'
5
- require 'colorize'
6
+ require 'rainbow/ext/string'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bummr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Pender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-21 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: colorize
28
+ name: rainbow
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: spring
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -168,16 +182,16 @@ dependencies:
168
182
  name: codeclimate-test-reporter
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
- - - ">="
185
+ - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: '0'
187
+ version: 1.0.0
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
- - - ">="
192
+ - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: '0'
194
+ version: 1.0.0
181
195
  description: See Readme
182
196
  email:
183
197
  - lpender@gmail.com
@@ -193,6 +207,7 @@ files:
193
207
  - Rakefile
194
208
  - bin/bummr
195
209
  - bummr.gemspec
210
+ - circle.yml
196
211
  - lib/bummr.rb
197
212
  - lib/bummr/bisecter.rb
198
213
  - lib/bummr/check.rb
@@ -230,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
245
  version: '0'
231
246
  requirements: []
232
247
  rubyforge_project:
233
- rubygems_version: 2.5.1
248
+ rubygems_version: 2.6.6
234
249
  signing_key:
235
250
  specification_version: 4
236
251
  summary: Helper script to intelligently update your Gemfile