active_link_to 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_link_to}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oleg Khabarov"]
12
- s.date = %q{2011-05-10}
12
+ s.date = %q{2011-06-23}
13
13
  s.description = %q{Extremely helpful when you need to add some logic that figures out if the link (or more often navigation item) is selected based on the current page or other arbitrary condition}
14
14
  s.email = %q{oleg@theworkinggroup.ca}
15
15
  s.extra_rdoc_files = [
@@ -29,12 +29,8 @@ Gem::Specification.new do |s|
29
29
  ]
30
30
  s.homepage = %q{http://github.com/twg/active_link_to}
31
31
  s.require_paths = ["lib"]
32
- s.rubygems_version = %q{1.7.2}
32
+ s.rubygems_version = %q{1.6.2}
33
33
  s.summary = %q{Marks currently active links}
34
- s.test_files = [
35
- "test/active_link_to_test.rb",
36
- "test/test_helper.rb"
37
- ]
38
34
 
39
35
  if s.respond_to? :specification_version then
40
36
  s.specification_version = 3
@@ -122,7 +122,7 @@ module ActiveLinkTo
122
122
  html_options[:class] += " #{css_class}" if !css_class.blank?
123
123
  html_options[:class].blank? ? html_options.delete(:class) : html_options[:class].lstrip!
124
124
 
125
- if active_link_options[:disable_link] === true
125
+ if active_link_options[:disable_link] === true && is_active_link?(url, active_link_options)
126
126
  content_tag(:span, name, html_options)
127
127
  else
128
128
  link_to(name, url, html_options)
@@ -86,6 +86,9 @@ class ActiveLinkToTest < Test::Unit::TestCase
86
86
  request.fullpath = '/test'
87
87
  out = active_link_to 'name', '/test', :active => { :disable_link => true }
88
88
  assert_equal '<span class="active">name</span>', out
89
+
90
+ out = active_link_to 'name', '/other', :active => { :disable_link => true }
91
+ assert_equal '<a href="/other">name</a>', out
89
92
  end
90
93
 
91
94
  def test_should_not_modify_passed_params
metadata CHANGED
@@ -1,28 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: active_link_to
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
4
5
  prerelease:
5
- version: 0.0.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Oleg Khabarov
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-10 00:00:00 Z
12
+ date: 2011-06-23 00:00:00.000000000 -04:00
13
+ default_executable:
14
14
  dependencies: []
15
-
16
- description: Extremely helpful when you need to add some logic that figures out if the link (or more often navigation item) is selected based on the current page or other arbitrary condition
15
+ description: Extremely helpful when you need to add some logic that figures out if
16
+ the link (or more often navigation item) is selected based on the current page or
17
+ other arbitrary condition
17
18
  email: oleg@theworkinggroup.ca
18
19
  executables: []
19
-
20
20
  extensions: []
21
-
22
- extra_rdoc_files:
21
+ extra_rdoc_files:
23
22
  - LICENSE
24
23
  - README.md
25
- files:
24
+ files:
26
25
  - LICENSE
27
26
  - README.md
28
27
  - Rakefile
@@ -32,33 +31,29 @@ files:
32
31
  - lib/active_link_to.rb
33
32
  - test/active_link_to_test.rb
34
33
  - test/test_helper.rb
34
+ has_rdoc: true
35
35
  homepage: http://github.com/twg/active_link_to
36
36
  licenses: []
37
-
38
37
  post_install_message:
39
38
  rdoc_options: []
40
-
41
- require_paths:
39
+ require_paths:
42
40
  - lib
43
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
44
42
  none: false
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: "0"
49
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
48
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: "0"
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
55
53
  requirements: []
56
-
57
54
  rubyforge_project:
58
- rubygems_version: 1.7.2
55
+ rubygems_version: 1.6.2
59
56
  signing_key:
60
57
  specification_version: 3
61
58
  summary: Marks currently active links
62
- test_files:
63
- - test/active_link_to_test.rb
64
- - test/test_helper.rb
59
+ test_files: []