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 +4 -4
- data/CHANGELOG.md +6 -2
- data/LICENSE +1 -1
- data/README.md +29 -6
- data/Rakefile +25 -2
- data/lib/simple_navigation.rb +1 -1
- data/lib/simple_navigation/version.rb +1 -1
- data/simple-navigation.gemspec +1 -1
- data/spec/fake_app/config/navigation.rb +2 -2
- data/spec/integration/rendering_navigation_spec.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fed9ef827f77e17a268919f549633011c3ad2da
|
4
|
+
data.tar.gz: 8438a20df8657b3d8ade790442ead078074f3ae0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0934ad4673e57f30a29e9188af3d784a2a25d5f98f115f74e3e643de4d1c74128e66810594e672c55f1722a915a126900871c0c4c41272c7439618e5a8c4d7b
|
7
|
+
data.tar.gz: 689c5ef4056e973c43dc1261eae8bbdff92a0f5495a9b4d52c5c3a376d3e71b5cbb3a180c396571a4d5d176be435dce2fcdb7ea49223a357d9dbd4588e98281e
|
data/CHANGELOG.md
CHANGED
@@ -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
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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)
|
63
|
+
Copyright (c) 2017 codeplant GmbH, released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,10 +1,33 @@
|
|
1
|
-
require 'bundler
|
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: :
|
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'
|
data/lib/simple_navigation.rb
CHANGED
@@ -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
|
|
data/simple-navigation.gemspec
CHANGED
@@ -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
|
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
|
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
|
+
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:
|
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.
|
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
|
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
|