Browse files

use latest parameters_extra, was method-args

  • Loading branch information...
1 parent 67b037a commit d0c0cdf8ad96ff09e433bd87184d8ae285811aae Josh Hull committed Jan 24, 2011
Showing with 9 additions and 9 deletions.
  1. +4 −4 Gemfile.lock
  2. +1 −1 apiary.gemspec
  3. +3 −3 lib/apiary.rb
  4. +1 −1 lib/apiary/version.rb
View
8 Gemfile.lock
@@ -4,7 +4,7 @@ PATH
apiary (0.0.4)
callsite
http_router
- method-args
+ parameters_extra (~> 0.2.0)
rack
thin
thin_async
@@ -22,11 +22,11 @@ GEM
http_router (0.5.0)
rack (>= 1.0.0)
url_mount (~> 0.2.1)
- method-args (0.1.0)
+ minitest (2.0.2)
+ parameters_extra (0.2.0)
ruby2ruby (~> 1.2.4)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0.4)
- minitest (2.0.2)
rack (1.2.1)
rake (0.8.7)
ruby2ruby (1.2.5)
@@ -52,8 +52,8 @@ DEPENDENCIES
callsite
em-http-request
http_router
- method-args
minitest (~> 2.0.0)
+ parameters_extra (~> 0.2.0)
rack
rake
thin
View
2 apiary.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.add_dependency 'callsite'
- s.add_dependency 'method-args'
+ s.add_dependency 'parameters_extra', "~> 0.2.0"
s.add_dependency 'thin'
s.add_dependency 'http_router'
s.add_dependency 'rack'
View
6 lib/apiary.rb
@@ -1,4 +1,4 @@
-require 'method_args'
+require 'parameters_extra'
require 'callsite'
require 'http_router'
require 'thin'
@@ -35,15 +35,15 @@ def __set_routing(method, path, async = false)
def method_added(m)
if @http_method
- MethodArgs.register(Callsite.parse(caller.first).filename)
+ ParametersExtra.register(Callsite.parse(caller.first).filename)
@cmds ||= []
@cmds << ApiMethod.new(m, @http_method, @path, @async)
@http_method, @path, @async = nil, nil, nil
end
end
def default_path(m)
- instance_method(m).args.inject(m.to_s) do |path, arg|
+ instance_method(m).parameters_extra.inject(m.to_s) do |path, arg|
path << case arg.type
when :required then "/:#{arg.name}"
when :optional then "/(:#{arg.name})"
View
2 lib/apiary/version.rb
@@ -1,3 +1,3 @@
module Apiary
- VERSION = '0.0.4'
+ VERSION = '0.0.5'
end

0 comments on commit d0c0cdf

Please sign in to comment.