actionnav 1.0.1 → 1.1.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
- SHA1:
3
- metadata.gz: f30d6ec29464f4bbb62223dc7a25dd47f6a94c44
4
- data.tar.gz: 1203ece453f2c274bfc1c0a37c40b9fc20c9e867
2
+ SHA256:
3
+ metadata.gz: a9b254bf96dcf8eacff52b8b4b22c2ce2ed63b88716893b850823fe330fbc035
4
+ data.tar.gz: a4faf9c7831fd7b99bd5e10de157bb6ca2ebd73a712d713fb66fcb397c0db324
5
5
  SHA512:
6
- metadata.gz: e60978e8b9069abe2bf9503c85641925a1cfc80d7d966545b7eb6d371631ff234869f9422e03d57f8688b5d080ccca1a98f8ae4e19d4af1e8e5d559a43e7535d
7
- data.tar.gz: cea5b9d97a86bc15b5a5f8f0024dd763f2d91abe394f2363115c63b19a55d1a4f9754fa0d9d39eacf79b2a9f5b349b088a33a6003e5d605a80c3ae377606fddd
6
+ metadata.gz: 91e146df497b9cf2d8edcbca6eafd6a9d9c6c7d14cc181f3c149c44654aba081ecfb4a2733cfc6d5a5e2305ca188c251762b0a28ffc006c6c8763ad27c268610
7
+ data.tar.gz: 956788e97fef1ca4c5b2da29a355d858771a43e1baece5fbfc22af82fba275d834acc620c2a0951283e82f41b0f718eaa64cd62cea4a96f39e7fd6dc0fdc4e68
@@ -5,7 +5,7 @@ module ActionNav
5
5
 
6
6
  def self.included(base)
7
7
  base.class_eval do
8
- helper_method :navigation
8
+ helper_method :navigation if respond_to?(:helper_method)
9
9
  end
10
10
  end
11
11
 
@@ -15,6 +15,7 @@ module ActionNav
15
15
  attr_accessor :url
16
16
  attr_accessor :description
17
17
  attr_accessor :icon
18
+ attr_accessor :meta
18
19
  attr_accessor :hide_unless
19
20
  attr_accessor :count
20
21
 
@@ -21,6 +21,10 @@ module ActionNav
21
21
  @item.icon = block_given? ? block : icon
22
22
  end
23
23
 
24
+ def meta(meta = {}, &block)
25
+ @item.meta = block_given? ? block : meta
26
+ end
27
+
24
28
  def hide_unless(&block)
25
29
  @item.hide_unless = block
26
30
  end
@@ -47,6 +47,10 @@ module ActionNav
47
47
  cache(:url) { parse(@item.url, "/")}
48
48
  end
49
49
 
50
+ def meta
51
+ cache(:meta) { parse(@item.meta, {}) }
52
+ end
53
+
50
54
  def icon
51
55
  cache(:icon) { parse(@item.icon) }
52
56
  end
@@ -74,6 +78,8 @@ module ActionNav
74
78
  def parse(item, default = nil)
75
79
  if item.is_a?(Proc)
76
80
  @base.controller.instance_eval(&item)
81
+ elsif item.is_a?(Hash)
82
+ item
77
83
  elsif item
78
84
  item.to_s
79
85
  else
@@ -1,3 +1,3 @@
1
1
  module ActionNav
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0" # x-release-please-version
3
3
  end
metadata CHANGED
@@ -1,36 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionnav
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQDDAJtZTEZ
14
- MBcGCgmSJomT8ixkARkWCWFkYW1jb29rZTESMBAGCgmSJomT8ixkARkWAmlvMB4X
15
- DTE5MDUxNDEzNTIxM1oXDTIwMDUxMzEzNTIxM1owPDELMAkGA1UEAwwCbWUxGTAX
16
- BgoJkiaJk/IsZAEZFglhZGFtY29va2UxEjAQBgoJkiaJk/IsZAEZFgJpbzCCASIw
17
- DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUohRlPw3iIOhWZq+qf5N1ATm1H
18
- 7gBO4TpsUrw/FL/+urFExzt1+4MPfiKjILge48vKpjoTfuZusRsOQebaFidOfmhk
19
- sEqa941CvN3OeUYARA53ORlmoLDLmdcrxq430+woFp4uuSYwim/2YQgIMdgiOTqs
20
- cHaM9yh/xUGMnH4lB9bBDNfggMmkSFb6P8Ax4rvdX3EVv5P58RHwHszd+UI4fyy9
21
- 0W143m6ntNmqena4ZOc7HtWtRyDHHXXzlGgmghKEZgOA+/LO53VHp+cM0JqB7lq5
22
- ZxN43fQrIT5yY9Dy7dRBeiDo53WNJPspa5soEivCBVYstMqfd+LGk/BnsyMCAwEA
23
- AaNxMG8wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFGlRGerNfr6J
24
- Dprgl6DQ3kLvgVvPMBoGA1UdEQQTMBGBD21lQGFkYW1jb29rZS5pbzAaBgNVHRIE
25
- EzARgQ9tZUBhZGFtY29va2UuaW8wDQYJKoZIhvcNAQEFBQADggEBAK2TQPMeW9qh
26
- NDNoVbbplfSc8/uscSP2DfssCbhXQqeDfF2z+kQpxv8iAc++KTlotqOaX5A6RvLb
27
- NvuwMHPJRQJ2e8rbuN8Sh3tUjbkAEv3SFw4hqbKmtp0j2oKBU0dxHWNfp+5ulh2l
28
- UXnQAt4zg3v1hTD1VrwLqG/hyk9xAaWB38lEDBuPhLrDIdDJklg9bD1E2TUvoMrg
29
- L6TIbdP1TRrxINO1D9GzboR+OuWos7qMLBEEbjat/fQchYrW1KLcHIUCyrGkZTLm
30
- 3wUJNGnT5XYq+qvTqmjkTSTfdGvZCM63C6bGdN5CAyMokGOOatGqyCMAONolWnfC
31
- gm3t2GWWrxY=
32
- -----END CERTIFICATE-----
33
- date: 2019-05-14 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2024-05-13 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: activesupport
@@ -82,8 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
60
  - !ruby/object:Gem::Version
83
61
  version: '0'
84
62
  requirements: []
85
- rubyforge_project:
86
- rubygems_version: 2.5.2.3
63
+ rubygems_version: 3.3.26
87
64
  signing_key:
88
65
  specification_version: 4
89
66
  summary: This gem provides a friendly way to manage application navigation.
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- ���I���҆x�o��=��Z��#��E*t���Y%��P�rI�)��N�]f��o .e���R���7�y5 ��h�X�7��F$�ڂ';��S��O�hx�1�eۮ����˦gHm���j�;ĈR��HD��I���N� jUU�2� ��T����D�ߊ�۰A#v����m@Dz%MV�{�v�\n�|>��&„�����͎-����Qc
2
- nqM��{�I^\=��[do���1w� ���ϲ��7�v