navigator 5.4.0 → 6.0.2
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/lib/navigator/identity.rb +1 -1
- data/lib/navigator/menu.rb +34 -12
- metadata +18 -242
- 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: f81e3a2019b6fd116de228b2c90d40b5345f87b62f53044060f9f1fef64923de
|
4
|
+
data.tar.gz: f347f45ed7a4bda9dc8a84d121c2ed1dd3aa4e2d05e2aeba523b84a3286c0409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b10e1420c9f59031f62efe923154cf9f5d677d0c8ee3195a700acef44dbb744ab32bda26d3d965e3fdc6f264deb97ddafd7e8073668439b1d57e3f04b30b6b
|
7
|
+
data.tar.gz: 9826cc604ba1cdcb50916b484f4ec06697e18fa1e359e361db7d68821c9fa1966e9e59c856e0f4a6489b1e108375334fb0acaf4ad48fb5d49e026554451270c5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/navigator/identity.rb
CHANGED
data/lib/navigator/menu.rb
CHANGED
@@ -3,11 +3,33 @@
|
|
3
3
|
module Navigator
|
4
4
|
# Renders a HTML menu.
|
5
5
|
class Menu
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
ALLOWED_ELEMENTS = /
|
7
|
+
^(
|
8
|
+
div|
|
9
|
+
section|
|
10
|
+
header|
|
11
|
+
h[1-6]|
|
12
|
+
nav|
|
13
|
+
ul|
|
14
|
+
li|
|
15
|
+
a|
|
16
|
+
img|
|
17
|
+
b|
|
18
|
+
em|
|
19
|
+
s|
|
20
|
+
small|
|
21
|
+
span|
|
22
|
+
strong|
|
23
|
+
sub|
|
24
|
+
sup|
|
25
|
+
form|
|
26
|
+
label|
|
27
|
+
select|
|
28
|
+
option|
|
29
|
+
input|
|
30
|
+
button
|
31
|
+
)$
|
32
|
+
/x
|
11
33
|
|
12
34
|
def initialize template,
|
13
35
|
tag: "ul",
|
@@ -19,12 +41,12 @@ module Navigator
|
|
19
41
|
@tag = Navigator::Tag.new tag, attributes: attributes, activator: activator
|
20
42
|
@menu_activator = activator
|
21
43
|
@items = []
|
22
|
-
instance_eval(&block) if
|
44
|
+
instance_eval(&block) if block
|
23
45
|
end
|
24
46
|
|
25
47
|
def add name, content = nil, attributes: {}, activator: menu_activator, &block
|
26
48
|
tag = Navigator::Tag.new name, content, attributes: attributes, activator: activator
|
27
|
-
return items << tag.render unless
|
49
|
+
return items << tag.render unless block
|
28
50
|
|
29
51
|
items << tag.prefix
|
30
52
|
items << tag.content
|
@@ -62,16 +84,16 @@ module Navigator
|
|
62
84
|
end
|
63
85
|
end
|
64
86
|
|
65
|
-
def method_missing name, *
|
87
|
+
def method_missing name, *positionals, **keywords, &block
|
66
88
|
if respond_to_missing? name
|
67
|
-
add(name, *
|
89
|
+
add(name, *positionals, **keywords, &block)
|
68
90
|
else
|
69
|
-
template.public_send(name, *
|
91
|
+
template.public_send(name, *positionals, **keywords) || super
|
70
92
|
end
|
71
93
|
end
|
72
94
|
|
73
95
|
def render
|
74
|
-
[tag.prefix, tag.content, items.compact.join
|
96
|
+
[tag.prefix, tag.content, items.compact.join, tag.suffix].compact.join
|
75
97
|
end
|
76
98
|
|
77
99
|
private
|
@@ -79,7 +101,7 @@ module Navigator
|
|
79
101
|
attr_accessor :template, :tag, :menu_activator, :items
|
80
102
|
|
81
103
|
def respond_to_missing? name, include_private = false
|
82
|
-
|
104
|
+
ALLOWED_ELEMENTS.match?(name) || super
|
83
105
|
end
|
84
106
|
|
85
107
|
def activate_item_attributes! attributes, url, activator
|
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: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIC/
|
14
|
-
|
15
|
-
|
13
|
+
MIIC/jCCAeagAwIBAgIBBDANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
|
14
|
+
a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMTAzMTkxMjQ4MDZaFw0yMjAzMTkx
|
15
|
+
MjQ4MDZaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
|
16
16
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
|
17
17
|
xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
|
18
18
|
brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
|
@@ -20,15 +20,15 @@ cert_chain:
|
|
20
20
|
D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
|
21
21
|
3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
|
22
22
|
AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
|
23
|
-
2CdikiiE3fJhP/
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAEjpaOXHHp8s/7GL2qCb
|
24
|
+
YAs7urOLv9VHSPfQWAwaTMVnSsIf3Sw4xzISOP/mmfEPBPXtz61K5esrE/uTFtgb
|
25
|
+
FyjxQk2H0sEWgrRXGGNHBWQRhhEs7LP/TByoC15A0br++xLxRz4r7HBLGAWQQDpg
|
26
|
+
66BJ2TBVjxS6K64tKbq7+ACyrOZGgTfNHACh4M076y0x0oRf/rwBrU39/KRfuhbb
|
27
|
+
cm+nNCEtO35gTmZ2bVDHLGvWazi3gJt6+huQjfXTCUUG2YYBxwhu+GPdAGQPxpf9
|
28
|
+
lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
|
29
|
+
W2A=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
31
|
+
date: 2021-08-07 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rails
|
@@ -45,243 +45,19 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '6.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: refinements
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0
|
54
|
-
type: :
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.7'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: bundler-leak
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.2'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0.2'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: capybara
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '3.1'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '3.1'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: gemsmith
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '14.8'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '14.8'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: git-lint
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.3'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '1.3'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: guard-rspec
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '4.7'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '4.7'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: pg
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '1.2'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '1.2'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: pry
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0.13'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0.13'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: pry-byebug
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '3.9'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '3.9'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: rake
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '13.0'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '13.0'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: reek
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '6.0'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '6.0'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: rspec-rails
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '4.0'
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '4.0'
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: rubocop
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '1.3'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '1.3'
|
229
|
-
- !ruby/object:Gem::Dependency
|
230
|
-
name: rubocop-performance
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - "~>"
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: '1.8'
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - "~>"
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: '1.8'
|
243
|
-
- !ruby/object:Gem::Dependency
|
244
|
-
name: rubocop-rake
|
245
|
-
requirement: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - "~>"
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: '0.5'
|
250
|
-
type: :development
|
251
|
-
prerelease: false
|
252
|
-
version_requirements: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - "~>"
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '0.5'
|
257
|
-
- !ruby/object:Gem::Dependency
|
258
|
-
name: rubocop-rspec
|
259
|
-
requirement: !ruby/object:Gem::Requirement
|
260
|
-
requirements:
|
261
|
-
- - "~>"
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
version: '2.0'
|
264
|
-
type: :development
|
265
|
-
prerelease: false
|
266
|
-
version_requirements: !ruby/object:Gem::Requirement
|
267
|
-
requirements:
|
268
|
-
- - "~>"
|
269
|
-
- !ruby/object:Gem::Version
|
270
|
-
version: '2.0'
|
271
|
-
- !ruby/object:Gem::Dependency
|
272
|
-
name: simplecov
|
273
|
-
requirement: !ruby/object:Gem::Requirement
|
274
|
-
requirements:
|
275
|
-
- - "~>"
|
276
|
-
- !ruby/object:Gem::Version
|
277
|
-
version: '0.19'
|
278
|
-
type: :development
|
53
|
+
version: '8.0'
|
54
|
+
type: :runtime
|
279
55
|
prerelease: false
|
280
56
|
version_requirements: !ruby/object:Gem::Requirement
|
281
57
|
requirements:
|
282
58
|
- - "~>"
|
283
59
|
- !ruby/object:Gem::Version
|
284
|
-
version: '0
|
60
|
+
version: '8.0'
|
285
61
|
description:
|
286
62
|
email:
|
287
63
|
- brooke@alchemists.io
|
@@ -316,14 +92,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
316
92
|
requirements:
|
317
93
|
- - "~>"
|
318
94
|
- !ruby/object:Gem::Version
|
319
|
-
version: '
|
95
|
+
version: '3.0'
|
320
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
321
97
|
requirements:
|
322
98
|
- - ">="
|
323
99
|
- !ruby/object:Gem::Version
|
324
100
|
version: '0'
|
325
101
|
requirements: []
|
326
|
-
rubygems_version: 3.
|
102
|
+
rubygems_version: 3.2.25
|
327
103
|
signing_key:
|
328
104
|
specification_version: 4
|
329
105
|
summary: Enhances Rails with a DSL for menu navigation.
|
metadata.gz.sig
CHANGED
Binary file
|