strongmind-auth 1.1.58 → 1.1.62
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 +4 -4
- data/config/initializers/devise.rb +1 -1
- data/lib/strongmind/auth/version.rb +1 -1
- data/lib/strongmind/common_nav_fetcher.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fbda7597b68d3fc40e7e2e345931da771bd337347bcb400b41f6c25ac9d0af4e
|
|
4
|
+
data.tar.gz: 9145c6eca8ef8b2f83cc89a40f6acec1505a832b7f1c0c527f7a63b0d31b5e02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 847ea8b84ec737bfe71a8ae87101a40d2554e14c62571807e85d21811784d22c68c89dd4e858fb1b6e019bc8dea6151abe73fa72e7a2ec0397fc2dceded19780
|
|
7
|
+
data.tar.gz: 568f3d402bf0aeed5be2d2751e0ce2649d530547b4289b7b32a57c356230a997fd62a32e24e6083b1737c746154a4b832a2e1a8aba2436086f513e3334fe06ca
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
return if defined? Rails::Generators
|
|
3
|
+
# return if defined? Rails::Generators # This line needs to be commented out to allow tailwindcss watch to run linked ticket: https://strongmind.atlassian.net/browse/BEL-2645
|
|
4
4
|
|
|
5
5
|
# if Devise is not present in Gemfile
|
|
6
6
|
unless File.read('Gemfile').include?('devise')
|
|
@@ -35,7 +35,16 @@ module Strongmind
|
|
|
35
35
|
private
|
|
36
36
|
|
|
37
37
|
def current_page?(url)
|
|
38
|
-
request.fullpath == URI.parse(url).path
|
|
38
|
+
request.fullpath == URI.parse(url).path || path_in_request?(url)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def path_in_request?(path)
|
|
42
|
+
sanitized_path = path.gsub('/', '')
|
|
43
|
+
|
|
44
|
+
path_to_compare = request.fullpath.split('?').first
|
|
45
|
+
|
|
46
|
+
return path_to_compare == '/' if sanitized_path.empty?
|
|
47
|
+
path_to_compare.include?(sanitized_path) || path_to_compare.include?(sanitized_path.pluralize)
|
|
39
48
|
end
|
|
40
49
|
|
|
41
50
|
def fetch_navbar_data(nav_items)
|
|
@@ -91,7 +100,9 @@ module Strongmind
|
|
|
91
100
|
end
|
|
92
101
|
|
|
93
102
|
def build_nav_items(menu_items)
|
|
94
|
-
{ nav_items: menu_items.map { |item| nav_item_data(item) } }
|
|
103
|
+
items = { nav_items: menu_items.map { |item| nav_item_data(item) } }
|
|
104
|
+
items[:nav_items].first[:is_active] = true unless items[:nav_items].any? { |item| item[:is_active] }
|
|
105
|
+
items
|
|
95
106
|
end
|
|
96
107
|
|
|
97
108
|
def nav_item_data(item)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: strongmind-auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.62
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Team Belding
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-03-
|
|
11
|
+
date: 2024-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|