gembox 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.5 2009-05-22
2
+
3
+ * Fixed the config.ru so gembox can run on passenger [Thanks Lenary]
4
+
1
5
  == 0.1.4 2009-04-13
2
6
 
3
7
  * Using the brand new release of Vegas for the binary
data/README.rdoc CHANGED
@@ -8,6 +8,28 @@ Please see the project home page for a full description:
8
8
 
9
9
  http://code.quirkey.com/gembox
10
10
 
11
+ === USAGE:
12
+
13
+ ==== BASIC:
14
+
15
+ Install gembox:
16
+
17
+ sudo gem install gembox
18
+
19
+ On the command-line:
20
+
21
+ $ gembox
22
+
23
+ And it should launch gembox in your browser.
24
+
25
+ ==== WITH PASSENGER:
26
+
27
+ To use Gembox with Passenger Pane there are a few simple steps you need to do:
28
+
29
+ $ git clone git://github.com/quirkey/gembox.git
30
+ $ open ./gembox/
31
+
32
+ Then open up Passenger Pane and drag the open Gembox folder into the list on the left (You'll have to be authenticated). Now browse to http://gembox.local/ and you'll see gembox! I told you it was simple.
11
33
 
12
34
  == LICENSE:
13
35
 
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ $hoe = Hoe.new('gembox', Gembox::VERSION) do |p|
12
12
  p.summary = p.description = "A sinatra based interface for browsing and admiring your gems."
13
13
  p.url = ['http://code.quirkey.com/gembox', 'http://github.com/quirkey/gembox']
14
14
  p.extra_deps = [
15
- ['sinatra', '>=0.9.1'],
15
+ ['sinatra', '>=0.9.2'],
16
16
  ['vegas', '>=0.0.1'],
17
17
  ['haml', '>=2.0.9'],
18
18
  ['activesupport', '>=2.2.2'],
data/config.ru ADDED
@@ -0,0 +1,9 @@
1
+ # To use with thin
2
+ # thin start -p PORT -R config.ru
3
+ require File.join(File.dirname(__FILE__), 'lib', 'gembox')
4
+
5
+ disable :run
6
+ Gembox::App.set({
7
+ :environment => :production
8
+ })
9
+ run Gembox::App
data/lib/gembox.rb CHANGED
@@ -2,12 +2,14 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  require 'rubygems'
5
+ require 'haml'
6
+ require 'sass'
5
7
  require 'active_support'
6
8
  require 'will_paginate/array'
7
9
  require 'will_paginate/view_helpers'
8
10
 
9
11
  module Gembox
10
- VERSION = '0.1.4'
12
+ VERSION = '0.1.5'
11
13
  end
12
14
 
13
15
  require 'extensions'
data/lib/gembox/app.rb CHANGED
@@ -9,11 +9,12 @@ module Gembox
9
9
 
10
10
  set :root, @@root
11
11
  set :app_file, __FILE__
12
-
12
+
13
13
  before do
14
14
  Gembox::Gems.load
15
- @gems = Gembox::Gems.local_gems.paginate :page => params[:page], :per_page => 30
15
+ @gems = Gembox::Gems.local_gems.paginate :page => params[:page], :per_page => 30
16
16
  @stats = Gembox::Gems.stats
17
+ @search ||= ''
17
18
  end
18
19
 
19
20
  get '/stylesheets/:stylesheet.css' do
@@ -46,7 +47,7 @@ module Gembox
46
47
  action = params[:action] || 'view'
47
48
  file_path = File.join(@gem.full_gem_path, params[:file])
48
49
  if File.readable?(file_path)
49
- if action == 'edit'
50
+ if action == 'edit' && !production?
50
51
  `$EDITOR #{file_path}`
51
52
  else
52
53
  content_type 'text/plain'
@@ -42,9 +42,11 @@
42
42
  } else {
43
43
  // build controls
44
44
  var $controls = $('<span class="controls"></span>');
45
- $('<a><img src="/images/edit.png" alt="Edit"/></a>')
46
- .attr('href', meta.url + '&action=edit')
47
- .appendTo($controls);
45
+ if ($('body').data('sinatra-env') != 'production') {
46
+ $('<a><img src="/images/edit.png" alt="Edit"/></a>')
47
+ .attr('href', meta.url + '&action=edit')
48
+ .appendTo($controls);
49
+ }
48
50
  if (!meta.subdirs) {
49
51
  $('<a><img src="/images/page_white_text.png" alt="View Raw"/></a>')
50
52
  .attr('href', meta.url + '&action=view')
data/views/layout.haml CHANGED
@@ -40,4 +40,9 @@
40
40
  =link_to 'Sinatra.', 'http://sinatrrb.com'
41
41
  %p.copyright
42
42
  Hey! I'm
43
- =link_to 'open-source!', 'http://github.com/quirkey/gembox'
43
+ =link_to 'open-source!', 'http://github.com/quirkey/gembox'
44
+
45
+ :erb
46
+ <script type="text/javascript" charset="utf-8">
47
+ jQuery('body').data('sinatra-env', '<%= options.environment %>');
48
+ </script>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gembox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Quint
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-13 00:00:00 -04:00
12
+ date: 2009-05-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.1
23
+ version: 0.9.2
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: vegas
@@ -108,11 +108,11 @@ files:
108
108
  - PostInstall.txt
109
109
  - README.rdoc
110
110
  - Rakefile
111
+ - config.ru
111
112
  - bin/gembox
112
113
  - lib/extensions.rb
113
114
  - lib/gembox.rb
114
115
  - lib/gembox/app.rb
115
- - lib/gembox/config.ru
116
116
  - lib/gembox/gem_list.rb
117
117
  - lib/gembox/gems.rb
118
118
  - lib/gembox/view_helpers.rb
@@ -145,6 +145,8 @@ files:
145
145
  - views/no_results.haml
146
146
  has_rdoc: true
147
147
  homepage: http://code.quirkey.com/gembox
148
+ licenses: []
149
+
148
150
  post_install_message: PostInstall.txt
149
151
  rdoc_options:
150
152
  - --main
@@ -166,9 +168,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
168
  requirements: []
167
169
 
168
170
  rubyforge_project: quirkey
169
- rubygems_version: 1.3.1
171
+ rubygems_version: 1.3.3
170
172
  signing_key:
171
- specification_version: 2
173
+ specification_version: 3
172
174
  summary: A sinatra based interface for browsing and admiring your gems.
173
175
  test_files:
174
176
  - test/test_gembox_app.rb
data/lib/gembox/config.ru DELETED
@@ -1,8 +0,0 @@
1
- # To use with thin
2
- # thin start -p PORT -R config.ru
3
-
4
- require File.join(File.dirname(__FILE__), 'gembox')
5
-
6
- disable :run
7
- set :env, :production
8
- run Gembox::App