geminabox 0.13.8 → 0.13.9
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.
Potentially problematic release.
This version of geminabox might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/lib/geminabox/http_adapter/http_client_adapter.rb +10 -7
- data/lib/geminabox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df9f0fb137477b8a862fb6270d1f25bf427905a7
|
4
|
+
data.tar.gz: a7ad385b84df2a883f3dfdd5d220a8acacc681e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d56bf2095b940b372a7158142c755432cc831c5248802bf2119a093a0d37ce2973271b0bbf1f8758782b67c773716a2d5ae0ca972855269b34a4a7fd43687af8
|
7
|
+
data.tar.gz: e795e2d39f5235b8ad5422cdca6bacb96027f38cbd2d12a59c6b4dd0e3db70ad51c5b231ae386ca3cd8f68f83cfc9592600faa3fd94922bc588c69f79f2e1a1c
|
data/README.md
CHANGED
@@ -55,6 +55,19 @@ If you want Geminabox to carry on providing gems when rubygems.org is unavailabl
|
|
55
55
|
Geminabox uses the HTTPClient gem to manage its connections to remote resources.
|
56
56
|
The relationship is managed via Geminabox::HttpClientAdapter.
|
57
57
|
|
58
|
+
To configure options of HTTPClient, pass your own HTTPClient object in config.ru as:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
# Geminabox.http_adapter = Geminabox::HttpClientAdapter.new # default
|
62
|
+
Geminabox.http_adapter.http_client = HTTPClient.new(ENV['http_proxy']).tap do |http_client|
|
63
|
+
http_client.transparent_gzip_decompression = true
|
64
|
+
http_client.keep_alive_timeout = 32 # sec
|
65
|
+
http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
66
|
+
http_client.send_timeout = 0
|
67
|
+
http_client.receive_timeout = 0
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
58
71
|
If you would like to use an alternative HTTP gem, create your own adapter
|
59
72
|
and specify it in config.ru:
|
60
73
|
|
@@ -19,17 +19,20 @@ module Geminabox
|
|
19
19
|
def set_auth(url, username = nil, password = nil)
|
20
20
|
http_client.set_auth(url, username, password) if username or password
|
21
21
|
http_client.www_auth.basic_auth.challenge(url) # Workaround: https://github.com/nahi/httpclient/issues/63
|
22
|
-
http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
23
|
-
http_client.send_timeout = 0
|
24
|
-
http_client.receive_timeout = 0
|
25
22
|
end
|
26
23
|
|
27
24
|
def http_client
|
28
|
-
@http_client ||= HTTPClient.new(ENV['http_proxy']).tap
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
@http_client ||= HTTPClient.new(ENV['http_proxy']).tap do |http_client|
|
26
|
+
http_client.transparent_gzip_decompression = true
|
27
|
+
http_client.keep_alive_timeout = 32 # sec
|
28
|
+
http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
29
|
+
http_client.send_timeout = 0
|
30
|
+
http_client.receive_timeout = 0
|
31
|
+
end
|
32
32
|
end
|
33
33
|
|
34
|
+
def http_client=(client)
|
35
|
+
@http_client = client
|
36
|
+
end
|
34
37
|
end
|
35
38
|
end
|
data/lib/geminabox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminabox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Lea
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-09-
|
14
|
+
date: 2017-09-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sinatra
|