bundle-diff 1.2.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +9 -0
- data/README.md +5 -0
- data/bundle-diff.gemspec +3 -3
- data/lib/bundler/diff/tool.rb +14 -23
- data/lib/bundler/diff.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b09c7445e1ef55db65f070b4c99fcc9aa1e8c0bd6d4571da2edb1eeb473d3b3f
|
4
|
+
data.tar.gz: 29106fd34b53909b41d8a9e2419cae0c8453ebe99605827d557d791cbb0bdc76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74bcf27d8ca455f0033650dcbe2285d06171c71959189a1eb8387aafd7e344d973c19ccb1a3d457c1ba34facf70c5b833dfc5137784b4d23a1bf0fb63cd8e911
|
7
|
+
data.tar.gz: e252edcc68e479b3f8b2c371b20f9685e36e97c87b39fb9be67f77e2f94c1e9d52ec897c3694513c495084fa92c8b683dc730d57e0397bd57f3721cbb17acb77
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -13,3 +13,8 @@ Bundler plugin for showing diffs of bundled gems against latest versions.
|
|
13
13
|
$ bundle diff GEMNAME
|
14
14
|
|
15
15
|
Tip: use `bundle outdated` to list installed gems with with newer versions available.
|
16
|
+
|
17
|
+
You can also specify the version of the gem to diff against:
|
18
|
+
|
19
|
+
$ bundle diff GEMNAME --version 1.2.3
|
20
|
+
|
data/bundle-diff.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'bundle-diff'
|
3
|
-
s.version = '
|
3
|
+
s.version = '2.0.0'
|
4
4
|
s.license = 'GPL-3.0'
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = ['Tim Craft']
|
7
|
-
s.email = ['
|
7
|
+
s.email = ['email@timcraft.com']
|
8
8
|
s.homepage = 'https://github.com/readysteady/bundle-diff'
|
9
9
|
s.description = 'Bundler plugin for showing diffs of bundled gems against latest versions'
|
10
10
|
s.summary = 'See description'
|
11
11
|
s.files = Dir.glob('lib/**/*.rb') + %w[CHANGES.md LICENSE.txt README.md bundle-diff.gemspec]
|
12
|
-
s.required_ruby_version = '>=
|
12
|
+
s.required_ruby_version = '>= 3.0.0'
|
13
13
|
s.add_dependency('bundler', '>= 1.0', '< 3.0')
|
14
14
|
s.require_path = 'lib'
|
15
15
|
s.executables = ['bundler-diff']
|
data/lib/bundler/diff/tool.rb
CHANGED
@@ -31,26 +31,28 @@ class Bundler::Diff::Tool
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def diff(a_path, b_path)
|
34
|
-
null = '/dev/null'
|
35
|
-
|
36
34
|
command = ['diff -u']
|
37
35
|
|
38
36
|
command_for_output = ['diff']
|
39
37
|
|
40
38
|
if a_path
|
41
|
-
|
42
|
-
|
39
|
+
a_label = a_output_dir.join(a_path)
|
40
|
+
|
41
|
+
command.concat [a_dir.join(a_path), '--label', a_label]
|
42
|
+
command_for_output << a_label
|
43
43
|
else
|
44
|
-
command
|
45
|
-
command_for_output << null
|
44
|
+
command.concat ['/dev/null', '--label', '/dev/null']
|
45
|
+
command_for_output << '/dev/null'
|
46
46
|
end
|
47
47
|
|
48
48
|
if b_path
|
49
|
-
|
50
|
-
|
49
|
+
b_label = b_output_dir.join(b_path)
|
50
|
+
|
51
|
+
command.concat [b_dir.join(b_path), '--label', b_label]
|
52
|
+
command_for_output << b_label
|
51
53
|
else
|
52
|
-
command << null
|
53
|
-
command_for_output << null
|
54
|
+
command << ['/dev/null', '--label', '/dev/null']
|
55
|
+
command_for_output << '/dev/null'
|
54
56
|
end
|
55
57
|
|
56
58
|
output = `#{command.join(' ')}`
|
@@ -63,19 +65,8 @@ class Bundler::Diff::Tool
|
|
63
65
|
|
64
66
|
private
|
65
67
|
|
66
|
-
if Pathname.instance_methods.include?(:glob) # Ruby 2.5+
|
67
|
-
def glob(pathname)
|
68
|
-
pathname.glob('**/*')
|
69
|
-
end
|
70
|
-
else
|
71
|
-
def glob(pathname)
|
72
|
-
Dir.glob(File.join(pathname.to_s, '**', '*')).map { |path| Pathname(path) }
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
68
|
def file_list(dir_path)
|
77
|
-
glob(
|
78
|
-
|
79
|
-
}.reject { |path| path.to_s.start_with?('ext/') }
|
69
|
+
paths = dir_path.glob('**/*').select(&:file?).map { |path| path.relative_path_from(dir_path) }
|
70
|
+
paths.reject { |path| path.to_s.start_with?('ext/') }
|
80
71
|
end
|
81
72
|
end
|
data/lib/bundler/diff.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle-diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Craft
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '3.0'
|
33
33
|
description: Bundler plugin for showing diffs of bundled gems against latest versions
|
34
34
|
email:
|
35
|
-
-
|
35
|
+
- email@timcraft.com
|
36
36
|
executables:
|
37
37
|
- bundler-diff
|
38
38
|
extensions: []
|
@@ -58,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.0.0
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.5.22
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: See description
|