rack-golem 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rack/golem.rb +1 -1
- data/rack-golem.gemspec +1 -1
- data/test/spec_golem.rb +1 -0
- metadata +3 -3
data/lib/rack/golem.rb
CHANGED
@@ -18,7 +18,7 @@ module Rack::Golem
|
|
18
18
|
@dispatcher_block || proc{
|
19
19
|
@path_atoms = @r.path_info.split('/').find_all{|s| s!=''}
|
20
20
|
@action, *@action_arguments = @path_atoms
|
21
|
-
unless public_methods.include?(@action)||public_methods.include?(
|
21
|
+
unless public_methods.include?(@action)||(@action&&public_methods.include?(@action.to_sym))
|
22
22
|
if public_methods.include?('index')||public_methods.include?(:index)
|
23
23
|
@action, @action_arguments = 'index', @path_atoms
|
24
24
|
else
|
data/rack-golem.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rack-golem'
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.3"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "A Controller middleware that is euh... basic"
|
6
6
|
s.description = "A Controller middleware that is euh... basic. I would say it is a sort of Ramaze for kids"
|
data/test/spec_golem.rb
CHANGED
@@ -87,6 +87,7 @@ describe "Golem" do
|
|
87
87
|
it "Should send everything to :index if it exists and there is no matching method for first arg" do
|
88
88
|
IndexedR.get('/exist/a/b/c/d').body.should=='a+b+c+d'
|
89
89
|
IndexedR.get('/a/b/c/d').body.should=='a+b+c+d'
|
90
|
+
IndexedR.get('/').body.should==''
|
90
91
|
end
|
91
92
|
it "Should set dispatch-specific variables correctly when defaulting to :index" do
|
92
93
|
IndexedR.get('/a/b/c/d?switch=true').body.should=="action=index args=a,b,c,d a+b+c+d"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-golem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mickael Riga
|