simple-navigation 2.5.3 → 2.5.4
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/CHANGELOG +4 -0
- data/VERSION.yml +1 -1
- data/lib/simple_navigation.rb +2 -2
- data/spec/lib/simple_navigation_spec.rb +6 -5
- metadata +3 -3
data/CHANGELOG
CHANGED
data/VERSION.yml
CHANGED
data/lib/simple_navigation.rb
CHANGED
@@ -30,7 +30,7 @@ module SimpleNavigation
|
|
30
30
|
File.join(SimpleNavigation.rails_root, 'config')
|
31
31
|
end
|
32
32
|
|
33
|
-
def config_file?(navigation_context=
|
33
|
+
def config_file?(navigation_context = :default)
|
34
34
|
File.exists?(config_file_name(navigation_context))
|
35
35
|
end
|
36
36
|
|
@@ -173,4 +173,4 @@ end
|
|
173
173
|
#
|
174
174
|
# - allow :function navigation item to specify function
|
175
175
|
# - allow specification of link-options in item (currently options are passed to li-element)
|
176
|
-
# - render_navigation: do not rescue from config-file not found error if no items are passed in directly
|
176
|
+
# - render_navigation: do not rescue from config-file not found error if no items are passed in directly
|
@@ -12,13 +12,14 @@ describe SimpleNavigation do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe 'config_file?' do
|
15
|
-
before(:each) do
|
16
|
-
SimpleNavigation.stub!(:config_file_name => 'file_name')
|
17
|
-
end
|
18
15
|
it "should check for the file existance with the file_name" do
|
19
|
-
File.should_receive(:exists?).with('
|
16
|
+
File.should_receive(:exists?).with('path_to_config/ctx_navigation.rb')
|
20
17
|
SimpleNavigation.config_file?(:ctx)
|
21
18
|
end
|
19
|
+
it "should check for the file existance on default context" do
|
20
|
+
File.should_receive(:exists?).with('path_to_config/navigation.rb')
|
21
|
+
SimpleNavigation.config_file?
|
22
|
+
end
|
22
23
|
context 'config file exists' do
|
23
24
|
before(:each) do
|
24
25
|
File.stub!(:exists? => true)
|
@@ -424,4 +425,4 @@ describe SimpleNavigation do
|
|
424
425
|
end
|
425
426
|
end
|
426
427
|
|
427
|
-
end
|
428
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 2.5.
|
8
|
+
- 4
|
9
|
+
version: 2.5.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andi Schacke
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-17 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|