nav 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/nav/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nav
2
2
 
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
 
5
5
  end
data/lib/nav.rb CHANGED
@@ -5,7 +5,8 @@ module Nav
5
5
  def nav( options = {}, &block )
6
6
  builder = Builder.new( self, options )
7
7
  yield( builder )
8
- concat( builder.to_html ).html_safe if builder.actions?
8
+
9
+ builder.to_html if builder.actions?
9
10
  end
10
11
 
11
12
 
@@ -36,7 +37,7 @@ module Nav
36
37
  def actions?; @actions.any?; end
37
38
 
38
39
  def to_html
39
- content_tag :ul, actions.html_safe, @options
40
+ content_tag( :ul, actions.html_safe, @options ).html_safe
40
41
  end
41
42
 
42
43
 
@@ -98,3 +99,5 @@ module Nav
98
99
  end
99
100
 
100
101
  end
102
+
103
+ ActionView::Base.send :include, Nav
data/test/test_helper.rb CHANGED
@@ -7,7 +7,7 @@ begin
7
7
  rescue LoadError
8
8
  STDERR.puts "Unable to run Nav tests."
9
9
  else
10
- require File.dirname(__FILE__) + "/../init"
10
+ require File.dirname(__FILE__) + "/../lib/nav"
11
11
  end
12
12
 
13
13
 
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.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
16
- requirement: &22210100 !ruby/object:Gem::Requirement
16
+ requirement: &18194960 !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: *22210100
24
+ version_requirements: *18194960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rr
27
- requirement: &22209660 !ruby/object:Gem::Requirement
27
+ requirement: &18194220 !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: *22209660
35
+ version_requirements: *18194220
36
36
  description: Simple nagivation builder
37
37
  email:
38
38
  executables: []
@@ -42,7 +42,6 @@ files:
42
42
  - .gitignore
43
43
  - Gemfile
44
44
  - Rakefile
45
- - init.rb
46
45
  - lib/nav.rb
47
46
  - lib/nav/version.rb
48
47
  - nav.gemspec
data/init.rb DELETED
@@ -1,5 +0,0 @@
1
- require File.dirname(__FILE__) + '/lib/nav'
2
-
3
- if defined?( ActionView::Base )
4
- ActionView::Base.send :include, Nav
5
- end