jap_mag 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7daaa3350ef3ac573901e3a17449442385db09a92fe853bcddd6fbb5e0a957f
4
- data.tar.gz: 1b99b84a47affc024cc5861d8f8f59907578b8c9bedbf253bc9cec701227a1f0
3
+ metadata.gz: 875def87b9735b33595cb5a0411d8a532b33ec72abe9556c2525daa61a67ecbd
4
+ data.tar.gz: 9cefba1bc7a28224050679818c703b7e91ccba66812b4bb7afd9f1fd37d14305
5
5
  SHA512:
6
- metadata.gz: '01654418aba5ce14c4f835e8930e07ffb388d5556aa0ac8fabcf1472b9f24ab5e83faedec8df450d5322db01668182a7f91d05c313628729bb1a547e861dad77'
7
- data.tar.gz: 0eb99fd441a1ea76f07b261a99108b822c6f7808417b91a97b5aaea08cd50cc023bd97eaf37dbce75f29085c91a3365e5d8fb97022df65e943b27e9b3b4dc28b
6
+ metadata.gz: 5b33bfa1bc09927303f4a90294047bf175a2dfc9a17673c8e7e307d5ad70b9dc142e652114de7f3070d5d8ae29e589176fe50bd6d4f7ff9ac8a74a7f1c2c8e98
7
+ data.tar.gz: 8d42bf6f7724b53cc54d86dd5245568efe0726b5433c7500ef935ef32d2f462fa124faf2cfca449dc7f7a27331068be3cd919238cd2e73b14d03856b92bb557b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jap_mag (1.4.2)
4
+ jap_mag (1.4.3)
5
5
  will_paginate
6
6
 
7
7
  GEM
@@ -75,7 +75,9 @@ module JapMagWidgetsHelper
75
75
  current = ((params[:scope] == scope[:key].to_s) or (scope[:default] and scope[:default] == true and params[:scope].blank?))
76
76
  klass = %w(nav-link)
77
77
  klass << :active if current
78
- link = link_to("#{content_tag(:span, scope[:text])} (#{scope[:count]})".html_safe, url, class: klass.join(' '))
78
+
79
+ count = scope[:count].present? ? "(#{scope[:count]})" : nil
80
+ link = link_to("#{content_tag(:span, scope[:text])} #{count}".html_safe, url, class: klass.join(' '))
79
81
 
80
82
  concat content_tag(:li, link, class: 'nav-item')
81
83
  end
@@ -194,7 +196,7 @@ module JapMagWidgetsHelper
194
196
  I18n.t "#{params[:controller]}.#{params[:action]}.sections.#{key}", **opts
195
197
  end
196
198
 
197
- def render_sections *args, **opts
199
+ def render_sections *args, opts
198
200
  opts = {locals: {}}.merge(opts)
199
201
 
200
202
  args.collect do |section|
data/jap_mag-1.4.4.gem ADDED
Binary file
@@ -1,3 +1,3 @@
1
1
  module JapMag
2
- VERSION = "1.4.3"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jap_mag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DING Yu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-14 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -66,6 +66,7 @@ files:
66
66
  - app/views/layouts/application.haml
67
67
  - config/locales/en.yml
68
68
  - docker-compose.yml
69
+ - jap_mag-1.4.4.gem
69
70
  - jap_mag.gemspec
70
71
  - lib/jap_mag.rb
71
72
  - lib/jap_mag/version.rb
@@ -77,7 +78,7 @@ files:
77
78
  homepage: https://github.com/felixding/JapMag
78
79
  licenses: []
79
80
  metadata: {}
80
- post_install_message:
81
+ post_install_message:
81
82
  rdoc_options: []
82
83
  require_paths:
83
84
  - lib
@@ -92,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  - !ruby/object:Gem::Version
93
94
  version: '0'
94
95
  requirements: []
95
- rubygems_version: 3.3.5
96
- signing_key:
96
+ rubygems_version: 3.3.26
97
+ signing_key:
97
98
  specification_version: 4
98
99
  summary: jap_mag-
99
100
  test_files: