simple-navigation 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/Rakefile +1 -0
- data/gemfiles/rails-6-0-stable.gemfile +1 -2
- data/generators/navigation_config/templates/config/navigation.rb +3 -2
- data/lib/simple_navigation/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9df430bc691baeee7336fcfbbf5b6702b89440da2d61a2d7cf9e654e04241f09
|
|
4
|
+
data.tar.gz: '059b49e4ac9536964aff8678c86dea636bdc29f3ceeeb51d661e4b0b3df02733'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a5b51b3afcc9f5324335d7064bcc12cd417d151384b219ad1b2db10d3d161a9517cbcd9a9c766555c93e7b343d3ca233ab50663459670fc6b4804216fc57534
|
|
7
|
+
data.tar.gz: 98417524e1562117207ca2f9c5eddc77328e8d0d5ef3da1ef42f52c420634c7e011931622d5f642d869d265f4b4ffda9c3477a31ea03b2cf3d200f7c2d7d1ca4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
* improvements to generator template. Credits to mgrunberg.
|
|
6
|
+
* be able to run 'rake spec:rails-6-0-stable'. Credits to mgrunberg.
|
|
7
|
+
|
|
3
8
|
## 4.1.0
|
|
4
9
|
|
|
5
10
|
* Delay rails6 initialization using on_load (getting rid of deprecation warnings in rails 6). Credits to Markus Benning.
|
data/README.md
CHANGED
data/Rakefile
CHANGED
|
@@ -24,7 +24,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|
|
24
24
|
# If you need to add custom html around item names, you can define a proc that
|
|
25
25
|
# will be called with the name you pass in to the navigation.
|
|
26
26
|
# The example below shows how to wrap items spans.
|
|
27
|
-
#navigation.name_generator = Proc.new {|name, item|
|
|
27
|
+
#navigation.name_generator = Proc.new {|name, item| tag.span(name) }
|
|
28
28
|
|
|
29
29
|
# Specify if the auto highlight feature is turned on (globally, for the whole navigation). Defaults to true
|
|
30
30
|
#navigation.auto_highlight = true
|
|
@@ -45,6 +45,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|
|
45
45
|
# url - the address that the generated item links to. You can also use url_helpers (named routes, restful routes helper, url_for etc.)
|
|
46
46
|
# options - can be used to specify attributes that will be included in the rendered navigation item (e.g. id, class etc.)
|
|
47
47
|
# some special options that can be set:
|
|
48
|
+
# :html - Specifies html attributes that will be included in the rendered navigation item
|
|
48
49
|
# :if - Specifies a proc to call to determine if the item should
|
|
49
50
|
# be rendered (e.g. <tt>if: -> { current_user.admin? }</tt>). The
|
|
50
51
|
# proc should evaluate to a true or false value and is evaluated in the context of the view.
|
|
@@ -67,7 +68,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|
|
67
68
|
# You can also specify a condition-proc that needs to be fullfilled to display an item.
|
|
68
69
|
# Conditions are part of the options. They are evaluated in the context of the views,
|
|
69
70
|
# thus you can use all the methods and vars you have available in the views.
|
|
70
|
-
primary.item :key_3, 'Admin', url, class: 'special', if: -> { current_user.admin? }
|
|
71
|
+
primary.item :key_3, 'Admin', url, html: { class: 'special' }, if: -> { current_user.admin? }
|
|
71
72
|
primary.item :key_4, 'Account', url, unless: -> { logged_in? }
|
|
72
73
|
|
|
73
74
|
# you can also specify html attributes to attach to this particular level
|
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple-navigation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andi Schacke
|
|
8
8
|
- Mark J. Titorenko
|
|
9
9
|
- Simon Courtois
|
|
10
|
-
autorequire:
|
|
10
|
+
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|
|
@@ -241,7 +241,7 @@ homepage: http://github.com/codeplant/simple-navigation
|
|
|
241
241
|
licenses:
|
|
242
242
|
- MIT
|
|
243
243
|
metadata: {}
|
|
244
|
-
post_install_message:
|
|
244
|
+
post_install_message:
|
|
245
245
|
rdoc_options:
|
|
246
246
|
- "--inline-source"
|
|
247
247
|
- "--charset=UTF-8"
|
|
@@ -258,9 +258,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
258
258
|
- !ruby/object:Gem::Version
|
|
259
259
|
version: '0'
|
|
260
260
|
requirements: []
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
signing_key:
|
|
261
|
+
rubygems_version: 3.0.9
|
|
262
|
+
signing_key:
|
|
264
263
|
specification_version: 4
|
|
265
264
|
summary: simple-navigation is a ruby library for creating navigations (with multiple
|
|
266
265
|
levels) for your Rails, Sinatra or Padrino application.
|