geminabox 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of geminabox might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2IyYmIwNzY5M2YwNjg3NmYwMDVjYTcwODNhZDI1YWY1NDBiYTJkYw==
4
+ OWI3ZTAwOTg3NjFmZTcwN2RmNDNhZTYwM2MzMjM4YWE5OWI4NzUyNg==
5
5
  data.tar.gz: !binary |-
6
- MWY4ZTJjNWM2ZjA5NTIxZTZiMGY5ZGYxMTY1MzYzZjNkNzdkODIwOA==
6
+ YThlZTE0MWJkYTI5YzNlMTkxNjkyMjQ2ZTEzNGUzOTU4NDQ5NmZlYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGI0OTY2ZmIyMDI1YTUwZGFhZGQyNDFmNmEyZDI3MDc2OGVhY2M0MWQwMDI0
10
- ODU1MjMzM2MxN2U4MjRmZTVkNjY5ZGQxOTQ5OWJlNTNmMjViNjk1ODM3OWVk
11
- ZjNkNTUwYWZjOWE0NTZjZmRlZmY3M2JhM2FhNDBjNGEyNjUxMWQ=
9
+ MDYyOTRiMDA0ZDhkOTY4YTQ1MzQxMTQ1YzYzZGVkNzlhOWNjMzU5ZDQwNTBk
10
+ YTUwYTJlZDg1N2ZlOWE5MjNmMWRjYjE2MTY3ZmRhNTBiYTVlODMxYzg2NWU5
11
+ ZDUzYjg3Y2FmMTdjNGQxMzRiZmM3YmE4YWRiZmJhZTI2YmRmYmM=
12
12
  data.tar.gz: !binary |-
13
- Njc2MzE1YTliMzFlZGJjNzk3M2JkYWI2MmUxMTliODlhZTg2YzNhZDBmNGI2
14
- ZmU4YmVmMmQ2NDE2ZjlkMTE5Y2I3OTVlY2Q5YWU1ZDdlMmY0ZmZlMTg1MzVl
15
- YmE0NjI0YjVjMGYzMWRjYzg3OWJlYTgzYTQ3Y2IyMjMzOGFlMTU=
13
+ M2Q3NmZmZDk2MzE1N2E3YzdjNDVmMzJlNDkzOTU4YzBlZWU0YTA1MDAyZjUy
14
+ N2VmZTE4YTkyMjkyOTA5NTRmMWU2ZWViNmUzZTQ4M2FkYjVlYmEyOTdkZTc3
15
+ NWJlMGU1MzlhNDY5OWI3YWE5YzVkYWIxZDEzYjZkNDU4MDkwYjE=
@@ -44,6 +44,8 @@ module Geminabox
44
44
 
45
45
  def remote_content
46
46
  HTTPClient.get_content(remote_url).force_encoding(encoding)
47
+ rescue
48
+ raise GemStoreError.new(500, "Unable to get content from #{remote_url}")
47
49
  end
48
50
 
49
51
  def remote_url
@@ -59,7 +59,7 @@ module Geminabox
59
59
  file = File.expand_path(File.join(Server.data, *request.path_info))
60
60
 
61
61
  unless File.exists?(file)
62
- ::Net::HTTP.start("production.cf.rubygems.org") do |http|
62
+ net_http_class.start("production.cf.rubygems.org") do |http|
63
63
  path = File.join(*request.path_info)
64
64
  response = http.get(path)
65
65
  GemStore.create(IncomingGem.new(StringIO.new(response.body)))
@@ -68,6 +68,12 @@ module Geminabox
68
68
 
69
69
  end
70
70
 
71
+ def net_http_class
72
+ return ::Net::HTTP unless ENV['http_proxy']
73
+ proxy_uri = URI.parse(ENV['http_proxy'])
74
+ ::Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password)
75
+ end
76
+
71
77
  def splice_file(file_name)
72
78
  self.file_handler = Splicer.make(file_name)
73
79
  end
@@ -1,3 +1,3 @@
1
1
  module Geminabox
2
- VERSION = '0.12.2' unless defined? VERSION
2
+ VERSION = '0.12.3' unless defined? VERSION
3
3
  end
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.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-12-29 00:00:00.000000000 Z
13
+ date: 2014-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra