allgems 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,188 @@
1
+ !blue = #6f91cf
2
+ !light_blue = #a0b6de
3
+ !dark_blue = #23437e
4
+ !light_grey = #CCCCCC
5
+ !light_grey_bg = #EFEFEF
6
+ !grey = #666
7
+ !highlight = #F4F6E6
8
+ !fonts = "'Franklin Gothic', 'Franklin Gothic Medium', Helvetica, sans-serif"
9
+ //
10
+
11
+ body
12
+ :font-family = !fonts
13
+ :background #FFFFFF
14
+ :margin 0px
15
+ :padding 0px
16
+ :text-align center
17
+
18
+ a:link,
19
+ a:visited
20
+ :color = !blue
21
+ :text-decoration none
22
+ a:hover
23
+ :color = !light_blue
24
+ :text-decoration underline
25
+
26
+ a img
27
+ :border none
28
+
29
+ .contained
30
+ :width 960px
31
+ :margin 0px auto
32
+ :text-align left
33
+ :position relative
34
+
35
+ #header
36
+ .contained
37
+ :width 250px
38
+ #logo
39
+ :position absolute
40
+ :top -20px
41
+ :left -135px
42
+ h1
43
+ :color = !dark_blue
44
+ :font-size 50px
45
+ :margin 20px 0px 0px 0px
46
+ a
47
+ :color = !dark_blue
48
+ a:hover
49
+ :text-decoration none
50
+
51
+ #nav
52
+ :background = !dark_blue
53
+ :padding 15px
54
+ .search
55
+ :margin-top 20px
56
+ :width 100%
57
+ :text-align center
58
+ input
59
+ :font-family = !fonts
60
+ :font-size 18px
61
+ :padding 4px
62
+ .search_field
63
+ :width 400px
64
+
65
+ #stats
66
+ :background = !light_grey_bg
67
+ :margin 0px 0px 10px 0px
68
+ :padding 2px
69
+ p
70
+ :text-align center
71
+ :color = !grey
72
+
73
+ #main
74
+ h2
75
+ :position relative
76
+ span.view_options
77
+ :font-size 14px
78
+ :font-weight normal
79
+ :color = !grey
80
+ :position absolute
81
+ :top 5px
82
+ :right 20px
83
+ strong
84
+ :color #333
85
+ :font-weight normal
86
+ .num
87
+ :color = !light_grey
88
+ .column
89
+ :width 460px
90
+ :float left
91
+ .gem
92
+ :font-size 14px
93
+ :margin 5px 0px
94
+ :padding 5px 0px
95
+ .name
96
+ :font-size 16px
97
+ :margin 0px
98
+ :padding 0px 0px 2px 0px
99
+ .description
100
+ :font-size 12px
101
+ :padding 2px 0px
102
+ :color #999
103
+ .versions
104
+ :color = !light_grey
105
+ a
106
+ :color = !grey
107
+ table#gems
108
+ :border-collapse collapse
109
+ :font-size 14px
110
+ :width 100%
111
+ th
112
+ :color = !grey
113
+ :text-align left
114
+ :font-size 12px
115
+ :font-weight normal
116
+ :border-bottom 1px solid #CCC
117
+ td
118
+ :padding 4px 4px 4px 0px
119
+ :vertical-align top
120
+ tr.summary td
121
+ :padding-top 0px
122
+
123
+ #gem
124
+ .description
125
+ :font-size 18px
126
+ :color = #333
127
+ .meta
128
+ :color = !grey
129
+ ul.files,
130
+ ul.files li ul
131
+ :list-style none
132
+ :font-size 14px
133
+ :font-weight normal
134
+ :margin 0px
135
+ :padding 4px 0px 0px
136
+ ul.files
137
+ li
138
+ :padding 4px 0px
139
+ li ul li
140
+ :padding-left 10px
141
+ img
142
+ :vertical-align top
143
+ .controls a
144
+ :padding 0px 4px 0px 0px
145
+ .file_hover
146
+ :background = !highlight
147
+
148
+ .pagination
149
+ :font-size 12px
150
+ :color = !grey
151
+ :width 100%
152
+ :background = !light_grey_bg
153
+ :padding 4px
154
+ :text-align right
155
+ a
156
+ :color = !dark_blue
157
+ a,
158
+ span
159
+ :padding 0px 4px
160
+
161
+ #footer
162
+ :margin 20px
163
+ :padding 10px
164
+ :border-top = 1px solid !light_grey
165
+ .copyright
166
+ :font-size 12px
167
+
168
+ #smallnav
169
+ :background = !dark_blue
170
+ :text-align center
171
+ :width auto
172
+ :padding 5px
173
+ a
174
+ :color #FFF
175
+ .back_link
176
+ :float left
177
+ .viewing
178
+ :color = !light_grey
179
+ #docframe
180
+ :border none
181
+ :padding none
182
+ :margin none
183
+ :width 100%
184
+ :height 95%
185
+ .clear
186
+ :clear both
187
+ :line-height 0px
188
+ :height 0px
@@ -0,0 +1,24 @@
1
+ =haml(:gems_header, :layout => false)
2
+ - unless @gems.empty?
3
+ #gems
4
+ - @gems.each do |gem|
5
+ .column
6
+ .gem
7
+ %h4.name=link_to_gem(gem[:name])
8
+ .description
9
+ - index = gem[:summary].index(' ', 50)
10
+ - if index
11
+ ="#{gem[:summary].slice(0,index)}..."
12
+ - else
13
+ =gem[:summary]
14
+ .versions
15
+ %span
16
+ =AllGems.db[:versions].filter(:gem_id => gem[:id]).order(:version.desc).map{|v| link_to_gem(gem[:name], :version => v[:version], :text => v[:version])}.join(', ')
17
+ .clear
18
+ .div{:style => 'text-align: center; padding: 15px;'}
19
+ =@page > 1 ? link_to('< prev', 'page' => @page - 1) : '< prev'
20
+ |
21
+ =link_to('next >', 'page' => @page + 1)
22
+ - else
23
+ =haml(:no_results, :layout => false)
24
+
@@ -0,0 +1,15 @@
1
+ %h2
2
+ -if @search
3
+ Gems matching
4
+ %em=@search
5
+ %span.num="(#{@search ? @gems.count : AllGems.total_gems})"
6
+ -else
7
+ Installed Gems
8
+ %span.num="(#{AllGems.total_gems})"
9
+ %span.view_options
10
+ View as
11
+ =(@show_as == 'columns') ? '<strong>Columns</strong>' : link_to('Columns', {'as' => 'columns'})
12
+ =' / '
13
+ =(@show_as == 'table') ? '<strong>Table</strong>' : link_to('Table', {'as' => 'table'})
14
+ / |
15
+ /=link_to('Summaries', {'summaries' => 'false'})
@@ -0,0 +1,28 @@
1
+ =haml(:gems_header, :layout => false)
2
+ - unless @gems.empty?
3
+ %table#gems
4
+ %thead
5
+ %th Name
6
+ %th=' '
7
+ %th Versions
8
+ %tbody
9
+ -@gems.each do |gem|
10
+ %tr.gem
11
+ %td.name=link_to_gem(gem[:name])
12
+ %td/
13
+ %td.versions=AllGems.db[:versions].filter(:gem_id => gem[:id]).order(:version.desc).map{|v| link_to_gem(gem[:name], :version => v[:version], :text => v[:version])}.join(', ')
14
+ %tr.gem.summary
15
+ %td/
16
+ %td/
17
+ %td.description
18
+ - index = gem[:summary].index(' ', 100)
19
+ - if index
20
+ ="#{gem[:summary].slice(0,index)}..."
21
+ - else
22
+ =gem[:summary]
23
+ .div{:style => 'text-align: center; padding: 15px;'}
24
+ =@page > 1 ? link_to('< prev', 'page' => @page - 1) : '< prev'
25
+ |
26
+ =link_to('next >', 'page' => @page + 1)
27
+ - else
28
+ =haml(:no_results, :layout => false)
@@ -0,0 +1 @@
1
+ =haml :gems_columns, :locals => {:gems => @gems}, :layout => false
@@ -0,0 +1,59 @@
1
+ %html{:xmlns=> "http://www.w3.org/1999/xhtml", 'xml:lang' => "en", :lang => "en"}
2
+ %head
3
+ %meta{'http-equiv' => "Content-Type", 'content' => "text/html; charset=utf-8"}
4
+ %title AllGems - Document everything
5
+ %link{'href' => '/stylesheets/gembox.css', 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen'}
6
+ -['jquery', 'jquery.ui', 'jquery.metadata', 'jquery.form', 'base', 'gembox'].each do |jslib|
7
+ %script{'type' => 'text/javascript', 'src' => "/javascripts/#{jslib}.js"}
8
+ %body
9
+ #container
10
+ #header
11
+ .contained
12
+ %img{:src => '/images/rubygems-125x125t.png', :alt => 'Rubygems logo', :id => 'logo'}
13
+ %h1=link_to('AllGems', '/')
14
+ #nav
15
+ .contained
16
+ .search
17
+ %form{:method => 'get', :action => '/gems'}
18
+ %input{:type => 'text', :name => 'search', :value => @search, :class => 'search_field', :tabindex => 1}
19
+ %input{:type => 'submit', :value => 'Search'}
20
+ #stats
21
+ .contained
22
+ %p
23
+ Currently
24
+ =AllGems.total_installs
25
+ versions of
26
+ =AllGems.total_gems
27
+ gems available.
28
+ Newest gem is
29
+ =link_to_gem(AllGems.newest_gem[:name])
30
+ released
31
+ =ts(AllGems.newest_gem[:release])
32
+
33
+ #main.contained
34
+ =yield
35
+ #footer
36
+ %p.copyright
37
+ =link_to 'AllGems', 'http://github.com/spox/allgems'
38
+ documentation engine. Developed by
39
+ =link_to 'spox.', 'http://github.com/spox'
40
+ %p.copyright
41
+ Powered by
42
+ =link_to 'Sinatra,', 'http://sinatrarb.com'
43
+ =link_to 'Sequel,', 'http://sequel.rubyforge.org'
44
+ and
45
+ =link_to 'RubyGems.', 'http://rubygems.org'
46
+ %p.copyright
47
+ Based on
48
+ =link_to 'Gembox', 'http://github.com/quirkey/gembox'
49
+ by
50
+ =link_to 'Quirkey', 'http://code.quirkey.com/'
51
+ %p.copyright
52
+ Currently running in
53
+ = @environment
54
+ mode.
55
+
56
+ :erb
57
+ <script type="text/javascript" charset="utf-8">
58
+ jQuery('body').data('sinatra-env', '<%= options.environment %>');
59
+ </script>
@@ -0,0 +1,16 @@
1
+ %html{:xmlns=> "http://www.w3.org/1999/xhtml", 'xml:lang' => "en", :lang => "en"}
2
+ %head
3
+ %meta{'http-equiv' => "Content-Type", 'content' => "text/html; charset=utf-8"}
4
+ %title Gembox
5
+ %link{'href' => '/stylesheets/gembox.css', 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen'}
6
+ -['jquery', 'jquery.ui', 'jquery.metadata', 'jquery.form', 'base', 'gembox'].each do |jslib|
7
+ %script{'type' => 'text/javascript', 'src' => "/javascripts/#{jslib}.js"}
8
+ %body
9
+ #container
10
+ #smallnav
11
+ .back_link=link_to_gem(@gem_name, :version => @gem_version, :text => '&laquo Back to AllGems')
12
+ .viewing
13
+ Viewing RDoc for
14
+ =@gem_name
15
+ &nbsp;
16
+ =@gem_version
@@ -0,0 +1,3 @@
1
+ .no_results
2
+ %p
3
+ Sorry, your search returned no results.
metadata ADDED
@@ -0,0 +1,185 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: allgems
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - spox
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-11-05 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sequel
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: ActionPool
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: ActionTimer
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: haml
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: rdoc
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: sdoc
67
+ type: :runtime
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: hanna
77
+ type: :runtime
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: nokogiri
87
+ type: :runtime
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: "0"
94
+ version:
95
+ description: AllGems is a tool to provide comprehensive gem documentation for an entire index
96
+ email: spox@modspox.com
97
+ executables:
98
+ - allgems
99
+ extensions: []
100
+
101
+ extra_rdoc_files:
102
+ - README.rdoc
103
+ - CHANGELOG
104
+ files:
105
+ - bin
106
+ - bin/allgems
107
+ - public
108
+ - public/swf
109
+ - public/swf/clippy.swf
110
+ - public/images
111
+ - public/images/edit.png
112
+ - public/images/folder.png
113
+ - public/images/page.png
114
+ - public/images/rubygems-125x125t.png
115
+ - public/images/git.gif
116
+ - public/images/page_white_text.png
117
+ - public/javascripts
118
+ - public/javascripts/jquery.metadata.js
119
+ - public/javascripts/gembox.js
120
+ - public/javascripts/base.js
121
+ - public/javascripts/jquery.ui.js
122
+ - public/javascripts/jquery.js
123
+ - public/javascripts/jquery.form.js
124
+ - allgems.gemspec
125
+ - views
126
+ - views/no_results.haml
127
+ - views/gem.haml
128
+ - views/gems_header.haml
129
+ - views/index.haml
130
+ - views/gembox.sass
131
+ - views/gems_table.haml
132
+ - views/file_tree.haml
133
+ - views/load.haml
134
+ - views/doc.haml
135
+ - views/gems_columns.haml
136
+ - views/layout.haml
137
+ - README.rdoc
138
+ - config.ru
139
+ - lib
140
+ - lib/allgems.rb
141
+ - lib/allgems
142
+ - lib/allgems/Specer.rb
143
+ - lib/allgems/GemWorker.rb
144
+ - lib/allgems/App.rb
145
+ - lib/allgems/migrations
146
+ - lib/allgems/migrations/001_initialize.rb
147
+ - lib/allgems/ViewHelpers.rb
148
+ - lib/allgems/Indexer.rb
149
+ - lib/allgems/Configurator.rb
150
+ - lib/allgems/IndexBuilder.rb
151
+ - lib/allgems/hanna_hack.rb
152
+ - lib/allgems/Runner.rb
153
+ - CHANGELOG
154
+ has_rdoc: false
155
+ homepage: http://github.com/spox/allgems
156
+ post_install_message:
157
+ rdoc_options:
158
+ - --title
159
+ - AllGems
160
+ - --main
161
+ - README.rdoc
162
+ - --line-numbers
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: 1.8.6
170
+ version:
171
+ required_rubygems_version: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: "0"
176
+ version:
177
+ requirements: []
178
+
179
+ rubyforge_project:
180
+ rubygems_version: 1.3.1
181
+ signing_key:
182
+ specification_version: 2
183
+ summary: Tools to document the world
184
+ test_files: []
185
+