simple-navigation 4.0.4 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fed9ef827f77e17a268919f549633011c3ad2da
4
- data.tar.gz: 8438a20df8657b3d8ade790442ead078074f3ae0
3
+ metadata.gz: 517a3078bcdee06d396acd50e301c2d595316ebb
4
+ data.tar.gz: b4da0b90ffa1a1996a6ce0ad5af542ae586f3936
5
5
  SHA512:
6
- metadata.gz: a0934ad4673e57f30a29e9188af3d784a2a25d5f98f115f74e3e643de4d1c74128e66810594e672c55f1722a915a126900871c0c4c41272c7439618e5a8c4d7b
7
- data.tar.gz: 689c5ef4056e973c43dc1261eae8bbdff92a0f5495a9b4d52c5c3a376d3e71b5cbb3a180c396571a4d5d176be435dce2fcdb7ea49223a357d9dbd4588e98281e
6
+ metadata.gz: a976b0a7c53937f03c25cad0fb84cc004a09e1d5f0f71a23e298cf5c03ed3ffb74600132c46d8eb78de5c1b4266f81f16f83e0b517278aa330cd2db7f64028fd
7
+ data.tar.gz: 7a2e60a09ae9126e6a97349e3fe6118744b316acf5d797bb7432ebed49f02b3d326048e788db962988d7dafb8f162d548388c41f25f56e2203d3d2f0f943e38d
@@ -2,9 +2,8 @@ before_install:
2
2
  - gem install bundler
3
3
 
4
4
  rvm:
5
- - 2.0.0
6
- - 2.1.5
7
- - 2.2.1
5
+ - 2.2.6
6
+ - 2.3.3
8
7
 
9
8
  gemfile:
10
9
  - gemfiles/rails-4-2-stable.gemfile
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.5
4
+
5
+ * Fix #188 Blank url and highligh_on_subpath = true causes error. Credits to Tristan Harmer (gondalez) and Ilia Pozhilov (ilyapoz).
6
+
3
7
  ## 4.0.4
4
8
 
5
9
  * Fix #184 uninitialized constant Rails::Railtie (NameError). Credits to n-rodriguez.
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/codeplant/simple-navigation.png)](https://codeclimate.com/github/codeplant/simple-navigation)
6
6
  [![Coverage Status](https://coveralls.io/repos/codeplant/simple-navigation/badge.png)](https://coveralls.io/r/codeplant/simple-navigation)
7
7
 
8
- Simple Navigation is a ruby library for creating navigations (with multiple levels) for your Rails 2, Rails 3, Rails 4, Sinatra or Padrino applications. It runs with all ruby versions (including ruby 2.x).
8
+ Simple Navigation is a ruby library for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. It runs with all ruby versions (including ruby 2.x).
9
9
 
10
10
  ## Documentation
11
11
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
8
8
 
9
9
  RSpec::Core::RakeTask.new(:spec)
10
10
 
11
- task default: 'spec:all'
11
+ task default: 'spec'
12
12
 
13
13
  namespace :spec do
14
14
  mappers = %w[
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'rake', '< 11.0'
3
4
  gem 'railties', '~> 3.2.0'
4
5
  gem 'rspec-rails', '~> 3.2.1'
5
6
 
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'rake', '< 11.0'
3
4
  gem 'railties', '~> 4.1.0'
4
5
  gem 'rspec-rails', '~> 3.2.1'
5
6
 
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'launchy'
3
+ gem 'rake', '< 11.0'
4
4
  gem 'railties', '~> 4.2.0'
5
5
  gem 'rspec-rails', '~> 3.2.1'
6
6
 
@@ -153,6 +153,7 @@ module SimpleNavigation
153
153
 
154
154
  def selected_by_autohighlight?
155
155
  return false unless auto_highlight?
156
+ return false unless self.url
156
157
 
157
158
  root_path_match? ||
158
159
  (url_for_autohighlight && SimpleNavigation.current_page?(url_for_autohighlight)) ||
@@ -1,3 +1,3 @@
1
1
  module SimpleNavigation
2
- VERSION = '4.0.4'
2
+ VERSION = '4.0.5'
3
3
  end
@@ -246,6 +246,14 @@ module SimpleNavigation
246
246
  double(:config, auto_highlight: true, highlight_on_subpath: true, ignore_query_params_on_auto_highlight: true, ignore_anchors_on_auto_highlight: true)
247
247
  end
248
248
 
249
+ context "but item has no url" do
250
+ let(:url) { nil }
251
+
252
+ it 'returns false' do
253
+ expect(item.selected?).to be false
254
+ end
255
+ end
256
+
249
257
  context "and the current url is a sub path of the item's url" do
250
258
  before do
251
259
  allow(adapter).to \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.4
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andi Schacke
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-03-07 00:00:00.000000000 Z
13
+ date: 2017-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  requirements: []
259
259
  rubyforge_project:
260
- rubygems_version: 2.6.7
260
+ rubygems_version: 2.2.2
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: simple-navigation is a ruby library for creating navigations (with multiple