rack-golem 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/golem.rb +4 -2
- data/rack-golem.gemspec +3 -1
- data/test/spec_golem.rb +0 -1
- metadata +37 -6
data/lib/rack/golem.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'tilt'
|
2
|
+
|
1
3
|
module Rack::Golem
|
2
4
|
|
3
5
|
def self.included(klass)
|
@@ -16,8 +18,8 @@ module Rack::Golem
|
|
16
18
|
@dispatcher_block || proc{
|
17
19
|
@path_atoms = @r.path_info.split('/').find_all{|s| s!=''}
|
18
20
|
@action, *@action_arguments = @path_atoms
|
19
|
-
unless public_methods.include?(@action)
|
20
|
-
if public_methods.include?('index')
|
21
|
+
unless public_methods.include?(@action)||public_methods.include?((@action||'').to_sym)
|
22
|
+
if public_methods.include?('index')||public_methods.include?(:index)
|
21
23
|
@action, @action_arguments = 'index', @path_atoms
|
22
24
|
else
|
23
25
|
@action, @action_arguments = 'not_found', @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.0.
|
3
|
+
s.version = "0.0.2"
|
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"
|
@@ -9,4 +9,6 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.author = "Mickael Riga"
|
10
10
|
s.email = "mig@campbellhay.com"
|
11
11
|
s.homepage = "http://www.campbellhay.com"
|
12
|
+
s.add_dependency(%q<tilt>, ["~> 1.2.2"])
|
13
|
+
s.add_development_dependency(%q<bacon>, "~> 1.1.0")
|
12
14
|
end
|
data/test/spec_golem.rb
CHANGED
@@ -86,7 +86,6 @@ describe "Golem" do
|
|
86
86
|
end
|
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
|
-
Indexed.new.public_methods.include?(:index)
|
90
89
|
IndexedR.get('/a/b/c/d').body.should=='a+b+c+d'
|
91
90
|
end
|
92
91
|
it "Should set dispatch-specific variables correctly when defaulting to :index" do
|
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: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mickael Riga
|
@@ -15,10 +15,41 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-06 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: tilt
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 27
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
- 2
|
34
|
+
version: 1.2.2
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bacon
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 19
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 1
|
49
|
+
- 0
|
50
|
+
version: 1.1.0
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
22
53
|
description: A Controller middleware that is euh... basic. I would say it is a sort of Ramaze for kids
|
23
54
|
email: mig@campbellhay.com
|
24
55
|
executables: []
|