gemdiff 4.1.0 → 6.0.0
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 +3 -4
- data/lib/gemdiff/colorize.rb +14 -16
- data/lib/gemdiff/outdated_gem.rb +1 -1
- data/lib/gemdiff/repo_finder.rb +4 -8
- data/lib/gemdiff/version.rb +1 -1
- metadata +23 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cac0b7b3c08ac692ac5b067339b59eabe2d84cf3419edd0faf4fbea671719922
|
4
|
+
data.tar.gz: 064d6f5e31b7dffcf6bb8a1aa77c63a0a88d740699167793aebc66eec9584c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5958a0e7e81b5c3cd4cc39e06aa475a5e69927b950246e97900412ead77ae726806905ddd6b19cf9cefd9207a04790b3bcdb97d460406733c2f11fe30f84bbf
|
7
|
+
data.tar.gz: cdc40bd0c4f872d9edd1a3899601760f8540589fe4aec5826db8d6d967aab59dce604120ee318a95f338863d2f6dd4bdb48d72bae55f734c065f570c3ab86302
|
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
module Gemdiff
|
4
4
|
class BundleInspector
|
5
|
-
BUNDLE_OUTDATED_PARSE_REGEX = /\A([^\s]+)\s\(newest\s([^,]+),\sinstalled\s([^,\)]+).*\z
|
5
|
+
BUNDLE_OUTDATED_PARSE_REGEX = /\A([^\s]+)\s\(newest\s([^,]+),\sinstalled\s([^,\)]+).*\z/
|
6
6
|
|
7
7
|
def list
|
8
8
|
@list ||=
|
9
9
|
outdated
|
10
10
|
.split("\n")
|
11
|
-
.
|
12
|
-
.compact
|
11
|
+
.filter_map { |line| new_outdated_gem(line) }
|
13
12
|
end
|
14
13
|
|
15
14
|
def outdated
|
@@ -27,7 +26,7 @@ module Gemdiff
|
|
27
26
|
end
|
28
27
|
|
29
28
|
def new_outdated_gem(line)
|
30
|
-
return unless match = BUNDLE_OUTDATED_PARSE_REGEX.match(line)
|
29
|
+
return unless (match = BUNDLE_OUTDATED_PARSE_REGEX.match(line))
|
31
30
|
|
32
31
|
OutdatedGem.new(match[1], match[2], match[3])
|
33
32
|
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
@@ -5,7 +5,7 @@ require "yaml"
|
|
5
5
|
|
6
6
|
module Gemdiff
|
7
7
|
module RepoFinder
|
8
|
-
GITHUB_REPO_REGEX = %r{(https?)://(www.)?github\.com/([\w.%-]*)/([\w.%-]*)}
|
8
|
+
GITHUB_REPO_REGEX = %r{(https?)://(www.)?github\.com/([\w.%-]*)/([\w.%-]*)}
|
9
9
|
|
10
10
|
# rails builds several gems that are not individual projects
|
11
11
|
# some repos move and the old repo page still exists
|
@@ -114,12 +114,8 @@ module Gemdiff
|
|
114
114
|
end
|
115
115
|
yaml = gemspec(gem_name)
|
116
116
|
return if yaml.to_s.empty?
|
117
|
-
spec =
|
118
|
-
|
119
|
-
else
|
120
|
-
YAML.load(yaml)
|
121
|
-
end
|
122
|
-
return clean_url(spec.homepage) if spec.homepage =~ GITHUB_REPO_REGEX
|
117
|
+
spec = YAML.safe_load(yaml, permitted_classes: PERMITTED_GEMSPEC_CLASSES)
|
118
|
+
return clean_url(spec.homepage) if GITHUB_REPO_REGEX.match?(spec.homepage)
|
123
119
|
match = spec.description.to_s.match(GITHUB_REPO_REGEX)
|
124
120
|
match && clean_url(match[0])
|
125
121
|
end
|
@@ -141,7 +137,7 @@ module Gemdiff
|
|
141
137
|
end
|
142
138
|
|
143
139
|
def access_token
|
144
|
-
ENV["GEMDIFF_GITHUB_TOKEN"] || ENV
|
140
|
+
ENV["GEMDIFF_GITHUB_TOKEN"] || ENV.fetch("GITHUB_TOKEN", nil)
|
145
141
|
end
|
146
142
|
|
147
143
|
def octokit_client
|
data/lib/gemdiff/version.rb
CHANGED
metadata
CHANGED
@@ -1,103 +1,75 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tee Parham
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-26 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
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '5.4'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '5.4'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: mocha
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.1'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.1'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
56
|
+
name: thor
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
86
58
|
requirements:
|
87
59
|
- - "~>"
|
88
60
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
90
|
-
type: :
|
61
|
+
version: '1.0'
|
62
|
+
type: :runtime
|
91
63
|
prerelease: false
|
92
64
|
version_requirements: !ruby/object:Gem::Requirement
|
93
65
|
requirements:
|
94
66
|
- - "~>"
|
95
67
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
68
|
+
version: '1.0'
|
97
69
|
description: Command-line utility to find source repositories for ruby gems, open
|
98
70
|
common GitHub pages, compare gem versions, and simplify gem update workflow in git.
|
99
71
|
email:
|
100
|
-
-
|
72
|
+
- parhameter@gmail.com
|
101
73
|
executables:
|
102
74
|
- gemdiff
|
103
75
|
extensions: []
|
@@ -117,8 +89,9 @@ files:
|
|
117
89
|
homepage: https://github.com/teeparham/gemdiff
|
118
90
|
licenses:
|
119
91
|
- MIT
|
120
|
-
metadata:
|
121
|
-
|
92
|
+
metadata:
|
93
|
+
rubygems_mfa_required: 'true'
|
94
|
+
post_install_message:
|
122
95
|
rdoc_options: []
|
123
96
|
require_paths:
|
124
97
|
- lib
|
@@ -126,15 +99,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
99
|
requirements:
|
127
100
|
- - ">="
|
128
101
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
102
|
+
version: 3.0.0
|
130
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
104
|
requirements:
|
132
105
|
- - ">="
|
133
106
|
- !ruby/object:Gem::Version
|
134
107
|
version: '0'
|
135
108
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
137
|
-
signing_key:
|
109
|
+
rubygems_version: 3.5.17
|
110
|
+
signing_key:
|
138
111
|
specification_version: 4
|
139
112
|
summary: Find source repositories for ruby gems. Open, compare, and update outdated
|
140
113
|
gem versions
|