ultimate_turbo_modal 2.0.0 → 2.0.1

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.
@@ -4,7 +4,7 @@ module Phlex
4
4
  module DeferredRenderWithMainContent
5
5
  def view_template(&block)
6
6
  output = capture(&block)
7
- super { unsafe_raw(output) }
7
+ super { respond_to?(:unsafe_raw) ? unsafe_raw(output) : raw(output) }
8
8
  end
9
9
  end
10
10
  end
@@ -123,7 +123,8 @@ class UltimateTurboModal::Base < Phlex::HTML
123
123
 
124
124
  def styles
125
125
  style do
126
- unsafe_raw("html:has(dialog[open]) {overflow: hidden;} html {scrollbar-gutter: stable;}".html_safe)
126
+ str = "html:has(dialog[open]) {overflow: hidden;} html {scrollbar-gutter: stable;}".html_safe
127
+ respond_to?(:unsafe_raw) ? unsafe_raw(str) : raw(str)
127
128
  end
128
129
  end
129
130
 
@@ -2,21 +2,38 @@
2
2
  set -e
3
3
  cd $(dirname $0)/..
4
4
 
5
+ if [ "$1" == "--help" ]; then
6
+ echo "Usage: $0 [--skip-gem] [--skip-js]"
7
+ echo ""
8
+ echo "Options:"
9
+ echo " --skip-gem Skip building and releasing the gem."
10
+ echo " --skip-js Skip building and releasing the JavaScript."
11
+ echo " --help Show this help message."
12
+ exit 0
13
+ fi
14
+
5
15
  # Check for uncommitted changes
6
- echo "Checking for uncommitted changes..."
7
16
  if ! git diff --quiet; then
8
17
  echo "There are uncommitted changes. Aborting."
9
18
  exit 1
10
19
  fi
11
- echo "No uncommitted changes found."
12
20
 
13
- echo "Building and releasing gem..."
14
- bundle exec rake build
15
- bundle exec rake release
16
21
 
17
- echo "Building JavaScript..."
18
- cd javascript
19
- ./scripts/release-npm.sh
22
+ if [ "$1" != "--skip-gem" ]; then
23
+ echo "Building and releasing gem..."
24
+ bundle exec rake build
25
+ bundle exec rake release
26
+ else
27
+ echo "Skipping gem build and release..."
28
+ fi
29
+
30
+ if [ "$1" != "--skip-js" ]; then
31
+ echo "Building JavaScript..."
32
+ cd javascript
33
+ ./scripts/release-npm.sh
34
+ else
35
+ echo "Skipping JavaScript build..."
36
+ fi
20
37
 
21
38
  echo "Done!"
22
39
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultimate_turbo_modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Mercier
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-07 00:00:00.000000000 Z
10
+ date: 2025-04-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: phlex-rails
@@ -86,6 +86,7 @@ files:
86
86
  - VERSION
87
87
  - javascript/index.js
88
88
  - javascript/modal_controller.js
89
+ - javascript/package-lock.json
89
90
  - javascript/package.json
90
91
  - javascript/rollup.config.js
91
92
  - javascript/scripts/release-npm.sh