bummr 1.0.0 → 1.1.0
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/Gemfile.lock +1 -1
- data/README.md +9 -8
- data/lib/bummr/cli.rb +1 -1
- data/lib/bummr/remover.rb +1 -1
- data/lib/bummr/updater.rb +6 -5
- data/lib/bummr/version.rb +1 -1
- data/spec/check_spec.rb +3 -3
- data/spec/lib/updater_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6eba01b649b2d2a467eebcc14c7c81040b8c6038c4a0f798fc740688fbb1fb6
|
4
|
+
data.tar.gz: 390435ebf0c5efb38bd355748afd84758912c72cc6a43e88f6cf7c0c2befec52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8315fefc4d58a5bef3ebabe084886c975a967e9bf38d4b9d48105d83ee01ce34065dfed54f725487343b8752128a1c1c2c452c982ff497e1c9befb46c59f64b7
|
7
|
+
data.tar.gz: dabf3ccfd52d3e927335fe591188d7512092dca5de2bec188c20b28c77d52a9b709241ac8dd8f2b4e9e5fbb33b82586eea41de311c61f8c3381df3571ab58f42
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Bummr
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/lpender/bummr)
|
4
3
|
[](https://codeclimate.com/github/lpender/bummr)
|
5
4
|
[](https://codeclimate.com/github/lpender/bummr/test_coverage)
|
6
5
|
|
@@ -14,7 +13,7 @@ build in separate commits, and logs the name and sha of each gem that fails.
|
|
14
13
|
|
15
14
|
Bummr assumes you have good test coverage and follow a [pull-request workflow].
|
16
15
|
|
17
|
-
By default, bummr will assume your base branch is named `
|
16
|
+
By default, bummr will assume your base branch is named `main`. If you would
|
18
17
|
like to designate a different base branch, you can set the `BASE_BRANCH`
|
19
18
|
environment variable: `export BASE_BRANCH='main'`
|
20
19
|
|
@@ -50,7 +49,7 @@ on the number of outdated gems you have and the number of tests in your test
|
|
50
49
|
suite.
|
51
50
|
|
52
51
|
For the purpose of these instructions, we are assuming that your base branch is
|
53
|
-
`
|
52
|
+
`main`. If you would like to specify a different base branch, see the
|
54
53
|
instructions in the Installation section of this README.
|
55
54
|
|
56
55
|
- After installing, create a new, clean branch off of your main branch.
|
@@ -81,7 +80,7 @@ instructions in the Installation section of this README.
|
|
81
80
|
Update gemname from 0.0.1 to 0.0.2
|
82
81
|
```
|
83
82
|
|
84
|
-
- Runs `git rebase -i
|
83
|
+
- Runs `git rebase -i main` to allow you the chance to review and make changes.
|
85
84
|
- Runs `bummr test`
|
86
85
|
|
87
86
|
##### `bummr test`
|
@@ -91,7 +90,7 @@ Update gemname from 0.0.1 to 0.0.2
|
|
91
90
|
|
92
91
|
##### `bummr bisect`
|
93
92
|
|
94
|
-
- `git bisect`s against
|
93
|
+
- `git bisect`s against main.
|
95
94
|
- Upon finding the bad commit, runs `git bisect reset` and notifies the developer on
|
96
95
|
how best to proceed.
|
97
96
|
- Logs the bad commit in `log/bummr.log`.
|
@@ -99,7 +98,7 @@ Update gemname from 0.0.1 to 0.0.2
|
|
99
98
|
## Notes
|
100
99
|
|
101
100
|
- Bummr assumes you have good test coverage and follow a [pull-request workflow]
|
102
|
-
with `
|
101
|
+
with `main` as your default branch.
|
103
102
|
- Once the build passes, you can push your branch and create a pull-request!
|
104
103
|
- You may wish to `tail -f log/bummr.log` in a separate terminal window so you
|
105
104
|
can see which commits are being removed.
|
@@ -114,11 +113,13 @@ Set version in `lib/bummr/version.rb`
|
|
114
113
|
|
115
114
|
`rake build` to build locally
|
116
115
|
|
117
|
-
`gem install --local
|
118
|
-
|
116
|
+
`gem install --local ./pkg/bummr-X.X.X.gem` with the ruby version of the app
|
117
|
+
you'd like to use it with.
|
119
118
|
|
120
119
|
`rake` will run the suite of unit tests.
|
121
120
|
|
121
|
+
`gem push ./pkg/bummr-x.x.x.gem` to publish new versions.
|
122
|
+
|
122
123
|
The suite relies on Oliver Peate's [jet
|
123
124
|
black](https://github.com/odlp/jet_black) testing library for command line feature
|
124
125
|
tests.
|
data/lib/bummr/cli.rb
CHANGED
data/lib/bummr/remover.rb
CHANGED
@@ -15,7 +15,7 @@ module Bummr
|
|
15
15
|
"Please do one of the following: \n\n" +
|
16
16
|
" 1. Update your code to work with the latest version of this gem.\n\n" +
|
17
17
|
" 2. Perform the following steps to lock the gem version:\n\n" +
|
18
|
-
" - `git reset --hard
|
18
|
+
" - `git reset --hard main`\n" +
|
19
19
|
" - Lock the version of this Gem in your Gemfile.\n" +
|
20
20
|
" - Commit the changes.\n" +
|
21
21
|
" - Run `bummr update` again.\n\n"
|
data/lib/bummr/updater.rb
CHANGED
@@ -16,15 +16,15 @@ module Bummr
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def update_gem(gem, index)
|
19
|
-
puts "Updating #{gem[:name]}: #{index+1} of #{@outdated_gems.count}"
|
19
|
+
puts "Updating #{gem[:name]}: #{index + 1} of #{@outdated_gems.count}"
|
20
20
|
system("bundle update #{gem[:name]}")
|
21
21
|
|
22
22
|
updated_version = updated_version_for(gem)
|
23
23
|
|
24
|
-
if
|
25
|
-
|
24
|
+
message = if updated_version
|
25
|
+
"Update #{gem[:name]} from #{gem[:installed]} to #{updated_version}"
|
26
26
|
else
|
27
|
-
|
27
|
+
"Update dependencies for #{gem[:name]}"
|
28
28
|
end
|
29
29
|
|
30
30
|
if gem[:installed] == updated_version
|
@@ -43,7 +43,8 @@ module Bummr
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def updated_version_for(gem)
|
46
|
-
`bundle list | grep "
|
46
|
+
string = `bundle list --paths | grep "#{gem[:name]}"`
|
47
|
+
string.match(/#{gem[:name]}-(.*)$/)[1]
|
47
48
|
end
|
48
49
|
end
|
49
50
|
end
|
data/lib/bummr/version.rb
CHANGED
data/spec/check_spec.rb
CHANGED
@@ -41,7 +41,7 @@ describe Bummr::Check do
|
|
41
41
|
allow(check)
|
42
42
|
.to receive(:check_base_branch).and_call_original
|
43
43
|
allow(check).to receive(:`).with('git rev-parse --abbrev-ref HEAD')
|
44
|
-
.and_return "
|
44
|
+
.and_return "main\n"
|
45
45
|
|
46
46
|
check.check
|
47
47
|
|
@@ -108,7 +108,7 @@ describe Bummr::Check do
|
|
108
108
|
context "check_diff fails" do
|
109
109
|
before do
|
110
110
|
allow(check).to receive(:check_diff).and_call_original
|
111
|
-
allow(check).to receive(:`).with('git diff
|
111
|
+
allow(check).to receive(:`).with('git diff main')
|
112
112
|
.and_return "+ file"
|
113
113
|
end
|
114
114
|
|
@@ -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
|
119
|
+
.with("Please make sure that `git diff main` 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/updater_spec.rb
CHANGED
@@ -124,8 +124,8 @@ describe Bummr::Updater do
|
|
124
124
|
describe "#updated_version_for" do
|
125
125
|
it "returns the correct version from bundle list" do
|
126
126
|
allow(updater).to receive(:`).with(
|
127
|
-
"bundle list | grep \"
|
128
|
-
).and_return("
|
127
|
+
"bundle list --paths | grep \"#{gem[:name]}\""
|
128
|
+
).and_return("asdf/asdf/asdf/#{gem[:name]}-3.5.2")
|
129
129
|
|
130
130
|
expect(updater.updated_version_for(gem)).to eq "3.5.2"
|
131
131
|
end
|
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: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Pender
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|