navigasmic 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -1
- data/VERSION +1 -1
- data/lib/builders/html_builder.rb +6 -6
- data/lib/navigasmic.rb +3 -3
- data/navigasmic.gemspec +3 -8
- metadata +8 -11
data/README.textile
CHANGED
@@ -266,7 +266,7 @@ RDoc documentation _should_ be automatically generated after each commit and mad
|
|
266
266
|
|
267
267
|
h2. Compatibility
|
268
268
|
|
269
|
-
I'm only testing with the latest Rails
|
269
|
+
I'm only testing with the latest Rails 3.x stable release, and it should work under Rails 2.3.x as well. Feel free to add backwards compatibility if you need it.
|
270
270
|
|
271
271
|
h2. Project Info
|
272
272
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.6
|
@@ -27,8 +27,8 @@ module Navigasmic
|
|
27
27
|
raise ArgumentError, "Missing block" unless block_given?
|
28
28
|
|
29
29
|
options[:html] ||= {}
|
30
|
-
options[:html][:class] = template.
|
31
|
-
options[:html][:id] ||= label.to_s.gsub(/\s/, '_').underscore unless label.blank?
|
30
|
+
options[:html][:class] = template.add_html_class(options[:html][:class], @@classnames[:with_group])
|
31
|
+
options[:html][:id] ||= label.to_s.gsub(/\s/, '_').underscore unless label.blank? || options[:html].has_key?(:id)
|
32
32
|
|
33
33
|
buffer = template.capture(self, &proc)
|
34
34
|
group = template.content_tag(@@group_tag, buffer)
|
@@ -44,10 +44,10 @@ module Navigasmic
|
|
44
44
|
item = NavigationItem.new(label, options, template)
|
45
45
|
|
46
46
|
options[:html] ||= {}
|
47
|
-
options[:html][:id]
|
47
|
+
options[:html][:id] = label.to_s.gsub(/\s/, '_').underscore unless options[:html].has_key?(:id)
|
48
48
|
|
49
|
-
options[:html][:class] = template.
|
50
|
-
options[:html][:class] = template.
|
49
|
+
options[:html][:class] = template.add_html_class(options[:html][:class], @@classnames[:disabled]) if item.disabled?
|
50
|
+
options[:html][:class] = template.add_html_class(options[:html][:class], @@classnames[:highlighted]) if item.highlighted?(template.request.path, template.params, template)
|
51
51
|
|
52
52
|
label = label_for_item(label)
|
53
53
|
link = item.link.is_a?(Proc) ? template.instance_eval(&item.link) : item.link
|
@@ -66,4 +66,4 @@ module Navigasmic
|
|
66
66
|
end
|
67
67
|
|
68
68
|
end
|
69
|
-
end
|
69
|
+
end
|
data/lib/navigasmic.rb
CHANGED
@@ -38,14 +38,14 @@ module Navigasmic #:nodoc:
|
|
38
38
|
options = args.extract_options!
|
39
39
|
|
40
40
|
options[:html] ||= {}
|
41
|
-
options[:html][:class] =
|
42
|
-
options[:html][:id] ||= name.to_s.underscore
|
41
|
+
options[:html][:class] = add_html_class(options[:html][:class], 'semantic-navigation')
|
42
|
+
options[:html][:id] ||= name.to_s.underscore unless options[:html].has_key?(:id)
|
43
43
|
|
44
44
|
builder = options.delete(:builder) || @@builder
|
45
45
|
builder.new(self, name, options, &proc)
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
48
|
+
def add_html_class(classnames, classname)
|
49
49
|
out = (classnames.is_a?(String) ? classnames.split(' ') : []) << classname
|
50
50
|
out.join(' ')
|
51
51
|
end
|
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.6"
|
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{2011-01
|
12
|
+
s.date = %q{2011-07-01}
|
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 = [
|
@@ -31,15 +31,10 @@ Gem::Specification.new do |s|
|
|
31
31
|
]
|
32
32
|
s.homepage = %q{http://github.com/jejacks0n/navigasmic}
|
33
33
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = %q{1.
|
34
|
+
s.rubygems_version = %q{1.7.2}
|
35
35
|
s.summary = %q{Semantic navigation for Rails}
|
36
|
-
s.test_files = [
|
37
|
-
"test/navigasmic_test.rb",
|
38
|
-
"test/test_helper.rb"
|
39
|
-
]
|
40
36
|
|
41
37
|
if s.respond_to? :specification_version then
|
42
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
43
38
|
s.specification_version = 3
|
44
39
|
|
45
40
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 6
|
10
|
+
version: 0.5.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeremy Jackson
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01
|
19
|
-
default_executable:
|
18
|
+
date: 2011-07-01 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: thoughtbot-shoulda
|
@@ -53,7 +52,6 @@ files:
|
|
53
52
|
- navigasmic.gemspec
|
54
53
|
- test/navigasmic_test.rb
|
55
54
|
- test/test_helper.rb
|
56
|
-
has_rdoc: true
|
57
55
|
homepage: http://github.com/jejacks0n/navigasmic
|
58
56
|
licenses: []
|
59
57
|
|
@@ -83,10 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
81
|
requirements: []
|
84
82
|
|
85
83
|
rubyforge_project:
|
86
|
-
rubygems_version: 1.
|
84
|
+
rubygems_version: 1.7.2
|
87
85
|
signing_key:
|
88
86
|
specification_version: 3
|
89
87
|
summary: Semantic navigation for Rails
|
90
|
-
test_files:
|
91
|
-
|
92
|
-
- test/test_helper.rb
|
88
|
+
test_files: []
|
89
|
+
|