bundle_update_interactive 0.10.0 → 0.11.1
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/LICENSE.txt +1 -1
- data/lib/bundle_update_interactive/cli.rb +12 -5
- data/lib/bundle_update_interactive/thread_pool.rb +21 -0
- data/lib/bundle_update_interactive/version.rb +1 -1
- metadata +18 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e52d480380d337ff9e53c7d26e42c64b62b7a2b5e569b4fc31e6210cc0bed49
|
4
|
+
data.tar.gz: 010d0158a82797174d80c781ca1dec9bd60fe8b273a5fb4d24056057e95f24d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09f8110965f2ff670a108fc0770a623df698cb125915d7fab913cc95dcc2d43d9ea318cd078b4121adc836f88c07830058da8eb56d083ad6accf5c98c910b641'
|
7
|
+
data.tar.gz: ed7622938bbfda9155644a1ea1874146a48470e38a589105fc35758461b07e3818141b9fe43cfba2dc7967ba7e397abb74481448f66cdf2e822b1ca3ca48e11c
|
data/LICENSE.txt
CHANGED
@@ -64,15 +64,22 @@ module BundleUpdateInteractive
|
|
64
64
|
updater = updater_class.new(groups: options.exclusively, only_explicit: options.only_explicit?)
|
65
65
|
|
66
66
|
report = updater.generate_report
|
67
|
-
unless report.empty?
|
68
|
-
whisper "Checking for security vulnerabilities..."
|
69
|
-
report.scan_for_vulnerabilities!
|
70
|
-
progress "Finding changelogs", report.all_gems.values, &:changelog_uri
|
71
|
-
end
|
67
|
+
populate_vulnerabilities_and_changelogs_concurrently(report) unless report.empty?
|
72
68
|
|
73
69
|
[report, updater]
|
74
70
|
end
|
75
71
|
|
72
|
+
def populate_vulnerabilities_and_changelogs_concurrently(report)
|
73
|
+
pool = ThreadPool.new(max_threads: 25)
|
74
|
+
whisper "Checking for security vulnerabilities..."
|
75
|
+
scan_promise = pool.future(report, &:scan_for_vulnerabilities!)
|
76
|
+
changelog_promises = report.all_gems.map do |_, outdated_gem|
|
77
|
+
pool.future(outdated_gem, &:changelog_uri)
|
78
|
+
end
|
79
|
+
progress "Finding changelogs", changelog_promises, &:value!
|
80
|
+
scan_promise.value!
|
81
|
+
end
|
82
|
+
|
76
83
|
def whisper(message)
|
77
84
|
$stderr.puts(message)
|
78
85
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "concurrent"
|
4
|
+
|
5
|
+
module BundleUpdateInteractive
|
6
|
+
class ThreadPool
|
7
|
+
include Concurrent::Promises::FactoryMethods
|
8
|
+
|
9
|
+
def initialize(max_threads:)
|
10
|
+
@executor = Concurrent::ThreadPoolExecutor.new(
|
11
|
+
min_threads: 0,
|
12
|
+
max_threads: max_threads,
|
13
|
+
max_queue: 0
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
def default_executor
|
18
|
+
@executor
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle_update_interactive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-05 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -38,6 +37,20 @@ dependencies:
|
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: 0.9.1
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: concurrent-ruby
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.3.4
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.3.4
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: launchy
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +121,6 @@ dependencies:
|
|
108
121
|
- - "~>"
|
109
122
|
- !ruby/object:Gem::Version
|
110
123
|
version: '2.6'
|
111
|
-
description:
|
112
124
|
email:
|
113
125
|
- opensource@mattbrictson.com
|
114
126
|
executables:
|
@@ -142,6 +154,7 @@ files:
|
|
142
154
|
- lib/bundle_update_interactive/report.rb
|
143
155
|
- lib/bundle_update_interactive/semver_change.rb
|
144
156
|
- lib/bundle_update_interactive/string_helper.rb
|
157
|
+
- lib/bundle_update_interactive/thread_pool.rb
|
145
158
|
- lib/bundle_update_interactive/updater.rb
|
146
159
|
- lib/bundle_update_interactive/version.rb
|
147
160
|
homepage: https://github.com/mattbrictson/bundle_update_interactive
|
@@ -153,7 +166,6 @@ metadata:
|
|
153
166
|
source_code_uri: https://github.com/mattbrictson/bundle_update_interactive
|
154
167
|
homepage_uri: https://github.com/mattbrictson/bundle_update_interactive
|
155
168
|
rubygems_mfa_required: 'true'
|
156
|
-
post_install_message:
|
157
169
|
rdoc_options: []
|
158
170
|
require_paths:
|
159
171
|
- lib
|
@@ -168,8 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
180
|
- !ruby/object:Gem::Version
|
169
181
|
version: '0'
|
170
182
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
172
|
-
signing_key:
|
183
|
+
rubygems_version: 3.6.6
|
173
184
|
specification_version: 4
|
174
185
|
summary: Adds an update-interactive command to Bundler
|
175
186
|
test_files: []
|