navigator 5.5.0 → 6.0.0

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
  SHA256:
3
- metadata.gz: d6d51966858f7e4d95ea10f0ae9f94010b23c7f7f980d89caa717862acb9ff7c
4
- data.tar.gz: d1bb4c5514d1cdc6a56f15ed3a705d0e4ab8417519f5aebd7e11656213b84c35
3
+ metadata.gz: 6ee02c41b532e95fefe52fb97b3cf417280a700b11676c5c1de437b3db5e9a47
4
+ data.tar.gz: 95a01b5614e1b220f9f90d3841f4b92706230fde8a925542ccc19ff01eea1528
5
5
  SHA512:
6
- metadata.gz: 63f0fb171e36398ac79b7c6a1a783285a804f2f90d43c1a33f026f4a7ad528e4703e7debd92068d5ee01f78dba1625917c8745d422699852b69ea9e48abcad63
7
- data.tar.gz: 486778d7294780c7c823163bcf3a47d45e2c826cfe9905b933575f13c87e67ca7dd18ca34ea5777c6fdbc494afb561258e040def7eb5b58f47f484b6d03c9ad3
6
+ metadata.gz: e94df980f74d11a7519d8c36b4a23b840a57d2473cae43213fd028f1748a3598545d5f2b2e39aea2dca0da60de830adf74b3fc775e2773ae17aca38a5f213f42
7
+ data.tar.gz: 7bd58c0e413a8f27b6af5391c573458f49a8b6a8c878e4fee3f8e0ed140fc0df5ae98c2d2c47e9b98ea309e5098c31197d338b6c44d227100d6df2c9549f841b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -5,7 +5,7 @@ module Navigator
5
5
  module Identity
6
6
  NAME = "navigator"
7
7
  LABEL = "Navigator"
8
- VERSION = "5.5.0"
8
+ VERSION = "6.0.0"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  end
11
11
  end
@@ -3,11 +3,33 @@
3
3
  module Navigator
4
4
  # Renders a HTML menu.
5
5
  class Menu
6
- # rubocop:disable Layout/LineLength
7
- def self.allowed_methods
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
- end
10
- # rubocop:enable Layout/LineLength
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",
@@ -62,11 +84,11 @@ module Navigator
62
84
  end
63
85
  end
64
86
 
65
- def method_missing name, *args, &block
87
+ def method_missing name, *positionals, **keywords, &block
66
88
  if respond_to_missing? name
67
- add(name, *args, &block)
89
+ add(name, *positionals, **keywords, &block)
68
90
  else
69
- template.public_send(name, *args) || super
91
+ template.public_send(name, *positionals, **keywords) || super
70
92
  end
71
93
  end
72
94
 
@@ -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
- self.class.allowed_methods.match?(name) || super
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: 5.5.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
29
  QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-12-13 00:00:00.000000000 Z
31
+ date: 2020-12-30 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rails
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '7.16'
53
+ version: '8.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '7.16'
60
+ version: '8.0'
61
61
  description:
62
62
  email:
63
63
  - brooke@alchemists.io
@@ -92,14 +92,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '2.7'
95
+ version: '3.0'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.2.0
102
+ rubygems_version: 3.2.3
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Enhances Rails with a DSL for menu navigation.
metadata.gz.sig CHANGED
Binary file