bundle_update_interactive 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- 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: 45766051bc33bd9e477c7e1cf57bb78352732be6c0683c173330a46b6ede55bd
|
4
|
+
data.tar.gz: 40308582e58bd8b027be213c38fd7bdbb375a8b25a5272f30ec0cde2f1e741b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b826b2cd41a7e31c2e875f5d6c5333ddba6df10931bcc6eacdc191e078be51b6bb65d993a3371e587de0825306ddbad383925b45729c62d3dc3a0e8b2bb56316
|
7
|
+
data.tar.gz: '08a986946005d949e9a53c460ea00e338dc71512b11ba7c4ab72f9b31e31291b009cb9da175c35ece600624d8499f6b509080da0731d2cabac9525b7d5bb6c63'
|
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.0
|
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-01-04 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.2
|
173
184
|
specification_version: 4
|
174
185
|
summary: Adds an update-interactive command to Bundler
|
175
186
|
test_files: []
|