sinatra-resources 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,8 @@
1
1
 
2
+ == 0.1.2 (May 23, 2010)
3
+
4
+ * Integrated patch to use super instead of method chains - niko (Niko Dittmann)
5
+
2
6
  == 0.1.1 (January 14, 2010)
3
7
 
4
8
  * Fixed nested symbol routes - eddanger (Michael Wood)
@@ -1,21 +1,9 @@
1
1
  module Sinatra
2
2
  module Resources
3
- def self.registered(app)
4
- [:get, :post, :put, :delete].each do |meth|
5
- # http://whynotwiki.com/Ruby_/_Method_aliasing_and_chaining#Can_you_alias_class_methods.3F
6
- app.class_eval <<-EndAlias
7
- class << self
8
- alias_method :#{meth}_without_resource, :#{meth}
9
- alias_method :#{meth}, :#{meth}_with_resource
10
- end
11
- EndAlias
12
- end
13
- end
14
-
15
3
  [:get, :post, :put, :delete].each do |meth|
16
4
  class_eval <<-EndMeth
17
- def #{meth}_with_resource(path=nil, options={}, &block)
18
- #{meth}_without_resource(make_path(path), options, &block)
5
+ def #{meth}(path=nil, options={}, &block)
6
+ super(make_path(path), options, &block)
19
7
  end
20
8
  EndMeth
21
9
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper'
1
+ require File.expand_path 'helper', File.dirname(__FILE__)
2
2
 
3
3
  # Helper method for easy route pattern matching testing
4
4
  def route_def(pattern)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Nate Wiger
@@ -9,20 +14,25 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-14 00:00:00 -08:00
17
+ date: 2010-05-23 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: sinatra
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 9
31
+ - 0
23
32
  version: 0.9.0
24
- version:
25
- description: Adds resource and member blocks to DSL. Based on widely-followed Sinatra ticket.
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: Simple nested resources for Sinatra. Based on widely-followed Sinatra ticket.
26
36
  email: nate@wiger.org
27
37
  executables: []
28
38
 
@@ -50,21 +60,25 @@ rdoc_options:
50
60
  require_paths:
51
61
  - lib
52
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
53
64
  requirements:
54
65
  - - ">="
55
66
  - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
56
69
  version: "0"
57
- version:
58
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
+ none: false
59
72
  requirements:
60
73
  - - ">="
61
74
  - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
62
77
  version: "0"
63
- version:
64
78
  requirements:
65
79
  - sinatra, v0.9.0 or greater
66
80
  rubyforge_project: sinatra-resources
67
- rubygems_version: 1.3.5
81
+ rubygems_version: 1.3.7
68
82
  signing_key:
69
83
  specification_version: 3
70
84
  summary: Simple nested resources for Sinatra