bummr 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f30f548b39e6f3124501b0408ee062380074d09
4
- data.tar.gz: 6e7740872ead38b07b91426f65fe67a623e1de54
3
+ metadata.gz: d8473b4f3a06e36c229bf26a1e3616772f7d3990
4
+ data.tar.gz: ab6ce39aeecddd616183755cf4a434639b52a76d
5
5
  SHA512:
6
- metadata.gz: 3aba5630386853fd5d46c021ace68cf0777828ac65c7f347a8a1df0baf4ff0107c895e913c83fa485b9023ead25c3dd778d6a96f7fdd3d9998453a36fbba3dbc
7
- data.tar.gz: b7d5ae9de74c88d18673a45d105496100052f1c42b0e4dd4bddbb6b7bcd975ae41f68a09e8fd611bb9c47e216d4dc02df6afae76fa24db839405402eebcc4cd8
6
+ metadata.gz: c41d64f81b11a1c8a7874925cde87c0a745ea20a2a0102bc0472abeef74424704a67f6ebd37a38b63fc9f5ed743d881a4ba44f9b28ce413efbd5032673e13e23
7
+ data.tar.gz: de76a97147722a12995845c759ddb0f4f80272303e38c09ae4536b8d59b7d15e342b6d4ae20b608c5435435c4690101f7498198a16ed72fa1a418a4b2d59f0ba
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ The MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md CHANGED
@@ -31,13 +31,21 @@ If you prefer, you can [run the build more than once]
31
31
  (https://gist.github.com/lpender/f6b55e7f3649db3b6df5), to protect against
32
32
  brittle tests and false positives.
33
33
 
34
+ By default, bummr will assume your base branch is named `master`. If you would
35
+ like to designate a different base branch, you can set the `BASE_BRANCH`
36
+ environment variable: `export BASE_BRANCH='develop'
37
+
34
38
  ## Usage:
35
39
 
36
40
  Using bummr can take anywhere from a few minutes to several hours, depending
37
41
  on the number of outdated gems you have and the number of tests in your test
38
42
  suite.
39
43
 
40
- - After installing, create a new, clean branch off of master.
44
+ For the purpose of these instructions, we are assuming that your base branch is
45
+ `master`. If you would like to specify a different base branch, see the
46
+ instructions in the Installation section of this README.
47
+
48
+ - After installing, create a new, clean branch off of your `master` branch.
41
49
  - Run `bummr update`. This may take some time.
42
50
  - `Bummr` will give you the opportunity to interactively rebase your branch
43
51
  before running the tests. Delete any commits for gems which you don't want
@@ -85,6 +93,10 @@ suite.
85
93
  which case you will have to remove it manually, continue the rebase, and
86
94
  run `bummr test` again.
87
95
 
96
+ ## License
97
+
98
+ See LICENSE
99
+
88
100
  ## Developing
89
101
 
90
102
  `rake build` to build locally
data/bummr.gemspec CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'thor'
22
- spec.add_dependency 'rainbow'
21
+ spec.add_dependency "thor"
22
+ spec.add_dependency "rainbow"
23
23
 
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_development_dependency "rspec-nc"
data/lib/bummr.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # grouped by dependency order than alpha
2
- require "bummr/log"
2
+ require 'bummr/log'
3
3
  require 'rainbow/ext/string'
4
4
  require 'open3'
5
5
  require 'singleton'
@@ -8,7 +8,7 @@ module Bummr
8
8
  system("bundle")
9
9
  system("git bisect start")
10
10
  system("git bisect bad")
11
- system("git bisect good master")
11
+ system("git bisect good #{BASE_BRANCH}")
12
12
 
13
13
  Open3.popen2e("git bisect run #{TEST_COMMAND}") do |_std_in, std_out_err|
14
14
  while line = std_out_err.gets
data/lib/bummr/check.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  module Bummr
2
- class Check
2
+ class Check < Thor
3
3
  include Singleton
4
4
 
5
5
  def check(fullcheck=true)
6
6
  @errors = []
7
7
 
8
- check_master
8
+ check_base_branch
9
9
  check_log
10
10
  check_status
11
11
 
@@ -24,9 +24,9 @@ module Bummr
24
24
 
25
25
  private
26
26
 
27
- def check_master
28
- if `git rev-parse --abbrev-ref HEAD` == "master\n"
29
- message = "Bummr is not meant to be run on master"
27
+ def check_base_branch
28
+ if `git rev-parse --abbrev-ref HEAD` == "#{BASE_BRANCH}\n"
29
+ message = "Bummr is not meant to be run on your base branch"
30
30
  puts message.color(:red)
31
31
  puts "Please checkout a branch with 'git checkout -b update-gems'"
32
32
  @errors.push message
@@ -60,8 +60,8 @@ module Bummr
60
60
  end
61
61
 
62
62
  def check_diff
63
- unless `git diff master`.empty?
64
- message = "Please make sure that `git diff master` returns empty"
63
+ unless `git diff #{BASE_BRANCH}`.empty?
64
+ message = "Please make sure that `git diff #{BASE_BRANCH}` returns empty"
65
65
  puts message.color(:red)
66
66
  @errors.push message
67
67
  end
data/lib/bummr/cli.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  TEST_COMMAND = ENV["BUMMR_TEST"] || "bundle exec rake"
2
+ BASE_BRANCH = ENV["BASE_BRANCH"] || "master"
2
3
 
3
4
  module Bummr
4
5
  class CLI < Thor
@@ -25,7 +26,7 @@ module Bummr
25
26
  else
26
27
  Bummr::Updater.new(outdated_gems).update_gems
27
28
 
28
- system("git rebase -i master")
29
+ system("git rebase -i #{BASE_BRANCH}")
29
30
  test
30
31
  end
31
32
  else
@@ -59,7 +60,7 @@ module Bummr
59
60
 
60
61
  def ask_questions
61
62
  puts "To run Bummr, you must:"
62
- puts "- Be in the root path of a clean git branch off of master"
63
+ puts "- Be in the root path of a clean git branch off of #{BASE_BRANCH}"
63
64
  puts "- Have no commits or local changes"
64
65
  puts "- Have a 'log' directory, where we can place logs"
65
66
  puts "- Have your build configured to fail fast (recommended)"
data/lib/bummr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bummr
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
data/spec/check_spec.rb CHANGED
@@ -5,7 +5,7 @@ describe Bummr::Check do
5
5
 
6
6
  before(:each) do
7
7
  allow(check)
8
- .to receive(:check_master).and_return(nil)
8
+ .to receive(:check_base_branch).and_return(nil)
9
9
  allow(check)
10
10
  .to receive(:check_log).and_return(nil)
11
11
  allow(check)
@@ -36,17 +36,17 @@ describe Bummr::Check do
36
36
  end
37
37
  end
38
38
 
39
- context "check_master fails" do
39
+ context "check_base_branch fails" do
40
40
  it "reports the error and exits after confirm" do
41
41
  allow(check)
42
- .to receive(:check_master).and_call_original
42
+ .to receive(:check_base_branch).and_call_original
43
43
  allow(check).to receive(:`).with('git rev-parse --abbrev-ref HEAD')
44
44
  .and_return "master\n"
45
45
 
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".color(:red))
49
+ .with("Bummr is not meant to be run on your base branch".color(:red))
50
50
  expect(check).to have_received(:yes?)
51
51
  expect(check).to have_received(:exit).with(0)
52
52
  end
data/spec/lib/cli_spec.rb CHANGED
@@ -54,7 +54,7 @@ describe Bummr::CLI do
54
54
  expect(cli).to receive(:log)
55
55
  expect(cli).to receive(:system).with("bundle")
56
56
  expect(Bummr::Updater).to receive(:new).with(outdated_gems).and_return updater
57
- expect(cli).to receive(:system).with("git rebase -i master")
57
+ expect(cli).to receive(:system).with("git rebase -i #{BASE_BRANCH}")
58
58
  expect(cli).to receive(:test)
59
59
 
60
60
  cli.update
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.6
4
+ version: 0.1.7
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-11-08 00:00:00.000000000 Z
11
+ date: 2017-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -203,6 +203,7 @@ files:
203
203
  - ".gitignore"
204
204
  - ".ruby-version"
205
205
  - Gemfile
206
+ - LICENSE
206
207
  - README.md
207
208
  - Rakefile
208
209
  - bin/bummr
@@ -245,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
246
  version: '0'
246
247
  requirements: []
247
248
  rubyforge_project:
248
- rubygems_version: 2.6.6
249
+ rubygems_version: 2.6.10
249
250
  signing_key:
250
251
  specification_version: 4
251
252
  summary: Helper script to intelligently update your Gemfile