geminabox 0.6.1pre1 → 0.6.1

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.

data/lib/geminabox.rb CHANGED
@@ -6,6 +6,7 @@ require 'rubygems/builder'
6
6
  require 'rubygems/indexer'
7
7
  require 'hostess'
8
8
  require 'geminabox/version'
9
+ require 'rss/atom'
9
10
 
10
11
  class Geminabox < Sinatra::Base
11
12
  enable :static, :methodoverride
@@ -3,6 +3,10 @@ require 'geminabox/gem_version'
3
3
  class Geminabox::GemVersionCollection
4
4
  include Enumerable
5
5
 
6
+ def size
7
+ @gems.size
8
+ end
9
+
6
10
  attr_reader :gems
7
11
 
8
12
  def initialize(initial_gems=[])
@@ -1 +1 @@
1
- GeminaboxVersion = '0.6.1pre1' unless defined? GeminaboxVersion
1
+ GeminaboxVersion = '0.6.1' unless defined? GeminaboxVersion
@@ -1 +1,2 @@
1
- Gem::CommandManager.instance.register_command :inabox if defined? Gem::CommandManager
1
+ require "rubygems/command_manager"
2
+ Gem::CommandManager.instance.register_command :inabox
data/views/atom.erb CHANGED
@@ -4,13 +4,25 @@
4
4
  <title>Gem in a Box</title>
5
5
  <link href="<%= url '/atom.xml' %>" rel="self" />
6
6
  <link href="<%= url '/' %>" />
7
-
8
- <% @gems.each do |name, versions| %>
7
+ <id><%= url '/atom.xml' %></id>
8
+ <% @gems.by_name do |name, versions| %>
9
+ <% spec = spec_for(name, versions.newest.number) %>
9
10
  <entry>
10
- <title><%= name %> (<%= versions.size == 1 ? versions.first : "#{versions.first} - #{versions.last}" %>)</title>
11
+ <id><%= name %></id>
12
+ <updated><%= spec.date.w3cdtf %></updated>
13
+ <title><%= name %> (<%= versions.size == 1 ? versions.oldest.number : "#{versions.oldest.number} - #{versions.newest.number}" %>)</title>
14
+ <author><name><%= spec.authors.join(", ") %></name></author>
11
15
  <% versions.each do |version| %>
12
- <link href="<%= url "/gems/#{name}-#{version}.gem" %>" />
16
+ <link href="<%= url "/gems/#{name}-#{version.number}.gem" %>" />
13
17
  <% end %>
14
18
  </entry>
15
19
  <% end %>
20
+
21
+ <updated>
22
+ <% if newest_gem = @gems.newest %>
23
+ <%= spec_for(newest_gem.name, newest_gem.number).date.w3cdtf %>
24
+ <% else %>
25
+ <%= Date.today %>
26
+ <% end %>
27
+ </updated>
16
28
  </feed>
metadata CHANGED
@@ -1,89 +1,115 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: geminabox
3
- version: !ruby/object:Gem::Version
4
- version: 0.6.1pre1
5
- prerelease: 5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 5
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 6
9
+ - 1
10
+ version: 0.6.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Tom Lea
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-03-13 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: sinatra
16
- requirement: &70334000572040 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
17
+
18
+ date: 2012-03-17 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
23
21
  prerelease: false
24
- version_requirements: *70334000572040
25
- - !ruby/object:Gem::Dependency
26
- name: builder
27
- requirement: &70334000571620 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
22
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70334000571620
36
- - !ruby/object:Gem::Dependency
37
- name: httpclient
38
- requirement: &70334000571120 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
39
24
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
44
- type: :runtime
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ version_requirements: *id001
33
+ name: sinatra
34
+ - !ruby/object:Gem::Dependency
45
35
  prerelease: false
46
- version_requirements: *70334000571120
47
- - !ruby/object:Gem::Dependency
48
- name: rake
49
- requirement: &70334000570580 !ruby/object:Gem::Requirement
36
+ type: :runtime
37
+ requirement: &id002 !ruby/object:Gem::Requirement
50
38
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :development
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ version_requirements: *id002
47
+ name: builder
48
+ - !ruby/object:Gem::Dependency
56
49
  prerelease: false
57
- version_requirements: *70334000570580
58
- - !ruby/object:Gem::Dependency
59
- name: rack-test
60
- requirement: &70334000570160 !ruby/object:Gem::Requirement
50
+ type: :runtime
51
+ requirement: &id003 !ruby/object:Gem::Requirement
61
52
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
66
- type: :development
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ version_requirements: *id003
61
+ name: httpclient
62
+ - !ruby/object:Gem::Dependency
67
63
  prerelease: false
68
- version_requirements: *70334000570160
69
- - !ruby/object:Gem::Dependency
70
- name: minitest
71
- requirement: &70334000569540 !ruby/object:Gem::Requirement
64
+ type: :development
65
+ requirement: &id004 !ruby/object:Gem::Requirement
72
66
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ version_requirements: *id004
75
+ name: rake
76
+ - !ruby/object:Gem::Dependency
77
+ prerelease: false
77
78
  type: :development
79
+ requirement: &id005 !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ version_requirements: *id005
89
+ name: rack-test
90
+ - !ruby/object:Gem::Dependency
78
91
  prerelease: false
79
- version_requirements: *70334000569540
92
+ type: :development
93
+ requirement: &id006 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ version_requirements: *id006
103
+ name: minitest
80
104
  description: A sinatra based gem hosting app, with client side gem push style functionality.
81
105
  email: contrib@tomlea.co.uk
82
106
  executables: []
107
+
83
108
  extensions: []
84
- extra_rdoc_files:
109
+
110
+ extra_rdoc_files:
85
111
  - README.markdown
86
- files:
112
+ files:
87
113
  - README.markdown
88
114
  - lib/geminabox/disk_cache.rb
89
115
  - lib/geminabox/gem_version.rb
@@ -104,31 +130,37 @@ files:
104
130
  - views/upload.erb
105
131
  homepage: http://tomlea.co.uk/p/gem-in-a-box
106
132
  licenses: []
133
+
107
134
  post_install_message:
108
- rdoc_options:
135
+ rdoc_options:
109
136
  - --main
110
137
  - README.markdown
111
- require_paths:
138
+ require_paths:
112
139
  - lib
113
- required_ruby_version: !ruby/object:Gem::Requirement
140
+ required_ruby_version: !ruby/object:Gem::Requirement
114
141
  none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- segments:
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
120
147
  - 0
121
- hash: -868340683115565236
122
- required_rubygems_version: !ruby/object:Gem::Requirement
148
+ version: "0"
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
150
  none: false
124
- requirements:
125
- - - ! '>'
126
- - !ruby/object:Gem::Version
127
- version: 1.3.1
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
156
+ - 0
157
+ version: "0"
128
158
  requirements: []
159
+
129
160
  rubyforge_project:
130
- rubygems_version: 1.8.10
161
+ rubygems_version: 1.8.13
131
162
  signing_key:
132
163
  specification_version: 3
133
164
  summary: Really simple rubygem hosting
134
165
  test_files: []
166
+