bundleup 0.8.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +14 -0
- data/.gitignore +0 -1
- data/.rubocop.yml +3 -4
- data/.travis.yml +5 -7
- data/LICENSE.txt +1 -1
- data/README.md +17 -17
- data/Rakefile +4 -16
- data/bundleup.gemspec +14 -5
- data/lib/bundleup.rb +1 -0
- data/lib/bundleup/bundle_commands.rb +2 -2
- data/lib/bundleup/outdated_parser.rb +17 -0
- data/lib/bundleup/upgrade.rb +4 -5
- data/lib/bundleup/version.rb +1 -1
- metadata +34 -28
- data/.github/main.workflow +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d18c6d9e39ccd56bb47b656745a19d022981a7a8c735a277eb2a782b106df8
|
4
|
+
data.tar.gz: 787cba0d2ec134b82de3dbae1819f609ebd55c98bfbdbc9fe58609eb35e861ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efcf4a177c7dc9b7e774b6f800f811abf6351d5e884858d9d4d2e626dddb28c2d09164485812032b61a8c15161ff809891b1a918c574ab63c46c57e96fe28108
|
7
|
+
data.tar.gz: 2bd482d805cf7f0e0c340d1c5e0c5bf0e12c018e5055533481aa882b792f9fa342ca70fbd57f6b51f13ec21b113bca9f98919b51f8867fb796f91492e35de14c
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require:
|
2
|
+
- rubocop-minitest
|
2
3
|
- rubocop-performance
|
3
4
|
|
4
5
|
AllCops:
|
5
|
-
|
6
|
+
NewCops: enable
|
7
|
+
TargetRubyVersion: 2.5
|
6
8
|
Exclude:
|
7
9
|
- "*.gemspec"
|
8
10
|
- "vendor/**/*"
|
@@ -40,8 +42,5 @@ Style/DoubleNegation:
|
|
40
42
|
Style/FrozenStringLiteralComment:
|
41
43
|
Enabled: false
|
42
44
|
|
43
|
-
Style/HashSyntax:
|
44
|
-
EnforcedStyle: ruby19
|
45
|
-
|
46
45
|
Style/StringLiterals:
|
47
46
|
EnforcedStyle: double_quotes
|
data/.travis.yml
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
---
|
2
|
-
sudo: false
|
3
2
|
language: ruby
|
4
3
|
cache: bundler
|
5
4
|
branches:
|
6
5
|
only:
|
7
|
-
-
|
6
|
+
- main
|
8
7
|
rvm:
|
9
|
-
- 2.
|
10
|
-
- 2.
|
11
|
-
- 2.
|
8
|
+
- 2.5.8
|
9
|
+
- 2.6.6
|
10
|
+
- 2.7.1
|
12
11
|
- ruby-head
|
13
12
|
before_install:
|
14
|
-
- gem
|
15
|
-
- gem install bundler -v 2.0.2 --conservative --no-document
|
13
|
+
- gem install bundler -v 2.1.4 --conservative --no-document
|
16
14
|
- gem install executable-hooks --conservative --no-document
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,22 +1,25 @@
|
|
1
1
|
# bundleup
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/bundleup.svg)](http://badge.fury.io/rb/bundleup)
|
4
|
-
[![Build Status](https://travis-ci.org/mattbrictson/bundleup.svg?branch=
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/mattbrictson/bundleup/badge.svg?branch=master&service=github)](https://coveralls.io/github/mattbrictson/bundleup?branch=master)
|
4
|
+
[![Build Status](https://travis-ci.org/mattbrictson/bundleup.svg?branch=main)](https://travis-ci.org/mattbrictson/bundleup)
|
6
5
|
|
7
6
|
**Run `bundleup` on a Ruby project containing a Gemfile to see what gem dependencies need updating.** It is a friendlier command-line interface to [Bundler’s][bundler] `bundle update` and `bundle outdated`.
|
8
7
|
|
9
8
|
You might like bundleup because it:
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
- shows you exactly what gems will be updated lets you decide whether to proceed
|
11
|
+
- uses color to call your attention to important gem updates (based on [Semver][])
|
12
|
+
- lets you know when a version "pin" in your Gemfile is preventing an update
|
13
|
+
- relies on standard Bundler output and does not patch code or use Bundler internals
|
15
14
|
|
16
15
|
Here it is in action:
|
17
16
|
|
18
|
-
<img src="https://raw.github.com/mattbrictson/bundleup/
|
17
|
+
<img src="https://raw.github.com/mattbrictson/bundleup/main/sample.png" width="599" height="553" alt="Sample output">
|
19
18
|
|
19
|
+
## Requirements
|
20
|
+
|
21
|
+
- Bundler 1.16 or later
|
22
|
+
- Ruby 2.5 or later
|
20
23
|
|
21
24
|
## Usage
|
22
25
|
|
@@ -43,29 +46,26 @@ bundleup --group=development
|
|
43
46
|
|
44
47
|
## How it works
|
45
48
|
|
46
|
-
bundleup starts by making a backup copy of your Gemfile.lock. Next it runs `bundle
|
49
|
+
bundleup starts by making a backup copy of your Gemfile.lock. Next it runs `bundle list`, then `bundle update` and `bundle list` again to find what gems versions are being used before and after Bundler does its updating magic. (Since gems are actually being installed into your Ruby environment during these steps, the process may take a few moments to complete, especially if gems with native extensions need to be compiled.)
|
47
50
|
|
48
|
-
Finally, bundleup runs `bundle outdated` to see the gems that were
|
51
|
+
Finally, bundleup runs `bundle outdated` to see the gems that were _not_ updated due to Gemfile restrictions.
|
49
52
|
|
50
53
|
After displaying its findings, bundleup gives you the option of keeping the changes. If you answer "no", bundleup will restore your original Gemfile.lock from its backup, leaving your project untouched.
|
51
54
|
|
52
|
-
|
53
55
|
## Roadmap
|
54
56
|
|
55
57
|
bundleup is a very simple script at this point, but it could be more. Some possibilities:
|
56
58
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
59
|
+
- Automatically commit the Gemfile.lock changes with a nice commit message
|
60
|
+
- Integrate with bundler-audit to mark upgrades that have important security fixes
|
61
|
+
- Display relevant CHANGELOG entries for major upgrades
|
62
|
+
- Non-interactive mode
|
61
63
|
|
62
64
|
If you have other ideas, open an issue on GitHub!
|
63
65
|
|
64
|
-
|
65
66
|
## Contributing
|
66
67
|
|
67
68
|
Code contributions are also welcome! Read [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
|
68
69
|
|
69
|
-
|
70
70
|
[bundler]: http://bundler.io
|
71
|
-
[
|
71
|
+
[semver]: http://semver.org
|
data/Rakefile
CHANGED
@@ -21,8 +21,9 @@ task bump: %w[bump:bundler bump:ruby bump:year]
|
|
21
21
|
|
22
22
|
namespace :bump do
|
23
23
|
task :bundler do
|
24
|
-
version =
|
24
|
+
version = Gem.latest_version_for("bundler").to_s
|
25
25
|
replace_in_file ".travis.yml", /bundler -v (\S+)/ => version
|
26
|
+
replace_in_file "Gemfile.lock", /^BUNDLED WITH\n\s+([\d.]+)$/ => version
|
26
27
|
end
|
27
28
|
|
28
29
|
task :ruby do
|
@@ -31,6 +32,7 @@ namespace :bump do
|
|
31
32
|
|
32
33
|
replace_in_file "bundleup.gemspec", /ruby_version = ">= (.*)"/ => lowest
|
33
34
|
replace_in_file ".rubocop.yml", /TargetRubyVersion: (.*)/ => lowest_minor
|
35
|
+
replace_in_file "README.md", /Ruby (\d+\.\d+)/ => lowest_minor
|
34
36
|
|
35
37
|
travis = YAML.safe_load(open(".travis.yml"))
|
36
38
|
travis["rvm"] = RubyVersions.latest_supported_patches + ["ruby-head"]
|
@@ -58,20 +60,6 @@ def replace_in_file(path, replacements)
|
|
58
60
|
IO.write(path, contents) if contents != orig_contents
|
59
61
|
end
|
60
62
|
|
61
|
-
module Gemfile
|
62
|
-
class << self
|
63
|
-
def bundler_version
|
64
|
-
lock_file[/BUNDLED WITH\n (\S+)$/, 1]
|
65
|
-
end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
def lock_file
|
70
|
-
@_lock_file ||= IO.read("Gemfile.lock")
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
63
|
module RubyVersions
|
76
64
|
class << self
|
77
65
|
def lowest_supported
|
@@ -95,7 +83,7 @@ module RubyVersions
|
|
95
83
|
|
96
84
|
def versions
|
97
85
|
@_versions ||= begin
|
98
|
-
yaml = open(
|
86
|
+
yaml = URI.open(
|
99
87
|
"https://raw.githubusercontent.com/ruby/www.ruby-lang.org/master/_data/downloads.yml"
|
100
88
|
)
|
101
89
|
YAML.safe_load(yaml, symbolize_names: true)
|
data/bundleup.gemspec
CHANGED
@@ -11,6 +11,15 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = "A friendlier command-line interface for Bundler’s "\
|
13
13
|
"`update` and `outdated` commands."
|
14
|
+
spec.description = "Use `bundleup` whenever you want to update the "\
|
15
|
+
"locked Gemfile dependencies of a Ruby project. It "\
|
16
|
+
"shows exactly what gems will be updated with color "\
|
17
|
+
"output that calls attention to significant semver "\
|
18
|
+
"changes. Bundleup will also let you know when a "\
|
19
|
+
'version "pin" in your Gemfile is preventing an '\
|
20
|
+
"update. Bundleup is a standalone tool that leverages "\
|
21
|
+
"standard Bundler output and does not patch code or "\
|
22
|
+
"use Bundler internals."
|
14
23
|
spec.homepage = "https://github.com/mattbrictson/bundleup"
|
15
24
|
spec.license = "MIT"
|
16
25
|
|
@@ -19,13 +28,13 @@ Gem::Specification.new do |spec|
|
|
19
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
29
|
spec.require_paths = ["lib"]
|
21
30
|
|
22
|
-
spec.required_ruby_version = ">= 2.
|
31
|
+
spec.required_ruby_version = ">= 2.5.0"
|
23
32
|
|
24
33
|
spec.add_development_dependency "bundler", "~> 2.0"
|
25
|
-
spec.add_development_dependency "coveralls", "~> 0.8.19"
|
26
34
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
35
|
spec.add_development_dependency "minitest-reporters", "~> 1.1"
|
28
|
-
spec.add_development_dependency "rake", "~>
|
29
|
-
spec.add_development_dependency "rubocop", "0.
|
30
|
-
spec.add_development_dependency "rubocop-
|
36
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
37
|
+
spec.add_development_dependency "rubocop", "0.86.0"
|
38
|
+
spec.add_development_dependency "rubocop-minitest", "0.9.0"
|
39
|
+
spec.add_development_dependency "rubocop-performance", "1.6.1"
|
31
40
|
end
|
data/lib/bundleup.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module Bundleup
|
2
|
+
module OutdatedParser
|
3
|
+
def self.parse(output)
|
4
|
+
expr = if output.match?(/^Gem\s+Current\s+Latest/)
|
5
|
+
# Bundler >= 2.2 format
|
6
|
+
/^(\S+)\s\s+\S+\s\s+(\d\S+)\s\s+(\S.*?)(?:$|\s\s)/
|
7
|
+
else
|
8
|
+
# Bundler < 2.2
|
9
|
+
/\* (\S+) \(newest (\S+),.* requested (.*)\)/
|
10
|
+
end
|
11
|
+
|
12
|
+
output.scan(expr).map do |name, newest, pin|
|
13
|
+
{ name: name, newest: newest, pin: pin }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/bundleup/upgrade.rb
CHANGED
@@ -40,15 +40,14 @@ module Bundleup
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def find_pinned_versions
|
43
|
-
|
44
|
-
|
45
|
-
gem_status(name).
|
46
|
-
gem_status(name).pin = pin
|
43
|
+
OutdatedParser.parse(commands.outdated).each do |gem|
|
44
|
+
gem_status(gem[:name]).newest_version = gem[:newest]
|
45
|
+
gem_status(gem[:name]).pin = gem[:pin]
|
47
46
|
end
|
48
47
|
end
|
49
48
|
|
50
49
|
def find_versions(type)
|
51
|
-
commands.
|
50
|
+
commands.list.scan(/\* (\S+) \((\S+)(?: (\S+))?\)/) do |name, ver, sha|
|
52
51
|
gem_status(name).public_send("#{type}_version=", sha || ver)
|
53
52
|
end
|
54
53
|
end
|
data/lib/bundleup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundleup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,90 +25,95 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
33
|
+
version: '5.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0
|
40
|
+
version: '5.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
42
|
+
name: minitest-reporters
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.86.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.86.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
84
|
+
name: rubocop-minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.9.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.9.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop-performance
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.6.1
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
111
|
-
description:
|
110
|
+
version: 1.6.1
|
111
|
+
description: Use `bundleup` whenever you want to update the locked Gemfile dependencies
|
112
|
+
of a Ruby project. It shows exactly what gems will be updated with color output
|
113
|
+
that calls attention to significant semver changes. Bundleup will also let you know
|
114
|
+
when a version "pin" in your Gemfile is preventing an update. Bundleup is a standalone
|
115
|
+
tool that leverages standard Bundler output and does not patch code or use Bundler
|
116
|
+
internals.
|
112
117
|
email:
|
113
118
|
- bundleup@mattbrictson.com
|
114
119
|
executables:
|
@@ -116,8 +121,8 @@ executables:
|
|
116
121
|
extensions: []
|
117
122
|
extra_rdoc_files: []
|
118
123
|
files:
|
119
|
-
- ".github/main.workflow"
|
120
124
|
- ".github/release-drafter.yml"
|
125
|
+
- ".github/workflows/push.yml"
|
121
126
|
- ".gitignore"
|
122
127
|
- ".rubocop.yml"
|
123
128
|
- ".travis.yml"
|
@@ -138,6 +143,7 @@ files:
|
|
138
143
|
- lib/bundleup/console.rb
|
139
144
|
- lib/bundleup/gem_status.rb
|
140
145
|
- lib/bundleup/gemfile.rb
|
146
|
+
- lib/bundleup/outdated_parser.rb
|
141
147
|
- lib/bundleup/upgrade.rb
|
142
148
|
- lib/bundleup/version.rb
|
143
149
|
- sample.png
|
@@ -145,7 +151,7 @@ homepage: https://github.com/mattbrictson/bundleup
|
|
145
151
|
licenses:
|
146
152
|
- MIT
|
147
153
|
metadata: {}
|
148
|
-
post_install_message:
|
154
|
+
post_install_message:
|
149
155
|
rdoc_options: []
|
150
156
|
require_paths:
|
151
157
|
- lib
|
@@ -153,15 +159,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
153
159
|
requirements:
|
154
160
|
- - ">="
|
155
161
|
- !ruby/object:Gem::Version
|
156
|
-
version: 2.
|
162
|
+
version: 2.5.0
|
157
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
164
|
requirements:
|
159
165
|
- - ">="
|
160
166
|
- !ruby/object:Gem::Version
|
161
167
|
version: '0'
|
162
168
|
requirements: []
|
163
|
-
rubygems_version: 3.
|
164
|
-
signing_key:
|
169
|
+
rubygems_version: 3.1.4
|
170
|
+
signing_key:
|
165
171
|
specification_version: 4
|
166
172
|
summary: A friendlier command-line interface for Bundler’s `update` and `outdated`
|
167
173
|
commands.
|