From 981fced9f935cef9be98c6ac01ca40ac264fd385 Mon Sep 17 00:00:00 2001
From: David Celis
Date: Fri, 23 Feb 2024 15:25:46 -0800
Subject: [PATCH 001/204] Rescue from `Interrupt` in `tailwindcss:watch`
When sending a SIGINT to end the `rake tailwindcss:watch` (or, for modern Procfile-based Rails applications, `bin/dev`) task, Ruby processes this via an `Interrupt` exception that can be rescued to handle gracefully tearing the process down. The `tailwindcss:watch` task, however, does not handle this exception, so when the task (or Rails' server via `bin/dev`) is terminated via the standard practice of using `^C`, that exception propagates and can result in a large backtrace; this can erroneously lead developers to think something is wrong.
This patch fixes #318 by rescuing `Interrupt` exceptions, which I've verified in my own applications that use this gem. It didn't seem like there's any necessary teardown that needs to happen upon quitting the process, so I left the `rescue` clause blank except for a log line when in verbose mode. I'm happy to make any necessary changes there, however! Additionally, if that `rescue` should occur elsewhere, like directly in `exe/tailwindcss`, I'm happy to do so there as well. I wasn't sure if that's where it belonged, however, as the other commands aren't meant to run indefinitely until killed.
---
lib/tasks/build.rake | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake
index 8f61bf8e..3044ff05 100644
--- a/lib/tasks/build.rake
+++ b/lib/tasks/build.rake
@@ -15,6 +15,8 @@ namespace :tailwindcss do
command = Tailwindcss::Commands.watch_command(always: always, debug: debug, poll: poll)
puts command.inspect if args.extras.include?("verbose")
system(*command)
+ rescue Interrupt
+ puts "Received interrupt, exiting tailwindcss:watch" if args.extras.include?("verbose")
end
end
From 01b0862d5a29f0389a1a717475c9f117d403826e Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 7 Mar 2024 09:50:43 -0500
Subject: [PATCH 002/204] doc: update CHANGELOG
[skip ci]
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7736a540..97952494 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* The `tailwindcss:watch` task handles interrupts more cleanly. (#318, #336) @davidcelis
+
+
## v2.3.0 / 2024-01-10
* Allow applications to override the generator templates. (#314) @flavorjones
From 27974ce5276942457cd48d42098f7cb4bf1621ae Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 8 Apr 2024 10:00:11 -0400
Subject: [PATCH 003/204] dev: bundle update
---
Gemfile.lock | 76 +++++++++++++++++++++++++---------------------------
1 file changed, 37 insertions(+), 39 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 10e60749..2a644a78 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,19 +7,19 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.2)
- actionpack (= 7.1.2)
- actionview (= 7.1.2)
- activejob (= 7.1.2)
- activesupport (= 7.1.2)
+ actionmailer (7.1.3.2)
+ actionpack (= 7.1.3.2)
+ actionview (= 7.1.3.2)
+ activejob (= 7.1.3.2)
+ activesupport (= 7.1.3.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
- actionpack (7.1.2)
- actionview (= 7.1.2)
- activesupport (= 7.1.2)
+ actionpack (7.1.3.2)
+ actionview (= 7.1.3.2)
+ activesupport (= 7.1.3.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@@ -27,16 +27,16 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.2)
- activesupport (= 7.1.2)
+ actionview (7.1.3.2)
+ activesupport (= 7.1.3.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.2)
- activesupport (= 7.1.2)
+ activejob (7.1.3.2)
+ activesupport (= 7.1.3.2)
globalid (>= 0.3.6)
- activesupport (7.1.2)
+ activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -47,26 +47,25 @@ GEM
mutex_m
tzinfo (~> 2.0)
base64 (0.2.0)
- bigdecimal (3.1.5)
+ bigdecimal (3.1.7)
builder (3.2.4)
- concurrent-ruby (1.2.2)
+ concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
- debug (1.9.1)
+ debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
- drb (2.2.0)
- ruby2_keywords
+ drb (2.2.1)
erubi (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
- i18n (1.14.1)
+ i18n (1.14.4)
concurrent-ruby (~> 1.0)
- io-console (0.7.1)
- irb (1.11.0)
+ io-console (0.7.2)
+ irb (1.12.0)
rdoc
- reline (>= 0.3.8)
+ reline (>= 0.4.2)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -77,30 +76,30 @@ GEM
net-smtp
mini_mime (1.1.5)
mini_portile2 (2.8.5)
- minitest (5.20.0)
+ minitest (5.22.3)
mutex_m (0.2.0)
- net-imap (0.4.9.1)
+ net-imap (0.4.10)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
- net-smtp (0.4.0.1)
+ net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.2)
+ nokogiri (1.16.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.2-arm64-darwin)
+ nokogiri (1.16.3-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.2-x86_64-darwin)
+ nokogiri (1.16.3-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.2-x86_64-linux)
+ nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
racc (1.7.3)
- rack (3.0.8)
+ rack (3.0.10)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -115,27 +114,26 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.2)
- actionpack (= 7.1.2)
- activesupport (= 7.1.2)
+ railties (7.1.3.2)
+ actionpack (= 7.1.3.2)
+ activesupport (= 7.1.3.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
- rake (13.1.0)
- rdoc (6.6.2)
+ rake (13.2.1)
+ rdoc (6.6.3.1)
psych (>= 4.0.0)
- reline (0.4.2)
+ reline (0.5.0)
io-console (~> 0.5)
- ruby2_keywords (0.0.5)
stringio (3.1.0)
- thor (1.3.0)
+ thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
- zeitwerk (2.6.12)
+ zeitwerk (2.6.13)
PLATFORMS
arm64-darwin
From 3df3d93be1ead5a4560536eeff627d087ab10f9b Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 8 Apr 2024 10:00:23 -0400
Subject: [PATCH 004/204] dep: update tailwindcss to 3.4.3 (from 3.4.1)
- https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.2
- https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.3
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 8dd7d8e5..120c37b8 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.1"
+ VERSION = "v3.4.3"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From fe5a6f7b688d89e146e8c8805520277820994264 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 8 Apr 2024 10:36:40 -0400
Subject: [PATCH 005/204] version bump to v2.4.0
---
CHANGELOG.md | 3 ++-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 97952494..fa699e71 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
-## next / unreleased
+## v2.4.0 / 2024-04-08
+* Update to [Tailwind CSS v3.4.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.3) from v3.4.1 by @flavorjones
* The `tailwindcss:watch` task handles interrupts more cleanly. (#318, #336) @davidcelis
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index bd5ad174..9e7d354c 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.3.0"
+ VERSION = "2.4.0"
end
From 828eacce74756a4fabd131d917818c07b52631b8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 22 Apr 2024 16:51:03 -0400
Subject: [PATCH 006/204] doc: add note about debug and reline to
Troubleshooting
Related to https://github.com/rails/tailwindcss-rails/discussions/346
[skip ci]
---
README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README.md b/README.md
index ab0f5aa1..205dd52f 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,7 @@
* [Using with PostCSS](#using-with-postcss)
* [Custom inputs or outputs](#custom-inputs-or-outputs)
- [Troubleshooting](#troubleshooting)
+ * [Lost keystrokes or hanging when using `ruby/debug` with the Puma plugin](#lost-keystrokes-or-hanging-when-using-rubydebug-with-the-puma-plugin)
* [Running in a docker container exits prematurely](#running-in-a-docker-container-exits-prematurely)
* [Conflict with sassc-rails](#conflict-with-sassc-rails)
* [Class names must be spelled out](#class-names-must-be-spelled-out)
@@ -185,6 +186,17 @@ If you need to use a custom input or output file, you can run `bundle exec tailw
Some common problems experienced by users ...
+### Lost keystrokes or hanging when using `ruby/debug` with the Puma plugin
+
+If you are using the `ruby/debug` debugger while using the Puma plugin from this gem, and you're experiencing what looks like hanging or lost keystrokes, then you'll need to disable Reline.
+
+You can read the [`debug` documentation](https://github.com/ruby/debug?tab=readme-ov-file#configuration) for more information, but the easiest thing to do is to set the environment variable `RUBY_DEBUG_NO_RELINE`:
+
+``` sh
+RUBY_DEBUG_NO_RELINE=1 rails server
+```
+
+
### Running in a docker container exits prematurely
If you are running `rails tailwindcss:watch` as a process in a Docker container, set `tty: true` in `docker-compose.yml` for the appropriate container to keep the watch process running.
From edd90d55461127bc46192de0eb8f0b89b19a98c3 Mon Sep 17 00:00:00 2001
From: tompng
Date: Wed, 24 Apr 2024 22:17:58 +0900
Subject: [PATCH 007/204] Use IO.popen instead of system to avoid stdin read by
tailwindcss watch command
`tailwindcss -w` reads stdin, probably to detect stdin close.
When using binding.irb or debugger with tailwindcss-rails, some keystrokes are taken by tailwindcss.
To not let tailwindcss watch command read stdin, we should use `IO.popen(command, 'r+')` instead of `system(*command)`.
Workaround for https://github.com/rails/tailwindcss-rails/discussions/346
---
lib/puma/plugin/tailwindcss.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/puma/plugin/tailwindcss.rb b/lib/puma/plugin/tailwindcss.rb
index d78b068e..e614d62a 100644
--- a/lib/puma/plugin/tailwindcss.rb
+++ b/lib/puma/plugin/tailwindcss.rb
@@ -8,7 +8,12 @@ def start(launcher)
@puma_pid = $$
@tailwind_pid = fork do
Thread.new { monitor_puma }
- system(*Tailwindcss::Commands.watch_command)
+ # Using IO.popen(command, 'r+') will avoid watch_command read from $stdin.
+ # If we use system(*command) instead, IRB and Debug can't read from $stdin
+ # correctly bacause some keystrokes will be taken by watch_command.
+ IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
+ IO.copy_stream(io, $stdout)
+ end
end
launcher.events.on_stopped { stop_tailwind }
From 272658bc100777bc036555efe8a97f62ddbb633b Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 25 Apr 2024 11:19:26 -0400
Subject: [PATCH 008/204] dev: bundle update
---
Gemfile.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 2a644a78..69df200a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -75,7 +75,7 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- mini_portile2 (2.8.5)
+ mini_portile2 (2.8.6)
minitest (5.22.3)
mutex_m (0.2.0)
net-imap (0.4.10)
@@ -87,14 +87,14 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.3)
+ nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.3-arm64-darwin)
+ nokogiri (1.16.4-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.3-x86_64-darwin)
+ nokogiri (1.16.4-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.3-x86_64-linux)
+ nokogiri (1.16.4-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
@@ -125,7 +125,7 @@ GEM
rake (13.2.1)
rdoc (6.6.3.1)
psych (>= 4.0.0)
- reline (0.5.0)
+ reline (0.5.3)
io-console (~> 0.5)
stringio (3.1.0)
thor (1.3.1)
From ebfe29920a988636817f703907797925d0c27a73 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 25 Apr 2024 11:19:40 -0400
Subject: [PATCH 009/204] version bump to v2.4.1
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa699e71..0e7f8f2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.4.1 / 2024-04-25
+
+* Fix debugger repl when using the Puma plugin. (#349) @tompng
+
+
## v2.4.0 / 2024-04-08
* Update to [Tailwind CSS v3.4.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.3) from v3.4.1 by @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 69df200a..c3fe8c8a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.3.0)
+ tailwindcss-rails (2.4.1)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 9e7d354c..11458afe 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.4.0"
+ VERSION = "2.4.1"
end
From db81dab83d76a1efb6ab5ae7f6c02a4156ae22d2 Mon Sep 17 00:00:00 2001
From: Stan Lo
Date: Thu, 25 Apr 2024 17:00:25 +0100
Subject: [PATCH 010/204] Update troubleshooting advice on the debugger issue
with puma plugin
---
README.md | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 205dd52f..01fa023b 100644
--- a/README.md
+++ b/README.md
@@ -186,16 +186,9 @@ If you need to use a custom input or output file, you can run `bundle exec tailw
Some common problems experienced by users ...
-### Lost keystrokes or hanging when using `ruby/debug` with the Puma plugin
-
-If you are using the `ruby/debug` debugger while using the Puma plugin from this gem, and you're experiencing what looks like hanging or lost keystrokes, then you'll need to disable Reline.
-
-You can read the [`debug` documentation](https://github.com/ruby/debug?tab=readme-ov-file#configuration) for more information, but the easiest thing to do is to set the environment variable `RUBY_DEBUG_NO_RELINE`:
-
-``` sh
-RUBY_DEBUG_NO_RELINE=1 rails server
-```
+### Lost keystrokes or hanging when using terminal-based debugging tools (e.g. IRB, Pry, `ruby/debug`...etc.) with the Puma plugin
+We've addressed the issue and you can avoid the problem by upgrading `tailwindcss-rails` to [v2.4.1](https://github.com/rails/tailwindcss-rails/releases/tag/v2.4.1) or later versions.
### Running in a docker container exits prematurely
From 76fd71aa88b81ea7f5bfed337be43f01fd7e1a26 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 26 Apr 2024 10:49:30 -0400
Subject: [PATCH 011/204] ci: add arm64-darwin coverage on macos-14
and pin x86_64-darwin to macos-13
See flavorjones/ruby-c-extensions-explained#30 for context
---
.github/workflows/gem-install.yml | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index 09271372..d2babe6a 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux", "arm-linux"]
+ platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "arm64-darwin", "x86_64-linux", "arm-linux"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -96,9 +96,9 @@ jobs:
tailwindcss --help
"
- darwin-install:
+ darwin-x86_64-install:
needs: ["package"]
- runs-on: macos-latest
+ runs-on: macos-13
steps:
- uses: ruby/setup-ruby@v1
with:
@@ -110,6 +110,20 @@ jobs:
- run: "gem install pkg/tailwindcss-rails-*.gem"
- run: "tailwindcss --help"
+ darwin-arm64-install:
+ needs: ["package"]
+ runs-on: macos-14
+ steps:
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: "3.2"
+ - uses: actions/download-artifact@v3
+ with:
+ name: gem-arm64-darwin
+ path: pkg
+ - run: "gem install pkg/tailwindcss-rails-*.gem"
+ - run: "tailwindcss --help"
+
windows-install:
needs: ["package"]
runs-on: windows-latest
From ec4d806a80aa68fa6d3c85c4d4f2293b7bef6b29 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 26 Apr 2024 16:36:26 -0400
Subject: [PATCH 012/204] generator: drop the tailwind aspect-ratio plugin
This plugin was originally a polyfill to handle the time gap until
Safari 15 was released (in Fall 2021), and so is beyond its useful
lifetime for anyone not targetting ancient browsers.
Co-authored-by: Justin Searls
---
CHANGELOG.md | 5 +++++
lib/install/tailwind.config.js | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e7f8f2f..2220e787 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Remove the `@tailwindcss/aspect-ratio` plugin from the `tailwind.config.js` that gets installed by the generator. (#344) @flavorjones @searls
+
+
## v2.4.1 / 2024-04-25
* Fix debugger repl when using the Puma plugin. (#349) @tompng
diff --git a/lib/install/tailwind.config.js b/lib/install/tailwind.config.js
index 39364deb..d6ad82c0 100644
--- a/lib/install/tailwind.config.js
+++ b/lib/install/tailwind.config.js
@@ -16,7 +16,6 @@ module.exports = {
},
plugins: [
require('@tailwindcss/forms'),
- require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
require('@tailwindcss/container-queries'),
]
From 6e6e34a334c419b4565dfcc6925fddae459485dc Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 27 Apr 2024 15:09:43 -0400
Subject: [PATCH 013/204] version bump to v2.5.0
---
CHANGELOG.md | 4 ++--
lib/tailwindcss/version.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2220e787..02a804bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
-## next / unreleased
+## v2.5.0 / 2024-04-27
-* Remove the `@tailwindcss/aspect-ratio` plugin from the `tailwind.config.js` that gets installed by the generator. (#344) @flavorjones @searls
+* Remove the `@tailwindcss/aspect-ratio` plugin from the `tailwind.config.js` that gets installed by the generator. This plugin was originally a polyfill until Safari 15 was released (in Fall 2021), and so is beyond its useful lifetime for anyone not targetting ancient browsers. (#344) @flavorjones @searls
## v2.4.1 / 2024-04-25
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 11458afe..53892fe2 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.4.1"
+ VERSION = "2.5.0"
end
From e9c3f80d957bbe6442a63e10c19dad18edd97d15 Mon Sep 17 00:00:00 2001
From: Olivier Lacan
Date: Mon, 29 Apr 2024 02:13:47 -0700
Subject: [PATCH 014/204] Increase form input field border contrast
The contrast provided by the border-gray-200 Tailwind utility
class is very poor. It's nearly impossible to distinguish the edges
of an input field on a white background.
That's not a great default experience for Rails scaffolds.
With a slight bump to border-gray-400, things are much easier
to distinguish.
---
.../tailwindcss/scaffold/templates/_form.html.erb.tt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index adbd5b7e..5ee5ecf0 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -15,23 +15,23 @@
<% if attribute.password_digest? -%>
<%%= form.label :password %>
- <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.label :password_confirmation %>
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :text_area -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% elsif attribute.field_type == :check_box -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
<% else -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% end -%>
<% end -%>
From 6208f900c02e6cb565428bdaa03be442fbdbbae0 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 30 Apr 2024 11:23:00 -0400
Subject: [PATCH 015/204] dev: get dependabot updates for gems and github
actions
---
dependabot.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 dependabot.yml
diff --git a/dependabot.yml b/dependabot.yml
new file mode 100644
index 00000000..01d8316b
--- /dev/null
+++ b/dependabot.yml
@@ -0,0 +1,13 @@
+version: 2
+updates:
+ - package-ecosystem: "bundler"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ groups:
+ github-actions:
+ applies-to: version-updates
From 5a5e39506e695aa97203fe917dc8ee820cc6f25f Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 30 Apr 2024 11:26:49 -0400
Subject: [PATCH 016/204] fix location of dependabot.yml
---
dependabot.yml => .github/dependabot.yml | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename dependabot.yml => .github/dependabot.yml (100%)
diff --git a/dependabot.yml b/.github/dependabot.yml
similarity index 100%
rename from dependabot.yml
rename to .github/dependabot.yml
From a64b7a4c6542f3ddaf385beae010481596a03549 Mon Sep 17 00:00:00 2001
From: Kingsley Chijioke
Date: Mon, 29 Apr 2024 19:37:57 +0100
Subject: [PATCH 017/204] generator: sync erb template
This updates the erb template to be in sync with the template in rails/rails
---
CHANGELOG.md | 5 +++++
.../tailwindcss/scaffold/templates/edit.html.erb.tt | 2 +-
.../tailwindcss/scaffold/templates/index.html.erb.tt | 9 ++++++++-
.../tailwindcss/scaffold/templates/partial.html.erb.tt | 5 -----
.../tailwindcss/scaffold/templates/show.html.erb.tt | 6 +++---
5 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02a804bd..2722f5f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## unreleased
+
+* Bring the scaffold templates up to date with rails/rails as much as possible without breaking 6.1 compatibility. (#357) @kinsomicrote
+
+
## v2.5.0 / 2024-04-27
* Remove the `@tailwindcss/aspect-ratio` plugin from the `tailwind.config.js` that gets installed by the generator. This plugin was originally a polyfill until Safari 15 was released (in Fall 2021), and so is beyond its useful lifetime for anyone not targetting ancient browsers. (#344) @flavorjones @searls
diff --git a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
index 34756518..a1e3772b 100644
--- a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
@@ -3,6 +3,6 @@
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
- <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
index c29d5e6e..f0a4bb9d 100644
--- a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
@@ -3,12 +3,19 @@
<%%= notice %>
<%% end %>
+ <%% content_for :title, "<%= human_name.pluralize %>" %>
+
<%= human_name.pluralize %>
<%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
- <%%= render @<%= plural_table_name %> %>
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
+ <%%= render <%= singular_table_name %> %>
+
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+
+ <%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
index 60a0de20..e1a45470 100644
--- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
@@ -14,9 +14,4 @@
<% end -%>
- <%% if action_name != "show" %>
- <%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_name %>_path(<%= singular_name %>), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
-
- <%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
index c386118c..fafb05a7 100644
--- a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
@@ -6,10 +6,10 @@
<%%= render @<%= singular_table_name %> %>
- <%%= link_to "Edit this <%= singular_table_name %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%%= button_to "Destroy this <%= singular_table_name %>", <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
+ <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
- <%%= link_to "Back to <%= plural_table_name %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
From d896e9523cc8ebf58e56e40edf7540270e1fc6f1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 1 May 2024 09:32:12 -0400
Subject: [PATCH 018/204] dev: remove attempt at dependabot grouping
---
.github/dependabot.yml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 01d8316b..403b3087 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -8,6 +8,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- groups:
- github-actions:
- applies-to: version-updates
From 95ffac7ea1d0a9ef7d8edac38358a3352650b11d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 1 May 2024 13:33:05 +0000
Subject: [PATCH 019/204] build(deps): bump actions/download-artifact from 3 to
4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
.github/workflows/gem-install.yml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index d2babe6a..f0b5d516 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -43,7 +43,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-ruby
path: pkg
@@ -57,7 +57,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-x86_64-linux
path: pkg
@@ -70,7 +70,7 @@ jobs:
container:
image: ruby:3.2-alpine
steps:
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-x86_64-linux
path: pkg
@@ -83,7 +83,7 @@ jobs:
needs: ["package"]
runs-on: ubuntu-latest
steps:
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-arm-linux
path: pkg
@@ -103,7 +103,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-x86_64-darwin
path: pkg
@@ -117,7 +117,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-arm64-darwin
path: pkg
@@ -131,7 +131,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-x64-mingw32
path: pkg
@@ -145,7 +145,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: gem-x64-mingw-ucrt
path: pkg
From 1fc0541e57227f970690845ee518c9126c73a538 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 30 Apr 2024 11:13:57 -0400
Subject: [PATCH 020/204] dep: drop support for Rails 6.0
which reached EOL 11 months ago, in June 2023
---
CHANGELOG.md | 1 +
Gemfile | 2 +-
Gemfile.lock | 9 ++++-----
tailwindcss-rails.gemspec | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2722f5f3..6e9718e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
## unreleased
* Bring the scaffold templates up to date with rails/rails as much as possible without breaking 6.1 compatibility. (#357) @kinsomicrote
+* Drop support for Rails 6.0, which reached end-of-life in June 2023.
## v2.5.0 / 2024-04-27
diff --git a/Gemfile b/Gemfile
index cf00e45c..7a21e102 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,5 +5,5 @@ gemspec
gem "debug", ">= 1.0.0"
group :test do
- gem "actionmailer", ">= 6.0.0"
+ gem "actionmailer", ">= 6.1.0"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index c3fe8c8a..75b24379 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.4.1)
- railties (>= 6.0.0)
+ tailwindcss-rails (2.5.0)
+ railties (>= 6.1.0)
GEM
remote: https://rubygems.org/
@@ -82,7 +82,6 @@ GEM
date
net-protocol
net-pop (0.1.2)
- net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
@@ -125,7 +124,7 @@ GEM
rake (13.2.1)
rdoc (6.6.3.1)
psych (>= 4.0.0)
- reline (0.5.3)
+ reline (0.5.4)
io-console (~> 0.5)
stringio (3.1.0)
thor (1.3.1)
@@ -142,7 +141,7 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
- actionmailer (>= 6.0.0)
+ actionmailer (>= 6.1.0)
debug (>= 1.0.0)
tailwindcss-rails!
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 02c10fb5..237161ff 100644
--- a/tailwindcss-rails.gemspec
+++ b/tailwindcss-rails.gemspec
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables << "tailwindcss"
- spec.add_dependency "railties", ">= 6.0.0"
+ spec.add_dependency "railties", ">= 6.1.0"
end
From 1c7e4dc2db2cedf9fefa5c0b78fba700b2ddcaed Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 1 May 2024 13:33:02 +0000
Subject: [PATCH 021/204] build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
.github/workflows/gem-install.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index f0b5d516..eb1300d6 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -30,7 +30,7 @@ jobs:
bundler: latest
bundler-cache: true
- run: "bundle exec rake gem:${{matrix.platform}}"
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
name: gem-${{matrix.platform}}
path: pkg
From 94128542a7d918116ab56e5be1f8fc9d7c18da7f Mon Sep 17 00:00:00 2001
From: Kingsley Chijioke
Date: Mon, 29 Apr 2024 19:37:57 +0100
Subject: [PATCH 022/204] generator: sync erb template to use Rails 7.0 APIs
This updates the erb template to be in sync with the template in rails/rails
---
lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt | 2 +-
lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt | 2 +-
lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt | 2 +-
lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
index a1e3772b..fab779d1 100644
--- a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
@@ -4,5 +4,5 @@
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
index f0a4bb9d..65cf06b5 100644
--- a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
@@ -14,7 +14,7 @@
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
<%%= render <%= singular_table_name %> %>
- <%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
index 61c0a450..665532e5 100644
--- a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
@@ -3,5 +3,5 @@
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
index fafb05a7..17d0febf 100644
--- a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
@@ -6,7 +6,7 @@
<%%= render @<%= singular_table_name %> %>
- <%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
From 3bf5cb93caa4de842ad4c40f5cd02d8cb05dd89c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 1 May 2024 10:15:49 -0400
Subject: [PATCH 023/204] dep: drop feature and bugfix support for Rails 6.1
We will still provide security support for the previous minor release
while Rails 6.1 is supported.
---
.github/workflows/ci.yml | 18 ------------------
CHANGELOG.md | 3 ++-
Gemfile | 2 +-
Gemfile.lock | 4 ++--
tailwindcss-rails.gemspec | 2 +-
5 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6af43c2a..db04fb3f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,24 +33,6 @@ jobs:
- name: Run tests
run: bin/test
- rails6:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - run: rm Gemfile.lock
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- bundler: latest
- - name: "Pin to Rails 6.1"
- run: |
- bundle remove actionmailer
- bundle add actionmailer --version "~> 6.1" --skip-install
- bundle add railties --version "~> 6.1" --skip-install
- bundle install
- - name: Run tests
- run: bin/test
-
user-journey:
strategy:
fail-fast: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e9718e0..e0db08db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,8 @@
## unreleased
-* Bring the scaffold templates up to date with rails/rails as much as possible without breaking 6.1 compatibility. (#357) @kinsomicrote
+* Bring the scaffold templates up to date with rails/rails. (#357, #359) @kinsomicrote
* Drop support for Rails 6.0, which reached end-of-life in June 2023.
+* Drop feature and bug fix support for Rails 6.1. The previous minor release will still receive security support while Rails 6.1 is supported.
## v2.5.0 / 2024-04-27
diff --git a/Gemfile b/Gemfile
index 7a21e102..46788894 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,5 +5,5 @@ gemspec
gem "debug", ">= 1.0.0"
group :test do
- gem "actionmailer", ">= 6.1.0"
+ gem "actionmailer", ">= 7.0.0"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 75b24379..0b99151e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,7 +2,7 @@ PATH
remote: .
specs:
tailwindcss-rails (2.5.0)
- railties (>= 6.1.0)
+ railties (>= 7.0.0)
GEM
remote: https://rubygems.org/
@@ -141,7 +141,7 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
- actionmailer (>= 6.1.0)
+ actionmailer (>= 7.0.0)
debug (>= 1.0.0)
tailwindcss-rails!
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 237161ff..7535ccc7 100644
--- a/tailwindcss-rails.gemspec
+++ b/tailwindcss-rails.gemspec
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables << "tailwindcss"
- spec.add_dependency "railties", ">= 6.1.0"
+ spec.add_dependency "railties", ">= 7.0.0"
end
From ec2725789e062fc93df9c9a9d57acfe847187702 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 4 May 2024 13:23:56 -0400
Subject: [PATCH 024/204] version bump to v2.6.0
---
CHANGELOG.md | 7 ++++---
lib/tailwindcss/version.rb | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0db08db..90c49f9d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,9 @@
-## unreleased
+## v2.6.0 / 2024-05-04
+* Increase form input field border contrast. (#356) @olivierlacan
* Bring the scaffold templates up to date with rails/rails. (#357, #359) @kinsomicrote
-* Drop support for Rails 6.0, which reached end-of-life in June 2023.
-* Drop feature and bug fix support for Rails 6.1. The previous minor release will still receive security support while Rails 6.1 is supported.
+* Drop support for Rails 6.0, which reached end-of-life in June 2023. (#358) @flavorjones
+* Drop feature and bug fix support for Rails 6.1. The previous minor release will still receive security support while Rails 6.1 is supported. (#359) @flavorjones
## v2.5.0 / 2024-04-27
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 53892fe2..0775ed7e 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.5.0"
+ VERSION = "2.6.0"
end
From 72aa03cbdf96f5b3406a56a404e193b028799d9a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 May 2024 14:13:34 -0400
Subject: [PATCH 025/204] wip: try to work around bcrypt_pbkdf issue on windows
---
test/integration/user_journey_test.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 95c3174d..b4242e0c 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -25,9 +25,12 @@ bundle exec rails new test-app --skip-bundle
pushd test-app
# make sure to use the same version of rails (e.g., install from git source if necessary)
-bundle remove rails
+bundle remove rails --skip-install
bundle add rails --skip-install ${RAILSOPTS:-}
+# work around https://github.com/net-ssh/bcrypt_pbkdf-ruby/issues/24
+bundle add bcrypt_pbkdf -v 1.1.1.rc2 --skip-install
+
# use the tailwindcss-rails under test
bundle add tailwindcss-rails --path="../.."
bundle install
From a4251ccfed27997b2f594bd0e559bf8ab2a6a07a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 May 2024 14:19:43 -0400
Subject: [PATCH 026/204] dep: bundle update
---
Gemfile.lock | 60 ++++++++++++++++++++++++++--------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 0b99151e..4b5e22c5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,25 +1,25 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.5.0)
+ tailwindcss-rails (2.6.0)
railties (>= 7.0.0)
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.3.2)
- actionpack (= 7.1.3.2)
- actionview (= 7.1.3.2)
- activejob (= 7.1.3.2)
- activesupport (= 7.1.3.2)
+ actionmailer (7.1.3.3)
+ actionpack (= 7.1.3.3)
+ actionview (= 7.1.3.3)
+ activejob (= 7.1.3.3)
+ activesupport (= 7.1.3.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
- actionpack (7.1.3.2)
- actionview (= 7.1.3.2)
- activesupport (= 7.1.3.2)
+ actionpack (7.1.3.3)
+ actionview (= 7.1.3.3)
+ activesupport (= 7.1.3.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@@ -27,16 +27,16 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.3.2)
- activesupport (= 7.1.3.2)
+ actionview (7.1.3.3)
+ activesupport (= 7.1.3.3)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.3.2)
- activesupport (= 7.1.3.2)
+ activejob (7.1.3.3)
+ activesupport (= 7.1.3.3)
globalid (>= 0.3.6)
- activesupport (7.1.3.2)
+ activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -47,7 +47,7 @@ GEM
mutex_m
tzinfo (~> 2.0)
base64 (0.2.0)
- bigdecimal (3.1.7)
+ bigdecimal (3.1.8)
builder (3.2.4)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
@@ -60,11 +60,11 @@ GEM
erubi (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
- i18n (1.14.4)
+ i18n (1.14.5)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
- irb (1.12.0)
- rdoc
+ irb (1.13.1)
+ rdoc (>= 4.0.0)
reline (>= 0.4.2)
loofah (2.22.0)
crass (~> 1.0.2)
@@ -76,9 +76,9 @@ GEM
net-smtp
mini_mime (1.1.5)
mini_portile2 (2.8.6)
- minitest (5.22.3)
+ minitest (5.23.0)
mutex_m (0.2.0)
- net-imap (0.4.10)
+ net-imap (0.4.11)
date
net-protocol
net-pop (0.1.2)
@@ -86,19 +86,19 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.4)
+ nokogiri (1.16.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.4-arm64-darwin)
+ nokogiri (1.16.5-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.4-x86_64-darwin)
+ nokogiri (1.16.5-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.4-x86_64-linux)
+ nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
racc (1.7.3)
- rack (3.0.10)
+ rack (3.0.11)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -113,9 +113,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.3.2)
- actionpack (= 7.1.3.2)
- activesupport (= 7.1.3.2)
+ railties (7.1.3.3)
+ actionpack (= 7.1.3.3)
+ activesupport (= 7.1.3.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -124,7 +124,7 @@ GEM
rake (13.2.1)
rdoc (6.6.3.1)
psych (>= 4.0.0)
- reline (0.5.4)
+ reline (0.5.7)
io-console (~> 0.5)
stringio (3.1.0)
thor (1.3.1)
@@ -132,7 +132,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
- zeitwerk (2.6.13)
+ zeitwerk (2.6.14)
PLATFORMS
arm64-darwin
From 1a81295cc106a93da775624e72e6b8728c320705 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 May 2024 14:27:06 -0400
Subject: [PATCH 027/204] dep: drop bcrypt_pbkdf workaround
---
test/integration/user_journey_test.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index b4242e0c..4016ec20 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -28,9 +28,6 @@ pushd test-app
bundle remove rails --skip-install
bundle add rails --skip-install ${RAILSOPTS:-}
-# work around https://github.com/net-ssh/bcrypt_pbkdf-ruby/issues/24
-bundle add bcrypt_pbkdf -v 1.1.1.rc2 --skip-install
-
# use the tailwindcss-rails under test
bundle add tailwindcss-rails --path="../.."
bundle install
From b11786f283f9d3eb8eccc491d727bac30a56ee88 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 5 Jun 2024 14:51:47 -0400
Subject: [PATCH 028/204] dep: update packaged tailwindcss to 3.4.4
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.4
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 120c37b8..2092d92a 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.3"
+ VERSION = "v3.4.4"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 6a592b7bb7eb6c3bfc1e8d524985d685f0939f4e Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 5 Jun 2024 15:19:25 -0400
Subject: [PATCH 029/204] version bump to v2.6.1
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90c49f9d..fc8ffb4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.6.1 / 2024-06-05
+
+* Update to [Tailwind CSS v3.4.4](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.4) (#373) @flavorjones
+
+
## v2.6.0 / 2024-05-04
* Increase form input field border contrast. (#356) @olivierlacan
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 0775ed7e..cd81e4f8 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.0"
+ VERSION = "2.6.1"
end
From 0ea974af3469b61c7e8fbc1100d8c58194454b96 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 5 Jun 2024 15:26:53 -0400
Subject: [PATCH 030/204] dep: bundle update
Should resolve https://github.com/rails/tailwindcss-rails/security/dependabot/52
---
Gemfile.lock | 50 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 4b5e22c5..57593b77 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,25 +1,25 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.0)
+ tailwindcss-rails (2.6.1)
railties (>= 7.0.0)
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.3.3)
- actionpack (= 7.1.3.3)
- actionview (= 7.1.3.3)
- activejob (= 7.1.3.3)
- activesupport (= 7.1.3.3)
+ actionmailer (7.1.3.4)
+ actionpack (= 7.1.3.4)
+ actionview (= 7.1.3.4)
+ activejob (= 7.1.3.4)
+ activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
- actionpack (7.1.3.3)
- actionview (= 7.1.3.3)
- activesupport (= 7.1.3.3)
+ actionpack (7.1.3.4)
+ actionview (= 7.1.3.4)
+ activesupport (= 7.1.3.4)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@@ -27,16 +27,16 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.3.3)
- activesupport (= 7.1.3.3)
+ actionview (7.1.3.4)
+ activesupport (= 7.1.3.4)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.3.3)
- activesupport (= 7.1.3.3)
+ activejob (7.1.3.4)
+ activesupport (= 7.1.3.4)
globalid (>= 0.3.6)
- activesupport (7.1.3.3)
+ activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -49,7 +49,7 @@ GEM
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.2.4)
- concurrent-ruby (1.2.3)
+ concurrent-ruby (1.3.1)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
@@ -75,10 +75,10 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- mini_portile2 (2.8.6)
- minitest (5.23.0)
+ mini_portile2 (2.8.7)
+ minitest (5.23.1)
mutex_m (0.2.0)
- net-imap (0.4.11)
+ net-imap (0.4.12)
date
net-protocol
net-pop (0.1.2)
@@ -97,7 +97,7 @@ GEM
racc (~> 1.4)
psych (5.1.2)
stringio
- racc (1.7.3)
+ racc (1.8.0)
rack (3.0.11)
rack-session (2.0.0)
rack (>= 3.0.0)
@@ -113,18 +113,18 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.3.3)
- actionpack (= 7.1.3.3)
- activesupport (= 7.1.3.3)
+ railties (7.1.3.4)
+ actionpack (= 7.1.3.4)
+ activesupport (= 7.1.3.4)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
- rdoc (6.6.3.1)
+ rdoc (6.7.0)
psych (>= 4.0.0)
- reline (0.5.7)
+ reline (0.5.8)
io-console (~> 0.5)
stringio (3.1.0)
thor (1.3.1)
@@ -132,7 +132,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
- zeitwerk (2.6.14)
+ zeitwerk (2.6.15)
PLATFORMS
arm64-darwin
From 700003569e7c740cce8ff4a03b50218f8d39f3a2 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 15 Jul 2024 17:16:08 -0400
Subject: [PATCH 031/204] dep: bump vendored tailwindcss to v3.4.5
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.5
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 2092d92a..872cbe4e 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.4"
+ VERSION = "v3.4.5"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 20c832d528c4c4b8944f73822638c8ef3dab3bb6 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 15 Jul 2024 17:16:51 -0400
Subject: [PATCH 032/204] dep: bundle update
---
Gemfile.lock | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 57593b77..b788d0ab 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -48,8 +48,8 @@ GEM
tzinfo (~> 2.0)
base64 (0.2.0)
bigdecimal (3.1.8)
- builder (3.2.4)
- concurrent-ruby (1.3.1)
+ builder (3.3.0)
+ concurrent-ruby (1.3.3)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
@@ -57,13 +57,13 @@ GEM
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
- erubi (1.12.0)
+ erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
- irb (1.13.1)
+ irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
loofah (2.22.0)
@@ -76,9 +76,9 @@ GEM
net-smtp
mini_mime (1.1.5)
mini_portile2 (2.8.7)
- minitest (5.23.1)
+ minitest (5.24.1)
mutex_m (0.2.0)
- net-imap (0.4.12)
+ net-imap (0.4.14)
date
net-protocol
net-pop (0.1.2)
@@ -86,19 +86,19 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.5)
+ nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.5-arm64-darwin)
+ nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.5-x86_64-darwin)
+ nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.5-x86_64-linux)
+ nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
racc (1.8.0)
- rack (3.0.11)
+ rack (3.1.7)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -124,15 +124,15 @@ GEM
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
- reline (0.5.8)
+ reline (0.5.9)
io-console (~> 0.5)
- stringio (3.1.0)
+ stringio (3.1.1)
thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
- zeitwerk (2.6.15)
+ zeitwerk (2.6.16)
PLATFORMS
arm64-darwin
From a1fb3b42bbbbf6930334be2ad7a2764c550e784c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 15 Jul 2024 17:26:27 -0400
Subject: [PATCH 033/204] version bump to v2.6.2
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc8ffb4b..69ccfcc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.6.2 / 2024-07-15
+
+* Update to [Tailwind CSS v3.4.5](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.5) (#380) @flavorjones
+
+
## v2.6.1 / 2024-06-05
* Update to [Tailwind CSS v3.4.4](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.4) (#373) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index b788d0ab..6b876b7a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.1)
+ tailwindcss-rails (2.6.2)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index cd81e4f8..679b0bca 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.1"
+ VERSION = "2.6.2"
end
From c59b4f768488981c7da006bebcdb4c5795ed92d3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 16 Jul 2024 11:46:26 -0400
Subject: [PATCH 034/204] dep: update packaged tailwindcss to v3.4.6
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.6
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 872cbe4e..6502cde6 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.5"
+ VERSION = "v3.4.6"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 7c3ebd1ab1436a063f3f51274170b526bd221c08 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 16 Jul 2024 12:05:16 -0400
Subject: [PATCH 035/204] version bump to v2.6.3
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69ccfcc7..4315703c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.6.3 / 2024-07-16
+
+* Update to [Tailwind CSS v3.4.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.6) (#381) @flavorjones
+
+
## v2.6.2 / 2024-07-15
* Update to [Tailwind CSS v3.4.5](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.5) (#380) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 6b876b7a..617615b3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.2)
+ tailwindcss-rails (2.6.3)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 679b0bca..cf9af227 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.2"
+ VERSION = "2.6.3"
end
From c09844ce9e948d47a41cf825b62c91cea1e8520d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 27 Jul 2024 17:17:38 -0400
Subject: [PATCH 036/204] dev: allow us to provide checksums when upstream does
not
See https://github.com/tailwindlabs/tailwindcss/issues/14072 for context
---
rakelib/package.rake | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/rakelib/package.rake b/rakelib/package.rake
index 095ef445..7cab2924 100644
--- a/rakelib/package.rake
+++ b/rakelib/package.rake
@@ -115,8 +115,12 @@ end
desc "Validate checksums for tailwindcss binaries"
task "check" => exepaths do
- sha_filename = "sha256sums.txt"
- sha_url = tailwindcss_download_url(sha_filename)
+ sha_filename = File.absolute_path("../package/tailwindcss-#{Tailwindcss::Upstream::VERSION}-checksums.txt", __dir__)
+ sha_url = if File.exist?(sha_filename)
+ sha_filename
+ else
+ sha_url = tailwindcss_download_url("sha256sums.txt")
+ end
gemspec = TAILWINDCSS_RAILS_GEMSPEC
checksums = URI.open(sha_url).each_line.map do |line|
From 1446f6221facdf9ef7436a74f8981c384b45cfed Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 27 Jul 2024 17:23:24 -0400
Subject: [PATCH 037/204] dep: update packaged tailwindcss to v3.4.7
---
lib/tailwindcss/upstream.rb | 2 +-
package/tailwindcss-v3.4.7-checksums.txt | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 package/tailwindcss-v3.4.7-checksums.txt
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 6502cde6..4b618de4 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.6"
+ VERSION = "v3.4.7"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
diff --git a/package/tailwindcss-v3.4.7-checksums.txt b/package/tailwindcss-v3.4.7-checksums.txt
new file mode 100644
index 00000000..0d5079d3
--- /dev/null
+++ b/package/tailwindcss-v3.4.7-checksums.txt
@@ -0,0 +1,6 @@
+8f8b5cd32fc35843ec24bbcdb214e972df6a9c485bf4d4fd049140fbcc766bcc tailwindcss-macos-x64
+0eda3bc8fe90506b7b9e5cb930312042730b76a7f18026d19414d48fbb3100ed tailwindcss-macos-arm64
+3c2321e66718f39e48388707ce8b587946338f82ef3d636c8ee19670514d3394 tailwindcss-linux-x64
+4146a6f534fffb27f95de9926d7806a6e432eeb7e55cb8850a57c4e062689c2b tailwindcss-linux-arm64
+85c4c71618f0bfcdb0edf246ed6ee394a7addb8af34ed7dbdce9298279243994 tailwindcss-linux-armv7
+e6891c3d181314b7d78382fe93121ff8957a9dbb1132a47afb064c0ed1f906e4 tailwindcss-windows-x64.exe
From 31ee0f79926b1fd8d8838d50d1dad2a22bc8028a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 27 Jul 2024 17:36:15 -0400
Subject: [PATCH 038/204] version bump to v2.6.4
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4315703c..682ac6ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.6.4 / 2024-07-27
+
+* Update to [Tailwind CSS v3.4.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.7) (#383) @flavorjones
+
+
## v2.6.3 / 2024-07-16
* Update to [Tailwind CSS v3.4.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.6) (#381) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 617615b3..11592706 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.3)
+ tailwindcss-rails (2.6.4)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index cf9af227..7d02f5fe 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.3"
+ VERSION = "2.6.4"
end
From c0e1e52b223bfa9b3748ab6c1e50a84ccd0b818f Mon Sep 17 00:00:00 2001
From: Jerome Dalbert
Date: Tue, 30 Jul 2024 07:07:43 -0700
Subject: [PATCH 039/204] Force bin/dev overwrite to deal with new default
bin/dev file (#385)
See Rails https://github.com/rails/rails/pull/52433
---
lib/install/tailwindcss.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/install/tailwindcss.rb b/lib/install/tailwindcss.rb
index 413f86b8..2c2ba50c 100644
--- a/lib/install/tailwindcss.rb
+++ b/lib/install/tailwindcss.rb
@@ -49,7 +49,7 @@
end
say "Add bin/dev to start foreman"
-copy_file "#{__dir__}/dev", "bin/dev"
+copy_file "#{__dir__}/dev", "bin/dev", force: true
chmod "bin/dev", 0755, verbose: false
say "Compile initial Tailwind build"
From 84c08f81ae2d65f6522d679711d6a8976978b158 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 30 Jul 2024 14:19:58 -0400
Subject: [PATCH 040/204] version bump to v2.6.5
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 682ac6ac..e1259252 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.6.5 / 2024-07-30
+
+* During installation, clobber the Rails v8 default `bin/dev` file without requiring human intervention. (#385) @jeromedalbert
+
+
## v2.6.4 / 2024-07-27
* Update to [Tailwind CSS v3.4.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.7) (#383) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 11592706..331eb72c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.4)
+ tailwindcss-rails (2.6.5)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 7d02f5fe..17119e4b 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.4"
+ VERSION = "2.6.5"
end
From a0783a7135df01682f24248724ef0bacc912d6fa Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 29 Jul 2024 13:26:30 -0400
Subject: [PATCH 041/204] introduce specialized view for rails 8 authentication
generator
Co-authored-by: yshmarov
---
.../authentication_generator.rb | 9 ++++++++
.../templates/views/sessions/new.html.erb | 22 +++++++++++++++++++
.../authentication_generator_test.rb | 16 ++++++++++++++
3 files changed, 47 insertions(+)
create mode 100644 lib/generators/tailwindcss/authentication/authentication_generator.rb
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
create mode 100644 test/lib/generators/tailwindcss/authentication_generator_test.rb
diff --git a/lib/generators/tailwindcss/authentication/authentication_generator.rb b/lib/generators/tailwindcss/authentication/authentication_generator.rb
new file mode 100644
index 00000000..aa6fc23b
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/authentication_generator.rb
@@ -0,0 +1,9 @@
+require "rails/generators/erb/authentication/authentication_generator"
+
+module Tailwindcss
+ module Generators
+ class AuthenticationGenerator < Erb::Generators::AuthenticationGenerator
+ source_root File.expand_path("templates", __dir__)
+ end
+ end
+end
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
new file mode 100644
index 00000000..824b506a
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
@@ -0,0 +1,22 @@
+
+
Sign in
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+ <%%= form_with url: session_url, class: "contents" do |form| %>
+
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+ <%% end %>
+
+
diff --git a/test/lib/generators/tailwindcss/authentication_generator_test.rb b/test/lib/generators/tailwindcss/authentication_generator_test.rb
new file mode 100644
index 00000000..bdf712b0
--- /dev/null
+++ b/test/lib/generators/tailwindcss/authentication_generator_test.rb
@@ -0,0 +1,16 @@
+require "test_helper"
+
+if Rails::VERSION::MAJOR >= 8
+ require "generators/tailwindcss/authentication/authentication_generator"
+
+ class Tailwindcss::Generators::AuthenticationGeneratorTest < Rails::Generators::TestCase
+ tests Tailwindcss::Generators::AuthenticationGenerator
+ destination TAILWINDCSS_TEST_APP_ROOT
+
+ test "generates the new session template" do
+ run_generator
+
+ assert_file "app/views/sessions/new.html.erb"
+ end
+ end
+end
From 381446b2405dbbf028c3afcd8606de700400b7e5 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 30 Jul 2024 15:20:38 -0400
Subject: [PATCH 042/204] ci: add unit tests to the upstream workflow
because the authentication template is only on rails edge
---
.github/workflows/upstream.yml | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index b2dda2bc..0b0f35eb 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -14,20 +14,42 @@ on:
- .github/workflows/upstream.yml # this file
jobs:
+ tests:
+ name: "tests (rails main)"
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ruby: ["3.3"]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{matrix.ruby}}
+ - run: |
+ rm Gemfile.lock
+ bundle remove actionmailer
+ git clone --depth 1 --branch main https://github.com/rails/rails
+ bundle add actionmailer --path=rails
+ bundle add railties --path=rails
+ bundle install
+ - name: Run tests
+ run: bin/test
+
user-journey:
name: "user-journey (rails main)"
+ runs-on: ${{matrix.plat}}-latest
strategy:
fail-fast: false
matrix:
plat: ["ubuntu", "windows", "macos"]
- runs-on: ${{matrix.plat}}-latest
env:
RAILSOPTS: --git=https://github.com/rails/rails --branch main
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.2"
+ ruby-version: "3.3"
bundler: latest
- run: test/integration/user_journey_test.sh
shell: bash
From 1d84cd12d97a2a87ef935a4fc45b2b340cc70bc4 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Sat, 3 Aug 2024 15:56:42 -0700
Subject: [PATCH 043/204] Add templates for password reset templates
---
.../templates/views/passwords/edit.html.erb | 21 +++++++++++++++++++
.../templates/views/passwords/new.html.erb | 17 +++++++++++++++
.../templates/views/sessions/new.html.erb | 14 +++++++++++--
3 files changed, 50 insertions(+), 2 deletions(-)
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
new file mode 100644
index 00000000..f648e89a
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
@@ -0,0 +1,21 @@
+
+
Update your password
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+ <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
+
+ <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+ <%% end %>
+
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
new file mode 100644
index 00000000..431cf70b
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
@@ -0,0 +1,17 @@
+
+
Forgot your password?
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+ <%%= form_with url: passwords_path, class: "contents" do |form| %>
+
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+ <%% end %>
+
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
index 824b506a..aebe9991 100644
--- a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
@@ -5,6 +5,10 @@
<%%= alert %>
<%% end %>
+ <%% if notice = flash[:notice] %>
+ <%%= notice %>
+ <%% end %>
+
<%%= form_with url: session_url, class: "contents" do |form| %>
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
@@ -14,8 +18,14 @@
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+
+ <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+
+
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
+
<%% end %>
From dfafa4c329e655383fe72189ea17c85fb5201e04 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Sat, 3 Aug 2024 15:57:25 -0700
Subject: [PATCH 044/204] Excess CR
---
.../authentication/templates/views/sessions/new.html.erb | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
index aebe9991..644b578a 100644
--- a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
@@ -29,4 +29,3 @@
<%% end %>
-
From 6116343e842f876fd5e5735f807bac8af0b6c6e8 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Sat, 3 Aug 2024 17:21:55 -0700
Subject: [PATCH 045/204] Alerts and notices look better above the heading
---
.../authentication/templates/views/passwords/edit.html.erb | 4 ++--
.../authentication/templates/views/passwords/new.html.erb | 4 ++--
.../authentication/templates/views/sessions/new.html.erb | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
index f648e89a..939b0b8d 100644
--- a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
@@ -1,10 +1,10 @@
-
Update your password
-
<%% if alert = flash[:alert] %>
<%%= alert %>
<%% end %>
+
Update your password
+
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
index 431cf70b..e5d88197 100644
--- a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
@@ -1,10 +1,10 @@
-
Forgot your password?
-
<%% if alert = flash[:alert] %>
<%%= alert %>
<%% end %>
+
Forgot your password?
+
<%%= form_with url: passwords_path, class: "contents" do |form| %>
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
index 644b578a..a4751541 100644
--- a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
@@ -1,6 +1,4 @@
-
Sign in
-
<%% if alert = flash[:alert] %>
<%%= alert %>
<%% end %>
@@ -9,6 +7,8 @@
<%%= notice %>
<%% end %>
+
Sign in
+
<%%= form_with url: session_url, class: "contents" do |form| %>
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
From 4249afa4141cf2a0ca220efe8dc8451cdb1dd189 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 5 Aug 2024 09:38:49 -0400
Subject: [PATCH 046/204] version bump to v2.7.0
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e1259252..aa109e1f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.0 / 2024-08-05
+
+* Add specialized views for the new authentication generator coming in Rails 8. (#384) @yshmarov @dhh @flavorjones
+
+
## v2.6.5 / 2024-07-30
* During installation, clobber the Rails v8 default `bin/dev` file without requiring human intervention. (#385) @jeromedalbert
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 17119e4b..4797a70a 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.6.5"
+ VERSION = "2.7.0"
end
From 99f60358a6d6bcdc726558e505253c7586140919 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 7 Aug 2024 14:22:30 -0400
Subject: [PATCH 047/204] dep: update packaged tailwindcss to v3.4.8
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.8
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 4b618de4..46b3a36e 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.7"
+ VERSION = "v3.4.8"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 68f0bd4ae610e1060f5fcf58f474f2ce38878065 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 7 Aug 2024 14:28:52 -0400
Subject: [PATCH 048/204] version bump to v2.7.1
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa109e1f..d3318bb3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.1 / 2024-08-07
+
+* Update to [Tailwind CSS v3.4.8](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.8) @flavorjones
+
+
## v2.7.0 / 2024-08-05
* Add specialized views for the new authentication generator coming in Rails 8. (#384) @yshmarov @dhh @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 331eb72c..bc4f5a0b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.6.5)
+ tailwindcss-rails (2.7.1)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 4797a70a..3bee3ccb 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.0"
+ VERSION = "2.7.1"
end
From 2a8d5825dc8209f8bc0dd97bfd3c41863f22ef40 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 8 Aug 2024 14:00:58 -0400
Subject: [PATCH 049/204] dep: bump tailwindcss to v3.4.9
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.9
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 46b3a36e..7d62c5c7 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.8"
+ VERSION = "v3.4.9"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 0301c4a8ce3f23a6da2db07658fba5288a9fc7d1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 8 Aug 2024 14:06:43 -0400
Subject: [PATCH 050/204] version bump to v2.7.2
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d3318bb3..012182dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.2 / 2024-08-08
+
+* Update to [Tailwind CSS v3.4.9](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.9) @flavorjones
+
+
## v2.7.1 / 2024-08-07
* Update to [Tailwind CSS v3.4.8](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.8) @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 3bee3ccb..dcdcff4b 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.1"
+ VERSION = "2.7.2"
end
From 082ccca8130a40a4008ec13b781418129f3a7e79 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 12 Aug 2024 14:43:54 +0000
Subject: [PATCH 051/204] build(deps): bump railties from 7.1.3.4 to 7.2.0
Bumps [railties](https://github.com/rails/rails) from 7.1.3.4 to 7.2.0.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.0/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.2.0)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 67 ++++++++++++++++++++++++++--------------------------
1 file changed, 34 insertions(+), 33 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index bc4f5a0b..b3e1b73f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,49 +7,48 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.3.4)
- actionpack (= 7.1.3.4)
- actionview (= 7.1.3.4)
- activejob (= 7.1.3.4)
- activesupport (= 7.1.3.4)
- mail (~> 2.5, >= 2.5.4)
- net-imap
- net-pop
- net-smtp
+ actionmailer (7.2.0)
+ actionpack (= 7.2.0)
+ actionview (= 7.2.0)
+ activejob (= 7.2.0)
+ activesupport (= 7.2.0)
+ mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.1.3.4)
- actionview (= 7.1.3.4)
- activesupport (= 7.1.3.4)
+ actionpack (7.2.0)
+ actionview (= 7.2.0)
+ activesupport (= 7.2.0)
nokogiri (>= 1.8.5)
racc
- rack (>= 2.2.4)
+ rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.3.4)
- activesupport (= 7.1.3.4)
+ useragent (~> 0.16)
+ actionview (7.2.0)
+ activesupport (= 7.2.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.3.4)
- activesupport (= 7.1.3.4)
+ activejob (7.2.0)
+ activesupport (= 7.2.0)
globalid (>= 0.3.6)
- activesupport (7.1.3.4)
+ activesupport (7.2.0)
base64
bigdecimal
- concurrent-ruby (~> 1.0, >= 1.0.2)
+ concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
+ logger (>= 1.4.2)
minitest (>= 5.1)
- mutex_m
- tzinfo (~> 2.0)
+ securerandom (>= 0.3)
+ tzinfo (~> 2.0, >= 2.0.5)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
- concurrent-ruby (1.3.3)
+ concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
@@ -66,6 +65,7 @@ GEM
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
+ logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -77,7 +77,6 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
- mutex_m (0.2.0)
net-imap (0.4.14)
date
net-protocol
@@ -86,18 +85,18 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.6)
+ nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.6-arm64-darwin)
+ nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.6-x86_64-darwin)
+ nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.6-x86_64-linux)
+ nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
- racc (1.8.0)
+ racc (1.8.1)
rack (3.1.7)
rack-session (2.0.0)
rack (>= 3.0.0)
@@ -113,10 +112,10 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.3.4)
- actionpack (= 7.1.3.4)
- activesupport (= 7.1.3.4)
- irb
+ railties (7.2.0)
+ actionpack (= 7.2.0)
+ activesupport (= 7.2.0)
+ irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
@@ -126,13 +125,15 @@ GEM
psych (>= 4.0.0)
reline (0.5.9)
io-console (~> 0.5)
+ securerandom (0.3.1)
stringio (3.1.1)
thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
+ useragent (0.16.10)
webrick (1.8.1)
- zeitwerk (2.6.16)
+ zeitwerk (2.6.17)
PLATFORMS
arm64-darwin
From 3fbcbe93ba3ccbdbfe030e7643270995a75551e5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 12 Aug 2024 14:44:05 +0000
Subject: [PATCH 052/204] build(deps-dev): bump actionmailer from 7.1.3.4 to
7.2.0
Bumps [actionmailer](https://github.com/rails/rails) from 7.1.3.4 to 7.2.0.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.0/actionmailer/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.2.0)
---
updated-dependencies:
- dependency-name: actionmailer
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 66 +++++++++++++++++++++++++++-------------------------
1 file changed, 34 insertions(+), 32 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index bc4f5a0b..d3436d9d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,49 +7,48 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.3.4)
- actionpack (= 7.1.3.4)
- actionview (= 7.1.3.4)
- activejob (= 7.1.3.4)
- activesupport (= 7.1.3.4)
- mail (~> 2.5, >= 2.5.4)
- net-imap
- net-pop
- net-smtp
+ actionmailer (7.2.0)
+ actionpack (= 7.2.0)
+ actionview (= 7.2.0)
+ activejob (= 7.2.0)
+ activesupport (= 7.2.0)
+ mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.1.3.4)
- actionview (= 7.1.3.4)
- activesupport (= 7.1.3.4)
+ actionpack (7.2.0)
+ actionview (= 7.2.0)
+ activesupport (= 7.2.0)
nokogiri (>= 1.8.5)
racc
- rack (>= 2.2.4)
+ rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.3.4)
- activesupport (= 7.1.3.4)
+ useragent (~> 0.16)
+ actionview (7.2.0)
+ activesupport (= 7.2.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.3.4)
- activesupport (= 7.1.3.4)
+ activejob (7.2.0)
+ activesupport (= 7.2.0)
globalid (>= 0.3.6)
- activesupport (7.1.3.4)
+ activesupport (7.2.0)
base64
bigdecimal
- concurrent-ruby (~> 1.0, >= 1.0.2)
+ concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
+ logger (>= 1.4.2)
minitest (>= 5.1)
- mutex_m
- tzinfo (~> 2.0)
+ securerandom (>= 0.3)
+ tzinfo (~> 2.0, >= 2.0.5)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
- concurrent-ruby (1.3.3)
+ concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
@@ -66,6 +65,7 @@ GEM
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
+ logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -77,27 +77,27 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
- mutex_m (0.2.0)
net-imap (0.4.14)
date
net-protocol
net-pop (0.1.2)
+ net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.6)
+ nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.6-arm64-darwin)
+ nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.6-x86_64-darwin)
+ nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.6-x86_64-linux)
+ nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
- racc (1.8.0)
+ racc (1.8.1)
rack (3.1.7)
rack-session (2.0.0)
rack (>= 3.0.0)
@@ -113,10 +113,10 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.3.4)
- actionpack (= 7.1.3.4)
- activesupport (= 7.1.3.4)
- irb
+ railties (7.2.0)
+ actionpack (= 7.2.0)
+ activesupport (= 7.2.0)
+ irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
@@ -126,11 +126,13 @@ GEM
psych (>= 4.0.0)
reline (0.5.9)
io-console (~> 0.5)
+ securerandom (0.3.1)
stringio (3.1.1)
thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
+ useragent (0.16.10)
webrick (1.8.1)
zeitwerk (2.6.16)
From df0c5716c7574c6e1e745dc873d64aaad5cfed6d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 14 Aug 2024 14:40:32 -0400
Subject: [PATCH 053/204] dep: update vendored tailwindcss to v3.4.10
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.10
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 012182dd..943b366b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.4.10](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.10) @flavorjones
+
+
## v2.7.2 / 2024-08-08
* Update to [Tailwind CSS v3.4.9](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.9) @flavorjones
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 7d62c5c7..0508b1fc 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.9"
+ VERSION = "v3.4.10"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From eeac920f92e6bea06a88f944db346908c2ff189f Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 14 Aug 2024 14:48:02 -0400
Subject: [PATCH 054/204] version bump to v2.7.3
---
CHANGELOG.md | 2 +-
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 943b366b..dd8404f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.7.3 / 2024-08-14
* Update to [Tailwind CSS v3.4.10](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.10) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 3921c244..b17a6dff 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.1)
+ tailwindcss-rails (2.7.3)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index dcdcff4b..672fec0c 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.2"
+ VERSION = "2.7.3"
end
From 00f2cdbe54078832b1bd9ca4e4825063bb220057 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 Aug 2024 14:49:45 +0000
Subject: [PATCH 055/204] build(deps-dev): bump actionmailer from 7.2.0 to
7.2.1
Bumps [actionmailer](https://github.com/rails/rails) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/actionmailer/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.0...v7.2.1)
---
updated-dependencies:
- dependency-name: actionmailer
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index b17a6dff..df718d3e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,16 +7,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.0)
- actionpack (= 7.2.0)
- actionview (= 7.2.0)
- activejob (= 7.2.0)
- activesupport (= 7.2.0)
+ actionmailer (7.2.1)
+ actionpack (= 7.2.1)
+ actionview (= 7.2.1)
+ activejob (= 7.2.1)
+ activesupport (= 7.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.0)
- actionview (= 7.2.0)
- activesupport (= 7.2.0)
+ actionpack (7.2.1)
+ actionview (= 7.2.1)
+ activesupport (= 7.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -25,16 +25,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.0)
- activesupport (= 7.2.0)
+ actionview (7.2.1)
+ activesupport (= 7.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.0)
- activesupport (= 7.2.0)
+ activejob (7.2.1)
+ activesupport (= 7.2.1)
globalid (>= 0.3.6)
- activesupport (7.2.0)
+ activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -76,7 +76,7 @@ GEM
net-smtp
mini_mime (1.1.5)
mini_portile2 (2.8.7)
- minitest (5.24.1)
+ minitest (5.25.1)
net-imap (0.4.14)
date
net-protocol
@@ -113,9 +113,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.0)
- actionpack (= 7.2.0)
- activesupport (= 7.2.0)
+ railties (7.2.1)
+ actionpack (= 7.2.1)
+ activesupport (= 7.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
From 7388f4c95c421c1754f3903cc5f162b009901651 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 Aug 2024 14:49:56 +0000
Subject: [PATCH 056/204] build(deps): bump railties from 7.2.0 to 7.2.1
Bumps [railties](https://github.com/rails/rails) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.0...v7.2.1)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index b17a6dff..df718d3e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,16 +7,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.0)
- actionpack (= 7.2.0)
- actionview (= 7.2.0)
- activejob (= 7.2.0)
- activesupport (= 7.2.0)
+ actionmailer (7.2.1)
+ actionpack (= 7.2.1)
+ actionview (= 7.2.1)
+ activejob (= 7.2.1)
+ activesupport (= 7.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.0)
- actionview (= 7.2.0)
- activesupport (= 7.2.0)
+ actionpack (7.2.1)
+ actionview (= 7.2.1)
+ activesupport (= 7.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -25,16 +25,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.0)
- activesupport (= 7.2.0)
+ actionview (7.2.1)
+ activesupport (= 7.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.0)
- activesupport (= 7.2.0)
+ activejob (7.2.1)
+ activesupport (= 7.2.1)
globalid (>= 0.3.6)
- activesupport (7.2.0)
+ activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -76,7 +76,7 @@ GEM
net-smtp
mini_mime (1.1.5)
mini_portile2 (2.8.7)
- minitest (5.24.1)
+ minitest (5.25.1)
net-imap (0.4.14)
date
net-protocol
@@ -113,9 +113,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.0)
- actionpack (= 7.2.0)
- activesupport (= 7.2.0)
+ railties (7.2.1)
+ actionpack (= 7.2.1)
+ activesupport (= 7.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
From 985ca94367ab2d5a7363d872071fbe9d474f67f6 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 13 Sep 2024 13:36:32 -0400
Subject: [PATCH 057/204] dep: update tailwindcss to v3.4.11
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.11
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 0508b1fc..ddf1a330 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.10"
+ VERSION = "v3.4.11"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 1b5c8f2a6d4066319f9f86ce0af68d76a5cd7e99 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 13 Sep 2024 13:53:30 -0400
Subject: [PATCH 058/204] version bump to v2.7.4
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd8404f3..a633c21d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.4 / 2024-09-13
+
+* Update to [Tailwind CSS v3.4.11](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.11) @flavorjones
+
+
## v2.7.3 / 2024-08-14
* Update to [Tailwind CSS v3.4.10](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.10) @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 672fec0c..5678e7df 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.3"
+ VERSION = "2.7.4"
end
From 1b5957f23e1bb6375f1698fc548c16c45f835424 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 13 Sep 2024 14:09:27 -0400
Subject: [PATCH 059/204] bump Gemfile
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index df718d3e..e107279a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.3)
+ tailwindcss-rails (2.7.4)
railties (>= 7.0.0)
GEM
From 8b750d0f2f3e9f81d2dde4ecbab036eb03fdfc4f Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 13 Sep 2024 14:10:17 -0400
Subject: [PATCH 060/204] doc: clarify CONTRIBUTING.md
[skip ci]
---
CONTRIBUTING.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8c68f93c..8dfb3c45 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,7 +29,7 @@ Update `lib/tailwindcss/upstream.rb` with the upstream version.
Run `bundle exec rake clobber` then `bundle exec rake download` to ensure the tailwindcss binaries can be downloaded, and that you have the correct versions on local disk.
-## Cutting a release
+## Cutting a release of tailwindcss-rails
- bump the version
- [ ] update `lib/tailwindcss/version.rb`
@@ -40,6 +40,6 @@ Run `bundle exec rake clobber` then `bundle exec rake download` to ensure the ta
- [ ] `bundle exec rake package`
- push
- [ ] `for g in pkg/*.gem ; do gem push $g ; done`
- - [ ] `git push`
+ - [ ] `git push && git push --tags`
- announce
- [ ] create a release at https://github.com/rails/tailwindcss-rails/releases
From a8258a3795206762f54f3fde960141461572c4a4 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 18 Sep 2024 10:49:28 -0400
Subject: [PATCH 061/204] dep: bump tailwindcss to v3.4.12
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.12
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index ddf1a330..d541e8c1 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.11"
+ VERSION = "v3.4.12"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 6647919ea332095ab648a0f447e4c1ae30e5c9e7 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 18 Sep 2024 10:56:05 -0400
Subject: [PATCH 062/204] version bump to v2.7.5
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a633c21d..656477c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.5 / 2024-09-18
+
+* Update to [Tailwind CSS v3.4.12](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.12) @flavorjones
+
+
## v2.7.4 / 2024-09-13
* Update to [Tailwind CSS v3.4.11](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.11) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index e107279a..368d7260 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.4)
+ tailwindcss-rails (2.7.5)
railties (>= 7.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 5678e7df..49eecaf0 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.4"
+ VERSION = "2.7.5"
end
From ee6f60b072475e1e36442747a4a7c1611dd0eb79 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 23 Sep 2024 16:24:24 -0400
Subject: [PATCH 063/204] dep: bump tailwindcss to 3.4.13
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.13
---
lib/tailwindcss/upstream.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index d541e8c1..a2399140 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,7 +1,7 @@
module Tailwindcss
# constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.12"
+ VERSION = "v3.4.13"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 3dfdcb9f8ff88f99187434a7aa295f7a67d6c866 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 23 Sep 2024 16:31:23 -0400
Subject: [PATCH 064/204] version bump to v2.7.6
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 656477c3..19620bb3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.6 / 2024-09-18
+
+* Update to [Tailwind CSS v3.4.13](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.13) @flavorjones
+
+
## v2.7.5 / 2024-09-18
* Update to [Tailwind CSS v3.4.12](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.12) @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 49eecaf0..83f9738e 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.5"
+ VERSION = "2.7.6"
end
From 67500d65cabef1f8bd2aba45764abd0b239c854d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 23 Sep 2024 16:33:51 -0400
Subject: [PATCH 065/204] doc: fix date in changelog
also update Gemfile.lock
[skip ci]
---
CHANGELOG.md | 2 +-
Gemfile.lock | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 19620bb3..59afb8e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## v2.7.6 / 2024-09-18
+## v2.7.6 / 2024-09-23
* Update to [Tailwind CSS v3.4.13](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.13) @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 368d7260..3eb21c65 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.5)
+ tailwindcss-rails (2.7.6)
railties (>= 7.0.0)
GEM
From 845c3f4d2de523f2d55816f21aee84720d3254dd Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 24 Sep 2024 13:24:29 -0400
Subject: [PATCH 066/204] dep: update webrick to 1.8.2
to address https://github.com/rails/tailwindcss-rails/security/dependabot/53
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 3eb21c65..922d259d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -133,7 +133,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
useragent (0.16.10)
- webrick (1.8.1)
+ webrick (1.8.2)
zeitwerk (2.6.17)
PLATFORMS
From 328b96b862b166395007cd705de8a9315bc84e81 Mon Sep 17 00:00:00 2001
From: Sean Doyle
Date: Sun, 29 Sep 2024 19:48:11 -0400
Subject: [PATCH 067/204] Rename Authentication template files
Follow-up to [#53098][]
The corresponding commit in `rails/rails` nested the template files
(including the view templates) under an `app/` directory.
This commit makes a corresponding change, nesting the `views/` templates
under `app/views/`.
[#53098]: https://github.com/rails/rails/pull/53098#issuecomment-2381650236
Co-authored-by: Jerome Dalbert
---
.../templates/{ => app}/views/passwords/edit.html.erb | 0
.../templates/{ => app}/views/passwords/new.html.erb | 0
.../templates/{ => app}/views/sessions/new.html.erb | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename lib/generators/tailwindcss/authentication/templates/{ => app}/views/passwords/edit.html.erb (100%)
rename lib/generators/tailwindcss/authentication/templates/{ => app}/views/passwords/new.html.erb (100%)
rename lib/generators/tailwindcss/authentication/templates/{ => app}/views/sessions/new.html.erb (100%)
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
similarity index 100%
rename from lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
rename to lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
similarity index 100%
rename from lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
rename to lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
similarity index 100%
rename from lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
rename to lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
From bed38c6591443065045e76ef9c0f87a6196a99f3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 1 Oct 2024 18:50:52 -0400
Subject: [PATCH 068/204] test: add coverage for generator templates
and matrix across Rails 7.2, 8.0, and main
---
.github/workflows/upstream.yml | 9 ++++-----
test/integration/user_journey_test.sh | 13 ++++++++++++-
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 0b0f35eb..0ba5507a 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -10,8 +10,6 @@ on:
types: [opened, synchronize]
branches:
- '*'
- paths:
- - .github/workflows/upstream.yml # this file
jobs:
tests:
@@ -37,14 +35,15 @@ jobs:
run: bin/test
user-journey:
- name: "user-journey (rails main)"
+ name: "user-journey (rails ${{ matrix.ref }})"
runs-on: ${{matrix.plat}}-latest
strategy:
fail-fast: false
matrix:
- plat: ["ubuntu", "windows", "macos"]
+ plat: ["ubuntu"]
+ ref: ["7-2-stable", "v8.0.0.beta1", "main"]
env:
- RAILSOPTS: --git=https://github.com/rails/rails --branch main
+ RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 4016ec20..1877e871 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -32,12 +32,13 @@ bundle add rails --skip-install ${RAILSOPTS:-}
bundle add tailwindcss-rails --path="../.."
bundle install
bundle show --paths
+bundle binstubs --all
# install tailwindcss
bin/rails tailwindcss:install
# TEST: tailwind was installed correctly
-grep tailwind app/views/layouts/application.html.erb
+grep -q tailwind app/views/layouts/application.html.erb
# TEST: rake tasks don't exec (#188)
cat <> Rakefile
@@ -47,3 +48,13 @@ end
EOF
bin/rails tailwindcss:build still_here | grep "Rake process did not exit early"
+
+if [[ $(rails -v) > "Rails 8.0.0.beta" ]] ; then
+ # TEST: presence of the generated file
+ bin/rails generate authentication
+ grep -q PasswordsController app/controllers/passwords_controller.rb
+fi
+
+# TEST: presence of the generated file
+bin/rails generate scaffold post title:string body:text published:boolean
+grep -q "Show this post" app/views/posts/index.html.erb
From 9dee33a64db4323414bab5910f379b38fb8b0d47 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 1 Oct 2024 18:20:05 -0400
Subject: [PATCH 069/204] Make copies of the auth templates for Rails 8 beta1
We can revert this once beta2 is out.
---
.../templates/views/passwords/edit.html.erb | 21 +++++++++++++
.../templates/views/passwords/new.html.erb | 17 ++++++++++
.../templates/views/sessions/new.html.erb | 31 +++++++++++++++++++
3 files changed, 69 insertions(+)
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
create mode 100644 lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
new file mode 100644
index 00000000..939b0b8d
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
@@ -0,0 +1,21 @@
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+
Update your password
+
+ <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
+
+ <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+ <%% end %>
+
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
new file mode 100644
index 00000000..e5d88197
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
@@ -0,0 +1,17 @@
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+
Forgot your password?
+
+ <%%= form_with url: passwords_path, class: "contents" do |form| %>
+
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+ <%% end %>
+
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
new file mode 100644
index 00000000..a4751541
--- /dev/null
+++ b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
@@ -0,0 +1,31 @@
+
+ <%% if alert = flash[:alert] %>
+
<%%= alert %>
+ <%% end %>
+
+ <%% if notice = flash[:notice] %>
+
<%%= notice %>
+ <%% end %>
+
+
Sign in
+
+ <%%= form_with url: session_url, class: "contents" do |form| %>
+
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+
+
+
+
+ <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+
+
+
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
+
+
+ <%% end %>
+
From d0c0590390e698586554e6769f6ec5e296d99c5b Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 2 Oct 2024 08:43:23 -0400
Subject: [PATCH 070/204] version bump to v2.7.7
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59afb8e1..63d2e03c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## v2.7.7 / 2024-10-02
+
+* Proactively support changes to Rails's authentication templates shipping in Rails 8.0.0.beta2 (which is not yet released). (#407, #408) @seanpdoyle @flavorjones
+
+
## v2.7.6 / 2024-09-23
* Update to [Tailwind CSS v3.4.13](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.13) @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 83f9738e..6f849135 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.6"
+ VERSION = "2.7.7"
end
From 97dce5fe4bf57c53c715ed672308a394574a94d8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 2 Oct 2024 08:54:03 -0400
Subject: [PATCH 071/204] dev: update Gemfile.lock
[skip ci]
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 922d259d..0c679b3c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.6)
+ tailwindcss-rails (2.7.7)
railties (>= 7.0.0)
GEM
From 27ba067699458fe9c2cda83ad4f7114badd79375 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 25 Sep 2024 17:44:34 -0400
Subject: [PATCH 072/204] Remove the upstream tailwindcss packaging
This is being extracted into the tailwindcss-ruby gem.
---
.gitignore | 1 -
CHANGELOG.md | 11 +
CONTRIBUTING.md | 11 +-
Gemfile.lock | 2 +
LICENSE-DEPENDENCIES | 26 ---
README.md | 66 +-----
exe/tailwindcss | 19 --
lib/tailwindcss-rails.rb | 1 -
lib/tailwindcss/commands.rb | 74 +------
lib/tailwindcss/upstream.rb | 15 +-
package/tailwindcss-v3.4.7-checksums.txt | 6 -
rakelib/package.rake | 149 --------------
tailwindcss-rails.gemspec | 3 +-
test/integration/user_journey_test.sh | 3 -
test/lib/tailwindcss/commands_test.rb | 246 ++++++-----------------
15 files changed, 86 insertions(+), 547 deletions(-)
delete mode 100644 LICENSE-DEPENDENCIES
delete mode 100755 exe/tailwindcss
delete mode 100644 package/tailwindcss-v3.4.7-checksums.txt
delete mode 100644 rakelib/package.rake
diff --git a/.gitignore b/.gitignore
index b2a14451..de5dc1de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,3 @@
*.gem
.idea/
**/tmp/
-/exe/*/tailwindcss
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63d2e03c..19fcccb4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+## next / unreleased
+
+### Notable changes
+
+* The upstream `tailwindcss` executable has been extracted from this gem into a new dependency, `tailwindcss-ruby`.
+
+ In advance of the upcoming TailwindCSS v4 release, we are decoupling the `tailwindcss` executable
+ from the Rails integration. This will allow users to upgrade TailwindCSS at a time of their
+ choosing, and allow early adopters to start using the beta releases.
+
+
## v2.7.7 / 2024-10-02
* Proactively support changes to Rails's authentication templates shipping in Rails 8.0.0.beta2 (which is not yet released). (#407, #408) @seanpdoyle @flavorjones
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8dfb3c45..debab121 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -23,23 +23,14 @@ gem "tailwindcss-rails", path: "/path/to/tailwindcss-rails"
```
-## Updating to the latest upstream tailwindcss version
-
-Update `lib/tailwindcss/upstream.rb` with the upstream version.
-
-Run `bundle exec rake clobber` then `bundle exec rake download` to ensure the tailwindcss binaries can be downloaded, and that you have the correct versions on local disk.
-
## Cutting a release of tailwindcss-rails
- bump the version
- [ ] update `lib/tailwindcss/version.rb`
- [ ] update `CHANGELOG.md`
- [ ] commit and create a git tag
-- build the native gems:
- - [ ] `bundle exec rake clobber` to clean up possibly-old tailwindcss executables
- - [ ] `bundle exec rake package`
- push
- - [ ] `for g in pkg/*.gem ; do gem push $g ; done`
+ - [ ] `gem push pkg/*.gem`
- [ ] `git push && git push --tags`
- announce
- [ ] create a release at https://github.com/rails/tailwindcss-rails/releases
diff --git a/Gemfile.lock b/Gemfile.lock
index 0c679b3c..7e6f5372 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -3,6 +3,7 @@ PATH
specs:
tailwindcss-rails (2.7.7)
railties (>= 7.0.0)
+ tailwindcss-ruby
GEM
remote: https://rubygems.org/
@@ -128,6 +129,7 @@ GEM
io-console (~> 0.5)
securerandom (0.3.1)
stringio (3.1.1)
+ tailwindcss-ruby (0.1.0-x86_64-linux)
thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
diff --git a/LICENSE-DEPENDENCIES b/LICENSE-DEPENDENCIES
deleted file mode 100644
index 93a34024..00000000
--- a/LICENSE-DEPENDENCIES
+++ /dev/null
@@ -1,26 +0,0 @@
-tailwindcss-rails may redistribute executables from the https://github.com/tailwindlabs/tailwindcss project
-
-The license for that software can be found at https://github.com/tailwindlabs/tailwindcss/blob/master/LICENSE which is reproduced here for your convenience:
-
- MIT License
-
- Copyright (c) Adam Wathan
- Copyright (c) Jonathan Reinink
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
diff --git a/README.md b/README.md
index 01fa023b..dc689b60 100644
--- a/README.md
+++ b/README.md
@@ -35,34 +35,7 @@ With Rails 7 you can generate a new application preconfigured with Tailwind by u
1. Run `./bin/bundle add tailwindcss-rails`
2. Run `./bin/rails tailwindcss:install`
-This gem wraps [the standalone executable version](https://tailwindcss.com/blog/standalone-cli) of the Tailwind CSS v3 framework. These executables are platform specific, so there are actually separate underlying gems per platform, but the correct gem will automatically be picked for your platform.
-
-Supported platforms are:
-
-- arm64-darwin (macos-arm64)
-- x64-mingw32 (windows-x64)
-- x64-mingw-ucr (windows-x64)
-- x86_64-darwin (macos-x64)
-- x86_64-linux (linux-x64)
-- aarch64-linux (linux-arm64)
-- arm-linux (linux-armv7)
-
-
-### Using a local installation of `tailwindcss`
-
-If you are not able to use the vendored standalone executables (for example, if you're on an unsupported platform), you can use a local installation of the `tailwindcss` executable by setting an environment variable named `TAILWINDCSS_INSTALL_DIR` to the directory path containing the executable.
-
-For example, if you've installed `tailwindcss` so that the executable is found at `/path/to/node_modules/bin/tailwindcss`, then you should set your environment variable like so:
-
-``` sh
-TAILWINDCSS_INSTALL_DIR=/path/to/node_modules/bin
-```
-
-or, for relative paths like `./node_modules/.bin/tailwindcss`:
-
-``` sh
-TAILWINDCSS_INSTALL_DIR=node_modules/.bin
-```
+This gem depends on the `tailwindcss-ruby` gem to install a working tailwind executable. You can also use a local (npm-based) installation if you prefer, please go to https://github.com/flavorjones/tailwindcss-ruby for more information.
## Developing with Tailwindcss
@@ -206,41 +179,7 @@ For Tailwind to work, your class names need to be spelled out. If you need to ma
### `ERROR: Cannot find the tailwindcss executable` for supported platform
-Some users are reporting this error even when running on one of the supported native platforms:
-
-- arm64-darwin
-- x64-mingw32
-- x64-mingw-ucrt
-- x86_64-darwin
-- x86_64-linux
-- aarch64-linux
-
-#### Check Bundler PLATFORMS
-
-A possible cause of this is that Bundler has not been told to include native gems for your current platform. Please check your `Gemfile.lock` file to see whether your native platform is included in the `PLATFORMS` section. If necessary, run:
-
-``` sh
-bundle lock --add-platform
-```
-
-and re-bundle.
-
-
-#### Check BUNDLE_FORCE_RUBY_PLATFORM
-
-Another common cause of this is that bundler is configured to always use the "ruby" platform via the
-`BUNDLE_FORCE_RUBY_PLATFORM` config parameter being set to `true`. Please remove this configuration:
-
-``` sh
-bundle config unset force_ruby_platform
-# or
-bundle config set --local force_ruby_platform false
-```
-
-and re-bundle.
-
-See https://bundler.io/man/bundle-config.1.html for more information.
-
+See https://github.com/flavorjones/tailwindcss-ruby for help.
### Using asset-pipeline assets
@@ -280,5 +219,4 @@ Or, if you do want to keep using the asset pipeline in parallel, make sure to re
## License
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
-Tailwind CSS is released under the [MIT License](https://opensource.org/licenses/MIT).
The Inter font is released under the [SIL Open Font License, Version 1.1](https://github.com/rsms/inter/blob/master/LICENSE.txt).
diff --git a/exe/tailwindcss b/exe/tailwindcss
deleted file mode 100755
index ce4a4437..00000000
--- a/exe/tailwindcss
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /usr/bin/env ruby
-# because rubygems shims assume a gem's executables are Ruby
-
-require "tailwindcss/commands"
-
-begin
- command = [Tailwindcss::Commands.executable, *ARGV]
- puts command.inspect
- if Gem.win_platform?
- # use system rather than exec as exec inexplicably fails to find the executable on Windows
- # see related https://github.com/rubys/sprockets-esbuild/pull/4
- system(*command, exception: true)
- else
- exec(*command)
- end
-rescue Tailwindcss::Commands::UnsupportedPlatformException, Tailwindcss::Commands::ExecutableNotFoundException => e
- STDERR.puts("ERROR: " + e.message)
- exit 1
-end
diff --git a/lib/tailwindcss-rails.rb b/lib/tailwindcss-rails.rb
index 112809c5..2b86ff1c 100644
--- a/lib/tailwindcss-rails.rb
+++ b/lib/tailwindcss-rails.rb
@@ -1,7 +1,6 @@
module Tailwindcss
end
-require_relative "tailwindcss/upstream"
require_relative "tailwindcss/version"
require_relative "tailwindcss/engine"
require_relative "tailwindcss/commands"
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 08b70d33..26c5178a 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -1,81 +1,11 @@
-require_relative "upstream"
+require "tailwindcss/ruby"
module Tailwindcss
module Commands
- DEFAULT_DIR = File.expand_path(File.join(__dir__, "..", "..", "exe"))
- GEM_NAME = "tailwindcss-rails"
-
- # raised when the host platform is not supported by upstream tailwindcss's binary releases
- class UnsupportedPlatformException < StandardError
- end
-
- # raised when the tailwindcss executable could not be found where we expected it to be
- class ExecutableNotFoundException < StandardError
- end
-
- # raised when TAILWINDCSS_INSTALL_DIR does not exist
- class DirectoryNotFoundException < StandardError
- end
-
class << self
- def platform
- [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
- end
-
- def executable(exe_path: DEFAULT_DIR)
- tailwindcss_install_dir = ENV["TAILWINDCSS_INSTALL_DIR"]
- if tailwindcss_install_dir
- if File.directory?(tailwindcss_install_dir)
- warn "NOTE: using TAILWINDCSS_INSTALL_DIR to find tailwindcss executable: #{tailwindcss_install_dir}"
- exe_path = tailwindcss_install_dir
- exe_file = File.expand_path(File.join(tailwindcss_install_dir, "tailwindcss"))
- else
- raise DirectoryNotFoundException, <<~MESSAGE
- TAILWINDCSS_INSTALL_DIR is set to #{tailwindcss_install_dir}, but that directory does not exist.
- MESSAGE
- end
- else
- if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), GEM_NAME) }
- raise UnsupportedPlatformException, <<~MESSAGE
- tailwindcss-rails does not support the #{platform} platform
- Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
- MESSAGE
- end
-
- exe_file = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
- Gem::Platform.match_gem?(Gem::Platform.new(File.basename(File.dirname(f))), GEM_NAME)
- end
- end
-
- if exe_file.nil? || !File.exist?(exe_file)
- raise ExecutableNotFoundException, <<~MESSAGE
- Cannot find the tailwindcss executable for #{platform} in #{exe_path}
-
- If you're using bundler, please make sure you're on the latest bundler version:
-
- gem install bundler
- bundle update --bundler
-
- Then make sure your lock file includes this platform by running:
-
- bundle lock --add-platform #{platform}
- bundle install
-
- See `bundle lock --help` output for details.
-
- If you're still seeing this message after taking those steps, try running
- `bundle config` and ensure `force_ruby_platform` isn't set to `true`. See
- https://github.com/rails/tailwindcss-rails#check-bundle_force_ruby_platform
- for more details.
- MESSAGE
- end
-
- exe_file
- end
-
def compile_command(debug: false, **kwargs)
command = [
- executable(**kwargs),
+ Tailwindcss::Ruby.executable(**kwargs),
"-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
"-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
"-c", Rails.root.join("config/tailwind.config.js").to_s,
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index a2399140..358db1c0 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -1,17 +1,6 @@
module Tailwindcss
- # constants describing the upstream tailwindcss project
module Upstream
- VERSION = "v3.4.13"
-
- # rubygems platform name => upstream release filename
- NATIVE_PLATFORMS = {
- "arm64-darwin" => "tailwindcss-macos-arm64",
- "x64-mingw32" => "tailwindcss-windows-x64.exe",
- "x64-mingw-ucrt" => "tailwindcss-windows-x64.exe",
- "x86_64-darwin" => "tailwindcss-macos-x64",
- "x86_64-linux" => "tailwindcss-linux-x64",
- "aarch64-linux" => "tailwindcss-linux-arm64",
- "arm-linux" => "tailwindcss-linux-armv7",
- }
+ VERSION = Tailwindcss::Ruby::Upstream::VERSION
+ deprecate_constant :VERSION
end
end
diff --git a/package/tailwindcss-v3.4.7-checksums.txt b/package/tailwindcss-v3.4.7-checksums.txt
deleted file mode 100644
index 0d5079d3..00000000
--- a/package/tailwindcss-v3.4.7-checksums.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-8f8b5cd32fc35843ec24bbcdb214e972df6a9c485bf4d4fd049140fbcc766bcc tailwindcss-macos-x64
-0eda3bc8fe90506b7b9e5cb930312042730b76a7f18026d19414d48fbb3100ed tailwindcss-macos-arm64
-3c2321e66718f39e48388707ce8b587946338f82ef3d636c8ee19670514d3394 tailwindcss-linux-x64
-4146a6f534fffb27f95de9926d7806a6e432eeb7e55cb8850a57c4e062689c2b tailwindcss-linux-arm64
-85c4c71618f0bfcdb0edf246ed6ee394a7addb8af34ed7dbdce9298279243994 tailwindcss-linux-armv7
-e6891c3d181314b7d78382fe93121ff8957a9dbb1132a47afb064c0ed1f906e4 tailwindcss-windows-x64.exe
diff --git a/rakelib/package.rake b/rakelib/package.rake
deleted file mode 100644
index 7cab2924..00000000
--- a/rakelib/package.rake
+++ /dev/null
@@ -1,149 +0,0 @@
-# coding: utf-8
-#
-# Rake tasks to manage native gem packages with binary executables from tailwindlabs/tailwindcss
-#
-# TL;DR: run "rake package"
-#
-# The native platform gems (defined by Tailwindcss::Upstream::NATIVE_PLATFORMS) will each contain
-# two files in addition to what the vanilla ruby gem contains:
-#
-# exe/
-# ├── tailwindcss # generic ruby script to find and run the binary
-# └── /
-# └── tailwindcss # the tailwindcss binary executable
-#
-# The ruby script `exe/tailwindcss` is installed into the user's path, and it simply locates the
-# binary and executes it. Note that this script is required because rubygems requires that
-# executables declared in a gemspec must be Ruby scripts.
-#
-# Windows support note: we ship the same executable in two gems, the `x64-mingw32` and
-# `x64-mingw-ucrt` flavors because Ruby < 3.1 uses the MSCVRT runtime libraries, and Ruby >= 3.1
-# uses the UCRT runtime libraries. You can read more about this change here:
-#
-# https://rubyinstaller.org/2021/12/31/rubyinstaller-3.1.0-1-released.html
-#
-# As a concrete example, an x86_64-linux system will see these files on disk after installing
-# tailwindcss-rails-1.x.x-x86_64-linux.gem:
-#
-# exe/
-# ├── tailwindcss
-# └── x86_64-linux/
-# └── tailwindcss
-#
-# So the full set of gem files created will be:
-#
-# - pkg/tailwindcss-rails-1.0.0.gem
-# - pkg/tailwindcss-rails-1.0.0-aarch64-linux.gem
-# - pkg/tailwindcss-rails-1.0.0-arm64-darwin.gem
-# - pkg/tailwindcss-rails-1.0.0-x64-mingw32.gem
-# - pkg/tailwindcss-rails-1.0.0-x64-mingw-ucrt.gem
-# - pkg/tailwindcss-rails-1.0.0-x86_64-darwin.gem
-# - pkg/tailwindcss-rails-1.0.0-x86_64-linux.gem
-#
-# Note that in addition to the native gems, a vanilla "ruby" gem will also be created without
-# either the `exe/tailwindcss` script or a binary executable present.
-#
-#
-# New rake tasks created:
-#
-# - rake gem:ruby # Build the ruby gem
-# - rake gem:aarch64-linux # Build the aarch64-linux gem
-# - rake gem:arm64-darwin # Build the arm64-darwin gem
-# - rake gem:x64-mingw32 # Build the x64-mingw32 gem
-# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem
-# - rake gem:x86_64-darwin # Build the x86_64-darwin gem
-# - rake gem:x86_64-linux # Build the x86_64-linux gem
-# - rake download # Download all tailwindcss binaries
-#
-# Modified rake tasks:
-#
-# - rake gem # Build all the gem files
-# - rake package # Build all the gem files (same as `gem`)
-# - rake repackage # Force a rebuild of all the gem files
-#
-# Note also that the binary executables will be lazily downloaded when needed, but you can
-# explicitly download them with the `rake download` command.
-#
-require "rubygems/package_task"
-require "open-uri"
-require_relative "../lib/tailwindcss/upstream"
-
-def tailwindcss_download_url(filename)
- "https://github.com/tailwindlabs/tailwindcss/releases/download/#{Tailwindcss::Upstream::VERSION}/#{filename}"
-end
-
-TAILWINDCSS_RAILS_GEMSPEC = Bundler.load_gemspec("tailwindcss-rails.gemspec")
-
-# prepend the download task before the Gem::PackageTask tasks
-task :package => :download
-
-gem_path = Gem::PackageTask.new(TAILWINDCSS_RAILS_GEMSPEC).define
-desc "Build the ruby gem"
-task "gem:ruby" => [gem_path]
-
-exepaths = []
-Tailwindcss::Upstream::NATIVE_PLATFORMS.each do |platform, filename|
- TAILWINDCSS_RAILS_GEMSPEC.dup.tap do |gemspec|
- exedir = File.join(gemspec.bindir, platform) # "exe/x86_64-linux"
- exepath = File.join(exedir, "tailwindcss") # "exe/x86_64-linux/tailwindcss"
- exepaths << exepath
-
- # modify a copy of the gemspec to include the native executable
- gemspec.platform = platform
- gemspec.files += [exepath, "LICENSE-DEPENDENCIES"]
-
- # create a package task
- gem_path = Gem::PackageTask.new(gemspec).define
- desc "Build the #{platform} gem"
- task "gem:#{platform}" => [gem_path]
-
- directory exedir
- file exepath => [exedir] do
- release_url = tailwindcss_download_url(filename)
- warn "Downloading #{exepath} from #{release_url} ..."
-
- # lazy, but fine for now.
- URI.open(release_url) do |remote|
- File.open(exepath, "wb") do |local|
- local.write(remote.read)
- end
- end
- FileUtils.chmod(0755, exepath, verbose: true)
- end
- end
-end
-
-desc "Validate checksums for tailwindcss binaries"
-task "check" => exepaths do
- sha_filename = File.absolute_path("../package/tailwindcss-#{Tailwindcss::Upstream::VERSION}-checksums.txt", __dir__)
- sha_url = if File.exist?(sha_filename)
- sha_filename
- else
- sha_url = tailwindcss_download_url("sha256sums.txt")
- end
- gemspec = TAILWINDCSS_RAILS_GEMSPEC
-
- checksums = URI.open(sha_url).each_line.map do |line|
- checksum, file = line.split
- [File.basename(file), checksum]
- end.to_h
-
- Tailwindcss::Upstream::NATIVE_PLATFORMS.each do |platform, filename|
- exedir = File.join(gemspec.bindir, platform) # "exe/x86_64-linux"
- exepath = File.join(exedir, "tailwindcss") # "exe/x86_64-linux/tailwindcss"
-
- local_sha256 = Digest::SHA256.file(exepath).hexdigest
- remote_sha256 = checksums.fetch(filename)
-
- if local_sha256 == remote_sha256
- puts "Checksum OK for #{exepath} (#{local_sha256})"
- else
- abort "Checksum mismatch for #{exepath} (#{local_sha256} != #{remote_sha256})"
- end
- end
-end
-
-desc "Download all tailwindcss binaries"
-task "download" => :check
-
-CLOBBER.add(exepaths.map { |p| File.dirname(p) })
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 7535ccc7..8d893029 100644
--- a/tailwindcss-rails.gemspec
+++ b/tailwindcss-rails.gemspec
@@ -17,8 +17,7 @@ Gem::Specification.new do |spec|
spec.required_rubygems_version = ">= 3.2.0" # for Gem::Platform#match_gem?
spec.files = Dir["{app,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
- spec.bindir = "exe"
- spec.executables << "tailwindcss"
spec.add_dependency "railties", ">= 7.0.0"
+ spec.add_dependency "tailwindcss-ruby"
end
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 1877e871..00818f2d 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -11,9 +11,6 @@ bundle remove actionmailer
bundle add rails --skip-install ${RAILSOPTS:-}
bundle install
-# fetch the upstream executables
-bundle exec rake download
-
# do our work a directory with spaces in the name (#176, #184)
rm -rf "My Workspace"
mkdir "My Workspace"
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index 0be78894..a273e45e 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -2,209 +2,93 @@
require "minitest/mock"
class Tailwindcss::CommandsTest < ActiveSupport::TestCase
- def mock_exe_directory(platform)
- Dir.mktmpdir do |dir|
- FileUtils.mkdir(File.join(dir, platform))
- path = File.join(dir, platform, "tailwindcss")
- FileUtils.touch(path)
- stub_gem_platform_match_gem(true) do
- yield(dir, path)
- end
- end
- end
-
- def stub_gem_platform_match_gem(value)
- assert_respond_to(Gem::Platform, :match_gem?)
- Gem::Platform.stub(:match_gem?, value) do
- yield
- end
- end
-
- def mock_local_tailwindcss_install
- Dir.mktmpdir do |dir|
- path = File.join(dir, "tailwindcss")
- FileUtils.touch(path)
- yield(dir, path)
- end
- end
-
- test ".platform is a string containing just the cpu and os (not the version)" do
- expected = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}"
- assert_equal(expected, Tailwindcss::Commands.platform)
- end
-
- test ".executable returns the absolute path to the binary" do
- mock_exe_directory("sparc-solaris2.8") do |dir, executable|
- expected = File.expand_path(File.join(dir, "sparc-solaris2.8", "tailwindcss"))
- assert_equal(expected, executable, "assert on setup")
- assert_equal(expected, Tailwindcss::Commands.executable(exe_path: dir))
- end
- end
-
- test ".executable raises UnsupportedPlatformException when we're not on a supported platform" do
- stub_gem_platform_match_gem(false) do # nothing is supported
- assert_raises(Tailwindcss::Commands::UnsupportedPlatformException) do
- Tailwindcss::Commands.executable
- end
- end
- end
-
- test ".executable raises ExecutableNotFoundException when we can't find the executable we expect" do
- Dir.mktmpdir do |dir| # empty directory
- assert_raises(Tailwindcss::Commands::ExecutableNotFoundException) do
- Tailwindcss::Commands.executable(exe_path: dir)
- end
- end
- end
+ attr_accessor :executable
- test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when no packaged binary exists" do
- mock_local_tailwindcss_install do |local_install_dir, expected|
- result = nil
- begin
- ENV["TAILWINDCSS_INSTALL_DIR"] = local_install_dir
- assert_output(nil, /using TAILWINDCSS_INSTALL_DIR/) do
- result = Tailwindcss::Commands.executable(exe_path: "/does/not/exist")
- end
- ensure
- ENV["TAILWINDCSS_INSTALL_DIR"] = nil
- end
- assert_equal(expected, result)
- end
+ def setup
+ super
+ @executable = Tailwindcss::Ruby.executable
end
- test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when we're not on a supported platform" do
- stub_gem_platform_match_gem(false) do # nothing is supported
- mock_local_tailwindcss_install do |local_install_dir, expected|
- result = nil
- begin
- ENV["TAILWINDCSS_INSTALL_DIR"] = local_install_dir
- assert_output(nil, /using TAILWINDCSS_INSTALL_DIR/) do
- result = Tailwindcss::Commands.executable
- end
- ensure
- ENV["TAILWINDCSS_INSTALL_DIR"] = nil
- end
- assert_equal(expected, result)
- end
+ test ".compile_command" do
+ Rails.stub(:root, File) do # Rails.root won't work in this test suite
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "--minify")
+
+ actual = Tailwindcss::Commands.compile_command(debug: true)
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ refute_includes(actual, "--minify")
end
end
- test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR even when a packaged binary exists" do
- mock_exe_directory("sparc-solaris2.8") do |dir, _executable|
- mock_local_tailwindcss_install do |local_install_dir, expected|
- result = nil
- begin
- ENV["TAILWINDCSS_INSTALL_DIR"] = local_install_dir
- assert_output(nil, /using TAILWINDCSS_INSTALL_DIR/) do
- result = Tailwindcss::Commands.executable(exe_path: dir)
- end
- ensure
- ENV["TAILWINDCSS_INSTALL_DIR"] = nil
- end
- assert_equal(expected, result)
+ test ".compile_command when Rails compression is on" do
+ Rails.stub(:root, File) do # Rails.root won't work in this test suite
+ Tailwindcss::Commands.stub(:rails_css_compressor?, true) do
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ refute_includes(actual, "--minify")
end
- end
- end
- test ".executable raises ExecutableNotFoundException is TAILWINDCSS_INSTALL_DIR is set to a nonexistent dir" do
- begin
- ENV["TAILWINDCSS_INSTALL_DIR"] = "/does/not/exist"
- assert_raises(Tailwindcss::Commands::DirectoryNotFoundException) do
- Tailwindcss::Commands.executable
+ Tailwindcss::Commands.stub(:rails_css_compressor?, false) do
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ assert_includes(actual, "--minify")
end
- ensure
- ENV["TAILWINDCSS_INSTALL_DIR"] = nil
end
end
- test ".compile_command" do
- mock_exe_directory("sparc-solaris2.8") do |dir, executable|
- Rails.stub(:root, File) do # Rails.root won't work in this test suite
- actual = Tailwindcss::Commands.compile_command(exe_path: dir)
+ test ".compile_command when postcss.config.js exists" do
+ Dir.mktmpdir do |tmpdir|
+ Rails.stub(:root, Pathname.new(tmpdir)) do # Rails.root won't work in this test suite
+ actual = Tailwindcss::Commands.compile_command
assert_kind_of(Array, actual)
assert_equal(executable, actual.first)
- assert_includes(actual, "--minify")
+ refute_includes(actual, "--postcss")
- actual = Tailwindcss::Commands.compile_command(exe_path: dir, debug: true)
+ config_file = Rails.root.join("config/postcss.config.js")
+ FileUtils.mkdir_p(Rails.root.join("config"))
+ FileUtils.touch(config_file)
+ actual = Tailwindcss::Commands.compile_command
assert_kind_of(Array, actual)
assert_equal(executable, actual.first)
- refute_includes(actual, "--minify")
- end
- end
- end
-
- test ".compile_command when Rails compression is on" do
- mock_exe_directory("sparc-solaris2.8") do |dir, executable|
- Rails.stub(:root, File) do # Rails.root won't work in this test suite
- Tailwindcss::Commands.stub(:rails_css_compressor?, true) do
- actual = Tailwindcss::Commands.compile_command(exe_path: dir)
- assert_kind_of(Array, actual)
- refute_includes(actual, "--minify")
- end
-
- Tailwindcss::Commands.stub(:rails_css_compressor?, false) do
- actual = Tailwindcss::Commands.compile_command(exe_path: dir)
- assert_kind_of(Array, actual)
- assert_includes(actual, "--minify")
- end
- end
- end
- end
-
- test ".compile_command when postcss.config.js exists" do
- mock_exe_directory("sparc-solaris2.8") do |dir, executable|
- Dir.mktmpdir do |tmpdir|
- Rails.stub(:root, Pathname.new(tmpdir)) do # Rails.root won't work in this test suite
- actual = Tailwindcss::Commands.compile_command(exe_path: dir)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- refute_includes(actual, "--postcss")
-
- config_file = Rails.root.join("config/postcss.config.js")
- FileUtils.mkdir_p(Rails.root.join("config"))
- FileUtils.touch(config_file)
- actual = Tailwindcss::Commands.compile_command(exe_path: dir)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "--postcss")
- postcss_index = actual.index("--postcss")
- assert_equal(actual[postcss_index + 1], config_file.to_s)
- end
+ assert_includes(actual, "--postcss")
+ postcss_index = actual.index("--postcss")
+ assert_equal(actual[postcss_index + 1], config_file.to_s)
end
end
end
test ".watch_command" do
- mock_exe_directory("sparc-solaris2.8") do |dir, executable|
- Rails.stub(:root, File) do # Rails.root won't work in this test suite
- actual = Tailwindcss::Commands.watch_command(exe_path: dir)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "-w")
- refute_includes(actual, "-p")
- assert_includes(actual, "--minify")
-
- actual = Tailwindcss::Commands.watch_command(exe_path: dir, debug: true)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "-w")
- refute_includes(actual, "-p")
- refute_includes(actual, "--minify")
-
- actual = Tailwindcss::Commands.watch_command(exe_path: dir, poll: true)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "-w")
- refute_includes(actual, "always")
- assert_includes(actual, "-p")
- assert_includes(actual, "--minify")
-
- actual = Tailwindcss::Commands.watch_command(exe_path: dir, always: true)
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "-w")
- assert_includes(actual, "always")
- end
+ Rails.stub(:root, File) do # Rails.root won't work in this test suite
+ actual = Tailwindcss::Commands.watch_command
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-w")
+ refute_includes(actual, "-p")
+ assert_includes(actual, "--minify")
+
+ actual = Tailwindcss::Commands.watch_command(debug: true)
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-w")
+ refute_includes(actual, "-p")
+ refute_includes(actual, "--minify")
+
+ actual = Tailwindcss::Commands.watch_command(poll: true)
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-w")
+ refute_includes(actual, "always")
+ assert_includes(actual, "-p")
+ assert_includes(actual, "--minify")
+
+ actual = Tailwindcss::Commands.watch_command(always: true)
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-w")
+ assert_includes(actual, "always")
end
end
end
From 297b570ebaf641dd9aa9deaf9d09679ea2b2b032 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 25 Sep 2024 17:45:07 -0400
Subject: [PATCH 073/204] ci: drop rubies that are out of upstream support
---
.github/workflows/ci.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index db04fb3f..78413ae9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,14 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
- ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "head"]
+ ruby: ["3.1", "3.2", "3.3", "head"]
steps:
- uses: actions/checkout@v4
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
- rubygems: "3.4.22" # last version to support Ruby 2.7
bundler: latest
bundler-cache: true
- name: Run tests
From 7ce669b65800e289d0939bb422cc77b7d19be381 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 25 Sep 2024 18:10:38 -0400
Subject: [PATCH 074/204] ci: drop the native gem building pipeline
---
.github/workflows/gem-install.yml | 153 ------------------------------
1 file changed, 153 deletions(-)
delete mode 100644 .github/workflows/gem-install.yml
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
deleted file mode 100644
index eb1300d6..00000000
--- a/.github/workflows/gem-install.yml
+++ /dev/null
@@ -1,153 +0,0 @@
-name: Native Gems
-concurrency:
- group: "${{github.workflow}}-${{github.ref}}"
- cancel-in-progress: true
-on:
- workflow_dispatch:
- push:
- branches:
- - main
- tags:
- - v*.*.*
- pull_request:
- types: [opened, synchronize]
- branches:
- - '*'
-
-jobs:
- package:
- strategy:
- fail-fast: false
- matrix:
- platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "arm64-darwin", "x86_64-linux", "arm-linux"]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - run: rm Gemfile.lock
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- bundler: latest
- bundler-cache: true
- - run: "bundle exec rake gem:${{matrix.platform}}"
- - uses: actions/upload-artifact@v4
- with:
- name: gem-${{matrix.platform}}
- path: pkg
- retention-days: 1
-
- vanilla-install:
- needs: ["package"]
- runs-on: ubuntu-latest
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- - uses: actions/download-artifact@v4
- with:
- name: gem-ruby
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss 2>&1 | fgrep 'ERROR: Cannot find the tailwindcss executable'"
-
- linux-install:
- needs: ["package"]
- runs-on: ubuntu-latest
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- - uses: actions/download-artifact@v4
- with:
- name: gem-x86_64-linux
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
-
- linux-musl-install:
- needs: ["package"]
- runs-on: ubuntu-latest
- container:
- image: ruby:3.2-alpine
- steps:
- - uses: actions/download-artifact@v4
- with:
- name: gem-x86_64-linux
- path: pkg
- - run: "apk add build-base" # to compile racc, etc.
- - run: "gem update --system" # let's make sure the latest is working for us (upstream test, see #200)
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
-
- linux-arm-install:
- needs: ["package"]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/download-artifact@v4
- with:
- name: gem-arm-linux
- path: pkg
- - run: |
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker run --rm -v "$(pwd):/test" -w /test --platform=linux/arm/v7 ruby:3.2 \
- /bin/bash -c "
- set -ex
- gem install pkg/tailwindcss-rails-*.gem
- tailwindcss --help
- "
-
- darwin-x86_64-install:
- needs: ["package"]
- runs-on: macos-13
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- - uses: actions/download-artifact@v4
- with:
- name: gem-x86_64-darwin
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
-
- darwin-arm64-install:
- needs: ["package"]
- runs-on: macos-14
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- - uses: actions/download-artifact@v4
- with:
- name: gem-arm64-darwin
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
-
- windows-install:
- needs: ["package"]
- runs-on: windows-latest
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.0"
- - uses: actions/download-artifact@v4
- with:
- name: gem-x64-mingw32
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
-
- windows-ucrt-install:
- needs: ["package"]
- runs-on: windows-2022
- steps:
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: "3.2"
- - uses: actions/download-artifact@v4
- with:
- name: gem-x64-mingw-ucrt
- path: pkg
- - run: "gem install pkg/tailwindcss-rails-*.gem"
- - run: "tailwindcss --help"
From d46ca0c01caeae8eae1a2e0dadb3f4f78f5735f0 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 26 Sep 2024 21:56:23 -0400
Subject: [PATCH 075/204] doc: add a README section on choosing a specific
version of tailwindcss
---
README.md | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index dc689b60..2887ab3f 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,7 @@
- [Installation](#installation)
+ * [Choosing a specific version of `tailwindcss`](#choosing-a-specific-version-of-tailwindcss)
* [Using a local installation of `tailwindcss`](#using-a-local-installation-of-tailwindcss)
- [Developing with Tailwindcss](#developing-with-tailwindcss)
* [Configuration and commands](#configuration-and-commands)
@@ -17,7 +18,7 @@
* [Using with PostCSS](#using-with-postcss)
* [Custom inputs or outputs](#custom-inputs-or-outputs)
- [Troubleshooting](#troubleshooting)
- * [Lost keystrokes or hanging when using `ruby/debug` with the Puma plugin](#lost-keystrokes-or-hanging-when-using-rubydebug-with-the-puma-plugin)
+ * [Lost keystrokes or hanging when using terminal-based debugging tools (e.g. IRB, Pry, `ruby/debug`...etc.) with the Puma plugin](#lost-keystrokes-or-hanging-when-using-terminal-based-debugging-tools-eg-irb-pry-rubydebugetc-with-the-puma-plugin)
* [Running in a docker container exits prematurely](#running-in-a-docker-container-exits-prematurely)
* [Conflict with sassc-rails](#conflict-with-sassc-rails)
* [Class names must be spelled out](#class-names-must-be-spelled-out)
@@ -35,7 +36,23 @@ With Rails 7 you can generate a new application preconfigured with Tailwind by u
1. Run `./bin/bundle add tailwindcss-rails`
2. Run `./bin/rails tailwindcss:install`
-This gem depends on the `tailwindcss-ruby` gem to install a working tailwind executable. You can also use a local (npm-based) installation if you prefer, please go to https://github.com/flavorjones/tailwindcss-ruby for more information.
+This gem depends on the `tailwindcss-ruby` gem to install a working tailwind executable.
+
+
+### Choosing a specific version of `tailwindcss`
+
+The `tailwindcss-ruby` gem is declared as a floating dependency of this gem, so by default you will get the most recent stable version. However, you can select a specific version of tailwind by pinning that gem to the analogous version in your application's `Gemfile`. For example,
+
+``` ruby
+gem "tailwindcss-rails"
+
+# pin to tailwindcss version 3.4.13
+gem "tailwindcss-ruby", "3.4.13"
+```
+
+### Using a local installation of `tailwindcss`
+
+You can also use a local (npm-based) installation if you prefer, please go to https://github.com/flavorjones/tailwindcss-ruby for more information.
## Developing with Tailwindcss
From 5562096af1e440334614d230724fec1a49adef11 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 26 Sep 2024 21:47:45 -0400
Subject: [PATCH 076/204] dev: re-bundle
---
Gemfile.lock | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 7e6f5372..d486fe4c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -60,13 +60,13 @@ GEM
erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
- i18n (1.14.5)
+ i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
- irb (1.14.0)
+ irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
- logger (1.6.0)
+ logger (1.6.1)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -76,9 +76,8 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- mini_portile2 (2.8.7)
minitest (5.25.1)
- net-imap (0.4.14)
+ net-imap (0.4.16)
date
net-protocol
net-pop (0.1.2)
@@ -87,11 +86,14 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.7)
- mini_portile2 (~> 2.8.2)
+ nokogiri (1.16.7-aarch64-linux)
+ racc (~> 1.4)
+ nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
+ nokogiri (1.16.7-x86-linux)
+ racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
@@ -125,22 +127,29 @@ GEM
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
- reline (0.5.9)
+ reline (0.5.10)
io-console (~> 0.5)
securerandom (0.3.1)
stringio (3.1.1)
- tailwindcss-ruby (0.1.0-x86_64-linux)
- thor (1.3.1)
+ tailwindcss-ruby (3.4.13)
+ tailwindcss-ruby (3.4.13-aarch64-linux)
+ tailwindcss-ruby (3.4.13-arm-linux)
+ tailwindcss-ruby (3.4.13-arm64-darwin)
+ tailwindcss-ruby (3.4.13-x86_64-darwin)
+ tailwindcss-ruby (3.4.13-x86_64-linux)
+ thor (1.3.2)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
useragent (0.16.10)
webrick (1.8.2)
- zeitwerk (2.6.17)
+ zeitwerk (2.6.18)
PLATFORMS
+ aarch64-linux
+ arm-linux
arm64-darwin
- ruby
+ x86-linux
x86_64-darwin
x86_64-linux
@@ -150,4 +159,4 @@ DEPENDENCIES
tailwindcss-rails!
BUNDLED WITH
- 2.5.4
+ 2.5.20
From 11d77640b01da4d3caabe86d6f8c8614068cfdf3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 2 Oct 2024 10:29:58 -0400
Subject: [PATCH 077/204] version bump to v3.0.0.rc1
---
CHANGELOG.md | 2 +-
CONTRIBUTING.md | 3 ++-
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 19fcccb4..fc74d110 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v3.0.0rc1
### Notable changes
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index debab121..a4040dfa 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,7 +29,8 @@ gem "tailwindcss-rails", path: "/path/to/tailwindcss-rails"
- [ ] update `lib/tailwindcss/version.rb`
- [ ] update `CHANGELOG.md`
- [ ] commit and create a git tag
-- push
+- package and push
+ - [ ] `bundle exec rake build`
- [ ] `gem push pkg/*.gem`
- [ ] `git push && git push --tags`
- announce
diff --git a/Gemfile.lock b/Gemfile.lock
index d486fe4c..b07ebd0a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.7.7)
+ tailwindcss-rails (3.0.0.rc1)
railties (>= 7.0.0)
tailwindcss-ruby
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 6f849135..e2f6fd49 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.7.7"
+ VERSION = "3.0.0.rc1"
end
From 0427a3bfd3ff0a9f71ea7d2d8884b76407c2ab9c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 2 Oct 2024 10:40:03 -0400
Subject: [PATCH 078/204] Update changelog
[skip ci]
---
CHANGELOG.md | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc74d110..8b04a9e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,11 +2,9 @@
### Notable changes
-* The upstream `tailwindcss` executable has been extracted from this gem into a new dependency, `tailwindcss-ruby`.
+* The upstream `tailwindcss` executable has been extracted from this gem into a new dependency, `tailwindcss-ruby`. @flavorjones
- In advance of the upcoming TailwindCSS v4 release, we are decoupling the `tailwindcss` executable
- from the Rails integration. This will allow users to upgrade TailwindCSS at a time of their
- choosing, and allow early adopters to start using the beta releases.
+ In advance of the upcoming TailwindCSS v4 release, we are decoupling the `tailwindcss` executable from the Rails integration. This will allow users to upgrade TailwindCSS at a time of their choosing, and allow early adopters to start using the beta releases.
## v2.7.7 / 2024-10-02
From db80e8828835279238aa3d3c942933a018295571 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 2 Oct 2024 10:40:37 -0400
Subject: [PATCH 079/204] Update changelog
[skip ci]
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b04a9e8..efd53447 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## v3.0.0rc1
+## v3.0.0.rc1
### Notable changes
From dde766d894b49bceaeccb9494a1e82fd9bce0687 Mon Sep 17 00:00:00 2001
From: Ender Ahmet Yurt
Date: Tue, 8 Oct 2024 16:29:16 +0300
Subject: [PATCH 080/204] Fix naming regarding Rails form naming
---
lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index 5ee5ecf0..4ce66d6f 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -28,7 +28,7 @@
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :text_area -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-<% elsif attribute.field_type == :check_box -%>
+<% elsif attribute.field_type == :checkbox -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
<% else -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
From 24d272bf7398744a129b8f8da3f4a85e608deeea Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 8 Oct 2024 14:53:18 -0400
Subject: [PATCH 081/204] doc: update CHANGELOG for 2.7.8
[skip ci]
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index efd53447..fecfced1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@
In advance of the upcoming TailwindCSS v4 release, we are decoupling the `tailwindcss` executable from the Rails integration. This will allow users to upgrade TailwindCSS at a time of their choosing, and allow early adopters to start using the beta releases.
+## v2.7.8 / 2024-10-08
+
+* Fix the scaffold form template to render checkboxes properly. (#416) @enderahmetyurt
+
+
## v2.7.7 / 2024-10-02
* Proactively support changes to Rails's authentication templates shipping in Rails 8.0.0.beta2 (which is not yet released). (#407, #408) @seanpdoyle @flavorjones
From 68d819afc165f3b74226130cabec334a8ce8b9d3 Mon Sep 17 00:00:00 2001
From: Earlopain <14981592+Earlopain@users.noreply.github.com>
Date: Wed, 9 Oct 2024 16:20:26 +0200
Subject: [PATCH 082/204] Handle both rails 7.2 and rails 8.0 field types
They got renamed in:
* https://github.com/rails/rails/pull/52432
* https://github.com/rails/rails/pull/52467
This ensures the correct classes are generated for both old and new versions
---
.../tailwindcss/scaffold/templates/_form.html.erb.tt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index 4ce66d6f..487f2f5f 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -26,9 +26,9 @@
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
-<% if attribute.field_type == :text_area -%>
+<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-<% elsif attribute.field_type == :checkbox -%>
+<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
<% else -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
From cb31a22af9ce953edb1c26fc7ce99fbd30cd5a60 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 15 Oct 2024 16:51:59 -0400
Subject: [PATCH 083/204] doc: update CHANGELOG for 2.7.9
[skip ci]
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fecfced1..6d34be2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@
In advance of the upcoming TailwindCSS v4 release, we are decoupling the `tailwindcss` executable from the Rails integration. This will allow users to upgrade TailwindCSS at a time of their choosing, and allow early adopters to start using the beta releases.
+## v2.7.9 / 2024-10-10
+
+* Fix the scaffold form template to render text forms and check boxes properly in all versions of Rails. (#418) @Earlopain
+
+
## v2.7.8 / 2024-10-08
* Fix the scaffold form template to render checkboxes properly. (#416) @enderahmetyurt
From 61cadc1b9d8dc9a525ca46ad3722e041590cbb35 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 15 Oct 2024 16:57:34 -0400
Subject: [PATCH 084/204] version bump to v3.0.0
---
CHANGELOG.md | 2 +-
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d34be2c..26d72880 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## v3.0.0.rc1
+## v3.0.0
### Notable changes
diff --git a/Gemfile.lock b/Gemfile.lock
index b07ebd0a..96696921 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (3.0.0.rc1)
+ tailwindcss-rails (3.0.0)
railties (>= 7.0.0)
tailwindcss-ruby
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index e2f6fd49..2bc244fc 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "3.0.0.rc1"
+ VERSION = "3.0.0"
end
From a6baeb5fc62357a16db1d581c7f5a4c8171be7e5 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 17 Oct 2024 10:58:16 -0400
Subject: [PATCH 085/204] test: verify the contents of tailwind.css in
integration test
---
test/integration/user_journey_test.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 00818f2d..a585017b 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -55,3 +55,9 @@ fi
# TEST: presence of the generated file
bin/rails generate scaffold post title:string body:text published:boolean
grep -q "Show this post" app/views/posts/index.html.erb
+
+# TEST: contents of the css file
+bin/rails tailwindcss:build[verbose]
+grep -q "py-2" app/assets/builds/tailwind.css
+
+echo "OK"
From 3a3a0eb4127128de171618057ad3b187e711bf15 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 17 Oct 2024 10:58:47 -0400
Subject: [PATCH 086/204] test: matrix tailwind 3.4 and 4.0 in integration test
---
.github/workflows/ci.yml | 3 +++
.github/workflows/upstream.yml | 2 ++
test/integration/user_journey_test.sh | 3 ++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 78413ae9..190294f1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,7 +37,10 @@ jobs:
fail-fast: false
matrix:
plat: ["ubuntu", "windows", "macos"]
+ tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
+ env:
runs-on: ${{matrix.plat}}-latest
+ TAILWINDCSSOPTS: ${{ matrix.tailwind }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 0ba5507a..17e02892 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -42,8 +42,10 @@ jobs:
matrix:
plat: ["ubuntu"]
ref: ["7-2-stable", "v8.0.0.beta1", "main"]
+ tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
env:
RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }}
+ TAILWINDCSSOPTS: ${{ matrix.tailwind }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index a585017b..178d5a57 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -26,7 +26,8 @@ bundle remove rails --skip-install
bundle add rails --skip-install ${RAILSOPTS:-}
# use the tailwindcss-rails under test
-bundle add tailwindcss-rails --path="../.."
+bundle add tailwindcss-rails --skip-install --path="../.."
+bundle add tailwindcss-ruby --skip-install ${TAILWINDCSSOPTS:-}
bundle install
bundle show --paths
bundle binstubs --all
From 6e828ebf094e43ffa01add8f5233316a397e94d8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 17 Oct 2024 11:14:16 -0400
Subject: [PATCH 087/204] Add support for Tailwind CSS v4
which doesn't need a config file or an input file anymore.
Closes #419
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/commands.rb | 15 +++++++++++---
test/lib/tailwindcss/commands_test.rb | 28 ++++++++++++++++++++++++++-
3 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26d72880..dc3b89b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Add experimental support for Tailwind CSS v4. (#420) @flavorjones
+
+
## v3.0.0
### Notable changes
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 26c5178a..c065b91a 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -3,14 +3,23 @@
module Tailwindcss
module Commands
class << self
+ def tailwindcss_version
+ Tailwindcss::Ruby::VERSION
+ end
+
def compile_command(debug: false, **kwargs)
command = [
Tailwindcss::Ruby.executable(**kwargs),
- "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
- "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
- "-c", Rails.root.join("config/tailwind.config.js").to_s,
+ "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s
]
+ unless tailwindcss_version >= "4.0"
+ command += [
+ "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
+ "-c", Rails.root.join("config/tailwind.config.js").to_s,
+ ]
+ end
+
command << "--minify" unless (debug || rails_css_compressor?)
postcss_path = Rails.root.join("config/postcss.config.js")
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index a273e45e..ef0e80ba 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -9,7 +9,33 @@ def setup
@executable = Tailwindcss::Ruby.executable
end
- test ".compile_command" do
+ test ".compile_command with tailwindcss v3" do
+ Rails.stub(:root, File) do # Rails.root won't work in this test suite
+ Tailwindcss::Commands.stub(:tailwindcss_version, "3.4.13") do
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-i")
+ assert_includes(actual, "-c")
+ assert_includes(actual, "-o")
+ end
+ end
+ end
+
+ test ".compile_command with tailwindcss v4" do
+ Rails.stub(:root, File) do # Rails.root won't work in this test suite
+ Tailwindcss::Commands.stub(:tailwindcss_version, "4.0.0") do
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ refute_includes(actual, "-i")
+ refute_includes(actual, "-c")
+ assert_includes(actual, "-o")
+ end
+ end
+ end
+
+ test ".compile_command debug flag" do
Rails.stub(:root, File) do # Rails.root won't work in this test suite
actual = Tailwindcss::Commands.compile_command
assert_kind_of(Array, actual)
From 0f282e2daf60e52e5523beada6ee2a546eb08103 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 17 Oct 2024 21:43:13 -0400
Subject: [PATCH 088/204] ci: fix pipeline
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 190294f1..56e245b3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,8 +38,8 @@ jobs:
matrix:
plat: ["ubuntu", "windows", "macos"]
tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
- env:
runs-on: ${{matrix.plat}}-latest
+ env:
TAILWINDCSSOPTS: ${{ matrix.tailwind }}
steps:
- uses: actions/checkout@v4
From 1acd6c56e12d5c1e51c54fe0ca8e3552eb87ecc9 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 17 Oct 2024 22:31:36 -0400
Subject: [PATCH 089/204] Unbreak support for v4 input file.
Reverts part of 6e828ebf but adds to test coverage now that I
understand the other changes v4 requires.
---
CHANGELOG.md | 2 +-
lib/tailwindcss/commands.rb | 15 +++-----------
test/integration/user_journey_test.sh | 18 +++++++++++++++++
test/lib/tailwindcss/commands_test.rb | 29 +++++++--------------------
4 files changed, 29 insertions(+), 35 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dc3b89b8..d33a4893 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
## next / unreleased
-* Add experimental support for Tailwind CSS v4. (#420) @flavorjones
+* Add experimental support for Tailwind CSS v4. (#420, #423) @flavorjones
## v3.0.0
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index c065b91a..26c5178a 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -3,23 +3,14 @@
module Tailwindcss
module Commands
class << self
- def tailwindcss_version
- Tailwindcss::Ruby::VERSION
- end
-
def compile_command(debug: false, **kwargs)
command = [
Tailwindcss::Ruby.executable(**kwargs),
- "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s
+ "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
+ "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
+ "-c", Rails.root.join("config/tailwind.config.js").to_s,
]
- unless tailwindcss_version >= "4.0"
- command += [
- "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
- "-c", Rails.root.join("config/tailwind.config.js").to_s,
- ]
- end
-
command << "--minify" unless (debug || rails_css_compressor?)
postcss_path = Rails.root.join("config/postcss.config.js")
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 178d5a57..14f4597a 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -32,6 +32,12 @@ bundle install
bundle show --paths
bundle binstubs --all
+if bundle show | fgrep tailwindcss-ruby | fgrep -q "(4." ; then
+ TAILWIND4=1
+else
+ TAILWIND4=0
+fi
+
# install tailwindcss
bin/rails tailwindcss:install
@@ -45,6 +51,13 @@ task :still_here do
end
EOF
+if [[ $TAILWIND4 = 1 ]] ; then
+ cat > app/assets/stylesheets/application.tailwind.css < "Rails 8.0.0.beta" ]] ; then
@@ -61,4 +74,9 @@ grep -q "Show this post" app/views/posts/index.html.erb
bin/rails tailwindcss:build[verbose]
grep -q "py-2" app/assets/builds/tailwind.css
+if [[ $TAILWIND4 = 1 ]] ; then
+ # TEST: contents include application.tailwind.css
+ grep -q "#abc12399" app/assets/builds/tailwind.css
+fi
+
echo "OK"
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index ef0e80ba..1ec6ce2b 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -9,29 +9,14 @@ def setup
@executable = Tailwindcss::Ruby.executable
end
- test ".compile_command with tailwindcss v3" do
+ test ".compile_command" do
Rails.stub(:root, File) do # Rails.root won't work in this test suite
- Tailwindcss::Commands.stub(:tailwindcss_version, "3.4.13") do
- actual = Tailwindcss::Commands.compile_command
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- assert_includes(actual, "-i")
- assert_includes(actual, "-c")
- assert_includes(actual, "-o")
- end
- end
- end
-
- test ".compile_command with tailwindcss v4" do
- Rails.stub(:root, File) do # Rails.root won't work in this test suite
- Tailwindcss::Commands.stub(:tailwindcss_version, "4.0.0") do
- actual = Tailwindcss::Commands.compile_command
- assert_kind_of(Array, actual)
- assert_equal(executable, actual.first)
- refute_includes(actual, "-i")
- refute_includes(actual, "-c")
- assert_includes(actual, "-o")
- end
+ actual = Tailwindcss::Commands.compile_command
+ assert_kind_of(Array, actual)
+ assert_equal(executable, actual.first)
+ assert_includes(actual, "-i")
+ assert_includes(actual, "-c")
+ assert_includes(actual, "-o")
end
end
From 04bf4ba4cd929569dfa23efc39c18190a5714b86 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 18 Oct 2024 09:07:49 -0400
Subject: [PATCH 090/204] doc: update CHANGELOG to remove note about reverted
change
[skip ci]
---
CHANGELOG.md | 3 ---
1 file changed, 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d33a4893..55d2ec04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,5 @@
## next / unreleased
-* Add experimental support for Tailwind CSS v4. (#420, #423) @flavorjones
-
-
## v3.0.0
### Notable changes
From c6668290f333dad080ac54f3d4572d9940af7f7b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Oct 2024 14:59:33 +0000
Subject: [PATCH 091/204] build(deps): bump railties from 7.2.1 to 7.2.1.1
Bumps [railties](https://github.com/rails/rails) from 7.2.1 to 7.2.1.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1.1/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.1...v7.2.1.1)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 96696921..3c698704 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.1)
- actionpack (= 7.2.1)
- actionview (= 7.2.1)
- activejob (= 7.2.1)
- activesupport (= 7.2.1)
+ actionmailer (7.2.1.1)
+ actionpack (= 7.2.1.1)
+ actionview (= 7.2.1.1)
+ activejob (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.1)
- actionview (= 7.2.1)
- activesupport (= 7.2.1)
+ actionpack (7.2.1.1)
+ actionview (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -26,16 +26,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.1)
- activesupport (= 7.2.1)
+ actionview (7.2.1.1)
+ activesupport (= 7.2.1.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.1)
- activesupport (= 7.2.1)
+ activejob (7.2.1.1)
+ activesupport (= 7.2.1.1)
globalid (>= 0.3.6)
- activesupport (7.2.1)
+ activesupport (7.2.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -101,7 +101,7 @@ GEM
psych (5.1.2)
stringio
racc (1.8.1)
- rack (3.1.7)
+ rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -116,9 +116,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.1)
- actionpack (= 7.2.1)
- activesupport (= 7.2.1)
+ railties (7.2.1.1)
+ actionpack (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -143,7 +143,7 @@ GEM
concurrent-ruby (~> 1.0)
useragent (0.16.10)
webrick (1.8.2)
- zeitwerk (2.6.18)
+ zeitwerk (2.7.1)
PLATFORMS
aarch64-linux
From 24512d49751209cd73377485c49ae8cee526c4ef Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Oct 2024 14:59:45 +0000
Subject: [PATCH 092/204] build(deps-dev): bump actionmailer from 7.2.1 to
7.2.1.1
Bumps [actionmailer](https://github.com/rails/rails) from 7.2.1 to 7.2.1.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1.1/actionmailer/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.1...v7.2.1.1)
---
updated-dependencies:
- dependency-name: actionmailer
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 96696921..b81e81df 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.1)
- actionpack (= 7.2.1)
- actionview (= 7.2.1)
- activejob (= 7.2.1)
- activesupport (= 7.2.1)
+ actionmailer (7.2.1.1)
+ actionpack (= 7.2.1.1)
+ actionview (= 7.2.1.1)
+ activejob (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.1)
- actionview (= 7.2.1)
- activesupport (= 7.2.1)
+ actionpack (7.2.1.1)
+ actionview (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -26,16 +26,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.1)
- activesupport (= 7.2.1)
+ actionview (7.2.1.1)
+ activesupport (= 7.2.1.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.1)
- activesupport (= 7.2.1)
+ activejob (7.2.1.1)
+ activesupport (= 7.2.1.1)
globalid (>= 0.3.6)
- activesupport (7.2.1)
+ activesupport (7.2.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -77,7 +77,7 @@ GEM
net-smtp
mini_mime (1.1.5)
minitest (5.25.1)
- net-imap (0.4.16)
+ net-imap (0.5.0)
date
net-protocol
net-pop (0.1.2)
@@ -101,7 +101,7 @@ GEM
psych (5.1.2)
stringio
racc (1.8.1)
- rack (3.1.7)
+ rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -116,9 +116,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.1)
- actionpack (= 7.2.1)
- activesupport (= 7.2.1)
+ railties (7.2.1.1)
+ actionpack (= 7.2.1.1)
+ activesupport (= 7.2.1.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
From 2a80e88f3a05f155538d2e52b5dcf99b4869cd7a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Oct 2024 14:59:53 +0000
Subject: [PATCH 093/204] build(deps): bump tailwindcss-ruby from 3.4.13 to
3.4.14
Bumps [tailwindcss-ruby](https://github.com/flavorjones/tailwindcss-ruby) from 3.4.13 to 3.4.14.
- [Release notes](https://github.com/flavorjones/tailwindcss-ruby/releases)
- [Changelog](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/tailwindcss-ruby/compare/v3.4.13...v3.4.14)
---
updated-dependencies:
- dependency-name: tailwindcss-ruby
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 96696921..045ab323 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -131,12 +131,12 @@ GEM
io-console (~> 0.5)
securerandom (0.3.1)
stringio (3.1.1)
- tailwindcss-ruby (3.4.13)
- tailwindcss-ruby (3.4.13-aarch64-linux)
- tailwindcss-ruby (3.4.13-arm-linux)
- tailwindcss-ruby (3.4.13-arm64-darwin)
- tailwindcss-ruby (3.4.13-x86_64-darwin)
- tailwindcss-ruby (3.4.13-x86_64-linux)
+ tailwindcss-ruby (3.4.14)
+ tailwindcss-ruby (3.4.14-aarch64-linux)
+ tailwindcss-ruby (3.4.14-arm-linux)
+ tailwindcss-ruby (3.4.14-arm64-darwin)
+ tailwindcss-ruby (3.4.14-x86_64-darwin)
+ tailwindcss-ruby (3.4.14-x86_64-linux)
thor (1.3.2)
timeout (0.4.1)
tzinfo (2.0.6)
From 5fd6372e07feacba44e3cbfab089e8d7848c8c80 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 28 Oct 2024 15:00:10 +0000
Subject: [PATCH 094/204] build(deps-dev): bump actionmailer from 7.2.1.1 to
7.2.1.2
Bumps [actionmailer](https://github.com/rails/rails) from 7.2.1.1 to 7.2.1.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1.2/actionmailer/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.1.1...v7.2.1.2)
---
updated-dependencies:
- dependency-name: actionmailer
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 10ffe3ab..0ff856a2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.1.1)
- actionpack (= 7.2.1.1)
- actionview (= 7.2.1.1)
- activejob (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionmailer (7.2.1.2)
+ actionpack (= 7.2.1.2)
+ actionview (= 7.2.1.2)
+ activejob (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.1.1)
- actionview (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionpack (7.2.1.2)
+ actionview (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -26,16 +26,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionview (7.2.1.2)
+ activesupport (= 7.2.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.1.1)
- activesupport (= 7.2.1.1)
+ activejob (7.2.1.2)
+ activesupport (= 7.2.1.2)
globalid (>= 0.3.6)
- activesupport (7.2.1.1)
+ activesupport (7.2.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -67,7 +67,7 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.1)
- loofah (2.22.0)
+ loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -116,9 +116,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.1.1)
- actionpack (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ railties (7.2.1.2)
+ actionpack (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
From bcf44064667f7445360617b346bd7d7ebb0e99bf Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 28 Oct 2024 15:00:24 +0000
Subject: [PATCH 095/204] build(deps): bump railties from 7.2.1.1 to 7.2.1.2
Bumps [railties](https://github.com/rails/rails) from 7.2.1.1 to 7.2.1.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1.2/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.1.1...v7.2.1.2)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 10ffe3ab..0ff856a2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.1.1)
- actionpack (= 7.2.1.1)
- actionview (= 7.2.1.1)
- activejob (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionmailer (7.2.1.2)
+ actionpack (= 7.2.1.2)
+ actionview (= 7.2.1.2)
+ activejob (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.1.1)
- actionview (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionpack (7.2.1.2)
+ actionview (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -26,16 +26,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.1.1)
- activesupport (= 7.2.1.1)
+ actionview (7.2.1.2)
+ activesupport (= 7.2.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.1.1)
- activesupport (= 7.2.1.1)
+ activejob (7.2.1.2)
+ activesupport (= 7.2.1.2)
globalid (>= 0.3.6)
- activesupport (7.2.1.1)
+ activesupport (7.2.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -67,7 +67,7 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.1)
- loofah (2.22.0)
+ loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -116,9 +116,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.1.1)
- actionpack (= 7.2.1.1)
- activesupport (= 7.2.1.1)
+ railties (7.2.1.2)
+ actionpack (= 7.2.1.2)
+ activesupport (= 7.2.1.2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
From 6c6aaf0b2b1550f4b95de2a44ec50891bcbfeae6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 4 Nov 2024 14:45:16 +0000
Subject: [PATCH 096/204] build(deps): bump railties from 7.2.1.2 to 7.2.2
Bumps [railties](https://github.com/rails/rails) from 7.2.1.2 to 7.2.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.2/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.1.2...v7.2.2)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 0ff856a2..65dee87d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.1.2)
- actionpack (= 7.2.1.2)
- actionview (= 7.2.1.2)
- activejob (= 7.2.1.2)
- activesupport (= 7.2.1.2)
+ actionmailer (7.2.2)
+ actionpack (= 7.2.2)
+ actionview (= 7.2.2)
+ activejob (= 7.2.2)
+ activesupport (= 7.2.2)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.1.2)
- actionview (= 7.2.1.2)
- activesupport (= 7.2.1.2)
+ actionpack (7.2.2)
+ actionview (= 7.2.2)
+ activesupport (= 7.2.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
@@ -26,17 +26,18 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.1.2)
- activesupport (= 7.2.1.2)
+ actionview (7.2.2)
+ activesupport (= 7.2.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.1.2)
- activesupport (= 7.2.1.2)
+ activejob (7.2.2)
+ activesupport (= 7.2.2)
globalid (>= 0.3.6)
- activesupport (7.2.1.2)
+ activesupport (7.2.2)
base64
+ benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
@@ -47,6 +48,7 @@ GEM
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
base64 (0.2.0)
+ benchmark (0.3.0)
bigdecimal (3.1.8)
builder (3.3.0)
concurrent-ruby (1.3.4)
@@ -106,9 +108,8 @@ GEM
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
- rackup (2.1.0)
+ rackup (2.2.0)
rack (>= 3)
- webrick (~> 1.8)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
@@ -116,9 +117,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.1.2)
- actionpack (= 7.2.1.2)
- activesupport (= 7.2.1.2)
+ railties (7.2.2)
+ actionpack (= 7.2.2)
+ activesupport (= 7.2.2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -142,7 +143,6 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
useragent (0.16.10)
- webrick (1.8.2)
zeitwerk (2.7.1)
PLATFORMS
From a812bdee79c2c32f745643ca39a13df75b40dd43 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 11 Nov 2024 14:27:06 +0000
Subject: [PATCH 097/204] build(deps): bump railties from 7.2.2 to 8.0.0
Bumps [railties](https://github.com/rails/rails) from 7.2.2 to 8.0.0.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.0.0/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.2...v8.0.0)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 65dee87d..7b8965d9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,34 +8,33 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.2.2)
- actionpack (= 7.2.2)
- actionview (= 7.2.2)
- activejob (= 7.2.2)
- activesupport (= 7.2.2)
+ actionmailer (8.0.0)
+ actionpack (= 8.0.0)
+ actionview (= 8.0.0)
+ activejob (= 8.0.0)
+ activesupport (= 8.0.0)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.2)
- actionview (= 7.2.2)
- activesupport (= 7.2.2)
+ actionpack (8.0.0)
+ actionview (= 8.0.0)
+ activesupport (= 8.0.0)
nokogiri (>= 1.8.5)
- racc
- rack (>= 2.2.4, < 3.2)
+ rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (7.2.2)
- activesupport (= 7.2.2)
+ actionview (8.0.0)
+ activesupport (= 8.0.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.2)
- activesupport (= 7.2.2)
+ activejob (8.0.0)
+ activesupport (= 8.0.0)
globalid (>= 0.3.6)
- activesupport (7.2.2)
+ activesupport (8.0.0)
base64
benchmark (>= 0.3)
bigdecimal
@@ -47,8 +46,9 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
+ uri (>= 0.13.1)
base64 (0.2.0)
- benchmark (0.3.0)
+ benchmark (0.4.0)
bigdecimal (3.1.8)
builder (3.3.0)
concurrent-ruby (1.3.4)
@@ -100,7 +100,7 @@ GEM
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
- psych (5.1.2)
+ psych (5.2.0)
stringio
racc (1.8.1)
rack (3.1.8)
@@ -117,9 +117,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.2)
- actionpack (= 7.2.2)
- activesupport (= 7.2.2)
+ railties (8.0.0)
+ actionpack (= 8.0.0)
+ activesupport (= 8.0.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -128,10 +128,10 @@ GEM
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
- reline (0.5.10)
+ reline (0.5.11)
io-console (~> 0.5)
- securerandom (0.3.1)
- stringio (3.1.1)
+ securerandom (0.3.2)
+ stringio (3.1.2)
tailwindcss-ruby (3.4.14)
tailwindcss-ruby (3.4.14-aarch64-linux)
tailwindcss-ruby (3.4.14-arm-linux)
@@ -142,6 +142,7 @@ GEM
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
+ uri (1.0.1)
useragent (0.16.10)
zeitwerk (2.7.1)
From bb3280a9204757600e29e1c9c722dd57b12b4393 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 1 Oct 2024 19:21:06 -0400
Subject: [PATCH 098/204] Revert "Make copies of the auth templates for Rails 8
beta1"
This reverts commit 9dee33a64db4323414bab5910f379b38fb8b0d47.
---
.../templates/views/passwords/edit.html.erb | 21 -------------
.../templates/views/passwords/new.html.erb | 17 ----------
.../templates/views/sessions/new.html.erb | 31 -------------------
3 files changed, 69 deletions(-)
delete mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
delete mode 100644 lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
delete mode 100644 lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
deleted file mode 100644
index 939b0b8d..00000000
--- a/lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-
- <%% if alert = flash[:alert] %>
-
<%%= alert %>
- <%% end %>
-
-
Update your password
-
- <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
-
- <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
-
-
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
-
-
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
-
- <%% end %>
-
diff --git a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
deleted file mode 100644
index e5d88197..00000000
--- a/lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-
- <%% if alert = flash[:alert] %>
-
<%%= alert %>
- <%% end %>
-
-
Forgot your password?
-
- <%%= form_with url: passwords_path, class: "contents" do |form| %>
-
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
-
-
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
-
- <%% end %>
-
diff --git a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
deleted file mode 100644
index a4751541..00000000
--- a/lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
+++ /dev/null
@@ -1,31 +0,0 @@
-
- <%% if alert = flash[:alert] %>
-
<%%= alert %>
- <%% end %>
-
- <%% if notice = flash[:notice] %>
-
<%%= notice %>
- <%% end %>
-
-
Sign in
-
- <%%= form_with url: session_url, class: "contents" do |form| %>
-
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
-
-
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-
-
-
-
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
-
-
-
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
-
-
- <%% end %>
-
From cfa33d9124c8add17ea3ba8a8783be798ae68c43 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 15 Nov 2024 10:35:30 -0500
Subject: [PATCH 099/204] ci: bump upstream matrix to include 8-0-stable
---
.github/workflows/upstream.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 17e02892..5c213e6e 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -41,7 +41,7 @@ jobs:
fail-fast: false
matrix:
plat: ["ubuntu"]
- ref: ["7-2-stable", "v8.0.0.beta1", "main"]
+ ref: ["7-2-stable", "8-0-stable", "main"]
tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
env:
RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }}
From 304dd879d80d9d21c42b1a49cee02a4f567f43c1 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 18 Nov 2024 15:04:14 +0000
Subject: [PATCH 100/204] build(deps): bump tailwindcss-ruby from 3.4.14 to
3.4.15
Bumps [tailwindcss-ruby](https://github.com/flavorjones/tailwindcss-ruby) from 3.4.14 to 3.4.15.
- [Release notes](https://github.com/flavorjones/tailwindcss-ruby/releases)
- [Changelog](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/tailwindcss-ruby/compare/v3.4.14...v3.4.15)
---
updated-dependencies:
- dependency-name: tailwindcss-ruby
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 7b8965d9..29f197f9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -132,12 +132,12 @@ GEM
io-console (~> 0.5)
securerandom (0.3.2)
stringio (3.1.2)
- tailwindcss-ruby (3.4.14)
- tailwindcss-ruby (3.4.14-aarch64-linux)
- tailwindcss-ruby (3.4.14-arm-linux)
- tailwindcss-ruby (3.4.14-arm64-darwin)
- tailwindcss-ruby (3.4.14-x86_64-darwin)
- tailwindcss-ruby (3.4.14-x86_64-linux)
+ tailwindcss-ruby (3.4.15)
+ tailwindcss-ruby (3.4.15-aarch64-linux)
+ tailwindcss-ruby (3.4.15-arm-linux)
+ tailwindcss-ruby (3.4.15-arm64-darwin)
+ tailwindcss-ruby (3.4.15-x86_64-darwin)
+ tailwindcss-ruby (3.4.15-x86_64-linux)
thor (1.3.2)
timeout (0.4.1)
tzinfo (2.0.6)
From d4afb9d20bf19ec8386fbfe950643171e93e6002 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 3 Dec 2024 09:15:03 -0500
Subject: [PATCH 101/204] dev: bundle update
---
Gemfile.lock | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 29f197f9..604d7041 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -54,7 +54,7 @@ GEM
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
- date (3.3.4)
+ date (3.4.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
@@ -64,11 +64,11 @@ GEM
activesupport (>= 6.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
- io-console (0.7.2)
+ io-console (0.8.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
- logger (1.6.1)
+ logger (1.6.2)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -78,8 +78,8 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- minitest (5.25.1)
- net-imap (0.5.0)
+ minitest (5.25.2)
+ net-imap (0.5.1)
date
net-protocol
net-pop (0.1.2)
@@ -88,19 +88,20 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.7-aarch64-linux)
+ nokogiri (1.16.8-aarch64-linux)
racc (~> 1.4)
- nokogiri (1.16.7-arm-linux)
+ nokogiri (1.16.8-arm-linux)
racc (~> 1.4)
- nokogiri (1.16.7-arm64-darwin)
+ nokogiri (1.16.8-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.7-x86-linux)
+ nokogiri (1.16.8-x86-linux)
racc (~> 1.4)
- nokogiri (1.16.7-x86_64-darwin)
+ nokogiri (1.16.8-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.7-x86_64-linux)
+ nokogiri (1.16.8-x86_64-linux)
racc (~> 1.4)
- psych (5.2.0)
+ psych (5.2.1)
+ date
stringio
racc (1.8.1)
rack (3.1.8)
@@ -108,15 +109,15 @@ GEM
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
- rackup (2.2.0)
+ rackup (2.2.1)
rack (>= 3)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
- rails-html-sanitizer (1.6.0)
+ rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
- nokogiri (~> 1.14)
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (8.0.0)
actionpack (= 8.0.0)
activesupport (= 8.0.0)
@@ -126,11 +127,11 @@ GEM
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
- rdoc (6.7.0)
+ rdoc (6.8.1)
psych (>= 4.0.0)
- reline (0.5.11)
+ reline (0.5.12)
io-console (~> 0.5)
- securerandom (0.3.2)
+ securerandom (0.4.0)
stringio (3.1.2)
tailwindcss-ruby (3.4.15)
tailwindcss-ruby (3.4.15-aarch64-linux)
@@ -139,10 +140,10 @@ GEM
tailwindcss-ruby (3.4.15-x86_64-darwin)
tailwindcss-ruby (3.4.15-x86_64-linux)
thor (1.3.2)
- timeout (0.4.1)
+ timeout (0.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- uri (1.0.1)
+ uri (1.0.2)
useragent (0.16.10)
zeitwerk (2.7.1)
@@ -160,4 +161,4 @@ DEPENDENCIES
tailwindcss-rails!
BUNDLED WITH
- 2.5.20
+ 2.5.23
From e358ae13ecc2c1419bbe5e2096c5ee0109d5d9fa Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Dec 2024 14:41:45 +0000
Subject: [PATCH 102/204] build(deps): bump tailwindcss-ruby from 3.4.15 to
3.4.16
Bumps [tailwindcss-ruby](https://github.com/flavorjones/tailwindcss-ruby) from 3.4.15 to 3.4.16.
- [Release notes](https://github.com/flavorjones/tailwindcss-ruby/releases)
- [Changelog](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/tailwindcss-ruby/compare/v3.4.15...v3.4.16)
---
updated-dependencies:
- dependency-name: tailwindcss-ruby
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 604d7041..1675ef60 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -133,12 +133,12 @@ GEM
io-console (~> 0.5)
securerandom (0.4.0)
stringio (3.1.2)
- tailwindcss-ruby (3.4.15)
- tailwindcss-ruby (3.4.15-aarch64-linux)
- tailwindcss-ruby (3.4.15-arm-linux)
- tailwindcss-ruby (3.4.15-arm64-darwin)
- tailwindcss-ruby (3.4.15-x86_64-darwin)
- tailwindcss-ruby (3.4.15-x86_64-linux)
+ tailwindcss-ruby (3.4.16)
+ tailwindcss-ruby (3.4.16-aarch64-linux)
+ tailwindcss-ruby (3.4.16-arm-linux)
+ tailwindcss-ruby (3.4.16-arm64-darwin)
+ tailwindcss-ruby (3.4.16-x86_64-darwin)
+ tailwindcss-ruby (3.4.16-x86_64-linux)
thor (1.3.2)
timeout (0.4.2)
tzinfo (2.0.6)
From 2936d40fc8c90c10b800155b0c355c9ea2c9cedc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:32:27 +0000
Subject: [PATCH 103/204] build(deps): bump railties from 8.0.0 to 8.0.1
Bumps [railties](https://github.com/rails/rails) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.0.1/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v8.0.0...v8.0.1)
---
updated-dependencies:
- dependency-name: railties
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 58 ++++++++++++++++++++++++++--------------------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 1675ef60..980cc42a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,16 +8,16 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (8.0.0)
- actionpack (= 8.0.0)
- actionview (= 8.0.0)
- activejob (= 8.0.0)
- activesupport (= 8.0.0)
+ actionmailer (8.0.1)
+ actionpack (= 8.0.1)
+ actionview (= 8.0.1)
+ activejob (= 8.0.1)
+ activesupport (= 8.0.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (8.0.0)
- actionview (= 8.0.0)
- activesupport (= 8.0.0)
+ actionpack (8.0.1)
+ actionview (= 8.0.1)
+ activesupport (= 8.0.1)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
@@ -25,16 +25,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actionview (8.0.0)
- activesupport (= 8.0.0)
+ actionview (8.0.1)
+ activesupport (= 8.0.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (8.0.0)
- activesupport (= 8.0.0)
+ activejob (8.0.1)
+ activesupport (= 8.0.1)
globalid (>= 0.3.6)
- activesupport (8.0.0)
+ activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
@@ -65,10 +65,10 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
- irb (1.14.1)
+ irb (1.14.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
- logger (1.6.2)
+ logger (1.6.3)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -78,7 +78,7 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- minitest (5.25.2)
+ minitest (5.25.4)
net-imap (0.5.1)
date
net-protocol
@@ -88,17 +88,17 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nokogiri (1.16.8-aarch64-linux)
+ nokogiri (1.17.2-aarch64-linux)
racc (~> 1.4)
- nokogiri (1.16.8-arm-linux)
+ nokogiri (1.17.2-arm-linux)
racc (~> 1.4)
- nokogiri (1.16.8-arm64-darwin)
+ nokogiri (1.17.2-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.8-x86-linux)
+ nokogiri (1.17.2-x86-linux)
racc (~> 1.4)
- nokogiri (1.16.8-x86_64-darwin)
+ nokogiri (1.17.2-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.8-x86_64-linux)
+ nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
psych (5.2.1)
date
@@ -115,23 +115,23 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
- rails-html-sanitizer (1.6.1)
+ rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
- railties (8.0.0)
- actionpack (= 8.0.0)
- activesupport (= 8.0.0)
+ railties (8.0.1)
+ actionpack (= 8.0.1)
+ activesupport (= 8.0.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
- rdoc (6.8.1)
+ rdoc (6.9.1)
psych (>= 4.0.0)
reline (0.5.12)
io-console (~> 0.5)
- securerandom (0.4.0)
+ securerandom (0.4.1)
stringio (3.1.2)
tailwindcss-ruby (3.4.16)
tailwindcss-ruby (3.4.16-aarch64-linux)
@@ -144,7 +144,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.2)
- useragent (0.16.10)
+ useragent (0.16.11)
zeitwerk (2.7.1)
PLATFORMS
From fcc31c15400e7a85fa436824aa88c97a1fe00ad1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 18 Dec 2024 19:10:28 -0500
Subject: [PATCH 104/204] Drop default plugins form, typography, and
container-queries
taking care to fix up the form styling.
---
.../templates/app/views/passwords/edit.html.erb | 4 ++--
.../templates/app/views/passwords/new.html.erb | 2 +-
.../templates/app/views/sessions/new.html.erb | 4 ++--
.../tailwindcss/scaffold/templates/_form.html.erb.tt | 12 ++++++------
lib/install/tailwind.config.js | 6 +++---
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
index 939b0b8d..4ea2c812 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
@@ -7,11 +7,11 @@
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
- <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
index e5d88197..2e7b1e9d 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
@@ -7,7 +7,7 @@
<%%= form_with url: passwords_path, class: "contents" do |form| %>
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
index a4751541..5176bc89 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
@@ -11,11 +11,11 @@
<%%= form_with url: session_url, class: "contents" do |form| %>
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index 487f2f5f..c76993bf 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -15,23 +15,23 @@
<% if attribute.password_digest? -%>
<%%= form.label :password %>
- <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<%%= form.label :password_confirmation %>
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 mt-2 h-5 w-5" %>
<% else -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<% end -%>
<% end -%>
diff --git a/lib/install/tailwind.config.js b/lib/install/tailwind.config.js
index d6ad82c0..c3deef14 100644
--- a/lib/install/tailwind.config.js
+++ b/lib/install/tailwind.config.js
@@ -15,8 +15,8 @@ module.exports = {
},
},
plugins: [
- require('@tailwindcss/forms'),
- require('@tailwindcss/typography'),
- require('@tailwindcss/container-queries'),
+ // require('@tailwindcss/forms'),
+ // require('@tailwindcss/typography'),
+ // require('@tailwindcss/container-queries'),
]
}
From a4015e8c9b504e2861b6d2fbad3512df80f910ad Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Dec 2024 14:27:07 +0000
Subject: [PATCH 105/204] build(deps): bump debug from 1.9.2 to 1.10.0
Bumps [debug](https://github.com/ruby/debug) from 1.9.2 to 1.10.0.
- [Release notes](https://github.com/ruby/debug/releases)
- [Commits](https://github.com/ruby/debug/compare/v1.9.2...v1.10.0)
---
updated-dependencies:
- dependency-name: debug
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 980cc42a..7cf2130c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -55,7 +55,7 @@ GEM
connection_pool (2.4.1)
crass (1.0.6)
date (3.4.1)
- debug (1.9.2)
+ debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
@@ -65,7 +65,7 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
- irb (1.14.2)
+ irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.3)
@@ -100,7 +100,7 @@ GEM
racc (~> 1.4)
nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
- psych (5.2.1)
+ psych (5.2.2)
date
stringio
racc (1.8.1)
@@ -127,9 +127,9 @@ GEM
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
- rdoc (6.9.1)
+ rdoc (6.10.0)
psych (>= 4.0.0)
- reline (0.5.12)
+ reline (0.6.0)
io-console (~> 0.5)
securerandom (0.4.1)
stringio (3.1.2)
From dfd566f81e5a3831b5cde59f3d355d06043aa825 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Dec 2024 14:27:14 +0000
Subject: [PATCH 106/204] build(deps): bump tailwindcss-ruby from 3.4.16 to
3.4.17
Bumps [tailwindcss-ruby](https://github.com/flavorjones/tailwindcss-ruby) from 3.4.16 to 3.4.17.
- [Release notes](https://github.com/flavorjones/tailwindcss-ruby/releases)
- [Changelog](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/tailwindcss-ruby/compare/v3.4.16...v3.4.17)
---
updated-dependencies:
- dependency-name: tailwindcss-ruby
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 980cc42a..de04cbaa 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -133,12 +133,12 @@ GEM
io-console (~> 0.5)
securerandom (0.4.1)
stringio (3.1.2)
- tailwindcss-ruby (3.4.16)
- tailwindcss-ruby (3.4.16-aarch64-linux)
- tailwindcss-ruby (3.4.16-arm-linux)
- tailwindcss-ruby (3.4.16-arm64-darwin)
- tailwindcss-ruby (3.4.16-x86_64-darwin)
- tailwindcss-ruby (3.4.16-x86_64-linux)
+ tailwindcss-ruby (3.4.17)
+ tailwindcss-ruby (3.4.17-aarch64-linux)
+ tailwindcss-ruby (3.4.17-arm-linux)
+ tailwindcss-ruby (3.4.17-arm64-darwin)
+ tailwindcss-ruby (3.4.17-x86_64-darwin)
+ tailwindcss-ruby (3.4.17-x86_64-linux)
thor (1.3.2)
timeout (0.4.2)
tzinfo (2.0.6)
From 21e8963397502be5b53d0528751e0020c7538cb1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 29 Dec 2024 14:01:12 -0500
Subject: [PATCH 107/204] version bump to v3.1.0
---
CHANGELOG.md | 9 ++++++++-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55d2ec04..3e7a5a36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
## next / unreleased
-## v3.0.0
+## v3.1.0 / 2024-12-29
+
+### Notable changes
+
+The tailwindcss plugins "form", "typography", and "container-queries" have been dropped from the default generated `tailwind.config.js` file. If you'd like to use them, you can re-add them to your project by uncommenting the appropriate lines in your config file. (#446) @flavorjones
+
+
+## v3.0.0 / 2024-10-15
### Notable changes
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 2bc244fc..e13fdb74 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "3.0.0"
+ VERSION = "3.1.0"
end
From af38df9105058f4ccc956beec94011cbf3090302 Mon Sep 17 00:00:00 2001
From: Patricio Mac Adden
Date: Fri, 10 Jan 2025 11:34:02 -0300
Subject: [PATCH 108/204] Improve scaffold views
---
Gemfile.lock | 2 +-
.../app/views/passwords/edit.html.erb | 2 +-
.../app/views/passwords/new.html.erb | 2 +-
.../templates/app/views/sessions/new.html.erb | 4 +--
.../scaffold/templates/_form.html.erb.tt | 22 +++++++--------
.../scaffold/templates/edit.html.erb.tt | 8 ++++--
.../scaffold/templates/index.html.erb.tt | 22 +++++++++------
.../scaffold/templates/new.html.erb.tt | 6 ++--
.../scaffold/templates/partial.html.erb.tt | 1 -
.../scaffold/templates/show.html.erb.tt | 28 ++++++++++---------
10 files changed, 53 insertions(+), 44 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 32cb5b53..7e1c0c73 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (3.0.0)
+ tailwindcss-rails (3.1.0)
railties (>= 7.0.0)
tailwindcss-ruby
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
index 4ea2c812..707bbe5c 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
@@ -15,7 +15,7 @@
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+ <%%= form.submit "Save", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
<%% end %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
index 2e7b1e9d..72c434de 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
@@ -11,7 +11,7 @@
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+ <%%= form.submit "Email reset instructions", class: "rounded-lg px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
<%% end %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
index 5176bc89..92d64b79 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
@@ -20,11 +20,11 @@
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+ <%%= form.submit "Sign in", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline hover:no-underline" %>
<%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index c76993bf..93490a15 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -1,9 +1,9 @@
<%%= form_with(model: <%= model_resource_name %>, class: "contents") do |form| %>
<%% if <%= singular_table_name %>.errors.any? %>
-
+
<%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:
-
-
+
<%%= form.label :password_confirmation %>
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 mt-2 h-5 w-5" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% else -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% end -%>
<% end -%>
<% end -%>
- <%%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+ <%%= form.submit class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
<%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
index fab779d1..74edd3de 100644
--- a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
@@ -1,8 +1,10 @@
-
+<%% content_for :title, "Editing <%= human_name.downcase %>" %>
+
+
Editing <%= human_name.downcase %>
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
index 65cf06b5..3d337f95 100644
--- a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
@@ -1,21 +1,25 @@
+<%% content_for :title, "<%= human_name.pluralize %>" %>
+
<%% if notice.present? %>
-
<%%= notice %>
+
<%%= notice %>
<%% end %>
- <%% content_for :title, "<%= human_name.pluralize %>" %>
-
<%= human_name.pluralize %>
- <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
+ <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
- <%%= render <%= singular_table_name %> %>
-
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
-
+ <%% if @<%= plural_table_name %>.any? %>
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
+ <%%= render <%= singular_table_name %> %>
+
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
+
+ <%% end %>
+ <%% else %>
+
No <%= human_name.downcase.pluralize %> found.
<%% end %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
index 665532e5..0a10d967 100644
--- a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
@@ -1,7 +1,9 @@
-
+<%% content_for :title, "New <%= human_name.downcase %>" %>
+
+
New <%= human_name.downcase %>
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
index e1a45470..88dc3eda 100644
--- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
@@ -12,6 +12,5 @@
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
<% end -%>
-
<% end -%>
diff --git a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
index 17d0febf..3a49e9a0 100644
--- a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt
@@ -1,15 +1,17 @@
-
-
- <%% if notice.present? %>
-
<%%= notice %>
- <%% end %>
-
- <%%= render @<%= singular_table_name %> %>
-
- <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
-
- <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
-
+<%% content_for :title, "Showing <%= human_name.downcase %>" %>
+
+
+ <%% if notice.present? %>
+
<%%= notice %>
+ <%% end %>
+
+
Showing <%= human_name.downcase %>
+
+ <%%= render @<%= singular_table_name %> %>
+
+ <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
+
+ <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium" %>
From 82aae1ac72e63d8898bd40fc1413658a5c362561 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 10 Jan 2025 12:05:18 -0500
Subject: [PATCH 109/204] dev: bundle update
---
Gemfile.lock | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 7e1c0c73..abbf5f76 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -49,17 +49,17 @@ GEM
uri (>= 0.13.1)
base64 (0.2.0)
benchmark (0.4.0)
- bigdecimal (3.1.8)
+ bigdecimal (3.1.9)
builder (3.3.0)
concurrent-ruby (1.3.4)
- connection_pool (2.4.1)
+ connection_pool (2.5.0)
crass (1.0.6)
date (3.4.1)
debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
- erubi (1.13.0)
+ erubi (1.13.1)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.6)
@@ -68,8 +68,8 @@ GEM
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
- logger (1.6.3)
- loofah (2.23.1)
+ logger (1.6.5)
+ loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -78,8 +78,9 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
+ mini_portile2 (2.8.8)
minitest (5.25.4)
- net-imap (0.5.1)
+ net-imap (0.5.5)
date
net-protocol
net-pop (0.1.2)
@@ -87,27 +88,28 @@ GEM
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
- net-protocol
- nokogiri (1.17.2-aarch64-linux)
+ nokogiri (1.18.1)
+ mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.17.2-arm-linux)
+ nokogiri (1.18.1-aarch64-linux-gnu)
racc (~> 1.4)
- nokogiri (1.17.2-arm64-darwin)
+ nokogiri (1.18.1-arm-linux-gnu)
racc (~> 1.4)
- nokogiri (1.17.2-x86-linux)
+ nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.17.2-x86_64-darwin)
+ nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.17.2-x86_64-linux)
+ nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
psych (5.2.2)
date
stringio
racc (1.8.1)
rack (3.1.8)
- rack-session (2.0.0)
+ rack-session (2.1.0)
+ base64 (>= 0.1.0)
rack (>= 3.0.0)
- rack-test (2.1.0)
+ rack-test (2.2.0)
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
@@ -140,7 +142,7 @@ GEM
tailwindcss-ruby (3.4.17-x86_64-darwin)
tailwindcss-ruby (3.4.17-x86_64-linux)
thor (1.3.2)
- timeout (0.4.2)
+ timeout (0.4.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.2)
From 4e6f3cb25108b8764709429d2d1e91c0c2cda3f1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 10 Jan 2025 12:05:29 -0500
Subject: [PATCH 110/204] ci: test with ruby 3.4
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 56e245b3..3889c27c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- ruby: ["3.1", "3.2", "3.3", "head"]
+ ruby: ["3.1", "3.2", "3.3", "3.4", "head"]
steps:
- uses: actions/checkout@v4
- run: rm Gemfile.lock
@@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.2"
+ ruby-version: "3.4"
bundler: latest
- run: test/integration/user_journey_test.sh
shell: bash
From 32d4da0920d1f279e1d834ee0524049641ba15ce Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 10 Jan 2025 12:18:49 -0500
Subject: [PATCH 111/204] doc: update README with caveats about postcss
Co-authored-by: Andre Meij
---
README.md | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2887ab3f..60b2f27e 100644
--- a/README.md
+++ b/README.md
@@ -151,7 +151,7 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
### Using with PostCSS
-If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and it will be loaded automatically.
+If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and that file will be loaded by tailwind automatically.
For example, to enable nesting:
@@ -167,6 +167,25 @@ module.exports = {
}
```
+⚠ Note that PostCSS is a javascript tool with its own prerequisites! By default `tailwindcss-rails` does not require any javascript tooling, so in order to use PostCSS, a `package.json` with dependencies for your plugins and a package manager like `yarn` or `npm` is required, for example:
+
+```json
+// package.json
+{
+ "name": "my app",
+ "private": true,
+ "dependencies": {
+ "postcss-advanced-variables": "^4.0.0",
+ "postcss-import": "^16.0.1",
+ "postcss-mixins": "^9.0.4",
+ "tailwindcss": "^3.4.1"
+ }
+}
+```
+
+Then you can use yarn or npm to install the dependencies.
+
+
### Custom inputs or outputs
If you need to use a custom input or output file, you can run `bundle exec tailwindcss` to access the platform-specific executable, and give it your own build options.
From b128001b4135f760e81b7cd6489583dc6d7908cf Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 10 Jan 2025 12:20:20 -0500
Subject: [PATCH 112/204] version bump to v3.2.0
---
CHANGELOG.md | 5 +++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3e7a5a36..7f07f0c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
## next / unreleased
+## v3.2.0 / 2025-01-10
+
+* Improve the scaffold views by making positions, padding, and sizes more consistent, add titles to all pages, add hover states and semantic colors to buttons and links, and change border and focus colors on fields with errors. (#452) @patriciomacadden
+
+
## v3.1.0 / 2024-12-29
### Notable changes
diff --git a/Gemfile.lock b/Gemfile.lock
index abbf5f76..8c603c6d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (3.1.0)
+ tailwindcss-rails (3.2.0)
railties (>= 7.0.0)
tailwindcss-ruby
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index e13fdb74..9e5b6e3d 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "3.1.0"
+ VERSION = "3.2.0"
end
From ca7812a355320e08c63c04c1a0a5cc97a0528783 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 Jan 2025 14:45:08 -0500
Subject: [PATCH 113/204] feat: support running the puma plugin in a bare puma
process
that is, not in `rails server`.
Closes #458
---
CHANGELOG.md | 5 +++++
README.md | 2 +-
lib/puma/plugin/tailwindcss.rb | 8 ++++++--
lib/tailwindcss/commands.rb | 10 ++++++----
4 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7f07f0c4..00a78f83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
## next / unreleased
+## v3.3.0 / unreleased
+
+* Add support for running the puma plugin outside of `rails server`. (#458) @flavorjones
+
+
## v3.2.0 / 2025-01-10
* Improve the scaffold views by making positions, padding, and sizes more consistent, add titles to all pages, add hover states and semantic colors to buttons and links, and change border and focus colors on fields with errors. (#452) @patriciomacadden
diff --git a/README.md b/README.md
index 60b2f27e..e81a5474 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ This gem ships with a Puma plugin. To use it, add this line to your `puma.rb` co
plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
```
-and then running `rails server` will run the Tailwind watch process in the background
+and then running `rails server` (or just `puma`) will run the Tailwind watch process in the background.
#### Run `rails tailwindcss:watch`
diff --git a/lib/puma/plugin/tailwindcss.rb b/lib/puma/plugin/tailwindcss.rb
index e614d62a..4624d7e8 100644
--- a/lib/puma/plugin/tailwindcss.rb
+++ b/lib/puma/plugin/tailwindcss.rb
@@ -1,4 +1,5 @@
require "puma/plugin"
+require "tailwindcss/commands"
Puma::Plugin.create do
attr_reader :puma_pid, :tailwind_pid, :log_writer
@@ -11,8 +12,11 @@ def start(launcher)
# Using IO.popen(command, 'r+') will avoid watch_command read from $stdin.
# If we use system(*command) instead, IRB and Debug can't read from $stdin
# correctly bacause some keystrokes will be taken by watch_command.
- IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
- IO.copy_stream(io, $stdout)
+ begin
+ IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
+ IO.copy_stream(io, $stdout)
+ end
+ rescue Interrupt
end
end
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 26c5178a..40d983a6 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -4,16 +4,18 @@ module Tailwindcss
module Commands
class << self
def compile_command(debug: false, **kwargs)
+ rails_root = defined?(Rails) ? Rails.root : Pathname.new(Dir.pwd)
+
command = [
Tailwindcss::Ruby.executable(**kwargs),
- "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
- "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
- "-c", Rails.root.join("config/tailwind.config.js").to_s,
+ "-i", rails_root.join("app/assets/stylesheets/application.tailwind.css").to_s,
+ "-o", rails_root.join("app/assets/builds/tailwind.css").to_s,
+ "-c", rails_root.join("config/tailwind.config.js").to_s,
]
command << "--minify" unless (debug || rails_css_compressor?)
- postcss_path = Rails.root.join("config/postcss.config.js")
+ postcss_path = rails_root.join("config/postcss.config.js")
command += ["--postcss", postcss_path.to_s] if File.exist?(postcss_path)
command
From 968ba5c1d6aa6ac4f91dd7d6f350b0d95fcaf4db Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 Jan 2025 15:11:00 -0500
Subject: [PATCH 114/204] version bump to v3.3.0
---
CHANGELOG.md | 4 ++--
lib/tailwindcss/version.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00a78f83..39f9bc25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
## next / unreleased
-## v3.3.0 / unreleased
+## v3.3.0 / 2025-01-19
-* Add support for running the puma plugin outside of `rails server`. (#458) @flavorjones
+* Add support for using the puma plugin in a standalone puma process (outside of `rails server`). (#458) @flavorjones
## v3.2.0 / 2025-01-10
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 9e5b6e3d..5c301936 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "3.2.0"
+ VERSION = "3.3.0"
end
From 4196564a4f77546a654828166195b6f7ed05991d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 Jan 2025 15:13:45 -0500
Subject: [PATCH 115/204] dep: update gemfile.lock
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 8c603c6d..42142bf2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (3.2.0)
+ tailwindcss-rails (3.3.0)
railties (>= 7.0.0)
tailwindcss-ruby
From 573855951ca13ebf5348372858ae0505b8a4f2cb Mon Sep 17 00:00:00 2001
From: Patricio Mac Adden
Date: Mon, 20 Jan 2025 12:14:05 -0300
Subject: [PATCH 116/204] improve partial: correct use of tags + attachment
links styling
---
.../tailwindcss/scaffold/templates/partial.html.erb.tt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
index 88dc3eda..ed89fc34 100644
--- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
@@ -1,16 +1,16 @@
-
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
-
+
<%= attribute.human_name %>:
<% if attribute.attachment? -%>
- <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
+ <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %>, class: "text-gray-700 underline hover:no-underline" if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
<% elsif attribute.attachments? -%>
<%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
-
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %>
+
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %>, class: "text-gray-700 underline hover:no-underline" %>
<%% end %>
<% else -%>
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
<% end -%>
-
+
<% end -%>
From 731d5c42e018215d70461012b60bbcdf29f0fd2c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 21 Jan 2025 12:29:35 -0500
Subject: [PATCH 117/204] dev: bundle update
---
Gemfile.lock | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 42142bf2..cd3b9354 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -51,7 +51,7 @@ GEM
benchmark (0.4.0)
bigdecimal (3.1.9)
builder (3.3.0)
- concurrent-ruby (1.3.4)
+ concurrent-ruby (1.3.5)
connection_pool (2.5.0)
crass (1.0.6)
date (3.4.1)
@@ -62,10 +62,11 @@ GEM
erubi (1.13.1)
globalid (1.2.1)
activesupport (>= 6.1)
- i18n (1.14.6)
+ i18n (1.14.7)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
- irb (1.14.3)
+ irb (1.15.0)
+ pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.5)
@@ -88,20 +89,24 @@ GEM
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
- nokogiri (1.18.1)
+ net-protocol
+ nokogiri (1.18.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.18.1-aarch64-linux-gnu)
+ nokogiri (1.18.2-aarch64-linux-gnu)
racc (~> 1.4)
- nokogiri (1.18.1-arm-linux-gnu)
+ nokogiri (1.18.2-arm-linux-gnu)
racc (~> 1.4)
- nokogiri (1.18.1-arm64-darwin)
+ nokogiri (1.18.2-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.18.1-x86_64-darwin)
+ nokogiri (1.18.2-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.18.1-x86_64-linux-gnu)
+ nokogiri (1.18.2-x86_64-linux-gnu)
racc (~> 1.4)
- psych (5.2.2)
+ pp (0.6.2)
+ prettyprint
+ prettyprint (0.2.0)
+ psych (5.2.3)
date
stringio
racc (1.8.1)
@@ -129,7 +134,7 @@ GEM
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
- rdoc (6.10.0)
+ rdoc (6.11.0)
psych (>= 4.0.0)
reline (0.6.0)
io-console (~> 0.5)
From 2895fc97a87ed7b45bb7bf61664ba8ab9cab167a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 09:19:08 -0500
Subject: [PATCH 118/204] dep: bump tailwindcss-ruby to ~> 4.0
---
.github/workflows/ci.yml | 3 ---
.github/workflows/upstream.yml | 2 --
Gemfile.lock | 13 ++++++-------
tailwindcss-rails.gemspec | 2 +-
test/integration/user_journey_test.sh | 1 -
5 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3889c27c..07fb8285 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,10 +37,7 @@ jobs:
fail-fast: false
matrix:
plat: ["ubuntu", "windows", "macos"]
- tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
runs-on: ${{matrix.plat}}-latest
- env:
- TAILWINDCSSOPTS: ${{ matrix.tailwind }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 5c213e6e..e491a957 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -42,10 +42,8 @@ jobs:
matrix:
plat: ["ubuntu"]
ref: ["7-2-stable", "8-0-stable", "main"]
- tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"]
env:
RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }}
- TAILWINDCSSOPTS: ${{ matrix.tailwind }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
diff --git a/Gemfile.lock b/Gemfile.lock
index cd3b9354..c671e3a8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -3,7 +3,7 @@ PATH
specs:
tailwindcss-rails (3.3.0)
railties (>= 7.0.0)
- tailwindcss-ruby
+ tailwindcss-ruby (~> 4.0)
GEM
remote: https://rubygems.org/
@@ -140,12 +140,11 @@ GEM
io-console (~> 0.5)
securerandom (0.4.1)
stringio (3.1.2)
- tailwindcss-ruby (3.4.17)
- tailwindcss-ruby (3.4.17-aarch64-linux)
- tailwindcss-ruby (3.4.17-arm-linux)
- tailwindcss-ruby (3.4.17-arm64-darwin)
- tailwindcss-ruby (3.4.17-x86_64-darwin)
- tailwindcss-ruby (3.4.17-x86_64-linux)
+ tailwindcss-ruby (4.0.0)
+ tailwindcss-ruby (4.0.0-aarch64-linux-gnu)
+ tailwindcss-ruby (4.0.0-arm64-darwin)
+ tailwindcss-ruby (4.0.0-x86_64-darwin)
+ tailwindcss-ruby (4.0.0-x86_64-linux-gnu)
thor (1.3.2)
timeout (0.4.3)
tzinfo (2.0.6)
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 8d893029..0b31c4a8 100644
--- a/tailwindcss-rails.gemspec
+++ b/tailwindcss-rails.gemspec
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
spec.files = Dir["{app,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
spec.add_dependency "railties", ">= 7.0.0"
- spec.add_dependency "tailwindcss-ruby"
+ spec.add_dependency "tailwindcss-ruby", "~> 4.0"
end
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 14f4597a..b8f6d961 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -27,7 +27,6 @@ bundle add rails --skip-install ${RAILSOPTS:-}
# use the tailwindcss-rails under test
bundle add tailwindcss-rails --skip-install --path="../.."
-bundle add tailwindcss-ruby --skip-install ${TAILWINDCSSOPTS:-}
bundle install
bundle show --paths
bundle binstubs --all
From 768594ad954c41d844c534d90507aca4b6a6dc00 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 10:04:59 -0500
Subject: [PATCH 119/204] Remove tailwind.config.js from the generator
Tailwind v4 doesn't need a config file.
---
README.md | 6 +-----
lib/install/application.tailwind.css | 14 +-------------
lib/install/tailwind.config.js | 22 ----------------------
lib/install/tailwindcss.rb | 5 -----
lib/tailwindcss/commands.rb | 1 -
test/integration/user_journey_test.sh | 21 +++++----------------
test/lib/tailwindcss/commands_test.rb | 1 -
7 files changed, 7 insertions(+), 63 deletions(-)
delete mode 100644 lib/install/tailwind.config.js
diff --git a/README.md b/README.md
index e81a5474..5b2d11c6 100644
--- a/README.md
+++ b/README.md
@@ -59,13 +59,9 @@ You can also use a local (npm-based) installation if you prefer, please go to ht
### Configuration and commands
-#### Configuration file: `config/tailwind.config.js`
-
-You can customize the Tailwind build through the `config/tailwind.config.js` file, just like you would if Tailwind was running in a traditional node installation. All the first-party plugins are supported.
-
#### Input file: `app/assets/stylesheets/application.tailwind.css`
-The installer will generate a Tailwind input file in `app/assets/stylesheets/application.tailwind.css`. This is where you import the plugins you want to use, and where you can setup your custom `@apply` rules.
+The installer will generate a Tailwind input file in `app/assets/stylesheets/application.tailwind.css`. This is where you import the plugins you want to use and where you can setup your custom `@apply` rules.
#### Output file: `app/assets/builds/tailwind.css`
diff --git a/lib/install/application.tailwind.css b/lib/install/application.tailwind.css
index 8666d2f3..f1d8c73c 100644
--- a/lib/install/application.tailwind.css
+++ b/lib/install/application.tailwind.css
@@ -1,13 +1 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-/*
-
-@layer components {
- .btn-primary {
- @apply py-2 px-4 bg-blue-200;
- }
-}
-
-*/
+@import "tailwindcss";
diff --git a/lib/install/tailwind.config.js b/lib/install/tailwind.config.js
deleted file mode 100644
index c3deef14..00000000
--- a/lib/install/tailwind.config.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const defaultTheme = require('tailwindcss/defaultTheme')
-
-module.exports = {
- content: [
- './public/*.html',
- './app/helpers/**/*.rb',
- './app/javascript/**/*.js',
- './app/views/**/*.{erb,haml,html,slim}'
- ],
- theme: {
- extend: {
- fontFamily: {
- sans: ['Inter var', ...defaultTheme.fontFamily.sans],
- },
- },
- },
- plugins: [
- // require('@tailwindcss/forms'),
- // require('@tailwindcss/typography'),
- // require('@tailwindcss/container-queries'),
- ]
-}
diff --git a/lib/install/tailwindcss.rb b/lib/install/tailwindcss.rb
index 2c2ba50c..b48cb398 100644
--- a/lib/install/tailwindcss.rb
+++ b/lib/install/tailwindcss.rb
@@ -28,11 +28,6 @@
append_to_file(".gitignore", %(\n/app/assets/builds/*\n!/app/assets/builds/.keep\n))
end
-unless Rails.root.join("config/tailwind.config.js").exist?
- say "Add default config/tailwindcss.config.js"
- copy_file "#{__dir__}/tailwind.config.js", "config/tailwind.config.js"
-end
-
unless Rails.root.join("app/assets/stylesheets/application.tailwind.css").exist?
say "Add default app/assets/stylesheets/application.tailwind.css"
copy_file "#{__dir__}/application.tailwind.css", "app/assets/stylesheets/application.tailwind.css"
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 40d983a6..ce08bb38 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -10,7 +10,6 @@ def compile_command(debug: false, **kwargs)
Tailwindcss::Ruby.executable(**kwargs),
"-i", rails_root.join("app/assets/stylesheets/application.tailwind.css").to_s,
"-o", rails_root.join("app/assets/builds/tailwind.css").to_s,
- "-c", rails_root.join("config/tailwind.config.js").to_s,
]
command << "--minify" unless (debug || rails_css_compressor?)
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index b8f6d961..985b72c4 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -9,7 +9,7 @@ set -eux
rm -f Gemfile.lock
bundle remove actionmailer
bundle add rails --skip-install ${RAILSOPTS:-}
-bundle install
+bundle install --prefer-local
# do our work a directory with spaces in the name (#176, #184)
rm -rf "My Workspace"
@@ -27,16 +27,10 @@ bundle add rails --skip-install ${RAILSOPTS:-}
# use the tailwindcss-rails under test
bundle add tailwindcss-rails --skip-install --path="../.."
-bundle install
+bundle install --prefer-local
bundle show --paths
bundle binstubs --all
-if bundle show | fgrep tailwindcss-ruby | fgrep -q "(4." ; then
- TAILWIND4=1
-else
- TAILWIND4=0
-fi
-
# install tailwindcss
bin/rails tailwindcss:install
@@ -50,12 +44,9 @@ task :still_here do
end
EOF
-if [[ $TAILWIND4 = 1 ]] ; then
- cat > app/assets/stylesheets/application.tailwind.css <> app/assets/stylesheets/application.tailwind.css <
Date: Thu, 23 Jan 2025 10:30:16 -0500
Subject: [PATCH 120/204] Remove remaining traces of the Inter font.
Note: we will need to smooth this out in an upgrade step.
---
README.md | 2 +-
app/assets/stylesheets/inter-font.css | 194 --------------------------
lib/install/tailwindcss.rb | 4 +-
lib/tailwindcss/engine.rb | 4 -
4 files changed, 3 insertions(+), 201 deletions(-)
delete mode 100644 app/assets/stylesheets/inter-font.css
diff --git a/README.md b/README.md
index 5b2d11c6..c80bae4d 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ The installer will generate a Tailwind input file in `app/assets/stylesheets/app
#### Output file: `app/assets/builds/tailwind.css`
-When you run `rails tailwindcss:build`, the input file will be used to generate the output in `app/assets/builds/tailwind.css`. That's the output CSS that you'll include in your app (the installer automatically configures this, alongside the Inter font as well).
+When you run `rails tailwindcss:build`, the input file will be used to generate the output in `app/assets/builds/tailwind.css`. That's the output CSS that you'll include in your app.
#### Commands
diff --git a/app/assets/stylesheets/inter-font.css b/app/assets/stylesheets/inter-font.css
deleted file mode 100644
index ddeabaf5..00000000
--- a/app/assets/stylesheets/inter-font.css
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- *= link_directory ../fonts
- */
-
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.extra.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Italic';
-}
-/* alternates */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.alternates.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Italic';
-}
-/* symbols */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.symbols.var.woff2') format('woff2');
- unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
- font-named-instance: 'Italic';
-}
-
-/* extra */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.extra.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Italic';
-}
-/* alternates */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.alternates.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Italic';
-}
-/* symbols */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.symbols.var.woff2') format('woff2');
- unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
- font-named-instance: 'Italic';
-}
-/* cyrillic */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.cyrillic.var.woff2') format('woff2');
- unicode-range: U+0400-049E,U+04A0-0500,U+052F,U+20B4,U+2116,U+2DFF,U+A69F;
- font-named-instance: 'Italic';
-}
-/* greek */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.greek.var.woff2') format('woff2');
- unicode-range: U+0370-0378,U+037A-0380,U+0384-038B,U+038C,U+038E-03A2,U+03A3-03E2,U+03F0-0400,U+1F00-1F16,U+1F18-1F1E,U+1F20-1F46,U+1F48-1F4E,U+1F50-1F58,U+1F59,U+1F5B,U+1F5D,U+1F5F-1F7E,U+1F80-1FB5,U+1FB6-1FC5,U+1FC6-1FD4,U+1FD6-1FDC,U+1FDD-1FF0,U+1FF2-1FF5,U+1FF6-1FFF;
- font-named-instance: 'Italic';
-}
-/* vietnamese */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.vietnamese.var.woff2') format('woff2');
- unicode-range: U+0102-0104,U+0110-0112,U+0128-012A,U+0168-016A,U+01A0-01A2,U+01AF-01B1,U+1EA0-1EFA,U+20AB;
- font-named-instance: 'Italic';
-}
-/* latin-ext */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.latin-ext.var.woff2') format('woff2');
- unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF;
- font-named-instance: 'Italic';
-}
-/* latin */
-@font-face {
- font-family: 'Inter var';
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-italic.latin.var.woff2') format('woff2');
- unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF;
- font-named-instance: 'Italic';
-}
-/* extra */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.extra.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Regular';
-}
-/* alternates */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.alternates.var.woff2') format('woff2');
- unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
- font-named-instance: 'Regular';
-}
-/* symbols */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.symbols.var.woff2') format('woff2');
- unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
- font-named-instance: 'Regular';
-}
-/* cyrillic */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.cyrillic.var.woff2') format('woff2');
- unicode-range: U+0400-049E,U+04A0-0500,U+052F,U+20B4,U+2116,U+2DFF,U+A69F;
- font-named-instance: 'Regular';
-}
-/* greek */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.greek.var.woff2') format('woff2');
- unicode-range: U+0370-0378,U+037A-0380,U+0384-038B,U+038C,U+038E-03A2,U+03A3-03E2,U+03F0-0400,U+1F00-1F16,U+1F18-1F1E,U+1F20-1F46,U+1F48-1F4E,U+1F50-1F58,U+1F59,U+1F5B,U+1F5D,U+1F5F-1F7E,U+1F80-1FB5,U+1FB6-1FC5,U+1FC6-1FD4,U+1FD6-1FDC,U+1FDD-1FF0,U+1FF2-1FF5,U+1FF6-1FFF;
- font-named-instance: 'Regular';
-}
-/* vietnamese */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.vietnamese.var.woff2') format('woff2');
- unicode-range: U+0102-0104,U+0110-0112,U+0128-012A,U+0168-016A,U+01A0-01A2,U+01AF-01B1,U+1EA0-1EFA,U+20AB;
- font-named-instance: 'Regular';
-}
-/* latin-ext */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.latin-ext.var.woff2') format('woff2');
- unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF;
- font-named-instance: 'Regular';
-}
-/* latin */
-@font-face {
- font-family: 'Inter var';
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url('Inter-roman.latin.var.woff2') format('woff2');
- unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF;
- font-named-instance: 'Regular';
-}
\ No newline at end of file
diff --git a/lib/install/tailwindcss.rb b/lib/install/tailwindcss.rb
index b48cb398..61fe3fac 100644
--- a/lib/install/tailwindcss.rb
+++ b/lib/install/tailwindcss.rb
@@ -4,7 +4,7 @@
if APPLICATION_LAYOUT_PATH.exist?
say "Add Tailwindcss include tags and container element in application layout"
insert_into_file APPLICATION_LAYOUT_PATH.to_s, <<~ERB.indent(4), before: /^\s*<%= stylesheet_link_tag/
- <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
+ <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
ERB
if File.open(APPLICATION_LAYOUT_PATH).read =~ /\n\s*<%= yield %>\n\s*<\/body>/
@@ -13,7 +13,7 @@
end
else
say "Default application.html.erb is missing!", :red
- say %( Add <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> within the tag in your custom layout.)
+ say %( Add <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %> within the tag in your custom layout.)
end
say "Build into app/assets/builds"
diff --git a/lib/tailwindcss/engine.rb b/lib/tailwindcss/engine.rb
index 4b9b9fdc..080416c4 100644
--- a/lib/tailwindcss/engine.rb
+++ b/lib/tailwindcss/engine.rb
@@ -2,10 +2,6 @@
module Tailwindcss
class Engine < ::Rails::Engine
- initializer "tailwindcss.assets" do
- Rails.application.config.assets.precompile += %w( inter-font.css )
- end
-
initializer "tailwindcss.disable_generator_stylesheets" do
Rails.application.config.generators.stylesheets = false
end
From 67a17e007acc608a37bdd21000544a0b114484c3 Mon Sep 17 00:00:00 2001
From: Eric Gusmao
Date: Thu, 23 Jan 2025 12:48:55 -0300
Subject: [PATCH 121/204] Update generators utility classes to tailwind v4
---
.../templates/app/views/passwords/edit.html.erb | 4 ++--
.../templates/app/views/passwords/new.html.erb | 2 +-
.../templates/app/views/sessions/new.html.erb | 4 ++--
.../tailwindcss/scaffold/templates/_form.html.erb.tt | 12 ++++++------
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
index 707bbe5c..5c989810 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
@@ -7,11 +7,11 @@
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
- <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
index 72c434de..e5862200 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
@@ -7,7 +7,7 @@
<%%= form_with url: passwords_path, class: "contents" do |form| %>
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
index 92d64b79..64c145c0 100644
--- a/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
+++ b/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
@@ -11,11 +11,11 @@
<%%= form_with url: session_url, class: "contents" do |form| %>
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index 93490a15..9e392609 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -15,23 +15,23 @@
<% if attribute.password_digest? -%>
<%%= form.label :password %>
- <%%= form.password_field :password, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
+ <%%= form.password_field :password, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
<%%= form.label :password_confirmation %>
- <%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
+ <%%= form.password_field :password_confirmation, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow-sm rounded-md border outline-hidden mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% else -%>
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
<% end -%>
<% end -%>
From e507b0ee1b89f90b31f5d9f0b7cfd929c540d5ff Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 12:26:15 -0500
Subject: [PATCH 122/204] prefactor: rename user_journey_test to
user_install_test
---
.github/workflows/ci.yml | 4 ++--
.github/workflows/upstream.yml | 6 +++---
CONTRIBUTING.md | 2 +-
.../{user_journey_test.sh => user_install_test.sh} | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
rename test/integration/{user_journey_test.sh => user_install_test.sh} (96%)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 07fb8285..b53627e4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,7 +32,7 @@ jobs:
- name: Run tests
run: bin/test
- user-journey:
+ user-install:
strategy:
fail-fast: false
matrix:
@@ -44,5 +44,5 @@ jobs:
with:
ruby-version: "3.4"
bundler: latest
- - run: test/integration/user_journey_test.sh
+ - run: test/integration/user_install_test.sh
shell: bash
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index e491a957..e38eac50 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -34,8 +34,8 @@ jobs:
- name: Run tests
run: bin/test
- user-journey:
- name: "user-journey (rails ${{ matrix.ref }})"
+ user-install:
+ name: "user-install (rails ${{ matrix.ref }})"
runs-on: ${{matrix.plat}}-latest
strategy:
fail-fast: false
@@ -50,5 +50,5 @@ jobs:
with:
ruby-version: "3.3"
bundler: latest
- - run: test/integration/user_journey_test.sh
+ - run: test/integration/user_install_test.sh
shell: bash
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a4040dfa..c2e8746f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -9,7 +9,7 @@ This doc is a brief introduction on modifying and maintaining this gem.
The unit tests are run with `bundle exec rake test`
-There is an additional integration test which runs in CI, `test/integration/user_journey_test.sh` which you may also want to run.
+There is an additional integration test which runs in CI, `test/integration/user_install_test.sh` which you may also want to run.
### Testing in a Rails app
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_install_test.sh
similarity index 96%
rename from test/integration/user_journey_test.sh
rename to test/integration/user_install_test.sh
index 985b72c4..dd36af25 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_install_test.sh
@@ -18,8 +18,8 @@ pushd "My Workspace"
# create a rails app
bundle exec rails -v
-bundle exec rails new test-app --skip-bundle
-pushd test-app
+bundle exec rails new test-install --skip-bundle
+pushd test-install
# make sure to use the same version of rails (e.g., install from git source if necessary)
bundle remove rails --skip-install
From 25010f3aecff8a2335e23749cd02143d29fa538c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 11:18:23 -0500
Subject: [PATCH 123/204] Introduce a 'tailwindcss:upgrade' task
- rename install/tailwindcss.rb to install/install_tailwindcss.rb
- new script install/upgrade_tailwindcss.rb which:
- removes the "inter-font" CSS tag from the application layout
- comments out references to 'defaultTheme' in tailwind.config.js
- runs "npx @tailwindcss/upgrade@next" if npx is available
- new integration test
---
.github/workflows/ci.yml | 15 ++++
.github/workflows/upstream.yml | 19 +++++
...{tailwindcss.rb => install_tailwindcss.rb} | 0
lib/install/upgrade_tailwindcss.rb | 42 +++++++++++
lib/tasks/install.rake | 2 +-
lib/tasks/upgrade.rake | 6 ++
test/integration/user_upgrade_test.sh | 72 +++++++++++++++++++
7 files changed, 155 insertions(+), 1 deletion(-)
rename lib/install/{tailwindcss.rb => install_tailwindcss.rb} (100%)
create mode 100644 lib/install/upgrade_tailwindcss.rb
create mode 100644 lib/tasks/upgrade.rake
create mode 100755 test/integration/user_upgrade_test.sh
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b53627e4..3822e414 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -46,3 +46,18 @@ jobs:
bundler: latest
- run: test/integration/user_install_test.sh
shell: bash
+
+ user-upgrade:
+ strategy:
+ fail-fast: false
+ matrix:
+ plat: ["ubuntu", "macos"] # TODO: on windows the tailwind upgrader tests are failing
+ runs-on: ${{matrix.plat}}-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: "3.4"
+ bundler: latest
+ - run: test/integration/user_upgrade_test.sh
+ shell: bash
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index e38eac50..e1b12dea 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -52,3 +52,22 @@ jobs:
bundler: latest
- run: test/integration/user_install_test.sh
shell: bash
+
+ user-upgrade:
+ name: "user-upgrade (rails ${{ matrix.ref }})"
+ runs-on: ${{matrix.plat}}-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ plat: ["ubuntu"]
+ ref: ["7-2-stable", "8-0-stable", "main"]
+ env:
+ RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: "3.3"
+ bundler: latest
+ - run: test/integration/user_upgrade_test.sh
+ shell: bash
diff --git a/lib/install/tailwindcss.rb b/lib/install/install_tailwindcss.rb
similarity index 100%
rename from lib/install/tailwindcss.rb
rename to lib/install/install_tailwindcss.rb
diff --git a/lib/install/upgrade_tailwindcss.rb b/lib/install/upgrade_tailwindcss.rb
new file mode 100644
index 00000000..24dd4551
--- /dev/null
+++ b/lib/install/upgrade_tailwindcss.rb
@@ -0,0 +1,42 @@
+TAILWIND_CONFIG_PATH = Rails.root.join("config/tailwind.config.js")
+APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
+
+if TAILWIND_CONFIG_PATH.exist?
+ if File.read(TAILWIND_CONFIG_PATH).match?(/defaultTheme/)
+ say "Removing references to 'defaultTheme' from #{TAILWIND_CONFIG_PATH}"
+ gsub_file TAILWIND_CONFIG_PATH.to_s, /^(.*defaultTheme)/, "// \\1"
+ end
+
+ if system("npx --version")
+ say "Running the upstream Tailwind CSS upgrader"
+ command = Shellwords.join(["npx", "@tailwindcss/upgrade@next", "--force", "--config", TAILWIND_CONFIG_PATH.to_s])
+ success = run(command, abort_on_failure: false)
+ unless success
+ say "The upgrade tool failed!", :red
+ say %( You probably need to update your configuration. Please read the error messages,)
+ say %( and check the Tailwind CSS upgrade guide at https://tailwindcss.com/docs/upgrade-guide.)
+ abort
+ end
+ else
+ say "Could not run the Tailwind upgrade tool. Please see https://tailwindcss.com/docs/upgrade-guide for manual instructions.", :red
+ abort
+ end
+else
+ say "Default tailwind.config.js is missing!", :red
+ abort
+end
+
+if APPLICATION_LAYOUT_PATH.exist?
+ if File.read(APPLICATION_LAYOUT_PATH).match?(/"inter-font"/)
+ say "Strip Inter font CSS from application layout"
+ gsub_file APPLICATION_LAYOUT_PATH.to_s, %r{, "inter-font"}, ""
+ else
+ say "Inter font CSS not detected.", :green
+ end
+else
+ say "Default application.html.erb is missing!", :red
+ say %( Please check your layouts and remove any "inter-font" stylesheet links.)
+end
+
+say "Compile initial Tailwind build"
+run "rails tailwindcss:build"
diff --git a/lib/tasks/install.rake b/lib/tasks/install.rake
index 2a571cad..f94ec2a1 100644
--- a/lib/tasks/install.rake
+++ b/lib/tasks/install.rake
@@ -1,6 +1,6 @@
namespace :tailwindcss do
desc "Install Tailwind CSS into the app"
task :install do
- system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/tailwindcss.rb", __dir__)}"
+ system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/install_tailwindcss.rb", __dir__)}"
end
end
diff --git a/lib/tasks/upgrade.rake b/lib/tasks/upgrade.rake
new file mode 100644
index 00000000..05047523
--- /dev/null
+++ b/lib/tasks/upgrade.rake
@@ -0,0 +1,6 @@
+namespace :tailwindcss do
+ desc "Upgrade app from Tailwind CSS v3 to v4"
+ task :upgrade do
+ system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/upgrade_tailwindcss.rb", __dir__)}"
+ end
+end
diff --git a/test/integration/user_upgrade_test.sh b/test/integration/user_upgrade_test.sh
new file mode 100755
index 00000000..d2cc9d8f
--- /dev/null
+++ b/test/integration/user_upgrade_test.sh
@@ -0,0 +1,72 @@
+#! /usr/bin/env bash
+# reproduce the documented user journey for installing and running tailwindcss-rails
+# this is run in the CI pipeline, non-zero exit code indicates a failure
+
+set -o pipefail
+set -eux
+
+# set up dependencies
+rm -f Gemfile.lock
+bundle remove actionmailer
+bundle add rails --skip-install ${RAILSOPTS:-}
+bundle install --prefer-local
+
+# do our work a directory with spaces in the name (#176, #184)
+rm -rf "My Workspace"
+mkdir "My Workspace"
+pushd "My Workspace"
+
+# create a rails app
+bundle exec rails -v
+bundle exec rails new test-upgrade --skip-bundle
+pushd test-upgrade
+
+# make sure to use the same version of rails (e.g., install from git source if necessary)
+bundle remove rails --skip-install
+bundle add rails --skip-install ${RAILSOPTS:-}
+
+# set up app with tailwindcss-rails v3 and tailwindcss-ruby v3
+bundle add tailwindcss-rails --skip-install --version 3.3.0
+bundle add tailwindcss-ruby --skip-install --version 3.4.17
+bundle install --prefer-local
+bundle show --paths
+bundle binstubs --all
+
+# install tailwindcss
+bin/rails tailwindcss:install
+grep -q inter-font app/views/layouts/application.html.erb
+
+if [[ $(rails -v) > "Rails 8.0.0.beta" ]] ; then
+ # install auth templates
+ bin/rails generate authentication
+ grep -q PasswordsController app/controllers/passwords_controller.rb
+fi
+
+# install scaffold templates
+bin/rails generate scaffold post title:string body:text published:boolean
+grep -q "Show this post" app/views/posts/index.html.erb
+
+# upgrade time!
+bundle remove tailwindcss-rails --skip-install
+bundle remove tailwindcss-ruby --skip-install
+
+bundle add tailwindcss-rails --skip-install --path="../.."
+bundle add tailwindcss-ruby --skip-install --version 4.0.0
+
+bundle install --prefer-local
+bundle show --paths
+bundle binstubs --all
+
+bin/rails tailwindcss:upgrade
+
+# TEST: removal of inter-font CSS
+if grep -q inter-font app/views/layouts/application.html.erb ; then
+ echo "FAIL: inter-font CSS not removed"
+ exit 1
+fi
+
+# generate CSS
+bin/rails tailwindcss:build[verbose]
+grep -q "py-2" app/assets/builds/tailwind.css
+
+echo "OK"
From fef615c401e54cd9ae1a089c8f4c9381ab5e2bea Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 14:06:58 -0500
Subject: [PATCH 124/204] If present, move config/postcss.config.js to root
This is where the tailwind upgrade tool expects it to be, because
that's the convention, apparently.
---
lib/install/upgrade_tailwindcss.rb | 42 +++++++++++++++------------
test/integration/user_upgrade_test.sh | 15 ++++++++++
2 files changed, 39 insertions(+), 18 deletions(-)
diff --git a/lib/install/upgrade_tailwindcss.rb b/lib/install/upgrade_tailwindcss.rb
index 24dd4551..b5389c73 100644
--- a/lib/install/upgrade_tailwindcss.rb
+++ b/lib/install/upgrade_tailwindcss.rb
@@ -1,28 +1,34 @@
TAILWIND_CONFIG_PATH = Rails.root.join("config/tailwind.config.js")
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
+POSTCSS_CONFIG_PATH = Rails.root.join("config/postcss.config.js")
-if TAILWIND_CONFIG_PATH.exist?
- if File.read(TAILWIND_CONFIG_PATH).match?(/defaultTheme/)
- say "Removing references to 'defaultTheme' from #{TAILWIND_CONFIG_PATH}"
- gsub_file TAILWIND_CONFIG_PATH.to_s, /^(.*defaultTheme)/, "// \\1"
- end
+unless TAILWIND_CONFIG_PATH.exist?
+ say "Default tailwind.config.js is missing!", :red
+ abort
+end
- if system("npx --version")
- say "Running the upstream Tailwind CSS upgrader"
- command = Shellwords.join(["npx", "@tailwindcss/upgrade@next", "--force", "--config", TAILWIND_CONFIG_PATH.to_s])
- success = run(command, abort_on_failure: false)
- unless success
- say "The upgrade tool failed!", :red
- say %( You probably need to update your configuration. Please read the error messages,)
- say %( and check the Tailwind CSS upgrade guide at https://tailwindcss.com/docs/upgrade-guide.)
- abort
- end
- else
- say "Could not run the Tailwind upgrade tool. Please see https://tailwindcss.com/docs/upgrade-guide for manual instructions.", :red
+if File.read(TAILWIND_CONFIG_PATH).match?(/defaultTheme/)
+ say "Removing references to 'defaultTheme' from #{TAILWIND_CONFIG_PATH}"
+ gsub_file TAILWIND_CONFIG_PATH.to_s, /^(.*defaultTheme)/, "// \\1"
+end
+
+if POSTCSS_CONFIG_PATH.exist?
+ say "Moving PostCSS configuration to application root directory"
+ FileUtils.mv(POSTCSS_CONFIG_PATH, Rails.root, verbose: true) || abort
+end
+
+if system("npx --version")
+ say "Running the upstream Tailwind CSS upgrader"
+ command = Shellwords.join(["npx", "@tailwindcss/upgrade@next", "--force", "--config", TAILWIND_CONFIG_PATH.to_s])
+ success = run(command, abort_on_failure: false)
+ unless success
+ say "The upgrade tool failed!", :red
+ say %( You probably need to update your configuration. Please read the error messages,)
+ say %( and check the Tailwind CSS upgrade guide at https://tailwindcss.com/docs/upgrade-guide.)
abort
end
else
- say "Default tailwind.config.js is missing!", :red
+ say "Could not run the Tailwind upgrade tool. Please see https://tailwindcss.com/docs/upgrade-guide for manual instructions.", :red
abort
end
diff --git a/test/integration/user_upgrade_test.sh b/test/integration/user_upgrade_test.sh
index d2cc9d8f..e4912818 100755
--- a/test/integration/user_upgrade_test.sh
+++ b/test/integration/user_upgrade_test.sh
@@ -57,6 +57,15 @@ bundle install --prefer-local
bundle show --paths
bundle binstubs --all
+# create a postcss file
+cat < config/postcss.config.js
+module.exports = {
+ plugins: {
+ autoprefixer: {},
+ },
+}
+EOF
+
bin/rails tailwindcss:upgrade
# TEST: removal of inter-font CSS
@@ -65,6 +74,12 @@ if grep -q inter-font app/views/layouts/application.html.erb ; then
exit 1
fi
+# TEST: moving the postcss file
+if [ ! -f postcss.config.js ] ; then
+ echo "FAIL: postcss.config.js not moved"
+ exit 1
+fi
+
# generate CSS
bin/rails tailwindcss:build[verbose]
grep -q "py-2" app/assets/builds/tailwind.css
From 1edc8c00ecc0e81c8a0ef7a510bc5177cb27ff68 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 14:34:27 -0500
Subject: [PATCH 125/204] doc: add upgrade notes to the README
and start a CHANGELOG entry
---
CHANGELOG.md | 25 ++++++++++++
README.md | 110 +++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 132 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 39f9bc25..b05f8fe5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
## next / unreleased
+## v4.0.0.rc1 / unreleased
+
+### Upgrade to Tailwind CSS v4
+
+General changes:
+
+- Dependency on `tailwindcss-ruby` set to `~> 4.0`.
+- The location of (optional) `postcss.config.js` has moved from the `config/` directory to the app root.
+
+Changes to the `tailwindcss:install` task:
+
+- The `tailwindcss:install` task no longer installs `config/tailwind.config.js`.
+- The Inter font is no longer packaged with the gem.
+- Some Tailwind class names are updated for v4.
+
+New task `tailwindcss:upgrade` upgrades many apps cleanly:
+
+- Cleans up some things in the generated `config/tailwind.config.js`.
+- Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended).
+- Removes references to the Inter font from the application layout.
+- If present, moves `config/postcss.config.js` to the root directory.
+
+Thanks to @EricGusmao and @excid3 for their help and advice on this work.
+
+
## v3.3.0 / 2025-01-19
* Add support for using the puma plugin in a standalone puma process (outside of `rails server`). (#458) @flavorjones
diff --git a/README.md b/README.md
index c80bae4d..7ea37753 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,10 @@
- [Installation](#installation)
* [Choosing a specific version of `tailwindcss`](#choosing-a-specific-version-of-tailwindcss)
* [Using a local installation of `tailwindcss`](#using-a-local-installation-of-tailwindcss)
+- [Upgrading your application from Tailwind v3 to v4](#upgrading-your-application-from-tailwind-v3-to-v4)
+ * [You don't _have_ to upgrade](#you-dont-_have_-to-upgrade)
+ * [Upgrade steps](#upgrade-steps)
+ * [Troubleshooting](#troubleshooting)
- [Developing with Tailwindcss](#developing-with-tailwindcss)
* [Configuration and commands](#configuration-and-commands)
* [Building for production](#building-for-production)
@@ -17,7 +21,7 @@
* [Live rebuild](#live-rebuild)
* [Using with PostCSS](#using-with-postcss)
* [Custom inputs or outputs](#custom-inputs-or-outputs)
-- [Troubleshooting](#troubleshooting)
+- [Troubleshooting](#troubleshooting-1)
* [Lost keystrokes or hanging when using terminal-based debugging tools (e.g. IRB, Pry, `ruby/debug`...etc.) with the Puma plugin](#lost-keystrokes-or-hanging-when-using-terminal-based-debugging-tools-eg-irb-pry-rubydebugetc-with-the-puma-plugin)
* [Running in a docker container exits prematurely](#running-in-a-docker-container-exits-prematurely)
* [Conflict with sassc-rails](#conflict-with-sassc-rails)
@@ -55,6 +59,106 @@ gem "tailwindcss-ruby", "3.4.13"
You can also use a local (npm-based) installation if you prefer, please go to https://github.com/flavorjones/tailwindcss-ruby for more information.
+## Upgrading your application from Tailwind v3 to v4
+
+v4.x of this gem has been updated to work with Tailwind v4, including providing some help with upgrading your application.
+
+A full explanation of a Tailwind v4 upgrade is out of scope for this README, so we strongly urge you to read the [official Tailwind v4 upgrade guide](https://tailwindcss.com/docs/upgrade-guide) before embarking on an upgrade to an existing large app.
+
+This gem will help with some of the mechanics of the upgrade, however.
+
+### You don't _have_ to upgrade
+
+Keep in mind that you don't _need_ to upgrade. You can stay on Tailwind v3 for the foreseeable future if you prefer not to migrate now, or if your migration runs into problems.
+
+Just make sure you're pinning the version of **both** `tailwindcss-rails` and `tailwindcss-ruby`:
+
+``` ruby
+# Gemfile
+gem "tailwindcss-rails", "~> 3.3"
+gem "tailwindcss-ruby", "~> 3.4"
+```
+
+
+### Upgrade steps
+
+First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you're transitively depending on `tailwindcss-ruby` v4.
+
+``` html
+# Gemfile
+gem "tailwindcss-rails", "~> 4.0"
+```
+
+Then, run the `tailwindcss:upgrade` task. Among other things, this will try to run the official Tailwind upgrade utility. It requires `npx` in order to run, but it's a one-time operation and is *highly recommended* for a successful upgrade.
+
+Here's what the upgrade task does:
+
+- Cleans up some things in the generated `config/tailwind.config.js`.
+- Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended).
+- Removes references to the Inter font from the application layout.
+- If present, moves `config/postcss.config.js` to the root directory.
+
+Here's what that upgrade looks like on a vanilla Rails app:
+
+``` sh
+$ bin/rails tailwindcss:upgrade
+ apply /path/to/tailwindcss-rails/lib/install/upgrade_tailwindcss.rb
+ Removing references to 'defaultTheme' from /home/user/myapp/config/tailwind.config.js
+ gsub config/tailwind.config.js
+ Running the upstream Tailwind CSS upgrader
+ run npx @tailwindcss/upgrade@next --force --config /home/user/myapp/config/tailwind.config.js from "."
+≈ tailwindcss v4.0.0
+
+│ Searching for CSS files in the current directory and its subdirectories…
+
+│ ↳ Linked `./config/tailwind.config.js` to `./app/assets/stylesheets/application.tailwind.css`
+
+│ Migrating JavaScript configuration files…
+
+│ ↳ The configuration file at `./config/tailwind.config.js` could not be automatically migrated to the new CSS
+│ configuration format, so your CSS has been updated to load your existing configuration file.
+
+│ Migrating templates…
+
+│ ↳ Migrated templates for configuration file: `./config/tailwind.config.js`
+
+│ Migrating stylesheets…
+
+│ ↳ Migrated stylesheet: `./app/assets/stylesheets/application.tailwind.css`
+
+│ ↳ No PostCSS config found, skipping migration.
+
+│ Updating dependencies…
+
+│ Could not detect a package manager. Please manually update `tailwindcss` to v4.
+
+│ Verify the changes and commit them to your repository.
+
+ Strip Inter font CSS from application layout
+ gsub app/views/layouts/application.html.erb
+ Compile initial Tailwind build
+ run rails tailwindcss:build from "."
+≈ tailwindcss v4.0.0
+
+Done in 52ms
+ run bundle install --quiet
+```
+
+If this doesn't succeed, it's likely that you've customized your Tailwind configuration and you'll need to do some work to make sure your application upgrades. Please read the [official upgrade guide](https://tailwindcss.com/docs/upgrade-guide)!
+
+
+### Troubleshooting
+
+You may want to check out [TailwindCSS v4 - upgrade experience report · rails/tailwindcss-rails · Discussion #450](https://github.com/rails/tailwindcss-rails/discussions/450) if you're having trouble upgrading.
+
+We know there are some cases we haven't addressed with the upgrade task:
+
+- If the user isn’t using PostCSS, some migrations (e.g., updating class names in the view files) may fail
+- In setups without JavaScript tooling, the update process may fail to fully migrate `tailwind.config.js` because the tool assumes that the imported packages (e.g., tailwind plugins) are installed via a package manager, allowing them to be called.
+
+We'll try to improve the upgrade process over time, but for now you may need to do some manual work to upgrade.
+
+
## Developing with Tailwindcss
### Configuration and commands
@@ -147,12 +251,12 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
### Using with PostCSS
-If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and that file will be loaded by tailwind automatically.
+If you want to use PostCSS as a preprocessor, create a custom `postcss.config.js` in your project root directory, and that file will be loaded by tailwind automatically.
For example, to enable nesting:
```js
-// config/postcss.config.js
+// postcss.config.js
module.exports = {
plugins: {
'postcss-import': {},
From dd85c1d798ae8b94f238c26b06c47ecf7d026a64 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 14:56:40 -0500
Subject: [PATCH 126/204] version bump to v4.0.0.rc1
---
CHANGELOG.md | 2 +-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b05f8fe5..a013c4f6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
## next / unreleased
-## v4.0.0.rc1 / unreleased
+## v4.0.0.rc1 / 2025-01-23
### Upgrade to Tailwind CSS v4
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 5c301936..18243054 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "3.3.0"
+ VERSION = "4.0.0.rc1"
end
From e57f34a3ac39fc652d537e8e5203b79ee4847e5a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 15:36:59 -0500
Subject: [PATCH 127/204] doc: merge CHANGELOG entry for v3.3.1
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a013c4f6..f978347c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,13 @@ New task `tailwindcss:upgrade` upgrades many apps cleanly:
Thanks to @EricGusmao and @excid3 for their help and advice on this work.
+## v3.3.1 / 2025-01-23
+
+* Pin the dependency on `tailwindcss-ruby` to `~> 3.0` to prevent users from upgrading Tailwind while still on v3 of this gem.
+
+ While it was useful during the Tailwind v4 beta period to allow users to float this dependency to try upgrading, we know (now that v4.0.0.rc1 of this gem is out) that not everything will work well if combining Tailwind v4 with `tailwindcss-rails` v3. Pinning this dependency should protect developers against unexpected issues.
+
+
## v3.3.0 / 2025-01-19
* Add support for using the puma plugin in a standalone puma process (outside of `rails server`). (#458) @flavorjones
From 65dd6c5ef76e474bf73249a086437bafa58e49b4 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 23 Jan 2025 15:39:11 -0500
Subject: [PATCH 128/204] doc: update README with updated gemfile instructions
because v3.3.1 pins tailwindcss-ruby to v3
[skip ci]
---
README.md | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7ea37753..303c7e21 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,14 @@ This gem will help with some of the mechanics of the upgrade, however.
Keep in mind that you don't _need_ to upgrade. You can stay on Tailwind v3 for the foreseeable future if you prefer not to migrate now, or if your migration runs into problems.
-Just make sure you're pinning the version of **both** `tailwindcss-rails` and `tailwindcss-ruby`:
+Just make sure you're either pinned to v3.3.1 of this gem:
+
+``` ruby
+# Gemfile
+gem "tailwindcss-rails", "3.3.1" # which transitively pins tailwindcss-ruby to v3
+```
+
+or if you're on an earlier version of this gem, make sure you're pinning the version of **both** `tailwindcss-rails` and `tailwindcss-ruby`:
``` ruby
# Gemfile
@@ -86,7 +93,7 @@ First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you
``` html
# Gemfile
-gem "tailwindcss-rails", "~> 4.0"
+gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4
```
Then, run the `tailwindcss:upgrade` task. Among other things, this will try to run the official Tailwind upgrade utility. It requires `npx` in order to run, but it's a one-time operation and is *highly recommended* for a successful upgrade.
From 5b478e7c5b900534962c0a563060bd7a5228005e Mon Sep 17 00:00:00 2001
From: Patricio Mac Adden
Date: Fri, 10 Jan 2025 18:23:04 -0300
Subject: [PATCH 129/204] Improve boolean fields
---
.../tailwindcss/scaffold/templates/_form.html.erb.tt | 4 ++--
.../tailwindcss/scaffold/templates/partial.html.erb.tt | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
index 9e392609..43d06cb2 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -12,7 +12,7 @@
<%% end %>
<% attributes.each do |attribute| -%>
-