navigator 2.4.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.md +163 -20
- data/README.md +4 -13
- data/app/helpers/navigator/navigation_helper.rb +2 -0
- data/lib/navigator/identity.rb +1 -1
- data/lib/navigator/menu.rb +2 -0
- data/lib/navigator/tag.rb +1 -0
- data/lib/navigator/tag_activator.rb +2 -0
- metadata +11 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dad5067e53174eaaa72d956fb5e8e04d9f67a3fce751bc1afd574dba93ef867
|
4
|
+
data.tar.gz: 0bf22908f9e12572453105478bb2441162d2611f75082cc0f42e01875dc9e46a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e4ef86ca706b6785bcb120966b3d22954cbb452a4281ba9ee4a703b4bb7c22e47bf2e336d52a014ae372af502409d0f16bb54640723a7a76616cd6798de7f74
|
7
|
+
data.tar.gz: 03e4a0e7d23d78ad251acf87617490f49025b6314445575717a7e2bbd7e254c2a6344349edacdca5f4506e8f95ac87cc4bddf7136a803d4308df94af4624deb8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE.md
CHANGED
@@ -1,20 +1,163 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
# Apache License
|
2
|
+
|
3
|
+
Version 2.0, January 2004
|
4
|
+
|
5
|
+
http://www.apache.org/licenses
|
6
|
+
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
8
|
+
|
9
|
+
## 1. Definitions
|
10
|
+
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
|
12
|
+
Sections 1 through 9 of this document.
|
13
|
+
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is
|
15
|
+
granting the License.
|
16
|
+
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are
|
18
|
+
controlled by, or are under common control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the direction or management of such
|
20
|
+
entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this
|
24
|
+
License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to
|
27
|
+
software source code, documentation source, and configuration files.
|
28
|
+
|
29
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a
|
30
|
+
Source form, including but not limited to compiled object code, generated documentation, and
|
31
|
+
conversions to other media types.
|
32
|
+
|
33
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the
|
34
|
+
License, as indicated by a copyright notice that is included in or attached to the work (an example
|
35
|
+
is provided in the Appendix below).
|
36
|
+
|
37
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or
|
38
|
+
derived from) the Work and for which the editorial revisions, annotations, elaborations, or other
|
39
|
+
modifications represent, as a whole, an original work of authorship. For the purposes of this
|
40
|
+
License, Derivative Works shall not include works that remain separable from, or merely link (or
|
41
|
+
bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
42
|
+
|
43
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any
|
44
|
+
modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted
|
45
|
+
to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity
|
46
|
+
authorized to submit on behalf of the copyright owner. For the purposes of this definition,
|
47
|
+
"submitted" means any form of electronic, verbal, or written communication sent to the Licensor or
|
48
|
+
its representatives, including but not limited to communication on electronic mailing lists, source
|
49
|
+
code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor
|
50
|
+
for the purpose of discussing and improving the Work, but excluding communication that is
|
51
|
+
conspicuously marked or otherwise designated in writing by the copyright owner as "Not a
|
52
|
+
Contribution."
|
53
|
+
|
54
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
|
55
|
+
Contribution has been received by Licensor and subsequently incorporated within the Work.
|
56
|
+
|
57
|
+
## 2. Grant of Copyright License
|
58
|
+
|
59
|
+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
60
|
+
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
61
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
|
62
|
+
distribute the Work and such Derivative Works in Source or Object form.
|
63
|
+
|
64
|
+
## 3. Grant of Patent License
|
65
|
+
|
66
|
+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
67
|
+
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
|
68
|
+
section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer
|
69
|
+
the Work, where such license applies only to those patent claims licensable by such Contributor that
|
70
|
+
are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s)
|
71
|
+
with the Work to which such Contribution(s) was submitted. If You institute patent litigation
|
72
|
+
against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or
|
73
|
+
a Contribution incorporated within the Work constitutes direct or contributory patent infringement,
|
74
|
+
then any patent licenses granted to You under this License for that Work shall terminate as of the
|
75
|
+
date such litigation is filed.
|
76
|
+
|
77
|
+
## 4. Redistribution
|
78
|
+
|
79
|
+
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
|
80
|
+
or without modifications, and in Source or Object form, provided that You meet the following
|
81
|
+
conditions:
|
82
|
+
|
83
|
+
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
84
|
+
|
85
|
+
2. You must cause any modified files to carry prominent notices stating that You changed the
|
86
|
+
files; and
|
87
|
+
|
88
|
+
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
|
89
|
+
patent, trademark, and attribution notices from the Source form of the Work, excluding those
|
90
|
+
notices that do not pertain to any part of the Derivative Works; and
|
91
|
+
|
92
|
+
4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
|
93
|
+
Works that You distribute must include a readable copy of the attribution notices contained
|
94
|
+
within such NOTICE file, excluding those notices that do not pertain to any part of the
|
95
|
+
Derivative Works, in at least one of the following places: within a NOTICE text file
|
96
|
+
distributed as part of the Derivative Works; within the Source form or documentation, if
|
97
|
+
provided along with the Derivative Works; or, within a display generated by the Derivative
|
98
|
+
Works, if and wherever such third-party notices normally appear. The contents of the NOTICE
|
99
|
+
file are for informational purposes only and do not modify the License. You may add Your own
|
100
|
+
attribution notices within Derivative Works that You distribute, alongside or as an addendum to
|
101
|
+
the NOTICE text from the Work, provided that such additional attribution notices cannot be
|
102
|
+
construed as modifying the License.
|
103
|
+
|
104
|
+
You may add Your own copyright statement to Your modifications and may provide additional or
|
105
|
+
different license terms and conditions for use, reproduction, or distribution of Your modifications,
|
106
|
+
or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
|
107
|
+
the Work otherwise complies with the conditions stated in this License.
|
108
|
+
|
109
|
+
## 5. Submission of Contributions
|
110
|
+
|
111
|
+
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
|
112
|
+
Work by You to the Licensor shall be under the terms and conditions of this License, without any
|
113
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify
|
114
|
+
the terms of any separate license agreement you may have executed with Licensor regarding such
|
115
|
+
Contributions.
|
116
|
+
|
117
|
+
## 6. Trademarks
|
118
|
+
|
119
|
+
This License does not grant permission to use the trade names, trademarks, service marks, or product
|
120
|
+
names of the Licensor, except as required for reasonable and customary use in describing the origin
|
121
|
+
of the Work and reproducing the content of the NOTICE file.
|
122
|
+
|
123
|
+
## 7. Disclaimer of Warranty
|
124
|
+
|
125
|
+
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
|
126
|
+
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
127
|
+
KIND, either express or implied, including, without limitation, any warranties or conditions of
|
128
|
+
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
129
|
+
responsible for determining the appropriateness of using or redistributing the Work and assume any
|
130
|
+
risks associated with Your exercise of permissions under this License.
|
131
|
+
|
132
|
+
## 8. Limitation of Liability
|
133
|
+
|
134
|
+
In no event and under no legal theory, whether in tort (including negligence), contract, or
|
135
|
+
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
|
136
|
+
agreed to in writing, shall any Contributor be liable to You for damages, including any direct,
|
137
|
+
indirect, special, incidental, or consequential damages of any character arising as a result of this
|
138
|
+
License or out of the use or inability to use the Work (including but not limited to damages for
|
139
|
+
loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
|
140
|
+
damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
141
|
+
|
142
|
+
## 9. Accepting Warranty or Additional Liability
|
143
|
+
|
144
|
+
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
|
145
|
+
for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
|
146
|
+
consistent with this License. However, in accepting such obligations, You may act only on Your own
|
147
|
+
behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You
|
148
|
+
agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or
|
149
|
+
claims asserted against, such Contributor by reason of your accepting any such warranty or
|
150
|
+
additional liability.
|
151
|
+
|
152
|
+
END OF TERMS AND CONDITIONS
|
153
|
+
|
154
|
+
Copyright 2012 [Alchemists](https://www.alchemists.io).
|
155
|
+
|
156
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
157
|
+
compliance with the License. You may obtain a [copy](http://www.apache.org/licenses/LICENSE-2.0) of
|
158
|
+
the License.
|
159
|
+
|
160
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
161
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
162
|
+
implied. See the License for the specific language governing permissions and limitations under the
|
163
|
+
License.
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Navigator
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/navigator.svg)](http://badge.fury.io/rb/navigator)
|
4
|
-
[![Code Climate
|
5
|
-
[![Code Climate Coverage](https://codeclimate.com/
|
4
|
+
[![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/2f8632ec1f734ea9561a/maintainability)](https://codeclimate.com/github/bkuhlmann/navigator/maintainability)
|
5
|
+
[![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/2f8632ec1f734ea9561a/test_coverage)](https://codeclimate.com/github/bkuhlmann/navigator/test_coverage)
|
6
6
|
[![Gemnasium Status](https://gemnasium.com/bkuhlmann/navigator.svg)](https://gemnasium.com/bkuhlmann/navigator)
|
7
7
|
[![Circle CI Status](https://circleci.com/gh/bkuhlmann/navigator.svg?style=svg)](https://circleci.com/gh/bkuhlmann/navigator)
|
8
8
|
[![Patreon](https://img.shields.io/badge/patreon-donate-brightgreen.svg)](https://www.patreon.com/bkuhlmann)
|
@@ -70,21 +70,12 @@ Enhances Rails with a DSL for menu navigation.
|
|
70
70
|
|
71
71
|
## Requirements
|
72
72
|
|
73
|
-
0. [Ruby 2.
|
73
|
+
0. [Ruby 2.5.x](https://www.ruby-lang.org).
|
74
74
|
0. [Ruby on Rails 5.x.x](http://rubyonrails.org).
|
75
75
|
|
76
76
|
## Setup
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
|
81
|
-
gem install navigator --trust-policy MediumSecurity
|
82
|
-
|
83
|
-
NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification
|
84
|
-
while allowing the installation of unsigned dependencies since they are beyond the scope of this
|
85
|
-
gem.
|
86
|
-
|
87
|
-
For an insecure install, type the following (not recommended):
|
78
|
+
Type the following to install:
|
88
79
|
|
89
80
|
gem install navigator
|
90
81
|
|
@@ -8,6 +8,8 @@ module Navigator
|
|
8
8
|
def navigation tag = "ul", attributes: {}, activator: navigation_activator, &block
|
9
9
|
raw Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block).render
|
10
10
|
end
|
11
|
+
# rubocop:enable Metrics/ParameterLists
|
12
|
+
# rubocop:enable Metrics/LineLength
|
11
13
|
|
12
14
|
module_function
|
13
15
|
|
data/lib/navigator/identity.rb
CHANGED
data/lib/navigator/menu.rb
CHANGED
@@ -7,6 +7,7 @@ module Navigator
|
|
7
7
|
def self.allowed_methods
|
8
8
|
/^(div|section|header|h[1-6]|nav|ul|li|a|img|b|em|s|small|span|strong|sub|sup|form|label|select|option|input|button)$/
|
9
9
|
end
|
10
|
+
# rubocop:enable Metrics/LineLength
|
10
11
|
|
11
12
|
def initialize template,
|
12
13
|
tag: "ul",
|
@@ -73,6 +74,7 @@ module Navigator
|
|
73
74
|
template.public_send name, *args
|
74
75
|
end
|
75
76
|
end
|
77
|
+
# rubocop:enable Style/MethodMissing
|
76
78
|
|
77
79
|
def render
|
78
80
|
[tag.prefix, tag.content, items.compact.join(""), tag.suffix].compact * ""
|
data/lib/navigator/tag.rb
CHANGED
@@ -12,6 +12,7 @@ module Navigator
|
|
12
12
|
@target_key = target_key
|
13
13
|
@target_value = target_value
|
14
14
|
end
|
15
|
+
# rubocop:enable Metrics/ParameterLists
|
15
16
|
|
16
17
|
# :reek:TooManyStatements
|
17
18
|
def activatable? attributes = {}
|
@@ -34,5 +35,6 @@ module Navigator
|
|
34
35
|
attributes[target_key] = [attributes[target_key], target_value].compact.join(" ") if activatable? attributes
|
35
36
|
attributes
|
36
37
|
end
|
38
|
+
# rubocop:enable Metrics/LineLength
|
37
39
|
end
|
38
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: navigator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
MQXa5aqjoFEODxVbBBI6NyNVH4gMKDsILEFlH/mcBQKKQwXj2McJmB8jIG+WuKoE
|
31
31
|
GyTL6s+8CnN9sL2Spfh/YdRn/29r4g2qi6FomQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2018-01-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rails
|
@@ -122,28 +122,28 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '11.0'
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
132
|
+
version: '11.0'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: git-cop
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
139
|
+
version: '2.0'
|
140
140
|
type: :development
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: '
|
146
|
+
version: '2.0'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
148
|
name: guard-rspec
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,20 +214,6 @@ dependencies:
|
|
214
214
|
- - "~>"
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '3.5'
|
217
|
-
- !ruby/object:Gem::Dependency
|
218
|
-
name: pry-state
|
219
|
-
requirement: !ruby/object:Gem::Requirement
|
220
|
-
requirements:
|
221
|
-
- - "~>"
|
222
|
-
- !ruby/object:Gem::Version
|
223
|
-
version: '0.1'
|
224
|
-
type: :development
|
225
|
-
prerelease: false
|
226
|
-
version_requirements: !ruby/object:Gem::Requirement
|
227
|
-
requirements:
|
228
|
-
- - "~>"
|
229
|
-
- !ruby/object:Gem::Version
|
230
|
-
version: '0.1'
|
231
217
|
- !ruby/object:Gem::Dependency
|
232
218
|
name: rake
|
233
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,14 +262,14 @@ dependencies:
|
|
276
262
|
requirements:
|
277
263
|
- - "~>"
|
278
264
|
- !ruby/object:Gem::Version
|
279
|
-
version: '0.
|
265
|
+
version: '0.52'
|
280
266
|
type: :development
|
281
267
|
prerelease: false
|
282
268
|
version_requirements: !ruby/object:Gem::Requirement
|
283
269
|
requirements:
|
284
270
|
- - "~>"
|
285
271
|
- !ruby/object:Gem::Version
|
286
|
-
version: '0.
|
272
|
+
version: '0.52'
|
287
273
|
- !ruby/object:Gem::Dependency
|
288
274
|
name: sass
|
289
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -346,7 +332,7 @@ files:
|
|
346
332
|
- lib/navigator/tag_activator.rb
|
347
333
|
homepage: https://github.com/bkuhlmann/navigator
|
348
334
|
licenses:
|
349
|
-
-
|
335
|
+
- Apache-2.0
|
350
336
|
metadata: {}
|
351
337
|
post_install_message:
|
352
338
|
rdoc_options: []
|
@@ -356,7 +342,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
356
342
|
requirements:
|
357
343
|
- - "~>"
|
358
344
|
- !ruby/object:Gem::Version
|
359
|
-
version: '2.
|
345
|
+
version: '2.5'
|
360
346
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
361
347
|
requirements:
|
362
348
|
- - ">="
|
@@ -364,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
350
|
version: '0'
|
365
351
|
requirements: []
|
366
352
|
rubyforge_project:
|
367
|
-
rubygems_version: 2.7.
|
353
|
+
rubygems_version: 2.7.4
|
368
354
|
signing_key:
|
369
355
|
specification_version: 4
|
370
356
|
summary: Enhances Rails with a DSL for menu navigation.
|
metadata.gz.sig
CHANGED
Binary file
|