jap_mag 1.3.4 → 1.3.5

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: e28dda46d885cb454f61326fc907e27931c9cf7cdad5e189597692ce364141c5
4
- data.tar.gz: 47babaf33cba04d636228888e5f11045be461a0d2253e1740c3c6ed8790c5fdb
3
+ metadata.gz: 6a65ff965780098ac76734497dee642f07790f98115a9d84e2dfb29b1960b6a5
4
+ data.tar.gz: 202a22e1358394c15bfc8e64f19ea6f655466adf01f1ed6385af892eec328a2e
5
5
  SHA512:
6
- metadata.gz: 96d782db55135d0eed4615174d6f92802d7b7c3dbd5a5f0cf347d8a77c6237fc4b3a77ff9405fee0d04a7250ac4879f3fa0539d35d5ca9d667760ea794c18bac
7
- data.tar.gz: 238aa199bc5dc8bc35336f698281b2ea3660f9b85200aa7ba0dda0936f169174beec901891f6b69fcae265762bfa73cc5d1e179fe891812477cb2df819a1b0e1
6
+ metadata.gz: f4c962c085d78a3837788b98ef79dca79cffe5cc671de5dfbe6176b30bde0fe84faff6454dfd5935497f41196bcf3690fc42f0eb5336664be4366606b6d676f3
7
+ data.tar.gz: 856b253088bd36722764e0080d49a25b4896e0a8342c25e809d302dbb92671288d8d1b22822a961d07366f3b3396bbbf33c8dadf2ff1726ed561a40d475902bc
@@ -1,3 +1,3 @@
1
1
  module JapMag
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
data/lib/jap_mag.rb CHANGED
@@ -43,29 +43,15 @@ module JapMag
43
43
  # multiple arguments: "page#index", "page#intro"
44
44
  #
45
45
  def current_controller_action_in?(*args)
46
- controller = params["controller"]
47
- action = params["action"]
46
+ controller = params[:controller]
47
+ action = params[:action]
48
+ #raise args.inspect if args != 'homepage/page#index'
48
49
 
49
- if args.size == 1
50
- if args.first.is_a?(Array)
51
- arguments = args.first.split(" ").first
52
- elsif args.first.is_a?(String)
53
- if args.first.split(" ").size > 1
54
- arguments = args.first.split(" ")
55
- else
56
- arguments = args
57
- end
58
- end
59
- else
60
- arguments = args
61
- end
62
-
63
- #raise arguments.inspect
50
+ args = args.first if args.size == 1 && args.first.is_a?(Array)
64
51
 
65
- arguments.each do |element|
66
- if element.include?("#")
67
- array = element.match(/([a-z\-\_\/]*)#([a-z\-\_]*)/).to_a
68
- c, a = array[1], array[2]
52
+ args.each do |element|
53
+ if element.to_s.include?("#")
54
+ c, a = element.split('#')
69
55
  return true if controller == c && action == a
70
56
  else
71
57
  return true if controller == element
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.3.4
4
+ version: 1.3.5
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-07-17 00:00:00.000000000 Z
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -57,7 +57,7 @@ files:
57
57
  homepage: https://github.com/felixding/JapMag
58
58
  licenses: []
59
59
  metadata: {}
60
- post_install_message:
60
+ post_install_message:
61
61
  rdoc_options: []
62
62
  require_paths:
63
63
  - lib
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.3.11
76
- signing_key:
75
+ rubygems_version: 3.3.5
76
+ signing_key:
77
77
  specification_version: 4
78
78
  summary: jap_mag-
79
79
  test_files: []