geminabox 0.3.0 → 0.3.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.
Potentially problematic release.
This version of geminabox might be problematic. Click here for more details.
- data/lib/geminabox.rb +1 -0
- data/lib/rubygems/commands/inabox_command.rb +13 -11
- data/views/index.erb +3 -1
- metadata +5 -5
data/lib/geminabox.rb
CHANGED
@@ -33,10 +33,10 @@ class Gem::Commands::InaboxCommand < Gem::Command
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def setup
|
36
|
-
|
37
|
-
find_gem
|
36
|
+
if options[:args].size == 0
|
37
|
+
@gemfiles = [find_gem]
|
38
38
|
else
|
39
|
-
|
39
|
+
@gemfiles = get_all_gem_names
|
40
40
|
end
|
41
41
|
configure unless geminabox_host
|
42
42
|
end
|
@@ -56,16 +56,18 @@ class Gem::Commands::InaboxCommand < Gem::Command
|
|
56
56
|
url_for_presentation = url.clone
|
57
57
|
url_for_presentation.password = '***' if url_for_presentation.password
|
58
58
|
|
59
|
-
|
59
|
+
@gemfiles.each do |gemfile|
|
60
|
+
say "Pushing #{File.basename(gemfile)} to #{url_for_presentation}..."
|
60
61
|
|
61
|
-
|
62
|
-
|
62
|
+
File.open(gemfile, "rb") do |file|
|
63
|
+
request_body, request_headers = Multipart::MultipartPost.new.prepare_query("file" => file)
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
proxy.start(url.host, url.port) {|con|
|
66
|
+
req = Net::HTTP::Post.new('/upload', request_headers)
|
67
|
+
req.basic_auth(url.user, url.password) if url.user
|
68
|
+
handle_response(con.request(req, request_body))
|
69
|
+
}
|
70
|
+
end
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
data/views/index.erb
CHANGED
@@ -21,7 +21,9 @@
|
|
21
21
|
<% if spec = spec_for(name, versions.last) %>
|
22
22
|
<%= spec.description %>
|
23
23
|
<br/>
|
24
|
-
<span class="author">–
|
24
|
+
<span class="author">– <%= spec.authors.map do |author|
|
25
|
+
"<a href='#{spec.homepage}'>#{author}</a>"
|
26
|
+
end.join(', ') %></span>
|
25
27
|
<% end %>
|
26
28
|
</p>
|
27
29
|
</div>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminabox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Lea
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements: []
|
101
101
|
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 1.
|
103
|
+
rubygems_version: 1.6.2
|
104
104
|
signing_key:
|
105
105
|
specification_version: 3
|
106
106
|
summary: Really simple rubygem hosting
|