rack-golem 0.1.2 → 0.1.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 +4 -0
- metadata +2 -2
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
|
-
@action.gsub
|
21
|
+
@action = @action.gsub(/[-.]/, '_') unless @action.nil?
|
22
22
|
unless public_methods.include?(@action)||(@action&&public_methods.include?(@action.to_sym))
|
23
23
|
if public_methods.include?('index')||public_methods.include?(:index) # For different RUBY_VERSION(s)
|
24
24
|
@action, @action_arguments = 'index', @path_atoms
|
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.1.
|
3
|
+
s.version = "0.1.3"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "A Controller middleware that is fairly basic"
|
6
6
|
s.description = "A Controller middleware that is fairly basic. I would say it is a sort of Ramaze for kids"
|
data/test/spec_golem.rb
CHANGED
@@ -113,6 +113,10 @@ describe "Golem" do
|
|
113
113
|
BasicR.get('/best-restaurants.rss').body.should=='<xml>test</xml>'
|
114
114
|
end
|
115
115
|
|
116
|
+
it "Should only apply '-' and '.' substitution on action names" do
|
117
|
+
IndexedR.get('/best-restaurants.rss').body.should=='best-restaurants.rss'
|
118
|
+
end
|
119
|
+
|
116
120
|
it "Should follow the rack stack if response is 404 and there are middlewares below" do
|
117
121
|
r = BasicLobsterR.get("/no_way")
|
118
122
|
r.status.should==200
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-golem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tilt
|