nav 0.3.2 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/nav/builder.rb +8 -5
  2. data/lib/nav/version.rb +1 -1
  3. metadata +6 -6
data/lib/nav/builder.rb CHANGED
@@ -72,11 +72,6 @@ module Nav
72
72
  false
73
73
  end
74
74
 
75
- def request_uri
76
- @request_uri or @request_uri = @template.request.request_uri
77
- end
78
-
79
-
80
75
  def content_tag( *args )
81
76
  @template.content_tag( *args ).html_safe
82
77
  end
@@ -84,6 +79,14 @@ module Nav
84
79
  def link_to( *args )
85
80
  @template.link_to( *args ).html_safe
86
81
  end
82
+
83
+ def request_uri
84
+ @request_uri or @request_uri = request.respond_to?(:request_uri) ? request.request_uri : request.url
85
+ end
86
+
87
+ def request
88
+ @template.request
89
+ end
87
90
  end
88
91
  end
89
92
 
data/lib/nav/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nav
2
2
 
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.1"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-31 00:00:00.000000000Z
12
+ date: 2011-11-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
16
- requirement: &16805620 !ruby/object:Gem::Requirement
16
+ requirement: &10030440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16805620
24
+ version_requirements: *10030440
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rr
27
- requirement: &16804580 !ruby/object:Gem::Requirement
27
+ requirement: &10029860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *16804580
35
+ version_requirements: *10029860
36
36
  description: Simple nagivation builder
37
37
  email:
38
38
  executables: []