navigasmic 0.5.1 → 0.5.2
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/VERSION +1 -1
- data/lib/builders/html_builder.rb +1 -1
- data/lib/builders/xml_builder.rb +1 -1
- data/lib/navigasmic.rb +2 -2
- data/navigasmic.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.2
|
|
@@ -34,7 +34,7 @@ module Navigasmic
|
|
|
34
34
|
group = template.content_tag(@@group_tag, buffer)
|
|
35
35
|
label = label_for_group(label) unless label.blank?
|
|
36
36
|
|
|
37
|
-
visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? options[:hidden_unless]
|
|
37
|
+
visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? template.instance_eval(&options[:hidden_unless]) : options[:hidden_unless]
|
|
38
38
|
visible ? template.content_tag(@@item_tag, label.to_s + group, options.delete(:html)) : ''
|
|
39
39
|
end
|
|
40
40
|
|
data/lib/builders/xml_builder.rb
CHANGED
|
@@ -30,7 +30,7 @@ module Navigasmic
|
|
|
30
30
|
|
|
31
31
|
buffer = template.capture(self, &proc)
|
|
32
32
|
|
|
33
|
-
visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? options[:hidden_unless]
|
|
33
|
+
visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? template.instance_eval(&options[:hidden_unless]) : options[:hidden_unless]
|
|
34
34
|
visible ? template.concat(template.content_tag(@@group_tag, buffer)) : ''
|
|
35
35
|
end
|
|
36
36
|
|
data/lib/navigasmic.rb
CHANGED
|
@@ -73,7 +73,7 @@ module Navigasmic #:nodoc:
|
|
|
73
73
|
@link ||= {}
|
|
74
74
|
|
|
75
75
|
@disabled_conditions = options[:disabled_if] || proc { false }
|
|
76
|
-
@visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? options[:hidden_unless]
|
|
76
|
+
@visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? template.instance_eval(options[:hidden_unless]) : options[:hidden_unless]
|
|
77
77
|
|
|
78
78
|
options[:highlights_on] = [options[:highlights_on]] if options[:highlights_on].kind_of?(Hash)
|
|
79
79
|
@highlights_on = options[:highlights_on] || []
|
|
@@ -103,7 +103,7 @@ module Navigasmic #:nodoc:
|
|
|
103
103
|
when String
|
|
104
104
|
highlighted &= path == highlight
|
|
105
105
|
when Proc
|
|
106
|
-
h = highlight
|
|
106
|
+
h = template.instance_evel(highlight)
|
|
107
107
|
raise 'proc highlighting rules must evaluate to TrueClass or FalseClass' unless (h.is_a?(TrueClass) || h.is_a?(FalseClass))
|
|
108
108
|
highlighted &= h
|
|
109
109
|
when Hash
|
data/navigasmic.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{navigasmic}
|
|
8
|
-
s.version = "0.5.
|
|
8
|
+
s.version = "0.5.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Jeremy Jackson"]
|
|
12
|
-
s.date = %q{2010-12-
|
|
12
|
+
s.date = %q{2010-12-15}
|
|
13
13
|
s.description = %q{Semantic navigation; a semantic way to build beautifully simple navigation structures in Rails.}
|
|
14
14
|
s.email = %q{jejacks0n@gmail.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: navigasmic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 15
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 5
|
|
9
|
-
-
|
|
10
|
-
version: 0.5.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.5.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jeremy Jackson
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-12-
|
|
18
|
+
date: 2010-12-15 00:00:00 -07:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|