ultimate_turbo_modal 3.2.1 → 3.4.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 +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +1 -1
- data/README.md +248 -0
- data/VERSION +1 -1
- data/app/assets/stylesheets/ultimate_turbo_modal.css +610 -0
- data/lib/generators/ultimate_turbo_modal/base.rb +44 -0
- data/lib/generators/ultimate_turbo_modal/install_generator.rb +8 -0
- data/lib/generators/ultimate_turbo_modal/templates/flavors/custom.rb +10 -1
- data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind.rb +78 -4
- data/lib/generators/ultimate_turbo_modal/templates/flavors/vanilla.rb +14 -1
- data/lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb +18 -0
- data/lib/generators/ultimate_turbo_modal/update_generator.rb +2 -0
- data/lib/ultimate_turbo_modal/base.rb +172 -26
- data/lib/ultimate_turbo_modal/configuration.rb +45 -5
- data/lib/ultimate_turbo_modal/helpers/view_helper.rb +31 -0
- data/lib/ultimate_turbo_modal/railtie.rb +23 -0
- data/lib/ultimate_turbo_modal.rb +4 -0
- metadata +2 -1
|
@@ -8,6 +8,29 @@ require "ultimate_turbo_modal/helpers/stream_helper"
|
|
|
8
8
|
|
|
9
9
|
module UltimateTurboModal
|
|
10
10
|
class Railtie < Rails::Railtie
|
|
11
|
+
# Absolute path to the stylesheets shipped with the gem. Exposed so that
|
|
12
|
+
# apps and tooling can locate `ultimate_turbo_modal.css` without guessing.
|
|
13
|
+
def self.stylesheets_path
|
|
14
|
+
File.expand_path("../../app/assets/stylesheets", __dir__)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Make `ultimate_turbo_modal.css` available to the asset pipeline so that
|
|
18
|
+
# `stylesheet_link_tag "ultimate_turbo_modal"` works under Propshaft and
|
|
19
|
+
# Sprockets alike, regardless of whether the app uses importmaps or a
|
|
20
|
+
# JavaScript bundler.
|
|
21
|
+
initializer "ultimate_turbo_modal.assets" do |app|
|
|
22
|
+
next unless app.config.respond_to?(:assets)
|
|
23
|
+
next unless app.config.assets.respond_to?(:paths)
|
|
24
|
+
|
|
25
|
+
app.config.assets.paths << UltimateTurboModal::Railtie.stylesheets_path
|
|
26
|
+
|
|
27
|
+
# Sprockets only precompiles what it is told about; Propshaft compiles
|
|
28
|
+
# everything on its load path and ignores this list.
|
|
29
|
+
if defined?(Sprockets) && app.config.assets.respond_to?(:precompile)
|
|
30
|
+
app.config.assets.precompile << "ultimate_turbo_modal.css"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
11
34
|
initializer "ultimate_turbo_modal.action_controller" do
|
|
12
35
|
ActiveSupport.on_load(:action_controller_base) do
|
|
13
36
|
include UltimateTurboModal::Helpers::ControllerHelper
|
data/lib/ultimate_turbo_modal.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultimate_turbo_modal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carl Mercier
|
|
@@ -139,6 +139,7 @@ files:
|
|
|
139
139
|
- Rakefile
|
|
140
140
|
- UPGRADING.md
|
|
141
141
|
- VERSION
|
|
142
|
+
- app/assets/stylesheets/ultimate_turbo_modal.css
|
|
142
143
|
- lefthook.yml
|
|
143
144
|
- lib/generators/ultimate_turbo_modal/base.rb
|
|
144
145
|
- lib/generators/ultimate_turbo_modal/install_generator.rb
|