keystone_ui-colors 0.6.1 → 0.6.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dab45427840d094baece32d1e00d2ae0f007c6e0b4abf89f40090316cfadf5e8
|
|
4
|
+
data.tar.gz: 5d494f95cabc6c9da0aba4e03a82e53cd8e0335a41fddac503557becc17e7839
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 908a5d9891c1c038970325e6290181508bd11d70842ea4536d075fb9f0cbf8d371444a0d55510bb257cb55c4425cf579c9575886a6a6b9faad79a498b74dfbc9
|
|
7
|
+
data.tar.gz: 2f738f4543cab65246f5e31587a2bf5415f1574db1f04905d47e58ffb91adae8593d9993f0e9acffbbff77f98aaf17b4934e42a30fcb21f3b0126900dd9e52b2
|
|
@@ -5,6 +5,7 @@ module KeystoneUi
|
|
|
5
5
|
class ApplicationController < ::ApplicationController
|
|
6
6
|
before_action { send(KeystoneUi::Colors.configuration.authentication_method) }
|
|
7
7
|
helper KeystoneUiHelper
|
|
8
|
+
helper HostRoutesHelper
|
|
8
9
|
|
|
9
10
|
layout -> { KeystoneUi::Colors.configuration.layout }
|
|
10
11
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module KeystoneUi
|
|
4
|
+
module Colors
|
|
5
|
+
module HostRoutesHelper
|
|
6
|
+
def method_missing(method, *args, **kwargs, &block)
|
|
7
|
+
if host_route?(method)
|
|
8
|
+
main_app.public_send(method, *args, **kwargs, &block)
|
|
9
|
+
else
|
|
10
|
+
super
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def respond_to_missing?(method, include_private = false)
|
|
15
|
+
host_route?(method) || super
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def host_route?(method) = method.end_with?("_path", "_url") && main_app.respond_to?(method)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -22,12 +22,6 @@ module KeystoneUi
|
|
|
22
22
|
initializer "keystone_ui.colors.tailwind" do
|
|
23
23
|
KeystoneUi.configuration.tailwind_sources << root.join("app/views/**/*.erb").to_s
|
|
24
24
|
end
|
|
25
|
-
|
|
26
|
-
initializer "keystone_ui.colors.url_helpers" do
|
|
27
|
-
ActiveSupport.on_load(:action_controller) do
|
|
28
|
-
helper Rails.application.routes.url_helpers
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
25
|
end
|
|
32
26
|
end
|
|
33
27
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: keystone_ui-colors
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tyler Schneider
|
|
@@ -79,6 +79,7 @@ files:
|
|
|
79
79
|
- app/controllers/concerns/keystone_ui/colors/current_palette.rb
|
|
80
80
|
- app/controllers/keystone_ui/colors/application_controller.rb
|
|
81
81
|
- app/controllers/keystone_ui/colors/settings_controller.rb
|
|
82
|
+
- app/helpers/keystone_ui/colors/host_routes_helper.rb
|
|
82
83
|
- app/helpers/keystone_ui/colors/palette_helper.rb
|
|
83
84
|
- app/javascript/keystone_ui/colors/theme_settings_controller.js
|
|
84
85
|
- app/models/keystone_ui/colors/application_record.rb
|