xebec 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/xebec/nav_bar_helper.rb +1 -1
- data/test/nav_bar_helper_test.rb +13 -0
- data/xebec.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -103,6 +103,10 @@ See `Xebec::StylesheetGenerator` for more information about how to customize the
|
|
103
103
|
|
104
104
|
To see the full range of features that Xebec supports, including internationalization and `before_filter`s for your controllers, check out the example application in `doc/example_app/`.
|
105
105
|
|
106
|
+
### Extras
|
107
|
+
|
108
|
+
Check out `Xebec::WebAppThemeRenderer` if you're using [Andrea Franz's web-app-theme](http://github.com/pilu/web-app-theme). Check out `Xebec::TitleEnhancedNavBarRenderer` if you want to give your navigation items both content and a tooltip title.
|
109
|
+
|
106
110
|
## What's a *xebec*? ##
|
107
111
|
|
108
112
|
Apple's dictionary provides the following entry:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.1
|
data/lib/xebec/nav_bar_helper.rb
CHANGED
@@ -66,7 +66,7 @@ EOS
|
|
66
66
|
def look_up_nav_bar(name, html_attributes)
|
67
67
|
bar = super(name, html_attributes)
|
68
68
|
if bar.kind_of?(Xebec::NavBar)
|
69
|
-
bar = nav_bars[bar.name] =
|
69
|
+
bar = nav_bars[bar.name] = Xebec::renderer_class.new(bar, self)
|
70
70
|
end
|
71
71
|
bar
|
72
72
|
end
|
data/test/nav_bar_helper_test.rb
CHANGED
@@ -13,6 +13,19 @@ class NavBarHelperTest < Test::Unit::TestCase
|
|
13
13
|
assert @helper.nav_bar.kind_of?(Xebec::NavBarRenderer)
|
14
14
|
end
|
15
15
|
|
16
|
+
should 'use a custom renderer class if one is set' do
|
17
|
+
begin
|
18
|
+
@old_renderer_class = Xebec::renderer_class
|
19
|
+
klass = Class.new do
|
20
|
+
def initialize(*args, &block); end;
|
21
|
+
end
|
22
|
+
Xebec::renderer_class = klass
|
23
|
+
assert @helper.nav_bar.kind_of?(klass)
|
24
|
+
ensure
|
25
|
+
Xebec::renderer_class = @old_renderer_class
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
16
29
|
should 'return a NavBar with the given name' do
|
17
30
|
assert_equal :snacks, @helper.nav_bar(:snacks).name
|
18
31
|
end
|
data/xebec.gemspec
CHANGED