navigator 2.1.0 → 2.2.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
  SHA1:
3
- metadata.gz: c5f4330f1d5250ab3d12908c7b8f42e8914db7ed
4
- data.tar.gz: 7adcff250ff86dd20c4b3bfe03a5108f3e5b3197
3
+ metadata.gz: 47457791c37025322e53fdc0342b4135fd93be35
4
+ data.tar.gz: 6759a1c4b24e77c4e1facde01084c23923c91516
5
5
  SHA512:
6
- metadata.gz: d48033f7759c60981815a18b8f8b9b67be668777c73a1fa2e792b4b1316c563d8d752f09286970d130ca2e883591172ceac98a4d5b929900324f588642b6bc3e
7
- data.tar.gz: ada9864042254bf36142196470981eb2e52158b548ffb32c810f7a9d93ae0efc0383dd30cc832c63cfed45b50c233581ccf5b58b2f2b0e9a44268f2ba07d6e46
6
+ metadata.gz: d129a5e2fa91db450379b3bb9d74d45f37d99a8c1bb5c19d31bfe118298b3515e28578a1dbf254834403aadea1813838aab340aa285a5032a9dfa0fee6a39439
7
+ data.tar.gz: 78fe251d5b31ab7f1a214c5347d4f5ea9e3355725cc12814c4058705b44f1f990e44088489b3a82b850994218f40a798a576625835c24bc7e1fe95514477d445
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -70,7 +70,7 @@ Enhances Rails with a DSL for menu navigation.
70
70
 
71
71
  # Requirements
72
72
 
73
- 0. [Ruby 2.x.x](https://www.ruby-lang.org).
73
+ 0. [Ruby 2.4.x](https://www.ruby-lang.org).
74
74
  0. [Ruby on Rails 5.x.x](http://rubyonrails.org).
75
75
 
76
76
  # Setup
@@ -3,6 +3,8 @@
3
3
  module Navigator
4
4
  # Navigation helper methods for the view layer.
5
5
  module NavigationHelper
6
+ # rubocop:disable Metrics/ParameterLists
7
+ # rubocop:disable Metrics/LineLength
6
8
  def navigation tag = "ul", attributes: {}, activator: navigation_activator, &block
7
9
  raw Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block).render
8
10
  end
@@ -12,7 +12,7 @@ module Navigator
12
12
  end
13
13
 
14
14
  def self.version
15
- "2.1.0"
15
+ "2.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
data/lib/navigator/tag.rb CHANGED
@@ -9,6 +9,7 @@ module Navigator
9
9
  %w[img input]
10
10
  end
11
11
 
12
+ # rubocop:disable Metrics/ParameterLists
12
13
  def initialize name, content = nil, attributes: {}, activator: Navigator::TagActivator.new
13
14
  @name = String(name)
14
15
  @content = content
@@ -5,6 +5,7 @@ module Navigator
5
5
  class TagActivator
6
6
  attr_reader :search_key, :search_value, :target_key, :target_value
7
7
 
8
+ # rubocop:disable Metrics/ParameterLists
8
9
  def initialize search_key: :href, search_value: nil, target_key: :class, target_value: "active"
9
10
  @search_key = search_key
10
11
  @search_value = search_value
@@ -25,6 +26,7 @@ module Navigator
25
26
  end
26
27
  end
27
28
 
29
+ # rubocop:disable Metrics/LineLength
28
30
  def activate attributes = {}
29
31
  attributes = attributes.with_indifferent_access
30
32
  attributes[target_key] = [attributes[target_key], target_value].compact.join(" ") if activatable? attributes
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: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
31
31
  3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2016-12-18 00:00:00.000000000 Z
33
+ date: 2017-01-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rails
@@ -108,14 +108,14 @@ dependencies:
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '8.2'
111
+ version: '9.0'
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '8.2'
118
+ version: '9.0'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: pry
121
121
  requirement: !ruby/object:Gem::Requirement
@@ -276,14 +276,14 @@ dependencies:
276
276
  requirements:
277
277
  - - "~>"
278
278
  - !ruby/object:Gem::Version
279
- version: '0.46'
279
+ version: '0.47'
280
280
  type: :development
281
281
  prerelease: false
282
282
  version_requirements: !ruby/object:Gem::Requirement
283
283
  requirements:
284
284
  - - "~>"
285
285
  - !ruby/object:Gem::Version
286
- version: '0.46'
286
+ version: '0.47'
287
287
  - !ruby/object:Gem::Dependency
288
288
  name: codeclimate-test-reporter
289
289
  requirement: !ruby/object:Gem::Requirement
@@ -328,7 +328,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
328
  requirements:
329
329
  - - "~>"
330
330
  - !ruby/object:Gem::Version
331
- version: '2.3'
331
+ version: '2.4'
332
332
  required_rubygems_version: !ruby/object:Gem::Requirement
333
333
  requirements:
334
334
  - - ">="
@@ -336,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
336
  version: '0'
337
337
  requirements: []
338
338
  rubyforge_project:
339
- rubygems_version: 2.6.8
339
+ rubygems_version: 2.6.9
340
340
  signing_key:
341
341
  specification_version: 4
342
342
  summary: Enhances Rails with a DSL for menu navigation.
metadata.gz.sig CHANGED
Binary file