bundle_update_interactive 0.11.2 → 0.12.0
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/README.md +0 -1
- data/lib/bundle_update_interactive/http.rb +19 -0
- data/lib/bundle_update_interactive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 684e52fd6757c57d6528530d9a936384eb34338f4159938d47ff6a125b236471
|
4
|
+
data.tar.gz: 477ad5ad4b4b81456a05169292addecf124da439068a8140d41d2e2306bec5e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c9717eb6b4ae86060c451a8779b5df80eaf9f0e6aeb011dd9a522d0c3d995c5d0ff6c6031b5cf7adb9067ec0ec73ab26ac4bf4e243e066a4b889cea451c0eff
|
7
|
+
data.tar.gz: 5a974047ac21c99196342df39887bf8542524317e24a3b160eb9af4aa30d3b68c9be8b50891513c88058033106b5f695f718f44a85ce23285e777231403fbd15
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[](https://rubygems.org/gems/bundle_update_interactive)
|
4
4
|
[](https://www.ruby-toolbox.com/projects/bundle_update_interactive)
|
5
5
|
[](https://github.com/mattbrictson/bundle_update_interactive/actions/workflows/ci.yml)
|
6
|
-
[](https://codeclimate.com/github/mattbrictson/bundle_update_interactive)
|
7
6
|
|
8
7
|
**This gem adds an `update-interactive` command to [Bundler](https://bundler.io).** Run it to see what gems can be updated, then pick and choose which ones to update. If you've used `yarn upgrade-interactive`, the interface should be very familiar.
|
9
8
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "openssl"
|
3
4
|
require "net/http"
|
4
5
|
require "uri"
|
5
6
|
|
@@ -11,6 +12,22 @@ module BundleUpdateInteractive
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
15
|
+
class Error
|
16
|
+
attr_reader :exception
|
17
|
+
|
18
|
+
def initialize(exception)
|
19
|
+
@exception = exception
|
20
|
+
end
|
21
|
+
|
22
|
+
def code
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def success?
|
27
|
+
false
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
14
31
|
class << self
|
15
32
|
def get(url)
|
16
33
|
http(:get, url)
|
@@ -28,6 +45,8 @@ module BundleUpdateInteractive
|
|
28
45
|
http.public_send(method, uri.request_uri)
|
29
46
|
end
|
30
47
|
response.extend(Success)
|
48
|
+
rescue OpenSSL::OpenSSLError => e
|
49
|
+
Error.new(e)
|
31
50
|
end
|
32
51
|
end
|
33
52
|
end
|