gemdiff 5.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gemdiff/bundle_inspector.rb +1 -2
- data/lib/gemdiff/cli.rb +6 -4
- data/lib/gemdiff/colorize.rb +14 -16
- data/lib/gemdiff/outdated_gem.rb +1 -1
- data/lib/gemdiff/repo_finder.rb +2 -2
- data/lib/gemdiff/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c0dc8c8039511e0dcfa1635fc73e28693d3e550695eec9086f236150da150b2
|
4
|
+
data.tar.gz: 74c94711c9aa6257b7c14627a2f7323651cbc876aeaec225b9ba6514bf159244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a16c9a2d800a4990e380f534eb6c4b5ed6f22009d687135e48ec1eda4e3839b0938ebdb4043b14647e845eb733e2f9a62984f65e85b3be50daabc2e716f571f
|
7
|
+
data.tar.gz: d5ba2b0e0dd876d22540152fb816cbeb25a6df8d1f4d692272fe936ba997c8aacab2e53ab138d8f19849212ed3c415fed54c60e102040bd132961176f47fde08
|
data/lib/gemdiff/cli.rb
CHANGED
@@ -12,6 +12,8 @@ module Gemdiff
|
|
12
12
|
CHECKING_FOR_OUTDATED = "Checking for outdated gems in your bundle..."
|
13
13
|
NOTHING_TO_UPDATE = "Nothing to update."
|
14
14
|
WORKING_DIRECTORY_IS_NOT_CLEAN = "Your working directory is not clean. Please commit or stash before updating."
|
15
|
+
RESPONSES_ALL = %w[s A].freeze
|
16
|
+
RESPONSES_COMPARE = %w[y A].freeze
|
15
17
|
|
16
18
|
desc "find <gem>", "Find the github repository URL for a gem"
|
17
19
|
def find(gem_name)
|
@@ -64,12 +66,12 @@ module Gemdiff
|
|
64
66
|
puts CHECKING_FOR_OUTDATED
|
65
67
|
inspector = BundleInspector.new
|
66
68
|
puts inspector.outdated
|
67
|
-
|
69
|
+
all_action = false
|
68
70
|
inspector.list.each do |outdated_gem|
|
69
71
|
puts outdated_gem.compare_message
|
70
|
-
response =
|
71
|
-
|
72
|
-
outdated_gem.compare if
|
72
|
+
response = all_action || ask("Open? (y to open, x to exit, A to open all, s to show all to stdout, else skip)")
|
73
|
+
all_action = response if RESPONSES_ALL.include?(response)
|
74
|
+
outdated_gem.compare if RESPONSES_COMPARE.include?(response)
|
73
75
|
puts outdated_gem.compare_url if response == "s"
|
74
76
|
break if response == "x"
|
75
77
|
end
|
data/lib/gemdiff/colorize.rb
CHANGED
@@ -13,22 +13,20 @@ module Gemdiff
|
|
13
13
|
|
14
14
|
# works with `git show` and `git diff`
|
15
15
|
def colorize_git_output(lines)
|
16
|
-
out =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
line
|
31
|
-
end
|
16
|
+
out = lines.split("\n").map do |line|
|
17
|
+
if line.start_with?("---", "+++", "diff", "index")
|
18
|
+
colorize line, :blue
|
19
|
+
elsif line.start_with?("@@")
|
20
|
+
colorize line, :magenta
|
21
|
+
elsif line.start_with?("commit")
|
22
|
+
colorize line, :yellow
|
23
|
+
elsif line.start_with?("-")
|
24
|
+
colorize line, :red
|
25
|
+
elsif line.start_with?("+")
|
26
|
+
colorize line, :green
|
27
|
+
else
|
28
|
+
line
|
29
|
+
end
|
32
30
|
end
|
33
31
|
out.join("\n")
|
34
32
|
end
|
data/lib/gemdiff/outdated_gem.rb
CHANGED
data/lib/gemdiff/repo_finder.rb
CHANGED
@@ -39,7 +39,7 @@ module Gemdiff
|
|
39
39
|
"guard-livereload": "guard/guard-livereload",
|
40
40
|
i18n: "ruby-i18n/i18n",
|
41
41
|
"jquery-ujs": "rails/jquery-ujs",
|
42
|
-
json: "
|
42
|
+
json: "ruby/json",
|
43
43
|
kaminari: "kaminari/kaminari",
|
44
44
|
"kaminari-actionview": "kaminari/kaminari",
|
45
45
|
"kaminari-activerecord": "kaminari/kaminari",
|
@@ -115,7 +115,7 @@ module Gemdiff
|
|
115
115
|
yaml = gemspec(gem_name)
|
116
116
|
return if yaml.to_s.empty?
|
117
117
|
spec = YAML.safe_load(yaml, permitted_classes: PERMITTED_GEMSPEC_CLASSES)
|
118
|
-
return clean_url(spec.homepage) if spec.homepage
|
118
|
+
return clean_url(spec.homepage) if GITHUB_REPO_REGEX.match?(spec.homepage)
|
119
119
|
match = spec.description.to_s.match(GITHUB_REPO_REGEX)
|
120
120
|
match && clean_url(match[0])
|
121
121
|
end
|
data/lib/gemdiff/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tee Parham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: faraday-retry
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.2'
|
20
20
|
type: :runtime
|
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: '2.
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: launchy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.0'
|
34
34
|
type: :runtime
|
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: '
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: octokit
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '9.0'
|
48
48
|
type: :runtime
|
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: '9.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.5.
|
109
|
+
rubygems_version: 3.5.23
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Find source repositories for ruby gems. Open, compare, and update outdated
|