geminabox 0.2.7 → 0.2.8
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/README.markdown +2 -2
- data/lib/geminabox.rb +5 -0
- data/public/master.css +10 -1
- data/views/index.erb +4 -1
- data/views/layout.erb +2 -1
- metadata +3 -3
data/README.markdown
CHANGED
@@ -20,7 +20,7 @@ Create a config.ru as follows:
|
|
20
20
|
Geminabox.data = "/var/geminabox-data" # …or wherever
|
21
21
|
run Geminabox
|
22
22
|
|
23
|
-
And finally, hook up the config.ru as you normally would ([passenger][passenger], [thin][thin], [unicorn][unicorn], whatever floats
|
23
|
+
And finally, hook up the config.ru as you normally would ([passenger][passenger], [thin][thin], [unicorn][unicorn], whatever floats your boat).
|
24
24
|
|
25
25
|
|
26
26
|
## Client Usage
|
@@ -34,4 +34,4 @@ Simples!
|
|
34
34
|
[sinatra]: http://www.sinatrarb.com/
|
35
35
|
[passenger]: http://www.modrails.com/
|
36
36
|
[thin]: http://code.macournoyer.com/thin/
|
37
|
-
[unicorn]: http://unicorn.bogomips.org/
|
37
|
+
[unicorn]: http://unicorn.bogomips.org/
|
data/lib/geminabox.rb
CHANGED
@@ -18,6 +18,7 @@ class Geminabox < Sinatra::Base
|
|
18
18
|
|
19
19
|
get '/' do
|
20
20
|
@gems = load_gems
|
21
|
+
@index_gems = index_gems(@gems)
|
21
22
|
erb :index
|
22
23
|
end
|
23
24
|
|
@@ -75,6 +76,10 @@ private
|
|
75
76
|
}
|
76
77
|
end
|
77
78
|
|
79
|
+
def index_gems(gems)
|
80
|
+
Set.new(gems.map{|name, _| name[0..0]})
|
81
|
+
end
|
82
|
+
|
78
83
|
helpers do
|
79
84
|
def url_for(path)
|
80
85
|
url = request.scheme + "://"
|
data/public/master.css
CHANGED
@@ -45,7 +45,10 @@ code {
|
|
45
45
|
|
46
46
|
ul.gemlist {
|
47
47
|
list-style: none;
|
48
|
-
margin:
|
48
|
+
margin-top: 0em;
|
49
|
+
margin-bottom: 2em;
|
50
|
+
margin-left: 0;
|
51
|
+
margin-right: 0;
|
49
52
|
padding: 0;
|
50
53
|
}
|
51
54
|
|
@@ -76,3 +79,9 @@ ul.gemlist li .delete-form button {
|
|
76
79
|
ul.gemlist li .delete-form:hover button {
|
77
80
|
visibility: visible;
|
78
81
|
}
|
82
|
+
|
83
|
+
#alpha_index {
|
84
|
+
font-size: 0.8em;
|
85
|
+
margin-top: 1.0em;
|
86
|
+
color: #aaa;
|
87
|
+
}
|
data/views/index.erb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
<% if @gems.any? %>
|
2
2
|
<a href="upload">Upload Another Gem</a>
|
3
3
|
|
4
|
+
<div id="alpha_index"><%= ("a".."z").map{|i| @index_gems.include?(i) ? "<a href='#jump_#{i}'>#{i}</a>" : i }.join(" - ") %></div>
|
5
|
+
|
4
6
|
<ul class="gemlist">
|
7
|
+
|
5
8
|
<% @gems.each do |name, versions| %>
|
6
|
-
<li
|
9
|
+
<li <%= %{id="jump_#{name[0..0]}"} if @index_gems.delete(name[0..0]) %>>
|
7
10
|
<strong><%= name %> (<%= versions.size == 1 ? versions.first : "#{versions.first} - #{versions.last}" %>)</strong>
|
8
11
|
<% versions.each do |version| %>
|
9
12
|
<form class="delete-form" method="post" action="/gems/<%= name %>-<%= version %>.gem">
|
data/views/layout.erb
CHANGED
@@ -11,7 +11,8 @@
|
|
11
11
|
<div id="content">
|
12
12
|
<h1>Gem in a Box</h1>
|
13
13
|
<p>
|
14
|
-
<code>gem sources -a <%= url_for "/" %></code>
|
14
|
+
<pre><code>gem sources -a <%= url_for "/" %></code></pre>
|
15
|
+
<pre><code>gem install geminabox<br />gem inabox [gemfile]</code></pre>
|
15
16
|
</p>
|
16
17
|
<%= yield %>
|
17
18
|
</div>
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 8
|
9
|
+
version: 0.2.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Tom Lea
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-09-16 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|