bundleup 0.7.0 → 0.8.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/.github/main.workflow +9 -0
- data/.github/release-drafter.yml +17 -0
- data/.rubocop.yml +11 -1
- data/.travis.yml +11 -6
- data/CHANGELOG.md +1 -66
- data/LICENSE.txt +1 -1
- data/Rakefile +93 -3
- data/bundleup.gemspec +4 -4
- data/lib/bundleup/bundle_commands.rb +1 -0
- data/lib/bundleup/cli.rb +2 -0
- data/lib/bundleup/console.rb +8 -5
- data/lib/bundleup/gem_status.rb +3 -0
- data/lib/bundleup/version.rb +1 -3
- metadata +24 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41775d894ceef821d639e5a283e9880a453695e1638ae007b707fb3b9641043f
|
4
|
+
data.tar.gz: e3f6ea14d551dbc1e561d8573579894fa21579415576ef551bfc08ae95984d9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc8901a74431a2c75ef87b334d9aad4669ee0c62df4a0c41ec24017113f8a942f7ea582b80018100c77ce1301e4f266c283bbda88590ad50f76bf44cd9fb179d
|
7
|
+
data.tar.gz: 5a09c595275237a78cb914bb7bcde07d4d7ef54340579d1c207bee88a21070b239bdfc39cbba081af946f5491f22634252133064731531b0b6c4076e429bd0a7
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name-template: "$NEXT_PATCH_VERSION"
|
2
|
+
tag-template: "v$NEXT_PATCH_VERSION"
|
3
|
+
categories:
|
4
|
+
- title: "⚠️ Breaking Changes"
|
5
|
+
label: "⚠️ Breaking"
|
6
|
+
- title: "✨ New Features"
|
7
|
+
label: "✨ Feature"
|
8
|
+
- title: "🐛 Bug Fixes"
|
9
|
+
label: "🐛 Bug Fix"
|
10
|
+
- title: "📚 Documentation"
|
11
|
+
label: "📚 Docs"
|
12
|
+
- title: "🏠 Housekeeping"
|
13
|
+
label: "🏠 Housekeeping"
|
14
|
+
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
|
15
|
+
no-changes-template: "- No changes"
|
16
|
+
template: |
|
17
|
+
$CHANGES
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
|
1
4
|
AllCops:
|
5
|
+
TargetRubyVersion: 2.4
|
2
6
|
Exclude:
|
3
7
|
- "*.gemspec"
|
4
8
|
- "vendor/**/*"
|
@@ -18,6 +22,9 @@ Metrics/ClassLength:
|
|
18
22
|
Exclude:
|
19
23
|
- "test/**/*"
|
20
24
|
|
25
|
+
Naming/MemoizedInstanceVariableName:
|
26
|
+
Enabled: false
|
27
|
+
|
21
28
|
Style/BarePercentLiterals:
|
22
29
|
EnforcedStyle: percent_q
|
23
30
|
|
@@ -30,8 +37,11 @@ Style/Documentation:
|
|
30
37
|
Style/DoubleNegation:
|
31
38
|
Enabled: false
|
32
39
|
|
40
|
+
Style/FrozenStringLiteralComment:
|
41
|
+
Enabled: false
|
42
|
+
|
33
43
|
Style/HashSyntax:
|
34
|
-
EnforcedStyle:
|
44
|
+
EnforcedStyle: ruby19
|
35
45
|
|
36
46
|
Style/StringLiterals:
|
37
47
|
EnforcedStyle: double_quotes
|
data/.travis.yml
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
+
---
|
1
2
|
sudo: false
|
2
3
|
language: ruby
|
3
4
|
cache: bundler
|
5
|
+
branches:
|
6
|
+
only:
|
7
|
+
- master
|
4
8
|
rvm:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
+
- 2.4.6
|
10
|
+
- 2.5.5
|
11
|
+
- 2.6.3
|
12
|
+
- ruby-head
|
9
13
|
before_install:
|
10
|
-
|
11
|
-
|
14
|
+
- gem update --system
|
15
|
+
- gem install bundler -v 2.0.2 --conservative --no-document
|
16
|
+
- gem install executable-hooks --conservative --no-document
|
data/CHANGELOG.md
CHANGED
@@ -1,66 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
All notable changes to this project will be documented in this file.
|
4
|
-
|
5
|
-
bundleup is in a pre-1.0 state. This means that its APIs and behavior are subject to breaking changes without deprecation notices. Until 1.0, version numbers will follow a [Semver][]-ish `0.y.z` format, where `y` is incremented when new features or breaking changes are introduced, and `z` is incremented for lesser changes or bug fixes.
|
6
|
-
|
7
|
-
## [Unreleased][]
|
8
|
-
|
9
|
-
* Your contribution here!
|
10
|
-
|
11
|
-
## [0.7.0][] (2018-12-30)
|
12
|
-
|
13
|
-
* **Drop support for Ruby < 2.3**
|
14
|
-
|
15
|
-
## [0.6.1][] (2017-11-06)
|
16
|
-
|
17
|
-
* Fix erroneous blank lines in output
|
18
|
-
|
19
|
-
## [0.6.0][] (2017-11-06)
|
20
|
-
|
21
|
-
* [#1](https://github.com/mattbrictson/bundleup/issues/1): If a Gemfile has an inline or prefix comment for a particular gem, and that gem is being held back due to a pin, then print the comment along with the pin information in bundleup's output.
|
22
|
-
|
23
|
-
## [0.5.0][] (2016-04-01)
|
24
|
-
|
25
|
-
* You can now pass command-line arguments to bundleup, which will in turn be
|
26
|
-
handed to `bundle update`. For example: `bundleup --group=development`.
|
27
|
-
* Improve the console output when a Bundler command fails.
|
28
|
-
* Fixed a bug where if a Bundler command failed to run, it would be executed a
|
29
|
-
second time.
|
30
|
-
|
31
|
-
## [0.4.0][] (2016-02-19)
|
32
|
-
|
33
|
-
* **Change the upgrade process to modify the Gemfile.lock in place, with the
|
34
|
-
option to "undo" (i.e. restore from backup) if the changes are not desired.**
|
35
|
-
This makes bundleup much faster since it doesn't have to run `bundle update`
|
36
|
-
twice.
|
37
|
-
* Fixed a bug where color was mistakenly based on the newest version of a gem,
|
38
|
-
even if a restriction prevented upgrading to that version.
|
39
|
-
|
40
|
-
## [0.3.0][] (2016-01-08)
|
41
|
-
|
42
|
-
* Always show SHA changes in red. If a dependency is tracking a
|
43
|
-
Git branch, and running `bundle update` would cause that branch
|
44
|
-
to updated and point to a new ref, that is something that
|
45
|
-
warrants attention.
|
46
|
-
|
47
|
-
## [0.2.0][] (2015-12-26)
|
48
|
-
|
49
|
-
* Animated spinner during long-running bundler commands
|
50
|
-
* Rather than run `bundle` in a temp directory, run within the current
|
51
|
-
directory, making a backup copy of Gemfile.lock. This ensures that relative
|
52
|
-
paths and `.bundle/config` are honored.
|
53
|
-
|
54
|
-
## 0.1.0 (2015-12-24)
|
55
|
-
|
56
|
-
* Initial release
|
57
|
-
|
58
|
-
[Semver]: http://semver.org
|
59
|
-
[Unreleased]: https://github.com/mattbrictson/bundleup/compare/v0.7.0...HEAD
|
60
|
-
[0.7.0]: https://github.com/mattbrictson/bundleup/compare/v0.6.1...v0.7.0
|
61
|
-
[0.6.1]: https://github.com/mattbrictson/bundleup/compare/v0.6.0...v0.6.1
|
62
|
-
[0.6.0]: https://github.com/mattbrictson/bundleup/compare/v0.5.0...v0.6.0
|
63
|
-
[0.5.0]: https://github.com/mattbrictson/bundleup/compare/v0.4.0...v0.5.0
|
64
|
-
[0.4.0]: https://github.com/mattbrictson/bundleup/compare/v0.3.0...v0.4.0
|
65
|
-
[0.3.0]: https://github.com/mattbrictson/bundleup/compare/v0.2.0...v0.3.0
|
66
|
-
[0.2.0]: https://github.com/mattbrictson/bundleup/compare/v0.1.0...v0.2.0
|
1
|
+
Release notes for this project are kept here: https://github.com/mattbrictson/bundleup/releases
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require "chandler/tasks"
|
3
2
|
require "rake/testtask"
|
4
3
|
require "rubocop/rake_task"
|
5
4
|
|
@@ -11,5 +10,96 @@ end
|
|
11
10
|
|
12
11
|
RuboCop::RakeTask.new
|
13
12
|
|
14
|
-
task
|
15
|
-
|
13
|
+
task default: %i[test rubocop]
|
14
|
+
|
15
|
+
Rake::Task["release"].enhance do
|
16
|
+
puts "Don't forget to publish the release on GitHub!"
|
17
|
+
system "open https://github.com/mattbrictson/bundleup/releases"
|
18
|
+
end
|
19
|
+
|
20
|
+
task bump: %w[bump:bundler bump:ruby bump:year]
|
21
|
+
|
22
|
+
namespace :bump do
|
23
|
+
task :bundler do
|
24
|
+
version = Gemfile.bundler_version
|
25
|
+
replace_in_file ".travis.yml", /bundler -v (\S+)/ => version
|
26
|
+
end
|
27
|
+
|
28
|
+
task :ruby do
|
29
|
+
lowest = RubyVersions.lowest_supported
|
30
|
+
lowest_minor = RubyVersions.lowest_supported_minor
|
31
|
+
|
32
|
+
replace_in_file "bundleup.gemspec", /ruby_version = ">= (.*)"/ => lowest
|
33
|
+
replace_in_file ".rubocop.yml", /TargetRubyVersion: (.*)/ => lowest_minor
|
34
|
+
|
35
|
+
travis = YAML.safe_load(open(".travis.yml"))
|
36
|
+
travis["rvm"] = RubyVersions.latest_supported_patches + ["ruby-head"]
|
37
|
+
IO.write(".travis.yml", YAML.dump(travis))
|
38
|
+
end
|
39
|
+
|
40
|
+
task :year do
|
41
|
+
replace_in_file "LICENSE.txt", /\(c\) (\d+)/ => Date.today.year.to_s
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
require "date"
|
46
|
+
require "open-uri"
|
47
|
+
require "yaml"
|
48
|
+
|
49
|
+
def replace_in_file(path, replacements)
|
50
|
+
contents = IO.read(path)
|
51
|
+
orig_contents = contents.dup
|
52
|
+
replacements.each do |regexp, text|
|
53
|
+
contents.gsub!(regexp) do |match|
|
54
|
+
match[regexp, 1] = text
|
55
|
+
match
|
56
|
+
end
|
57
|
+
end
|
58
|
+
IO.write(path, contents) if contents != orig_contents
|
59
|
+
end
|
60
|
+
|
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
|
+
module RubyVersions
|
76
|
+
class << self
|
77
|
+
def lowest_supported
|
78
|
+
"#{lowest_supported_minor}.0"
|
79
|
+
end
|
80
|
+
|
81
|
+
def lowest_supported_minor
|
82
|
+
latest_supported_patches.first[/\d+\.\d+/]
|
83
|
+
end
|
84
|
+
|
85
|
+
def latest
|
86
|
+
latest_supported_patches.last
|
87
|
+
end
|
88
|
+
|
89
|
+
def latest_supported_patches
|
90
|
+
patches = [versions[:stable], versions[:security_maintenance]].flatten
|
91
|
+
patches.map(&Gem::Version.method(:new)).sort.map(&:to_s)
|
92
|
+
end
|
93
|
+
|
94
|
+
private
|
95
|
+
|
96
|
+
def versions
|
97
|
+
@_versions ||= begin
|
98
|
+
yaml = open(
|
99
|
+
"https://raw.githubusercontent.com/ruby/www.ruby-lang.org/master/_data/downloads.yml"
|
100
|
+
)
|
101
|
+
YAML.safe_load(yaml, symbolize_names: true)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/bundleup.gemspec
CHANGED
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.required_ruby_version = ">= 2.
|
22
|
+
spec.required_ruby_version = ">= 2.4.0"
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~>
|
25
|
-
spec.add_development_dependency "chandler"
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
26
25
|
spec.add_development_dependency "coveralls", "~> 0.8.19"
|
27
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
28
27
|
spec.add_development_dependency "minitest-reporters", "~> 1.1"
|
29
28
|
spec.add_development_dependency "rake", "~> 12.0"
|
30
|
-
spec.add_development_dependency "rubocop", "0.
|
29
|
+
spec.add_development_dependency "rubocop", "0.71.0"
|
30
|
+
spec.add_development_dependency "rubocop-performance", "1.4.0"
|
31
31
|
end
|
data/lib/bundleup/cli.rb
CHANGED
@@ -28,6 +28,7 @@ module Bundleup
|
|
28
28
|
|
29
29
|
def review_pins
|
30
30
|
return if pins.empty?
|
31
|
+
|
31
32
|
puts "\nNote that the following gem(s) are being held back:\n\n"
|
32
33
|
print_pins_table
|
33
34
|
end
|
@@ -39,6 +40,7 @@ module Bundleup
|
|
39
40
|
def restore_lockfile
|
40
41
|
return unless defined?(@upgrade)
|
41
42
|
return unless upgrade.lockfile_changed?
|
43
|
+
|
42
44
|
upgrade.undo
|
43
45
|
puts "Your original Gemfile.lock has been restored."
|
44
46
|
end
|
data/lib/bundleup/console.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Bundleup
|
2
2
|
module Console
|
3
3
|
ANSI_CODES = {
|
4
|
-
:
|
5
|
-
:
|
6
|
-
:
|
7
|
-
:
|
8
|
-
:
|
4
|
+
red: 31,
|
5
|
+
green: 32,
|
6
|
+
yellow: 33,
|
7
|
+
blue: 34,
|
8
|
+
gray: 90
|
9
9
|
}.freeze
|
10
10
|
|
11
11
|
def ok(message)
|
@@ -19,6 +19,7 @@ module Bundleup
|
|
19
19
|
def color(color_name, message)
|
20
20
|
code = ANSI_CODES[color_name]
|
21
21
|
return message if code.nil?
|
22
|
+
|
22
23
|
"\e[0;#{code};49m#{message}\e[0m"
|
23
24
|
end
|
24
25
|
|
@@ -80,6 +81,7 @@ module Bundleup
|
|
80
81
|
wait_for_exit(thread, initial_wait)
|
81
82
|
loop do
|
82
83
|
break if wait_for_exit(thread, periodic_wait)
|
84
|
+
|
83
85
|
yield
|
84
86
|
end
|
85
87
|
thread.value
|
@@ -90,6 +92,7 @@ module Bundleup
|
|
90
92
|
rescue StandardError
|
91
93
|
# Sanity check. If we get an exception, the thread should be dead.
|
92
94
|
raise if thread.alive?
|
95
|
+
|
93
96
|
thread
|
94
97
|
end
|
95
98
|
end
|
data/lib/bundleup/gem_status.rb
CHANGED
@@ -35,11 +35,13 @@ module Bundleup
|
|
35
35
|
|
36
36
|
def major_upgrade?
|
37
37
|
return false if new_version.nil? || old_version.nil?
|
38
|
+
|
38
39
|
major(new_version) != major(old_version)
|
39
40
|
end
|
40
41
|
|
41
42
|
def minor_upgrade?
|
42
43
|
return false if new_version.nil? || old_version.nil?
|
44
|
+
|
43
45
|
!major_upgrade? && minor(new_version) != minor(old_version)
|
44
46
|
end
|
45
47
|
|
@@ -54,3 +56,4 @@ module Bundleup
|
|
54
56
|
end
|
55
57
|
end
|
56
58
|
end
|
59
|
+
# rubocop:enable Metrics/BlockLength
|
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: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: chandler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
26
|
+
version: '2.0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: coveralls
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +86,28 @@ dependencies:
|
|
100
86
|
requirements:
|
101
87
|
- - '='
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
89
|
+
version: 0.71.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.71.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-performance
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.4.0
|
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:
|
110
|
+
version: 1.4.0
|
111
111
|
description:
|
112
112
|
email:
|
113
113
|
- bundleup@mattbrictson.com
|
@@ -116,6 +116,8 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".github/main.workflow"
|
120
|
+
- ".github/release-drafter.yml"
|
119
121
|
- ".gitignore"
|
120
122
|
- ".rubocop.yml"
|
121
123
|
- ".travis.yml"
|
@@ -151,14 +153,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
153
|
requirements:
|
152
154
|
- - ">="
|
153
155
|
- !ruby/object:Gem::Version
|
154
|
-
version: 2.
|
156
|
+
version: 2.4.0
|
155
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
158
|
requirements:
|
157
159
|
- - ">="
|
158
160
|
- !ruby/object:Gem::Version
|
159
161
|
version: '0'
|
160
162
|
requirements: []
|
161
|
-
rubygems_version: 3.0.
|
163
|
+
rubygems_version: 3.0.4
|
162
164
|
signing_key:
|
163
165
|
specification_version: 4
|
164
166
|
summary: A friendlier command-line interface for Bundler’s `update` and `outdated`
|