Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version Bump v0.2.1

This is a minor upgrade, mainly to take advantage of a new feature of Vegas. Namely you can now pass the name of a gem search to gembox on the command line.
  • Loading branch information...
commit 2a4cfc2403d1cdd505249868db6e5f04c0fc66c5 1 parent bc342ca
@quirkey authored
View
7 History.txt
@@ -1,3 +1,10 @@
+== 0.2.1 2009-08-30
+
+* Typing in an argument in the command line will launch to that specific search:
+e.g. $ gembox rack #=> opens gembox to the rack page.
+* If a search exactly matches a gem name it will open that gems info page instead of displaying search results
+* Updated to latest version of Vegas
+
== 0.2.0 2009-07-06
* Updated to latest version of Vegas for Windows compatability
View
4 Rakefile
@@ -1,4 +1,4 @@
-%w[rubygems rake rake/clean fileutils newgem rubigen jeweler].each { |f| require f }
+%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
require File.dirname(__FILE__) + '/lib/gembox'
# Generate all the Rake tasks
@@ -13,7 +13,7 @@ $hoe = Hoe.new('gembox', Gembox::VERSION) do |p|
p.url = ['http://code.quirkey.com/gembox', 'http://github.com/quirkey/gembox']
p.extra_deps = [
['sinatra', '>=0.9.2'],
- ['vegas', '>=0.0.3.1'],
+ ['vegas', '>=0.1.0'],
['haml', '>=2.0.9'],
['rdoc', '=2.4.3'],
['activesupport', '>=2.2.2'],
View
4 bin/gembox
@@ -6,4 +6,6 @@
require File.expand_path(File.dirname(__FILE__) + "/../lib/gembox")
require 'vegas'
-Vegas::Runner.new(Gembox::App, 'gembox')
+Vegas::Runner.new(Gembox::App, 'gembox', {
+ :launch_path => lambda {|r| r.args.first ? "/gems/?search=#{r.args.first}" : '' }
+})
View
12 gembox.gemspec
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{gembox}
- s.version = "0.2.0"
+ s.version = "0.2.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Aaron Quint"]
- s.date = %q{2009-07-06}
+ s.date = %q{2009-08-30}
s.default_executable = %q{gembox}
s.description = %q{A sinatra based interface for browsing and admiring your gems.}
s.email = ["aaron@quirkey.com"]
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{quirkey}
- s.rubygems_version = %q{1.3.3}
+ s.rubygems_version = %q{1.3.5}
s.summary = %q{A sinatra based interface for browsing and admiring your gems.}
s.test_files = ["test/test_gembox_app.rb", "test/test_gembox_gems.rb", "test/test_helper.rb"]
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
- s.add_runtime_dependency(%q<vegas>, [">= 0.0.3.1"])
+ s.add_runtime_dependency(%q<vegas>, [">= 0.1.0"])
s.add_runtime_dependency(%q<haml>, [">= 2.0.9"])
s.add_runtime_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_runtime_dependency(%q<activesupport>, [">= 2.2.2"])
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
else
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
- s.add_dependency(%q<vegas>, [">= 0.0.3.1"])
+ s.add_dependency(%q<vegas>, [">= 0.1.0"])
s.add_dependency(%q<haml>, [">= 2.0.9"])
s.add_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_dependency(%q<activesupport>, [">= 2.2.2"])
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
end
else
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
- s.add_dependency(%q<vegas>, [">= 0.0.3.1"])
+ s.add_dependency(%q<vegas>, [">= 0.1.0"])
s.add_dependency(%q<haml>, [">= 2.0.9"])
s.add_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_dependency(%q<activesupport>, [">= 2.2.2"])
View
2  lib/gembox.rb
@@ -10,7 +10,7 @@
require 'will_paginate/view_helpers'
module Gembox
- VERSION = '0.2.0'
+ VERSION = '0.2.1'
end
require 'gembox/extensions'
View
6 lib/gembox/app.rb
@@ -61,7 +61,11 @@ class App < ::Sinatra::Default
show_layout = params[:layout] != 'false'
@show_as = params[:as] || 'columns'
if @search = params[:search]
- @gems = Gembox::Gems.search(@search).paginate :page => params[:page]
+ @gems = Gembox::Gems.search(@search).paginate :page => params[:page]
+ if !@gems.empty? && gem = @gems.find {|k,v| k.strip == @search.strip }
+ gem = gem[1][0]
+ redirect "/gems/#{gem.name}/#{gem.version}" and return
+ end
end
haml "gems_#{@show_as}".to_sym, :layout => show_layout
end
View
4 test/test_gembox_app.rb
@@ -110,7 +110,7 @@
describe 'getting gems/name/version' do
before do
- get '/gems/sinatra/0.9.0.4'
+ get "/gems/sinatra/#{Sinatra::VERSION}"
end
should "display dependencies" do
@@ -122,7 +122,7 @@
end
should "load gem spec specified version" do
- body.should have_element('.version', '0.9.0.4')
+ body.should have_element('.version', Sinatra::VERSION)
end
should "display links to all versions" do
Please sign in to comment.
Something went wrong with that request. Please try again.