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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b93f18c4e3bd1b48f80fe132fceed9bd1ebd68ece90ce7d2ea85887186bb31a1
4
- data.tar.gz: 9d048cbc9595c38ac6b6a821c845e95869ba5641b1550ad7c3eadd29e31f09f4
3
+ metadata.gz: b09c7445e1ef55db65f070b4c99fcc9aa1e8c0bd6d4571da2edb1eeb473d3b3f
4
+ data.tar.gz: 29106fd34b53909b41d8a9e2419cae0c8453ebe99605827d557d791cbb0bdc76
5
5
  SHA512:
6
- metadata.gz: 54828f54dbf3db526438929fd3fe7b38465034b156d5b2f72b6902db98a02885e3b4c5bef4a989f4847138deb916afae350af9a780de99a20aca051195760751
7
- data.tar.gz: 9b0f1adbf7577d077825e11f2c394abebd47e5aa4e05766b5412838ac41f2e2c31f9aa0c03e9b47649c2456a9c0e3210172609075d8e08a1ffe192eaafeee21a
6
+ metadata.gz: 74bcf27d8ca455f0033650dcbe2285d06171c71959189a1eb8387aafd7e344d973c19ccb1a3d457c1ba34facf70c5b833dfc5137784b4d23a1bf0fb63cd8e911
7
+ data.tar.gz: e252edcc68e479b3f8b2c371b20f9685e36e97c87b39fb9be67f77e2f94c1e9d52ec897c3694513c495084fa92c8b683dc730d57e0397bd57f3721cbb17acb77
data/CHANGES.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 2.0.0
2
+
3
+ * **Required ruby version is now 3.0.0**
4
+
5
+ * Changed diff labels to include gem directory names
6
+
7
+ * Fixed diff labels for /dev/null
8
+
9
+
1
10
  # 1.2.2
2
11
 
3
12
  * Fix for Ruby 2.3 and Ruby 2.4
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 = '1.2.2'
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 = ['mail@timcraft.com']
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 = '>= 2.3.0'
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']
@@ -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
- command.concat [a_dir.join(a_path), '--label', Pathname('a').join(a_path)]
42
- command_for_output << a_output_dir.join(a_path)
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 << null
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
- command.concat [b_dir.join(b_path), '--label', Pathname('b').join(b_path)]
50
- command_for_output << b_output_dir.join(b_path)
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(dir_path).select(&:file?).map { |path|
78
- path.relative_path_from(dir_path)
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2019-2020 TIMCRAFT
1
+ # Copyright (c) 2019-2025 TIMCRAFT
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
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: 1.2.2
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: 2020-08-24 00:00:00.000000000 Z
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
- - mail@timcraft.com
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: 2.3.0
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.1.2
68
+ rubygems_version: 3.5.22
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: See description