simple-navigation 4.0.3 → 4.0.4

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: 14ed2a793a80e75cc8ac03f09c2d03d7c6672bea
4
- data.tar.gz: 4d33fafbeb0d419f27a6d0695582077e68c6ca13
3
+ metadata.gz: 9fed9ef827f77e17a268919f549633011c3ad2da
4
+ data.tar.gz: 8438a20df8657b3d8ade790442ead078074f3ae0
5
5
  SHA512:
6
- metadata.gz: db0eecfe9e6b34d144aec5e76bf9bc69e29078f22f85b70a4945f90ad952219cac18b1ca428877adec9cb792348ea3da121b8be1b6ed5ff2d4f367270990be1d
7
- data.tar.gz: 5e2085493c00bf60d6ad18d9119f0f6d0dd71f05744468313e3f4b7fbc6110af191e877cf1fdc084af3f71aef196a76e2060fd1d81de1c679334cd18cd3b84f1
6
+ metadata.gz: a0934ad4673e57f30a29e9188af3d784a2a25d5f98f115f74e3e643de4d1c74128e66810594e672c55f1722a915a126900871c0c4c41272c7439618e5a8c4d7b
7
+ data.tar.gz: 689c5ef4056e973c43dc1261eae8bbdff92a0f5495a9b4d52c5c3a376d3e71b5cbb3a180c396571a4d5d176be435dce2fcdb7ea49223a357d9dbd4588e98281e
@@ -1,14 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.4
4
+
5
+ * Fix #184 uninitialized constant Rails::Railtie (NameError). Credits to n-rodriguez.
6
+
3
7
  ## 4.0.3
4
8
 
5
9
  * Fix #180 Check URL before invoking current_page?
6
10
 
7
11
  ## 4.0.2
8
12
 
9
- * fixing current_page? when url is nil
13
+ * fixing current_page? when url is nil
10
14
 
11
- ## 4.0.1
15
+ ## 4.0.1
12
16
 
13
17
  * fixed padrino adapter
14
18
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 codeplant GmbH
1
+ Copyright (c) 2017 codeplant GmbH
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -29,12 +29,35 @@ Don't hesitate to come talk on the [project's group](http://groups.google.com/gr
29
29
 
30
30
  ## Contributing
31
31
 
32
- 1. Fork it (https://github.com/codeplant/simple-navigation/fork)
33
- 2. Create your feature branch (`git checkout -b my-new-feature`)
34
- 3. Commit your changes (`git commit -am 'Add some feature'`)
35
- 4. Push to the branch (`git push origin my-new-feature`)
36
- 5. Create new Pull Request
32
+ Fork, fix, then send a Pull Request.
33
+
34
+ To run the test suite locally against all supported frameworks:
35
+
36
+ % bundle install
37
+ % rake spec:all
38
+
39
+ To target the test suite against one framework:
40
+
41
+ % rake spec:rails-4-2-stable
42
+
43
+ You can find a list of supported spec tasks by running rake -T. You may also find it useful to run a specific test for a specific framework. To do so, you'll have to first make sure you have bundled everything for that configuration, then you can run the specific test:
44
+
45
+ % BUNDLE_GEMFILE='gemfiles/rails-4-2-stable.gemfile' bundle install -j 4
46
+ % BUNDLE_GEMFILE='gemfiles/rails-4-2-stable.gemfile' bundle exec rspec ./spec/requests/users_spec.rb
47
+
48
+ ### Rake and Bundler
49
+
50
+ If you use a shell plugin (like oh-my-zsh:bundler) that auto-prefixes commands with `bundle exec` using the `rake` command will fail.
51
+
52
+ Get the original command with `type -a rake`:
53
+
54
+ % type -a rake
55
+ rake is an alias for bundled_rake
56
+ rake is /Users/username/.rubies/ruby-2.2.3/bin/rake
57
+ rake is /usr/bin/rake
58
+
59
+ In this situation `/Users/username/.rubies/ruby-2.2.3/bin/rake` is the command you should use.
37
60
 
38
61
  ## License
39
62
 
40
- Copyright (c) 2014 codeplant GmbH, released under the MIT license
63
+ Copyright (c) 2017 codeplant GmbH, released under the MIT license
data/Rakefile CHANGED
@@ -1,10 +1,33 @@
1
- require 'bundler/gem_tasks'
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core'
2
5
  require 'rspec/core/rake_task'
6
+
3
7
  require 'rdoc/task'
4
8
 
5
9
  RSpec::Core::RakeTask.new(:spec)
6
10
 
7
- task default: :spec
11
+ task default: 'spec:all'
12
+
13
+ namespace :spec do
14
+ mappers = %w[
15
+ rails-3-2-stable
16
+ rails-4-1-stable
17
+ rails-4-2-stable
18
+ ]
19
+
20
+ mappers.each do |gemfile|
21
+ desc "Run Tests against #{gemfile}"
22
+ task gemfile do
23
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle -j 4 --quiet"
24
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake -t spec"
25
+ end
26
+ end
27
+
28
+ desc 'Run Tests against all ORMs'
29
+ task all: mappers
30
+ end
8
31
 
9
32
  RDoc::Task.new do |rdoc|
10
33
  rdoc.rdoc_dir = 'rdoc'
@@ -12,7 +12,7 @@ require 'simple_navigation/items_provider'
12
12
  require 'simple_navigation/renderer'
13
13
  require 'simple_navigation/adapters'
14
14
  require 'simple_navigation/config_file_finder'
15
- require 'simple_navigation/railtie' if defined?(::Rails)
15
+ require 'simple_navigation/railtie' if defined?(::Rails::Railtie)
16
16
 
17
17
  require 'forwardable'
18
18
 
@@ -1,3 +1,3 @@
1
1
  module SimpleNavigation
2
- VERSION = '4.0.3'
2
+ VERSION = '4.0.4'
3
3
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  "as explicit highlighting of the currently active " \
16
16
  "navigation through regular expressions."
17
17
  spec.summary = "simple-navigation is a ruby library for creating navigations "\
18
- "(with multiple levels) for your Rails2, Rails3, Rails4, Sinatra or " \
18
+ "(with multiple levels) for your Rails, Sinatra or " \
19
19
  "Padrino application."
20
20
  spec.homepage = 'http://github.com/codeplant/simple-navigation'
21
21
  spec.license = 'MIT'
@@ -1,6 +1,6 @@
1
1
  SimpleNavigation::Configuration.run do |navigation|
2
2
  navigation.items do |nav|
3
- nav.item :item_1, 'Item 1', '/item_1'
4
- nav.item :item_2, 'Item 2', '/item_2'
3
+ nav.item :item_1, 'Item 1', '/item_1', html: {class: 'item_1'}, link_html: {id: 'link_1'}
4
+ nav.item :item_2, 'Item 2', '/item_2', html: {class: 'item_2'}, link_html: {id: 'link_2'}
5
5
  end
6
6
  end
@@ -8,5 +8,7 @@ RSpec.feature 'Rendering navigation' do
8
8
 
9
9
  expect(page).to have_content('Item 1')
10
10
  expect(page).to have_content('Item 2')
11
+ expect(page).to have_selector('li.item_1 a#link_1')
12
+ expect(page).to have_selector('li.item_2 a#link_2')
11
13
  end
12
14
  end
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.3
4
+ version: 4.0.4
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: 2015-04-09 00:00:00.000000000 Z
13
+ date: 2017-03-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -257,11 +257,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  requirements: []
259
259
  rubyforge_project:
260
- rubygems_version: 2.2.2
260
+ rubygems_version: 2.6.7
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: simple-navigation is a ruby library for creating navigations (with multiple
264
- levels) for your Rails2, Rails3, Rails4, Sinatra or Padrino application.
264
+ levels) for your Rails, Sinatra or Padrino application.
265
265
  test_files:
266
266
  - spec/fake_app/config/navigation.rb
267
267
  - spec/fake_app/rails_app.rb