simple-navigation 2.5.3 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ *2.5.4
2
+
3
+ * bugfix: SimpleNavigation.config_file? without params does not check for _navigation.rb file anymore. Credits to Markus Schirp.
4
+
1
5
  *2.5.3
2
6
 
3
7
  * removed depreciated railtie_name from simple_navigation/railtie. Credits to Markus Schirp.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 5
4
- :patch: 3
4
+ :patch: 4
@@ -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=nil)
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('file_name')
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
- - 3
9
- version: 2.5.3
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-04-30 00:00:00 +02:00
17
+ date: 2010-05-17 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency