actionnav 1.0.0 → 1.0.1

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: 3139471d9e398daa9e8e509f374be2077ec99ee8
4
- data.tar.gz: da0f5b8f07d8e02e2214261dfa6aafca1f870207
3
+ metadata.gz: f30d6ec29464f4bbb62223dc7a25dd47f6a94c44
4
+ data.tar.gz: 1203ece453f2c274bfc1c0a37c40b9fc20c9e867
5
5
  SHA512:
6
- metadata.gz: a5f0b4e891687847b56360cf59f2d4300f42016336680d534061547fff5c85b4dafbeccdf207e671ad7892549da71d9d0b43c3b49a248cb6548feacff782dd10
7
- data.tar.gz: e9bf9423862d3465a095485480742fffb6d394cfb1fe77ac53f496fe6fb1aabb5d378cccda5a9e2811ea74666e4e4c0e421719d75ab802cce871d36686f60bf0
6
+ metadata.gz: e60978e8b9069abe2bf9503c85641925a1cfc80d7d966545b7eb6d371631ff234869f9422e03d57f8688b5d080ccca1a98f8ae4e19d4af1e8e5d559a43e7535d
7
+ data.tar.gz: cea5b9d97a86bc15b5a5f8f0024dd763f2d91abe394f2363115c63b19a55d1a4f9754fa0d9d39eacf79b2a9f5b349b088a33a6003e5d605a80c3ae377606fddd
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -16,6 +16,7 @@ module ActionNav
16
16
  attr_accessor :description
17
17
  attr_accessor :icon
18
18
  attr_accessor :hide_unless
19
+ attr_accessor :count
19
20
 
20
21
  def path
21
22
  @parent ? [@parent.path, id].flatten : [id]
@@ -31,5 +31,13 @@ module ActionNav
31
31
  child
32
32
  end
33
33
 
34
+ def count(&block)
35
+ if block_given?
36
+ @item.count = block
37
+ else
38
+ raise ArgumentError, "Block must be provided to `count`"
39
+ end
40
+ end
41
+
34
42
  end
35
43
  end
@@ -65,6 +65,10 @@ module ActionNav
65
65
  end
66
66
  end
67
67
 
68
+ def count
69
+ @item.count ? @count ||= @item.count.call : nil
70
+ end
71
+
68
72
  private
69
73
 
70
74
  def parse(item, default = nil)
@@ -1,3 +1,3 @@
1
1
  module ActionNav
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionnav
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
@@ -10,32 +10,27 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIEZDCCAsygAwIBAgIBATANBgkqhkiG9w0BAQsFADA8MQswCQYDVQQDDAJtZTEZ
13
+ MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQDDAJtZTEZ
14
14
  MBcGCgmSJomT8ixkARkWCWFkYW1jb29rZTESMBAGCgmSJomT8ixkARkWAmlvMB4X
15
- DTE4MDMwNTE3MzAwNVoXDTE5MDMwNTE3MzAwNVowPDELMAkGA1UEAwwCbWUxGTAX
16
- BgoJkiaJk/IsZAEZFglhZGFtY29va2UxEjAQBgoJkiaJk/IsZAEZFgJpbzCCAaIw
17
- DQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAOH6HpXwjmVYrUQxUHm25mLm9qYK
18
- WS66Me1IfMUX3ZREZ/GzqiJZdV6itPuaaaKpbcm2A/KjgGSPOi9FZBneZ5KvbIeK
19
- /GsixL98kxB06q9DZwJbFz7Inklxkd/S0anm+PxtWkQP1TLkMsviRcBPEAqSLON9
20
- dCKC7+3kibhatdlsbqIQaeEhSoCUipYMi7ZyFHu5Qz+zMwc8JwHvQ4yi8cMa/QZ+
21
- s1tN4mkp/6vWWj4G4lF3YjFYyt2txJcK5ELDtyBy7a3vbMImPy9pplFx1/M6SNpn
22
- 7Pck0LqDprRzJXsGjq3CbC0nUaudFjUPr31KwxMYq1u13aQL9YuO3GeQCQ3gvdlJ
23
- TSd7zoGgLwr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BQADggEPADCCAQoCggEBAMUohRlPw3iIOhWZq+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=
37
32
  -----END CERTIFICATE-----
38
- date: 2018-12-04 00:00:00.000000000 Z
33
+ date: 2019-05-14 00:00:00.000000000 Z
39
34
  dependencies:
40
35
  - !ruby/object:Gem::Dependency
41
36
  name: activesupport
metadata.gz.sig CHANGED
Binary file