navigatrix 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTU0ZDk1YzY1NjgxODkwODM0YmE1NjcyYmRmMWQwNWRjYmYwNTUxZQ==
4
+ ZTc1NTM4NmRhODFlNmNjYzA1NjBjNDVkNTgzZTc5YTZmYWQ3MzA1MA==
5
5
  data.tar.gz: !binary |-
6
- NWRlOTg0NDVmYWZkNTg1MGEwYmRhMTU2Y2EwNGM4Yjc2MjFkMjk3MA==
6
+ MmEwZmZhYTA4MWM0Njg3NzQzZjMyZGMxMWMyZThkY2EzNzY2OGJlYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTI3M2I0MTIyYTE0ZjI0N2U4ZDA1NjhlNTJjMWU4MjBjYzg4YjU5NGU4NGM4
10
- NWVmZmViNDY4NjgyMzRjZTk3NmU2NTAzZjk4MjkwZTE0N2FlMjU1YmI2ZDEw
11
- NTQzMDU4YjQyZTJiMzM2YzNmMmIxYTVlMWE5ZThmZTM3ODM0ZWQ=
9
+ NDkwYWJhM2RmNTQyMmZkOGU4OTE2ZDRhMDAxYmUwODViNWViMjcyNjZiMWZi
10
+ NWU3YmYzZDMwODFkOThmMmM4YmNkYWYzODMzZDEyOGY5MGJhM2ZjNGQyMmUx
11
+ ODNkYzI2YTg5OTZhMTdlMDdkNzQ0MGU2NGMwMzExZDRjZmY1ODQ=
12
12
  data.tar.gz: !binary |-
13
- NWU0YzVjMGY3OTYxYWJkNTEyZTQ0ZDBiMWVkMzI1NmU2NmZiNWI1NmU2YWNl
14
- MjdmMDVhMDhkNWE1NzNmOTk3ZjBhNGFhODVjZmNjOTk5MmZiMTcwNzdiOGZh
15
- MmM2NDhmNTk4ZmEzNmM3NzhkZGRkNjYzOGMwYTc4ZThjMTg2ZmY=
13
+ YWFkODc1MjYyODFmODNiODA5MjEyMWQ4ZmM5ODI3NjhmMzE3OTkzNzhjZjZl
14
+ YjcyYmNjOWFhM2NiZjQyODhiN2I1ZDM5MzVmMWQxMzI2ZGYzMmZmMmFiNDU3
15
+ ZmUzM2FiZjZiMDExNDVkODc5MWExZWYxNmJkZDU4MjM4MTRhNzM=
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Navigation generation for Rails and Sinatra.
6
6
 
7
7
  ## Installation
8
- Add `gem "navigatrix", github: "foraker/navigatrix"` to your Gemfile and run `bundle install`.
8
+ Add `gem "navigatrix"` to your Gemfile and run `bundle install`.
9
9
 
10
10
  ### The Simplest Possible Navigation
11
11
  ```ERB
@@ -1,3 +1,4 @@
1
+ require "active_support"
1
2
  require "active_support/core_ext"
2
3
 
3
4
  module Navigatrix
@@ -45,7 +45,7 @@ module Navigatrix
45
45
  end
46
46
 
47
47
  def currently_on_path?
48
- current_path == path
48
+ current_path == path.split('#').first
49
49
  end
50
50
 
51
51
  def unlinked_states_specified?
@@ -1,3 +1,4 @@
1
+ require "active_support"
1
2
  require "active_support/core_ext"
2
3
 
3
4
  module Navigatrix
@@ -1,3 +1,3 @@
1
1
  module Navigatrix
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -138,6 +138,12 @@ module Navigatrix
138
138
  item.should be_unlinked
139
139
  end
140
140
 
141
+ it "ignores anchors on the item path" do
142
+ item = new_item({})
143
+ item.stub(:path => "/path_1#anchor")
144
+ item.should be_unlinked
145
+ end
146
+
141
147
  it "is false when the current_path is not the same the item path" do
142
148
  item = new_item({})
143
149
  item.stub(:path => "/path_2")
@@ -23,7 +23,7 @@ module ListRenderingStrategy
23
23
  :has_children? => false
24
24
  }
25
25
 
26
- double(defaults.merge(options))
26
+ OpenStruct.new(defaults.merge(options))
27
27
  end
28
28
 
29
29
  shared_examples_for("a list rendering strategy") do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navigatrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eddy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-17 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n