Skip to content

Commit

Permalink
Version Bump v0.2.1
Browse files Browse the repository at this point in the history
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
quirkey committed Aug 30, 2009
1 parent bc342ca commit 2a4cfc2
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
7 changes: 7 additions & 0 deletions 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 == 0.2.0 2009-07-06


* Updated to latest version of Vegas for Windows compatability * Updated to latest version of Vegas for Windows compatability
Expand Down
4 changes: 2 additions & 2 deletions 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' require File.dirname(__FILE__) + '/lib/gembox'


# Generate all the Rake tasks # Generate all the Rake tasks
Expand All @@ -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.url = ['http://code.quirkey.com/gembox', 'http://github.com/quirkey/gembox']
p.extra_deps = [ p.extra_deps = [
['sinatra', '>=0.9.2'], ['sinatra', '>=0.9.2'],
['vegas', '>=0.0.3.1'], ['vegas', '>=0.1.0'],
['haml', '>=2.0.9'], ['haml', '>=2.0.9'],
['rdoc', '=2.4.3'], ['rdoc', '=2.4.3'],
['activesupport', '>=2.2.2'], ['activesupport', '>=2.2.2'],
Expand Down
4 changes: 3 additions & 1 deletion bin/gembox
Expand Up @@ -6,4 +6,6 @@
require File.expand_path(File.dirname(__FILE__) + "/../lib/gembox") require File.expand_path(File.dirname(__FILE__) + "/../lib/gembox")
require 'vegas' 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}" : '' }
})
12 changes: 6 additions & 6 deletions gembox.gemspec
Expand Up @@ -2,11 +2,11 @@


Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{gembox} 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.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Aaron Quint"] s.authors = ["Aaron Quint"]
s.date = %q{2009-07-06} s.date = %q{2009-08-30}
s.default_executable = %q{gembox} s.default_executable = %q{gembox}
s.description = %q{A sinatra based interface for browsing and admiring your gems.} s.description = %q{A sinatra based interface for browsing and admiring your gems.}
s.email = ["aaron@quirkey.com"] s.email = ["aaron@quirkey.com"]
Expand All @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--main", "README.rdoc"] s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubyforge_project = %q{quirkey} 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.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"] s.test_files = ["test/test_gembox_app.rb", "test/test_gembox_gems.rb", "test/test_helper.rb"]


Expand All @@ -28,7 +28,7 @@ Gem::Specification.new do |s|


if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then 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<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<haml>, [">= 2.0.9"])
s.add_runtime_dependency(%q<rdoc>, ["= 2.4.3"]) s.add_runtime_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_runtime_dependency(%q<activesupport>, [">= 2.2.2"]) s.add_runtime_dependency(%q<activesupport>, [">= 2.2.2"])
Expand All @@ -38,7 +38,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<hoe>, [">= 1.8.0"]) s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
else else
s.add_dependency(%q<sinatra>, [">= 0.9.2"]) 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<haml>, [">= 2.0.9"])
s.add_dependency(%q<rdoc>, ["= 2.4.3"]) s.add_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_dependency(%q<activesupport>, [">= 2.2.2"]) s.add_dependency(%q<activesupport>, [">= 2.2.2"])
Expand All @@ -49,7 +49,7 @@ Gem::Specification.new do |s|
end end
else else
s.add_dependency(%q<sinatra>, [">= 0.9.2"]) 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<haml>, [">= 2.0.9"])
s.add_dependency(%q<rdoc>, ["= 2.4.3"]) s.add_dependency(%q<rdoc>, ["= 2.4.3"])
s.add_dependency(%q<activesupport>, [">= 2.2.2"]) s.add_dependency(%q<activesupport>, [">= 2.2.2"])
Expand Down
2 changes: 1 addition & 1 deletion lib/gembox.rb
Expand Up @@ -10,7 +10,7 @@
require 'will_paginate/view_helpers' require 'will_paginate/view_helpers'


module Gembox module Gembox
VERSION = '0.2.0' VERSION = '0.2.1'
end end


require 'gembox/extensions' require 'gembox/extensions'
Expand Down
6 changes: 5 additions & 1 deletion lib/gembox/app.rb
Expand Up @@ -61,7 +61,11 @@ class App < ::Sinatra::Default
show_layout = params[:layout] != 'false' show_layout = params[:layout] != 'false'
@show_as = params[:as] || 'columns' @show_as = params[:as] || 'columns'
if @search = params[:search] 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 end
haml "gems_#{@show_as}".to_sym, :layout => show_layout haml "gems_#{@show_as}".to_sym, :layout => show_layout
end end
Expand Down
4 changes: 2 additions & 2 deletions test/test_gembox_app.rb
Expand Up @@ -110,7 +110,7 @@


describe 'getting gems/name/version' do describe 'getting gems/name/version' do
before do before do
get '/gems/sinatra/0.9.0.4' get "/gems/sinatra/#{Sinatra::VERSION}"
end end


should "display dependencies" do should "display dependencies" do
Expand All @@ -122,7 +122,7 @@
end end


should "load gem spec specified version" do should "load gem spec specified version" do
body.should have_element('.version', '0.9.0.4') body.should have_element('.version', Sinatra::VERSION)
end end


should "display links to all versions" do should "display links to all versions" do
Expand Down

0 comments on commit 2a4cfc2

Please sign in to comment.