diff --git a/Rakefile b/Rakefile index 2f45f4a..5108405 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,7 @@ require 'rake' begin require 'jeweler' Jeweler::Tasks.new do |gem| - gem.name = "snap" + gem.name = "sinatra-snap" gem.summary = "Sinatra NAmed Path support" gem.email = "bcarlso@gmail.com" gem.homepage = "http://github.com/bcarlso/snap" diff --git a/examples/named_route_example.rb b/examples/named_route_example.rb index 7f02190..321c719 100644 --- a/examples/named_route_example.rb +++ b/examples/named_route_example.rb @@ -1,6 +1,6 @@ require 'rubygems' require 'sinatra' -require '../lib/sinatra/named_path_support' +require 'sinatra-snap' path :home => '/index' paths :add => '/add/:augend/:addend', @@ -13,7 +13,7 @@ end get :add do - redirect(path_to(:result).with(params[:augend], params[:addend])) + redirect(path_to(:sum).with(params[:augend], params[:addend])) end get :sum do @@ -37,5 +37,5 @@ end get :hello do - "Hi #{:name}" + "Hi #{params[:name]}" end \ No newline at end of file diff --git a/lib/snap.rb b/lib/sinatra-snap.rb similarity index 100% rename from lib/snap.rb rename to lib/sinatra-snap.rb diff --git a/snap.gemspec b/sinatra-snap.gemspec similarity index 88% rename from snap.gemspec rename to sinatra-snap.gemspec index 99fb006..1c2895c 100644 --- a/snap.gemspec +++ b/sinatra-snap.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = %q{snap} + s.name = %q{sinatra-snap} s.version = "0.3.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= @@ -21,12 +21,12 @@ Gem::Specification.new do |s| "VERSION", "examples/named_route_example.rb", "lib/sinatra/named_path_support.rb", - "lib/snap.rb", - "snap.gemspec", + "lib/sinatra-snap.rb", + "sinatra-snap.gemspec", "spec/snap_spec.rb", "spec/spec_helper.rb" ] - s.homepage = %q{http://github.com/bcarlso/snap} + s.homepage = %q{http://github.com/bcarlso/sinatra-snap} s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] s.rubygems_version = %q{1.3.5}