From 75488bff1db564be8611cde608c703556a46c0d0 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 20 Oct 2022 10:51:12 -0400
Subject: [PATCH 001/305] dev: remove sqlite3 and add native platforms to the
Gemfile.lock
---
Gemfile | 1 -
Gemfile.lock | 8 ++++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 5db3afed..cf00e45c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,6 @@ source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec
-gem "sqlite3"
gem "debug", ">= 1.0.0"
group :test do
diff --git a/Gemfile.lock b/Gemfile.lock
index 11ed5ea7..7ba79fc6 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -62,6 +62,10 @@ GEM
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
+ nokogiri (1.13.6-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.13.6-x86_64-linux)
+ racc (~> 1.4)
racc (1.6.0)
rack (2.2.3)
rack-test (1.1.0)
@@ -80,7 +84,6 @@ GEM
rake (13.0.6)
reline (0.2.7)
io-console (~> 0.5)
- sqlite3 (1.4.2)
thor (1.2.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
@@ -88,11 +91,12 @@ GEM
PLATFORMS
ruby
+ x86_64-darwin
+ x86_64-linux
DEPENDENCIES
actionmailer (>= 6.0.0)
debug (>= 1.0.0)
- sqlite3
tailwindcss-rails!
BUNDLED WITH
From 473425fbd8caedeff220976117373fa594b5411a Mon Sep 17 00:00:00 2001
From: AlexKovynev
Date: Fri, 21 Oct 2022 16:43:40 +0000
Subject: [PATCH 002/305] Update tailwind to version 3.2.1
---
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 305091f5..d0afc3e6 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.2.0"
+ VERSION = "v3.2.1"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 5661d2165e0641a1325c4a80b4607fa7b00022f1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 21 Oct 2022 13:32:20 -0400
Subject: [PATCH 003/305] version bump to v2.0.16
---
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 e643f9da..5cb84afa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.16 / 2022-10-21
+
+* Update to [Tailwind CSS v3.2.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.1) by [@AlexKovynev](https://github.com/AlexKovynev) in [#213](https://github.com/rails/tailwindcss-rails/pull/213).
+
+
## v2.0.15 / 2022-10-20
* Update to [Tailwind CSS v3.2.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.0) by [@domchristie](https://github.com/domchristie) in [#209](https://github.com/rails/tailwindcss-rails/pull/209).
diff --git a/Gemfile.lock b/Gemfile.lock
index 11ed5ea7..a51c029d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.15)
+ tailwindcss-rails (2.0.16)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 32928a02..006e1ae8 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.15"
+ VERSION = "2.0.16"
end
From 70f884614b380ce3fed89f7219b473f90c25f441 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 31 Oct 2022 21:44:58 -0400
Subject: [PATCH 004/305] ci: cleanup workaround for broken bundler version
---
.github/workflows/gem-install.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index f32f3e29..ce4fe48e 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -74,8 +74,7 @@ jobs:
with:
name: gem-x86_64-linux
path: pkg
- - run: "gem update --system"
- - run: "apk add build-base" # TODO: remove after https://github.com/rubygems/rubygems/issues/5914 is in a rubygems release
+ - 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"
From d535a2a8f3ae0e720d6d72172b8af477b07f18db Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 31 Oct 2022 16:46:30 -0400
Subject: [PATCH 005/305] native: support for arm-linux
and ensure test coverage in the CI pipeline
---
.github/workflows/gem-install.yml | 19 ++++++++++++++++++-
lib/tailwindcss/upstream.rb | 1 +
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index ce4fe48e..6f537004 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"]
+ platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux", "arm-linux"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -78,6 +78,23 @@ jobs:
- run: "gem install pkg/tailwindcss-rails-*.gem"
- run: "tailwindcss --help"
+ linux-arm-install:
+ needs: ["package"]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/download-artifact@v3
+ 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.1 \
+ /bin/bash -c "
+ set -ex
+ gem install pkg/tailwindcss-rails-*.gem
+ tailwindcss --help
+ "
+
darwin-install:
needs: ["package"]
runs-on: macos-latest
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index d0afc3e6..cd45d7fb 100644
--- a/lib/tailwindcss/upstream.rb
+++ b/lib/tailwindcss/upstream.rb
@@ -11,6 +11,7 @@ module Upstream
"x86_64-darwin" => "tailwindcss-macos-x64",
"x86_64-linux" => "tailwindcss-linux-x64",
"aarch64-linux" => "tailwindcss-linux-arm64",
+ "arm-linux" => "tailwindcss-linux-armv7",
}
end
end
From 232d6b162738e38239935fc7cbd3addedf61badd Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 1 Nov 2022 08:05:12 -0400
Subject: [PATCH 006/305] version bump to v2.0.17
---
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 5cb84afa..1e754f5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.17 / 2022-11-01
+
+* Add `arm-linux` support. [#218](https://github.com/rails/tailwindcss-rails/pull/218) by [@flavorjones](https://github.com/flavorjones).
+
+
## v2.0.16 / 2022-10-21
* Update to [Tailwind CSS v3.2.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.1) by [@AlexKovynev](https://github.com/AlexKovynev) in [#213](https://github.com/rails/tailwindcss-rails/pull/213).
diff --git a/Gemfile.lock b/Gemfile.lock
index 9d0c820c..6c922e73 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.16)
+ tailwindcss-rails (2.0.17)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 006e1ae8..fb4f46fd 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.16"
+ VERSION = "2.0.17"
end
From 761263003d74c3e002edbc15cf4089389f8793a4 Mon Sep 17 00:00:00 2001
From: Marco Roth
Date: Fri, 4 Nov 2022 23:03:50 +0100
Subject: [PATCH 007/305] Unify `bin/dev` script with other js/css installers
---
lib/install/dev | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/install/dev b/lib/install/dev
index 2daf7764..74ade166 100755
--- a/lib/install/dev
+++ b/lib/install/dev
@@ -1,9 +1,8 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
-if ! command -v foreman &> /dev/null
-then
+if ! gem list foreman -i --silent; then
echo "Installing foreman..."
gem install foreman
fi
-foreman start -f Procfile.dev
+exec foreman start -f Procfile.dev "$@"
From a3c4a2bca75abda4fc42355e0333c07f84d74ced Mon Sep 17 00:00:00 2001
From: AlexKovynev
Date: Sat, 5 Nov 2022 04:06:08 +0000
Subject: [PATCH 008/305] Update tailwind to version 3.2.2
---
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 cd45d7fb..db1ba068 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.2.1"
+ VERSION = "v3.2.2"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From a5bbf6e93b16d268fb4947dc86dc2f6381fa1b92 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 7 Nov 2022 11:21:06 -0500
Subject: [PATCH 009/305] version bump to v2.0.18
---
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 1e754f5d..79114de8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.18 / 2022-11-07
+
+* Update to [Tailwind CSS v3.2.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.2) by by [@AlexKovynev](https://github.com/AlexKovynev).
+
+
## v2.0.17 / 2022-11-01
* Add `arm-linux` support. [#218](https://github.com/rails/tailwindcss-rails/pull/218) by [@flavorjones](https://github.com/flavorjones).
diff --git a/Gemfile.lock b/Gemfile.lock
index 6c922e73..1acc2d80 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.17)
+ tailwindcss-rails (2.0.18)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index fb4f46fd..bccb594d 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.17"
+ VERSION = "2.0.18"
end
From ccc0bec87f1b0b8c45fa39eabab57dfe84baf2e1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 8 Nov 2022 08:23:53 -0500
Subject: [PATCH 010/305] version bump to v2.0.19
---
CHANGELOG.md | 7 ++++++-
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79114de8..66606805 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,12 @@
+## v2.0.19 / 2022-11-08
+
+* Update `bin/dev` script to stay in sync with other Rails installers' versions (e.g, `cssbundling-rails` and `dartsass-rails`). Use `sh` instead of `bash` for vanilla Alpine support, and use `exec` to run foreman for better interrupt handling. [#219](https://github.com/rails/tailwindcss-rails/pull/219) by [@marcoroth](https://github.com/marcoroth).
+
+
## v2.0.18 / 2022-11-07
-* Update to [Tailwind CSS v3.2.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.2) by by [@AlexKovynev](https://github.com/AlexKovynev).
+* Update to [Tailwind CSS v3.2.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.2) by [@AlexKovynev](https://github.com/AlexKovynev).
## v2.0.17 / 2022-11-01
diff --git a/Gemfile.lock b/Gemfile.lock
index 1acc2d80..8dfbd902 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.18)
+ tailwindcss-rails (2.0.19)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index bccb594d..10b95e4d 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.18"
+ VERSION = "2.0.19"
end
From 41a22bf721030d3cf1f3f0a02ed08be1de2e27f2 Mon Sep 17 00:00:00 2001
From: Will Cosgrove
Date: Wed, 9 Nov 2022 17:32:37 -0600
Subject: [PATCH 011/305] Update upstream tailwindcss version 3.2.2 -> 3.2.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 db1ba068..3e835d8d 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.2.2"
+ VERSION = "v3.2.3"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 8d89ca8ac1d56790016d5907d228a7189f27f8b7 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 10 Nov 2022 10:07:39 -0500
Subject: [PATCH 012/305] version bump to v2.0.20
---
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 66606805..326d90ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.20 / 2022-11-10
+
+* Update to [Tailwind CSS v3.2.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.3) by [@willcosgrove](https://github.com/willcosgrove).
+
+
## v2.0.19 / 2022-11-08
* Update `bin/dev` script to stay in sync with other Rails installers' versions (e.g, `cssbundling-rails` and `dartsass-rails`). Use `sh` instead of `bash` for vanilla Alpine support, and use `exec` to run foreman for better interrupt handling. [#219](https://github.com/rails/tailwindcss-rails/pull/219) by [@marcoroth](https://github.com/marcoroth).
diff --git a/Gemfile.lock b/Gemfile.lock
index 8dfbd902..3feef309 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.19)
+ tailwindcss-rails (2.0.20)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 10b95e4d..85e63c4e 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.19"
+ VERSION = "2.0.20"
end
From 52290fdae0107335616f62cf01a2004cb91e1a17 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 11 Nov 2022 14:07:20 -0500
Subject: [PATCH 013/305] bump upstream to 3.2.4
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.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 3e835d8d..ebd0c250 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.2.3"
+ VERSION = "v3.2.4"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From a4b26247dadb59914c0260c8155fa9d2789a51d0 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 11 Nov 2022 15:00:31 -0500
Subject: [PATCH 014/305] version bump to v2.0.21
---
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 326d90ac..f27bdd16 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.21 / 2022-11-11
+
+* Update to [Tailwind CSS v3.2.4](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.4) by [@flavorjones](https://github.com/flavorjones).
+
+
## v2.0.20 / 2022-11-10
* Update to [Tailwind CSS v3.2.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.3) by [@willcosgrove](https://github.com/willcosgrove).
diff --git a/Gemfile.lock b/Gemfile.lock
index 3feef309..384757b4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.20)
+ tailwindcss-rails (2.0.21)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 85e63c4e..fa73ef4d 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.20"
+ VERSION = "2.0.21"
end
From f095f3f78c3465498d7151eaabff28306d0bd134 Mon Sep 17 00:00:00 2001
From: Alex Ghiculescu
Date: Wed, 7 Dec 2022 14:58:07 -0600
Subject: [PATCH 015/305] Clarify how to run Tailwind command in CI (#230)
Co-authored-by: Mike Dalessio
---
README.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index acaa69a0..cf87dfdf 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,13 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
### Building for testing
-The `tailwindcss:build` is automatically attached to `test:prepare`, which runs before Rails tests. (Note that this currently only applies to rails `test:*` tasks (like `test:all` or `test:controllers`), not "rails test", as that doesn't load `test:prepare`).
+The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. The `test:prepare` task is run before some test tasks (e.g. `test:all` and `test:controllers`), but not before the bare `test` task.
+If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command:
+
+```
+bin/rails test:prepare test
+```
### Update assets automatically
From 97f110a073094195ad9d103214408068115452ff Mon Sep 17 00:00:00 2001
From: Alex Ghiculescu
Date: Wed, 7 Dec 2022 16:51:46 -0600
Subject: [PATCH 016/305] `verbose` arg for build commands
By default, removes the verbose log line when running a Tailwind build. This isn't really needed most of the time. You can use the `verbose` option to include it.
```
% bin/rake "tailwindcss:build[verbose]"
["/Users/alex/.rvm/gems/ruby-3.1.2/gems/tailwindcss-rails-2.0.21-x86_64-darwin/exe/x86_64-darwin/tailwindcss", "-i", "/Users/alex/Code/foo/app/assets/stylesheets/application.tailwind.css", "-o", "/Users/alex/Code/foo/app/assets/builds/tailwind.css", "-c", "/Users/alex/Code/foo/config/tailwind.config.js", "--minify"]
Rebuilding...
Done in 480ms.
% bin/rake "tailwindcss:build"
Rebuilding...
Done in 500ms.
```
---
lib/tasks/build.rake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake
index 258930eb..bd407214 100644
--- a/lib/tasks/build.rake
+++ b/lib/tasks/build.rake
@@ -3,7 +3,7 @@ namespace :tailwindcss do
task :build do |_, args|
debug = args.extras.include?("debug")
command = Tailwindcss::Commands.compile_command(debug: debug)
- puts command.inspect
+ puts command.inspect if args.extras.include?("verbose")
system(*command, exception: true)
end
@@ -12,7 +12,7 @@ namespace :tailwindcss do
debug = args.extras.include?("debug")
poll = args.extras.include?("poll")
command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
- puts command.inspect
+ puts command.inspect if args.extras.include?("verbose")
system(*command)
end
end
From e14d23ac02d5d73feb817f7ac785fcadac0d251c Mon Sep 17 00:00:00 2001
From: Dino Maric
Date: Fri, 9 Dec 2022 16:48:39 +0100
Subject: [PATCH 017/305] Fix generating nested models (#229)
Tis PR fixes error when generating nested models such as:
`bin/rails g scaffold admin/role name description`
---
.../tailwindcss/scaffold/scaffold_generator.rb | 4 ++--
.../scaffold/templates/partial.html.erb.tt | 12 ++++++------
.../tailwindcss/scaffold_generator_test.rb | 6 ++++++
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
index 3ae3c99d..6c1a2101 100644
--- a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
+++ b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
@@ -22,7 +22,7 @@ def copy_view_files
end
end
- template "partial.html.erb", File.join("app/views", controller_file_path, "_#{singular_table_name}.html.erb")
+ template "partial.html.erb", File.join("app/views", controller_file_path, "_#{singular_name}.html.erb")
end
private
@@ -31,4 +31,4 @@ def available_views
end
end
end
-end
\ No newline at end of file
+end
diff --git a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
index 301d82f2..55717003 100644
--- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
@@ -1,22 +1,22 @@
-
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
<%= attribute.human_name %>:
<% if attribute.attachment? -%>
- <%%= link_to <%= singular_table_name %>.<%= attribute.column_name %>.filename, <%= singular_table_name %>.<%= attribute.column_name %> if <%= singular_table_name %>.<%= attribute.column_name %>.attached? %>
+ <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
<% elsif attribute.attachments? -%>
- <%% <%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
+ <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %>
<%% end %>
<% else -%>
- <%%= <%= singular_table_name %>.<%= attribute.column_name %> %>
+ <%%= <%= singular_name %>.<%= attribute.column_name %> %>
<% end -%>
<% end -%>
<%% if action_name != "show" %>
- <%%= link_to "Show this <%= human_name.downcase %>", <%= singular_table_name %>, class: "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: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
+ <%%= 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/test/lib/generators/tailwindcss/scaffold_generator_test.rb b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
index 2973a7a4..01d892b2 100644
--- a/test/lib/generators/tailwindcss/scaffold_generator_test.rb
+++ b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
@@ -12,4 +12,10 @@ class Tailwindcss::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCa
%w(index edit new show _form _message).each { |view| assert_file "app/views/messages/#{view}.html.erb" }
end
+
+ test "with namespace invoked" do
+ run_generator [ "admin/role", "name:string", "description:string" ]
+
+ %w(index edit new show _form _role).each { |view| assert_file "app/views/admin/roles/#{view}.html.erb" }
+ end
end
From 9b01bf57cdf1f49e202ac765d78a43d741e2eaae Mon Sep 17 00:00:00 2001
From: victor
Date: Mon, 12 Dec 2022 21:08:36 +0100
Subject: [PATCH 018/305] Add explanation for programmatically composed class
names to use the safelist option.
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index cf87dfdf..216ee7ec 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,8 @@ Tailwind uses modern CSS features that are not recognized by the `sassc-rails` e
### Class names must be spelled out
-For Tailwind to work, your class names need to be spelled out. They can't be programmatically composed. So no "text-gray-#{grade}", only "text-gray-500".
+For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates certain class names that don’t exist in your content files or they are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
+
### ERROR: Cannot find the tailwindcss executable for <supported platform>
From 885ec2b90eaf18cf2745eb6d6ffedf00220547ce Mon Sep 17 00:00:00 2001
From: Alex Ghiculescu
Date: Sat, 17 Dec 2022 09:17:12 -0600
Subject: [PATCH 019/305] Fix typos
---
README.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 216ee7ec..db1a12cd 100644
--- a/README.md
+++ b/README.md
@@ -70,8 +70,7 @@ Tailwind uses modern CSS features that are not recognized by the `sassc-rails` e
### Class names must be spelled out
-For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates certain class names that don’t exist in your content files or they are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
-
+For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates class names that don't exist in your content files or that are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
### ERROR: Cannot find the tailwindcss executable for <supported platform>
From 3b005768058dff0d6fdeb3174197e9513bbf7406 Mon Sep 17 00:00:00 2001
From: Peter Goldstein
Date: Mon, 2 Jan 2023 10:29:16 -0500
Subject: [PATCH 020/305] Adds Ruby 3.2 to the CI matrix
---
.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 b8a965e3..01135a4a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ["2.7", "3.0", "3.1"]
+ ruby: ["2.7", "3.0", "3.1", "3.2"]
steps:
- uses: actions/checkout@v3
- run: rm Gemfile.lock
From adc00e108744e746169b0098e1f706ead6f62147 Mon Sep 17 00:00:00 2001
From: Alex Ghiculescu
Date: Mon, 9 Jan 2023 12:57:05 -0700
Subject: [PATCH 021/305] Simplify "Building for testing"
Now that https://github.com/rails/rails/pull/46664 is merged, we can simplify the testing instructions.
Technically these instructions aren't true until Rails 7.1, so I'm happy to leave the PR open until then if that's preferred.
---
README.md | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/README.md b/README.md
index db1a12cd..3fa69ef7 100644
--- a/README.md
+++ b/README.md
@@ -28,13 +28,8 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
### Building for testing
-The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. The `test:prepare` task is run before some test tasks (e.g. `test:all` and `test:controllers`), but not before the bare `test` task.
+The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. This task runs before test commands. If you run `bin/rails test` in your CI environment, your Tailwind output will be generated before tests run.
-If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command:
-
-```
-bin/rails test:prepare test
-```
### Update assets automatically
From 999db1c19568f0c11622b31d4266bfa4a42cb441 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 8 Feb 2023 15:27:18 -0500
Subject: [PATCH 022/305] dep: upgrade upstream to v3.2.6
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.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 ebd0c250..9a219fc7 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.2.4"
+ VERSION = "v3.2.6"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From caeecd7d9f15c37803e5c1eb80bb8f1e8f7af8fa Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 8 Feb 2023 15:37:40 -0500
Subject: [PATCH 023/305] dev: Gemfile.lock
---
Gemfile.lock | 102 ++++++++++++++++++++++++++++-----------------------
1 file changed, 56 insertions(+), 46 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 384757b4..ced4a4f4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,87 +7,97 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (6.1.4.1)
- actionpack (= 6.1.4.1)
- actionview (= 6.1.4.1)
- activejob (= 6.1.4.1)
- activesupport (= 6.1.4.1)
+ actionmailer (7.0.4.2)
+ actionpack (= 7.0.4.2)
+ actionview (= 7.0.4.2)
+ activejob (= 7.0.4.2)
+ activesupport (= 7.0.4.2)
mail (~> 2.5, >= 2.5.4)
+ net-imap
+ net-pop
+ net-smtp
rails-dom-testing (~> 2.0)
- actionpack (6.1.4.1)
- actionview (= 6.1.4.1)
- activesupport (= 6.1.4.1)
- rack (~> 2.0, >= 2.0.9)
+ actionpack (7.0.4.2)
+ actionview (= 7.0.4.2)
+ activesupport (= 7.0.4.2)
+ rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actionview (6.1.4.1)
- activesupport (= 6.1.4.1)
+ actionview (7.0.4.2)
+ activesupport (= 7.0.4.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.1.4.1)
- activesupport (= 6.1.4.1)
+ activejob (7.0.4.2)
+ activesupport (= 7.0.4.2)
globalid (>= 0.3.6)
- activesupport (6.1.4.1)
+ activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
- zeitwerk (~> 2.3)
builder (3.2.4)
- concurrent-ruby (1.1.9)
+ concurrent-ruby (1.2.0)
crass (1.0.6)
- debug (1.1.0)
- irb
- reline (>= 0.2.7)
- erubi (1.10.0)
- globalid (1.0.0)
+ date (3.3.3)
+ debug (1.7.1)
+ erubi (1.12.0)
+ globalid (1.1.0)
activesupport (>= 5.0)
- i18n (1.8.11)
+ i18n (1.12.0)
concurrent-ruby (~> 1.0)
- io-console (0.5.9)
- irb (1.3.7)
- reline (>= 0.2.7)
- loofah (2.12.0)
+ loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
- mail (2.7.1)
+ mail (2.8.1)
mini_mime (>= 0.1.1)
+ net-imap
+ net-pop
+ net-smtp
method_source (1.0.0)
mini_mime (1.1.2)
- mini_portile2 (2.8.0)
- minitest (5.14.4)
- nokogiri (1.13.6)
+ mini_portile2 (2.8.1)
+ minitest (5.17.0)
+ net-imap (0.3.4)
+ date
+ net-protocol
+ net-pop (0.1.2)
+ net-protocol
+ net-protocol (0.2.1)
+ timeout
+ net-smtp (0.3.3)
+ net-protocol
+ nokogiri (1.14.1)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
- nokogiri (1.13.6-x86_64-darwin)
+ nokogiri (1.14.1-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.13.6-x86_64-linux)
+ nokogiri (1.14.1-x86_64-linux)
racc (~> 1.4)
- racc (1.6.0)
- rack (2.2.3)
- rack-test (1.1.0)
- rack (>= 1.0, < 3)
+ racc (1.6.2)
+ rack (2.2.6.2)
+ rack-test (2.0.2)
+ rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
- rails-html-sanitizer (1.4.2)
- loofah (~> 2.3)
- railties (6.1.4.1)
- actionpack (= 6.1.4.1)
- activesupport (= 6.1.4.1)
+ rails-html-sanitizer (1.5.0)
+ loofah (~> 2.19, >= 2.19.1)
+ railties (7.0.4.2)
+ actionpack (= 7.0.4.2)
+ activesupport (= 7.0.4.2)
method_source
- rake (>= 0.13)
+ rake (>= 12.2)
thor (~> 1.0)
+ zeitwerk (~> 2.5)
rake (13.0.6)
- reline (0.2.7)
- io-console (~> 0.5)
thor (1.2.1)
- tzinfo (2.0.4)
+ timeout (0.3.1)
+ tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- zeitwerk (2.5.1)
+ zeitwerk (2.6.6)
PLATFORMS
ruby
From 781d840dcd9452e01fdbf10d491d9b8742a019be Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 8 Feb 2023 15:39:02 -0500
Subject: [PATCH 024/305] version bump to v2.0.22
---
CHANGELOG.md | 8 ++++++++
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f27bdd16..c4450740 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,12 @@
+## v2.0.22 / 2023-02-08
+
+* Update to [Tailwind CSS v3.2.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.6) by [@flavorjones](https://github.com/flavorjones).
+* Introduce a `verbose` task argument, and put verbose logging behind it by [@ghiculescu](https://github.com/ghiculescu).
+* Fix scaffold view generation for nested models (#227) by [@dixpac](https://github.com/dixpac).
+* Improved documentation by [@ghiculescu](https://github.com/ghiculescu) and [@flavorjones](https://github.com/flavorjones).
+
+
## v2.0.21 / 2022-11-11
* Update to [Tailwind CSS v3.2.4](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.4) by [@flavorjones](https://github.com/flavorjones).
diff --git a/Gemfile.lock b/Gemfile.lock
index ced4a4f4..325fbff0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.21)
+ tailwindcss-rails (2.0.22)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index fa73ef4d..6fd3b6b1 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.21"
+ VERSION = "2.0.22"
end
From 205aed8ae15d6c65b158868e89a4047ee77a5caf Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 Feb 2023 12:21:58 -0500
Subject: [PATCH 025/305] dep: update tailwindcss to v3.2.7
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.7
---
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 9a219fc7..3fa169b5 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.2.6"
+ VERSION = "v3.2.7"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 05c5753c1051d5eb792cc60ee1e90564e8165af9 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 19 Feb 2023 12:28:43 -0500
Subject: [PATCH 026/305] version bump to v2.0.23
---
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 c4450740..e035e504 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.23 / 2023-02-19
+
+* Update to [Tailwind CSS v3.2.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.7) by [@flavorjones](https://github.com/flavorjones).
+
+
## v2.0.22 / 2023-02-08
* Update to [Tailwind CSS v3.2.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.6) by [@flavorjones](https://github.com/flavorjones).
diff --git a/Gemfile.lock b/Gemfile.lock
index 325fbff0..e6a9169f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.22)
+ tailwindcss-rails (2.0.23)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 6fd3b6b1..d7b5d205 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.22"
+ VERSION = "2.0.23"
end
From 8159bd8652bb8f545f3ad7397d59b6e4deb1c89c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 2 Mar 2023 08:54:26 -0500
Subject: [PATCH 027/305] feat: tailwind will not minify when Rails CSS
compression is on
to avoid double-compression which breaks styles.
Fixes #243
See https://github.com/rails/rails/issues/47553
---
lib/tailwindcss/commands.rb | 6 +++++-
lib/tasks/build.rake | 4 ++--
test/lib/tailwindcss/commands_test.rb | 18 ++++++++++++++++++
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index e7f34cb5..4c91428c 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -62,7 +62,7 @@ def compile_command(debug: false, **kwargs)
"-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
"-c", Rails.root.join("config/tailwind.config.js").to_s,
].tap do |command|
- command << "--minify" unless debug
+ command << "--minify" unless (debug || rails_css_compressor?)
end
end
@@ -72,6 +72,10 @@ def watch_command(poll: false, **kwargs)
command << "-p" if poll
end
end
+
+ def rails_css_compressor?
+ defined?(Rails) && Rails&.application&.config&.assets&.css_compressor.present?
+ end
end
end
end
diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake
index bd407214..27653811 100644
--- a/lib/tasks/build.rake
+++ b/lib/tasks/build.rake
@@ -1,6 +1,6 @@
namespace :tailwindcss do
desc "Build your Tailwind CSS"
- task :build do |_, args|
+ task build: :environment do |_, args|
debug = args.extras.include?("debug")
command = Tailwindcss::Commands.compile_command(debug: debug)
puts command.inspect if args.extras.include?("verbose")
@@ -8,7 +8,7 @@ namespace :tailwindcss do
end
desc "Watch and build your Tailwind CSS on file changes"
- task :watch do |_, args|
+ task watch: :environment do |_, args|
debug = args.extras.include?("debug")
poll = args.extras.include?("poll")
command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index 7ff0c5c6..ac8f9d05 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -58,6 +58,24 @@ def mock_exe_directory(platform)
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 ".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
From b4c83b8ba309826e422fe97903b6b6c216c26394 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 5 Mar 2023 09:39:00 -0500
Subject: [PATCH 028/305] version bump to v2.0.24
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e035e504..bc9770bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.24 / 2023-03-05
+
+* When Rails CSS compression is on, avoid generating minified tailwindcss assets. (#253) by [@flavorjones](https://github.com/flavorjones).
+
+
## v2.0.23 / 2023-02-19
* Update to [Tailwind CSS v3.2.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.2.7) by [@flavorjones](https://github.com/flavorjones).
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index d7b5d205..11a309fe 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.23"
+ VERSION = "2.0.24"
end
From 73bbd8d187e3392881f758ff11e08c74e31959f0 Mon Sep 17 00:00:00 2001
From: Kentastic
Date: Sun, 5 Mar 2023 10:54:17 -0500
Subject: [PATCH 029/305] Added 2 official Tailwind plugins (#254)
---
lib/install/tailwind.config.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/install/tailwind.config.js b/lib/install/tailwind.config.js
index 094432ff..4476e099 100644
--- a/lib/install/tailwind.config.js
+++ b/lib/install/tailwind.config.js
@@ -18,5 +18,7 @@ module.exports = {
require('@tailwindcss/forms'),
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
+ require('@tailwindcss/line-clamp'),
+ require('@tailwindcss/container-queries'),
]
}
From e07a765e228c7f90d5229a789d2248669b6a7e91 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 5 Mar 2023 09:44:02 -0500
Subject: [PATCH 030/305] dev: update Gemfile.lock
---
Gemfile.lock | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index e6a9169f..45b315c9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,45 +1,45 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.23)
+ tailwindcss-rails (2.0.24)
railties (>= 6.0.0)
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.0.4.2)
- actionpack (= 7.0.4.2)
- actionview (= 7.0.4.2)
- activejob (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionmailer (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ actionview (= 7.0.4.3)
+ activejob (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
- actionpack (7.0.4.2)
- actionview (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionpack (7.0.4.3)
+ actionview (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actionview (7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionview (7.0.4.3)
+ activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (7.0.4.2)
- activesupport (= 7.0.4.2)
+ activejob (7.0.4.3)
+ activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
- activesupport (7.0.4.2)
+ activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
builder (3.2.4)
- concurrent-ruby (1.2.0)
+ concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
debug (1.7.1)
@@ -59,7 +59,7 @@ GEM
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
- minitest (5.17.0)
+ minitest (5.18.0)
net-imap (0.3.4)
date
net-protocol
@@ -69,15 +69,15 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
- nokogiri (1.14.1)
+ nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
- nokogiri (1.14.1-x86_64-darwin)
+ nokogiri (1.14.2-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.14.1-x86_64-linux)
+ nokogiri (1.14.2-x86_64-linux)
racc (~> 1.4)
racc (1.6.2)
- rack (2.2.6.2)
+ rack (2.2.6.4)
rack-test (2.0.2)
rack (>= 1.3)
rails-dom-testing (2.0.3)
@@ -85,19 +85,19 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
- railties (7.0.4.2)
- actionpack (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ railties (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
thor (1.2.1)
- timeout (0.3.1)
+ timeout (0.3.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- zeitwerk (2.6.6)
+ zeitwerk (2.6.7)
PLATFORMS
ruby
@@ -110,4 +110,4 @@ DEPENDENCIES
tailwindcss-rails!
BUNDLED WITH
- 2.3.14
+ 2.4.7
From cbf5512abc04660e74212e781487824f56d2ccb3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 14 Mar 2023 10:41:52 -0400
Subject: [PATCH 031/305] version bump to v2.0.25
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc9770bc..9ab95abb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.25 / 2023-03-14
+
+* Installer now includes all 5 official Tailwind plugins (adding `line-clamp` and `container-queries`). (#254) by @Kentasmic
+
+
## v2.0.24 / 2023-03-05
* When Rails CSS compression is on, avoid generating minified tailwindcss assets. (#253) by [@flavorjones](https://github.com/flavorjones).
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 11a309fe..b073fed9 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.24"
+ VERSION = "2.0.25"
end
From 4c0de9a020ff4cbbae6e7c5c33b8861548288073 Mon Sep 17 00:00:00 2001
From: Tyson Gach
Date: Tue, 28 Mar 2023 10:52:04 -0500
Subject: [PATCH 032/305] Update tailwindcss to v3.3.0
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.0
The line-clamp plugin is now baked into the framework itself:
https://tailwindcss.com/blog/tailwindcss-v3-3
---
lib/install/tailwind.config.js | 1 -
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/install/tailwind.config.js b/lib/install/tailwind.config.js
index 4476e099..39364deb 100644
--- a/lib/install/tailwind.config.js
+++ b/lib/install/tailwind.config.js
@@ -18,7 +18,6 @@ module.exports = {
require('@tailwindcss/forms'),
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
- require('@tailwindcss/line-clamp'),
require('@tailwindcss/container-queries'),
]
}
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 3fa169b5..ee759439 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.2.7"
+ VERSION = "v3.3.0"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From c2fced8a580e92d91d60c79bd0b2ab5051974956 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 29 Mar 2023 22:47:26 -0400
Subject: [PATCH 033/305] doc: update CHANGELOG
[skip ci]
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ab95abb..7b776444 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.0) by @tysongach
+
+
## v2.0.25 / 2023-03-14
* Installer now includes all 5 official Tailwind plugins (adding `line-clamp` and `container-queries`). (#254) by @Kentasmic
From 56bdb1fddffa798563ce22b1fbc9e9235ef88337 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 30 Mar 2023 00:34:10 -0400
Subject: [PATCH 034/305] use a local tailwindcss binary by setting
TAILWINDCSS_INSTALL_DIR
this will work for both the vanilla "ruby" platform as well as
override the behavior of the native platform gem.
---
CHANGELOG.md | 1 +
README.md | 29 +++++++++-
lib/tailwindcss/commands.rb | 45 +++++++++++-----
test/lib/tailwindcss/commands_test.rb | 78 +++++++++++++++++++++++++--
4 files changed, 133 insertions(+), 20 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b776444..1d1ac58b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## next / unreleased
* Update to [Tailwind CSS v3.3.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.0) by @tysongach
+* Users can use a locally-installed `tailwindcss` executable by setting a `TAILWINDCSS_INSTALL_DIR` environment variable. (#224, #226) by @flavorjones
## v2.0.25 / 2023-03-14
diff --git a/README.md b/README.md
index db1a12cd..aa4aed4b 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,34 @@ 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 Linux x64, macOS arm64, macOS x64, and Windows x64. (Note that due to this setup, you must install the actual gems – you can't pin your gem to the github repo.)
+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 containing the executable.
+
+For example, if you've installed `tailwindcss` so that the executable is found at `/node_modules/bin/tailwindcss`, then you should set your environment variable like so:
+
+``` sh
+TAILWINDCSS_INSTALL_DIR=/path/to/node_modules/bin
+```
+
+This also works with relative paths. If you've installed into your app's directory at `./node_modules/.bin/tailwindcss`:
+
+``` sh
+TAILWINDCSS_INSTALL_DIR=node_modules/.bin
+```
## Developing with Tailwindcss
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 4c91428c..448e08f9 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -2,6 +2,8 @@
module Tailwindcss
module Commands
+ DEFAULT_DIR = File.expand_path(File.join(__dir__, "..", "..", "exe"))
+
# raised when the host platform is not supported by upstream tailwindcss's binary releases
class UnsupportedPlatformException < StandardError
end
@@ -10,26 +12,41 @@ class UnsupportedPlatformException < StandardError
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: File.expand_path(File.join(__dir__, "..", "..", "exe"))
- )
- if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(Gem::Platform.new(p)) }
- 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_path = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
- Gem::Platform.match(Gem::Platform.new(File.basename(File.dirname(f))))
+ 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::Platform.new(p)) }
+ 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::Platform.new(File.basename(File.dirname(f))))
+ end
end
- if exe_path.nil?
+ if exe_file.nil? || !File.exist?(exe_file)
raise ExecutableNotFoundException, <<~MESSAGE
Cannot find the tailwindcss executable for #{platform} in #{exe_path}
@@ -52,7 +69,7 @@ def executable(
MESSAGE
end
- exe_path
+ exe_file
end
def compile_command(debug: false, **kwargs)
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index ac8f9d05..6ddc6a25 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -2,11 +2,6 @@
require "minitest/mock"
class Tailwindcss::CommandsTest < ActiveSupport::TestCase
- 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
-
def mock_exe_directory(platform)
Dir.mktmpdir do |dir|
FileUtils.mkdir(File.join(dir, platform))
@@ -18,6 +13,19 @@ def mock_exe_directory(platform)
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"))
@@ -42,6 +50,66 @@ def mock_exe_directory(platform)
end
end
+ 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
+ end
+
+ test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when we're not on a supported platform" do
+ Gem::Platform.stub(:match, 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
+ 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)
+ 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
+ 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
From 3f091fe9bda8a05b28449a9f1619059ac293cea6 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 30 Mar 2023 01:44:11 -0400
Subject: [PATCH 035/305] version bump to v2.0.26
---
CHANGELOG.md | 4 ++--
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d1ac58b..d9a614d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
-## next / unreleased
+## v2.0.26 / 2023-03-30
* Update to [Tailwind CSS v3.3.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.0) by @tysongach
-* Users can use a locally-installed `tailwindcss` executable by setting a `TAILWINDCSS_INSTALL_DIR` environment variable. (#224, #226) by @flavorjones
+* Use a locally-installed `tailwindcss` executable by setting a `TAILWINDCSS_INSTALL_DIR` environment variable. (#224, #226) by @flavorjones
## v2.0.25 / 2023-03-14
diff --git a/Gemfile.lock b/Gemfile.lock
index 45b315c9..762cadd3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.24)
+ tailwindcss-rails (2.0.26)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index b073fed9..d37ae321 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.25"
+ VERSION = "2.0.26"
end
From ee5dca524a9c8f84b1a9b1ffccfb1cb9d1c02efd Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 2 Apr 2023 09:06:20 -0400
Subject: [PATCH 036/305] dep: update tailwindcss to v3.3.1
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.1
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d9a614d0..201b4d26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.1) by @flavorjones
+
+
## v2.0.26 / 2023-03-30
* Update to [Tailwind CSS v3.3.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.0) by @tysongach
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index ee759439..273a69b4 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.3.0"
+ VERSION = "v3.3.1"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 5777017729a2990ac485d86a6fed3df2fcaf8d23 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 18 Apr 2023 20:53:16 +0000
Subject: [PATCH 037/305] build(deps): bump nokogiri from 1.14.2 to 1.14.3
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.2 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.2...v1.14.3)
---
updated-dependencies:
- dependency-name: nokogiri
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 762cadd3..f79fc0dc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -69,12 +69,12 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
- nokogiri (1.14.2)
+ nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
- nokogiri (1.14.2-x86_64-darwin)
+ nokogiri (1.14.3-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.14.2-x86_64-linux)
+ nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
racc (1.6.2)
rack (2.2.6.4)
From f44a6dbfbe6ae288cbcb82f1d3868cf571870c76 Mon Sep 17 00:00:00 2001
From: Gord Pearson
Date: Thu, 20 Apr 2023 16:18:17 -0400
Subject: [PATCH 038/305] Handle `tailwindcss:watch[always]`
---
lib/tailwindcss/commands.rb | 3 ++-
lib/tasks/build.rake | 3 ++-
test/lib/tailwindcss/commands_test.rb | 7 +++++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 448e08f9..0020a973 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -83,9 +83,10 @@ def compile_command(debug: false, **kwargs)
end
end
- def watch_command(poll: false, **kwargs)
+ def watch_command(always: false, poll: false, **kwargs)
compile_command(**kwargs).tap do |command|
command << "-w"
+ command << "always" if always
command << "-p" if poll
end
end
diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake
index 27653811..13407699 100644
--- a/lib/tasks/build.rake
+++ b/lib/tasks/build.rake
@@ -11,7 +11,8 @@ namespace :tailwindcss do
task watch: :environment do |_, args|
debug = args.extras.include?("debug")
poll = args.extras.include?("poll")
- command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
+ always = args.extras.include?("always")
+ command = Tailwindcss::Commands.watch_command(always: always, debug: debug, poll: poll)
puts command.inspect if args.extras.include?("verbose")
system(*command)
end
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index 6ddc6a25..142efcfc 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -165,8 +165,15 @@ def mock_local_tailwindcss_install
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
end
end
From 86b93cd2981d2b764a970e3ef277496ef6b62483 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 2 Apr 2023 09:13:49 -0400
Subject: [PATCH 039/305] version bump to v2.0.27 (backport commit)
---
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 201b4d26..590a2b09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,5 @@
-## next / unreleased
+## v2.0.27 / 2023-04-02
* Update to [Tailwind CSS v3.3.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.1) by @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index f79fc0dc..0ee303aa 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.26)
+ tailwindcss-rails (2.0.27)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index d37ae321..a2163aaa 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.26"
+ VERSION = "2.0.27"
end
From e665b097ae51e4e4d388370352a6390d41e685fd Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 21 Apr 2023 12:26:25 -0400
Subject: [PATCH 040/305] doc: update README to describe `watch[always]`
See #262
[skip ci]
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index aa4aed4b..c0394640 100644
--- a/README.md
+++ b/README.md
@@ -70,9 +70,11 @@ While you're developing your application, you want to run Tailwind in "watch" mo
- running `rails tailwindcss:watch` as a separate process,
- or by running `./bin/dev` which uses [foreman](https://github.com/ddollar/foreman) to start both the Tailwind watch process and the rails server in development mode.
+If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling: `rails tailwindcss:watch[poll]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
+
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.
-If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling: `rails tailwindcss:watch[poll]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
+If you are running `rails tailwindcss:watch` in a docker container without a tty, pass the `always` argument to the task to instruct tailwindcss to keep the watcher alive even when `stdin` is closed: `rails tailwindcss:watch[always]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
### Debugging with unminified assets
From 0f9965a33a5f94781585ce36700a575b9163c224 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 21 Apr 2023 12:46:10 -0400
Subject: [PATCH 041/305] dep: bundle update
---
Gemfile.lock | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 0ee303aa..2eab2979 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -42,13 +42,18 @@ GEM
concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
- debug (1.7.1)
+ debug (1.7.2)
+ irb (>= 1.5.0)
+ reline (>= 0.3.1)
erubi (1.12.0)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
- loofah (2.19.1)
+ io-console (0.6.0)
+ irb (1.6.4)
+ reline (>= 0.3.0)
+ loofah (2.20.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.1)
@@ -78,7 +83,7 @@ GEM
racc (~> 1.4)
racc (1.6.2)
rack (2.2.6.4)
- rack-test (2.0.2)
+ rack-test (2.1.0)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
@@ -93,6 +98,8 @@ GEM
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
+ reline (0.3.3)
+ io-console (~> 0.5)
thor (1.2.1)
timeout (0.3.2)
tzinfo (2.0.6)
From 83aeedecae1f938c4ed1ef348eebd78620502624 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 21 Apr 2023 12:49:24 -0400
Subject: [PATCH 042/305] version bump to v2.0.28
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/version.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 590a2b09..bb30202e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## v2.0.28 / 2023-04-21
+
+* The `watch` task accepts an `always` argument to keep the watcher alive when stdin is closed: `rails tailwindcss:watch[always]`. #262 by @GoodForOneFare
+
+
## v2.0.27 / 2023-04-02
* Update to [Tailwind CSS v3.3.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.1) by @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index a2163aaa..7e61754a 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.27"
+ VERSION = "2.0.28"
end
From 92f6cdb33604d6b55127c97ac21e61e3baa083f7 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 26 Apr 2023 09:36:39 -0400
Subject: [PATCH 043/305] dep: update tailwindcss to v3.3.2
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.2
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb30202e..0f2d20df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.2) by @flavorjones
+
+
## v2.0.28 / 2023-04-21
* The `watch` task accepts an `always` argument to keep the watcher alive when stdin is closed: `rails tailwindcss:watch[always]`. #262 by @GoodForOneFare
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 273a69b4..1048f0fb 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.3.1"
+ VERSION = "v3.3.2"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From b6d9029058f901a30f19df3fd5ca0321425612a8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 26 Apr 2023 09:58:49 -0400
Subject: [PATCH 044/305] version bump to v2.0.29
and update Gemfile.lock
---
CHANGELOG.md | 2 +-
Gemfile.lock | 6 +++---
lib/tailwindcss/version.rb | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f2d20df..3102d87d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,5 @@
-## next / unreleased
+## v2.0.29 / 2023-04-26
* Update to [Tailwind CSS v3.3.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.2) by @flavorjones
diff --git a/Gemfile.lock b/Gemfile.lock
index 2eab2979..ed969420 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.27)
+ tailwindcss-rails (2.0.29)
railties (>= 6.0.0)
GEM
@@ -48,7 +48,7 @@ GEM
erubi (1.12.0)
globalid (1.1.0)
activesupport (>= 5.0)
- i18n (1.12.0)
+ i18n (1.13.0)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.6.4)
@@ -82,7 +82,7 @@ GEM
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
racc (1.6.2)
- rack (2.2.6.4)
+ rack (2.2.7)
rack-test (2.1.0)
rack (>= 1.3)
rails-dom-testing (2.0.3)
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 7e61754a..41639b39 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.28"
+ VERSION = "2.0.29"
end
From e333322623cdc8ebbe953222cd7e064fe6b49e23 Mon Sep 17 00:00:00 2001
From: Robin Mehner
Date: Tue, 20 Jun 2023 20:25:22 +0200
Subject: [PATCH 045/305] Enhance spec:prepare command with tailwindcss:build
command
jsbundling-rails (https://github.com/rails/jsbundling-rails/pull/128)
and cssbundling-rails (https://github.com/rails/cssbundling-rails/pull/116)
do the same and it's useful for people who are using RSpec.
---
lib/tasks/build.rake | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake
index 13407699..8f61bf8e 100644
--- a/lib/tasks/build.rake
+++ b/lib/tasks/build.rake
@@ -22,6 +22,8 @@ Rake::Task["assets:precompile"].enhance(["tailwindcss:build"])
if Rake::Task.task_defined?("test:prepare")
Rake::Task["test:prepare"].enhance(["tailwindcss:build"])
+elsif Rake::Task.task_defined?("spec:prepare")
+ Rake::Task["spec:prepare"].enhance(["tailwindcss:build"])
elsif Rake::Task.task_defined?("db:test:prepare")
Rake::Task["db:test:prepare"].enhance(["tailwindcss:build"])
end
From da6e52630cc1885d24b34e8a33f849eb2d6507d1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 21 Jun 2023 16:43:32 -0400
Subject: [PATCH 046/305] update CHANGELOG
[skip ci]
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3102d87d..5fd59751 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
+## next / unreleased
+
+* If defined, the `spec:prepare` rake task will be decorated with `tailwindcss:build` (#271) by @rmehner
+
+
## v2.0.29 / 2023-04-26
* Update to [Tailwind CSS v3.3.2](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.2) by @flavorjones
From 3f24769fa4feaf115d8a346da4df027a3bf7c080 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 13 Jul 2023 13:11:32 -0400
Subject: [PATCH 047/305] dep: bundle update Gemfile.lock
---
Gemfile.lock | 80 +++++++++++++++++++++++++++-------------------------
1 file changed, 41 insertions(+), 39 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index ed969420..faae2446 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,33 +7,33 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.0.4.3)
- actionpack (= 7.0.4.3)
- actionview (= 7.0.4.3)
- activejob (= 7.0.4.3)
- activesupport (= 7.0.4.3)
+ actionmailer (7.0.6)
+ actionpack (= 7.0.6)
+ actionview (= 7.0.6)
+ activejob (= 7.0.6)
+ activesupport (= 7.0.6)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
- actionpack (7.0.4.3)
- actionview (= 7.0.4.3)
- activesupport (= 7.0.4.3)
- rack (~> 2.0, >= 2.2.0)
+ actionpack (7.0.6)
+ actionview (= 7.0.6)
+ activesupport (= 7.0.6)
+ rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actionview (7.0.4.3)
- activesupport (= 7.0.4.3)
+ actionview (7.0.6)
+ activesupport (= 7.0.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (7.0.4.3)
- activesupport (= 7.0.4.3)
+ activejob (7.0.6)
+ activesupport (= 7.0.6)
globalid (>= 0.3.6)
- activesupport (7.0.4.3)
+ activesupport (7.0.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -42,20 +42,20 @@ GEM
concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
- debug (1.7.2)
+ debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
erubi (1.12.0)
globalid (1.1.0)
activesupport (>= 5.0)
- i18n (1.13.0)
+ i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
- irb (1.6.4)
- reline (>= 0.3.0)
- loofah (2.20.0)
+ irb (1.7.3)
+ reline (>= 0.3.6)
+ loofah (2.21.3)
crass (~> 1.0.2)
- nokogiri (>= 1.5.9)
+ nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
@@ -63,9 +63,9 @@ GEM
net-smtp
method_source (1.0.0)
mini_mime (1.1.2)
- mini_portile2 (2.8.1)
- minitest (5.18.0)
- net-imap (0.3.4)
+ mini_portile2 (2.8.2)
+ minitest (5.18.1)
+ net-imap (0.3.6)
date
net-protocol
net-pop (0.1.2)
@@ -74,37 +74,39 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
- nokogiri (1.14.3)
- mini_portile2 (~> 2.8.0)
+ nokogiri (1.15.3)
+ mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.14.3-x86_64-darwin)
+ nokogiri (1.15.3-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.14.3-x86_64-linux)
+ nokogiri (1.15.3-x86_64-linux)
racc (~> 1.4)
- racc (1.6.2)
+ racc (1.7.1)
rack (2.2.7)
rack-test (2.1.0)
rack (>= 1.3)
- rails-dom-testing (2.0.3)
- activesupport (>= 4.2.0)
+ rails-dom-testing (2.1.1)
+ activesupport (>= 5.0.0)
+ minitest
nokogiri (>= 1.6)
- rails-html-sanitizer (1.5.0)
- loofah (~> 2.19, >= 2.19.1)
- railties (7.0.4.3)
- actionpack (= 7.0.4.3)
- activesupport (= 7.0.4.3)
+ rails-html-sanitizer (1.6.0)
+ loofah (~> 2.21)
+ nokogiri (~> 1.14)
+ railties (7.0.6)
+ actionpack (= 7.0.6)
+ activesupport (= 7.0.6)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
- reline (0.3.3)
+ reline (0.3.6)
io-console (~> 0.5)
- thor (1.2.1)
- timeout (0.3.2)
+ thor (1.2.2)
+ timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- zeitwerk (2.6.7)
+ zeitwerk (2.6.8)
PLATFORMS
ruby
From f49eeda701d7ef1f0cb939cac911d2fa1c08a94d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 13 Jul 2023 13:15:29 -0400
Subject: [PATCH 048/305] dep: update tailwindcss to v3.3.3
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.3
---
CHANGELOG.md | 1 +
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5fd59751..c35b7ac6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
## next / unreleased
+* Update to [Tailwind CSS v3.3.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.3) by @flavorjones
* If defined, the `spec:prepare` rake task will be decorated with `tailwindcss:build` (#271) by @rmehner
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 1048f0fb..62ed8fc2 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.3.2"
+ VERSION = "v3.3.3"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 9e64982ea500e2b498a3a2f2f788b8fc0ffcb43a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 13 Jul 2023 13:28:02 -0400
Subject: [PATCH 049/305] version bump to v2.0.30
---
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 c35b7ac6..0ad83495 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,5 @@
-## next / unreleased
+## v2.0.30 / 2023-07-13
* Update to [Tailwind CSS v3.3.3](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.3) by @flavorjones
* If defined, the `spec:prepare` rake task will be decorated with `tailwindcss:build` (#271) by @rmehner
diff --git a/Gemfile.lock b/Gemfile.lock
index faae2446..4f3dc109 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.29)
+ tailwindcss-rails (2.0.30)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 41639b39..644ed51d 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.29"
+ VERSION = "2.0.30"
end
From 788f01f618ff51c533408269cb6a0521a202f740 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Thu, 17 Aug 2023 13:55:12 -0700
Subject: [PATCH 050/305] Consistently use double quotes in all templates
---
lib/generators/tailwindcss/scaffold/scaffold_generator.rb | 2 +-
.../tailwindcss/scaffold/templates/index.html.erb.tt | 2 +-
.../tailwindcss/scaffold/templates/new.html.erb.tt | 2 +-
.../tailwindcss/scaffold/templates/partial.html.erb.tt | 2 +-
.../tailwindcss/scaffold/templates/show.html.erb.tt | 6 +++---
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
index 6c1a2101..e50ea3e8 100644
--- a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
+++ b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
@@ -1,4 +1,4 @@
-require 'rails/generators/erb/scaffold/scaffold_generator'
+require "rails/generators/erb/scaffold/scaffold_generator"
require "rails/generators/resource_helpers"
module Tailwindcss
diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
index c65409fa..c29d5e6e 100644
--- a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
@@ -5,7 +5,7 @@
<%= 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-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt
index 1f7870f6..61c0a450 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 %>_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/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
index 55717003..60a0de20 100644
--- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt
@@ -16,7 +16,7 @@
<% 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" %>
+ <%%= 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 4bf94e8f..c386118c 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 <%= 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" %>
- <%%= 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 <%= 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" %>
- <%%= 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" %>
+ <%%= 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 3dfd6f7b5cf8775863bc24994037e3dd0d46e887 Mon Sep 17 00:00:00 2001
From: Cadu Ribeiro
Date: Tue, 10 Oct 2023 13:29:07 -0300
Subject: [PATCH 051/305] Run the server with remote debugging enabled
This commit adds the `--open` option so a remote session can be
started using `rdbg --attach`. This allows to debug inside a
foreman process.
---
CHANGELOG.md | 3 +++
lib/install/Procfile.dev | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ad83495..a03a9cc3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## next / unreleased
+
+* Update Procfile.dev to run foreman with `--open` option allowing remote sessions with `rdbg --attach` by @duduribeiro
## v2.0.30 / 2023-07-13
diff --git a/lib/install/Procfile.dev b/lib/install/Procfile.dev
index 023e98a0..59915d58 100644
--- a/lib/install/Procfile.dev
+++ b/lib/install/Procfile.dev
@@ -1,2 +1,2 @@
-web: bin/rails server -p 3000
+web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
css: bin/rails tailwindcss:watch
From 2da275cb7c600cfa5479018d22d33de628fad7eb Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 10 Oct 2023 14:20:51 -0400
Subject: [PATCH 052/305] test: fix user journey tests to support Rails 7.1
The "about" rake task was removed in e9540260
---
test/integration/user_journey_test.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index c714ea09..0656ba55 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -23,5 +23,11 @@ bundle install
bin/rails tailwindcss:install
+cat <> Rakefile
+task :still_here do
+ puts "Rake process did not exit early"
+end
+EOF
+
# ensure rake tasks don't exec (#188)
-bin/rails tailwindcss:build about | grep "About your application"
+bin/rails tailwindcss:build still_here | grep "Rake process did not exit early"
From 01f17082f8e5854671cfaacedf5fdff3395dea89 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 10 Oct 2023 14:24:56 -0400
Subject: [PATCH 053/305] dep: update Gemfile.lock
---
Gemfile.lock | 114 +++++++++++++++++++++++++++++++--------------------
1 file changed, 70 insertions(+), 44 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 4f3dc109..270b56d7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,53 +7,66 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.0.6)
- actionpack (= 7.0.6)
- actionview (= 7.0.6)
- activejob (= 7.0.6)
- activesupport (= 7.0.6)
+ actionmailer (7.1.0)
+ actionpack (= 7.1.0)
+ actionview (= 7.1.0)
+ activejob (= 7.1.0)
+ activesupport (= 7.1.0)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
- rails-dom-testing (~> 2.0)
- actionpack (7.0.6)
- actionview (= 7.0.6)
- activesupport (= 7.0.6)
- rack (~> 2.0, >= 2.2.4)
+ rails-dom-testing (~> 2.2)
+ actionpack (7.1.0)
+ actionview (= 7.1.0)
+ activesupport (= 7.1.0)
+ nokogiri (>= 1.8.5)
+ rack (>= 2.2.4)
+ rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
- rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actionview (7.0.6)
- activesupport (= 7.0.6)
+ rails-dom-testing (~> 2.2)
+ rails-html-sanitizer (~> 1.6)
+ actionview (7.1.0)
+ activesupport (= 7.1.0)
builder (~> 3.1)
- erubi (~> 1.4)
- rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (7.0.6)
- activesupport (= 7.0.6)
+ erubi (~> 1.11)
+ rails-dom-testing (~> 2.2)
+ rails-html-sanitizer (~> 1.6)
+ activejob (7.1.0)
+ activesupport (= 7.1.0)
globalid (>= 0.3.6)
- activesupport (7.0.6)
+ activesupport (7.1.0)
+ base64
+ bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
+ connection_pool (>= 2.2.5)
+ drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
+ mutex_m
tzinfo (~> 2.0)
+ base64 (0.1.1)
+ bigdecimal (3.1.4)
builder (3.2.4)
concurrent-ruby (1.2.2)
+ connection_pool (2.4.1)
crass (1.0.6)
date (3.3.3)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
+ drb (2.1.1)
+ ruby2_keywords
erubi (1.12.0)
- globalid (1.1.0)
- activesupport (>= 5.0)
+ globalid (1.2.1)
+ activesupport (>= 6.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
- irb (1.7.3)
- reline (>= 0.3.6)
- loofah (2.21.3)
+ irb (1.8.1)
+ rdoc
+ reline (>= 0.3.8)
+ loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -61,52 +74,65 @@ GEM
net-imap
net-pop
net-smtp
- method_source (1.0.0)
- mini_mime (1.1.2)
- mini_portile2 (2.8.2)
- minitest (5.18.1)
- net-imap (0.3.6)
+ mini_mime (1.1.5)
+ mini_portile2 (2.8.4)
+ minitest (5.20.0)
+ mutex_m (0.1.2)
+ net-imap (0.4.1)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
- net-smtp (0.3.3)
+ net-smtp (0.4.0)
net-protocol
- nokogiri (1.15.3)
+ nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.15.3-x86_64-darwin)
+ nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.15.3-x86_64-linux)
+ nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
+ psych (5.1.0)
+ stringio
racc (1.7.1)
- rack (2.2.7)
+ rack (3.0.8)
+ rack-session (2.0.0)
+ rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
- rails-dom-testing (2.1.1)
+ rackup (2.1.0)
+ rack (>= 3)
+ webrick (~> 1.8)
+ rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.0.6)
- actionpack (= 7.0.6)
- activesupport (= 7.0.6)
- method_source
+ railties (7.1.0)
+ actionpack (= 7.1.0)
+ activesupport (= 7.1.0)
+ irb
+ rackup (>= 1.0.0)
rake (>= 12.2)
- thor (~> 1.0)
- zeitwerk (~> 2.5)
+ thor (~> 1.0, >= 1.2.2)
+ zeitwerk (~> 2.6)
rake (13.0.6)
- reline (0.3.6)
+ rdoc (6.5.0)
+ psych (>= 4.0.0)
+ reline (0.3.9)
io-console (~> 0.5)
+ ruby2_keywords (0.0.5)
+ stringio (3.0.8)
thor (1.2.2)
timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- zeitwerk (2.6.8)
+ webrick (1.8.1)
+ zeitwerk (2.6.12)
PLATFORMS
ruby
From b473e19a13819638f6a4ff0504ba4da40c71a6aa Mon Sep 17 00:00:00 2001
From: Olly Headey
Date: Mon, 9 Oct 2023 20:03:55 +0100
Subject: [PATCH 054/305] Fix deprecation warnings in 3.5.0
---
lib/tailwindcss/commands.rb | 4 ++--
test/lib/tailwindcss/commands_test.rb | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 0020a973..1a4b0855 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -34,7 +34,7 @@ def executable(exe_path: DEFAULT_DIR)
MESSAGE
end
else
- if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(Gem::Platform.new(p)) }
+ if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), nil) }
raise UnsupportedPlatformException, <<~MESSAGE
tailwindcss-rails does not support the #{platform} platform
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
@@ -42,7 +42,7 @@ def executable(exe_path: DEFAULT_DIR)
end
exe_file = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
- Gem::Platform.match(Gem::Platform.new(File.basename(File.dirname(f))))
+ Gem::Platform.match_gem?(Gem::Platform.new(File.basename(File.dirname(f))), nil)
end
end
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index 142efcfc..d09d8a94 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -7,7 +7,7 @@ def mock_exe_directory(platform)
FileUtils.mkdir(File.join(dir, platform))
path = File.join(dir, platform, "tailwindcss")
FileUtils.touch(path)
- Gem::Platform.stub(:match, true) do
+ Gem::Platform.stub(:match_gem?, true) do
yield(dir, path)
end
end
@@ -35,7 +35,7 @@ def mock_local_tailwindcss_install
end
test ".executable raises UnsupportedPlatformException when we're not on a supported platform" do
- Gem::Platform.stub(:match, false) do # nothing is supported
+ Gem::Platform.stub(:match_gem?, false) do # nothing is supported
assert_raises(Tailwindcss::Commands::UnsupportedPlatformException) do
Tailwindcss::Commands.executable
end
@@ -66,7 +66,7 @@ def mock_local_tailwindcss_install
end
test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when we're not on a supported platform" do
- Gem::Platform.stub(:match, false) do # nothing is supported
+ Gem::Platform.stub(:match_gem?, false) do # nothing is supported
mock_local_tailwindcss_install do |local_install_dir, expected|
result = nil
begin
From a5dd494944ce1d9271f9a69bb0ea725da2fa89a3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 10 Oct 2023 14:48:30 -0400
Subject: [PATCH 055/305] pass the gem name to Gem::Platform.match_gem?
Although this argument isn't used in the CRuby implementation, other
implementations (specifically TruffleRuby) reserve the right to
re-implement this method with special cases for specific gems.
More context at rubygems/rubygems#3817
---
lib/tailwindcss/commands.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 1a4b0855..b1367c66 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -3,6 +3,7 @@
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
@@ -34,7 +35,7 @@ def executable(exe_path: DEFAULT_DIR)
MESSAGE
end
else
- if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), nil) }
+ 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
@@ -42,7 +43,7 @@ def executable(exe_path: DEFAULT_DIR)
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))), nil)
+ Gem::Platform.match_gem?(Gem::Platform.new(File.basename(File.dirname(f))), GEM_NAME)
end
end
From ad7edc914a33fb7e2b005135210e2e804e0abded Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 10 Oct 2023 15:05:49 -0400
Subject: [PATCH 056/305] version bump to v2.0.31
---
CHANGELOG.md | 6 ++++--
lib/tailwindcss/version.rb | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a03a9cc3..9c755e5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
-## next / unreleased
+## v2.0.31 / 2023-10-10
+
+* Update Procfile.dev to run foreman with `--open` option allowing remote sessions with `rdbg --attach` (#281) by @duduribeiro
+* Address Rubygems 3.5.0 deprecation warnings (#280) by @lylo
-* Update Procfile.dev to run foreman with `--open` option allowing remote sessions with `rdbg --attach` by @duduribeiro
## v2.0.30 / 2023-07-13
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 644ed51d..bb255445 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.30"
+ VERSION = "2.0.31"
end
From a648c2c13caf7b62ac4a2ce221c5322caed0d985 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 27 Oct 2023 13:56:30 -0400
Subject: [PATCH 057/305] dep: tailwindcss 3.3.5 (from 3.3.3)
---
CHANGELOG.md | 6 ++++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c755e5d..fe3cb3c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.5](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.5) from v3.3.3 by @flavorjones
+ * Also see [v3.3.4 release notes](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.4)
+
+
## v2.0.31 / 2023-10-10
* Update Procfile.dev to run foreman with `--open` option allowing remote sessions with `rdbg --attach` (#281) by @duduribeiro
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 62ed8fc2..83f4daed 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.3.3"
+ VERSION = "v3.3.5"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From bcbd8360c8d9ff2df88f2396eb9bfa985a6d877d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 27 Oct 2023 15:11:29 -0400
Subject: [PATCH 058/305] test: assert on the existence of
Gem::Platform.match_gem?
to avoid stubbing a method that doesn't exist
---
test/lib/tailwindcss/commands_test.rb | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index d09d8a94..47112225 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -7,12 +7,19 @@ def mock_exe_directory(platform)
FileUtils.mkdir(File.join(dir, platform))
path = File.join(dir, platform, "tailwindcss")
FileUtils.touch(path)
- Gem::Platform.stub(:match_gem?, true) do
+ 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")
@@ -35,7 +42,7 @@ def mock_local_tailwindcss_install
end
test ".executable raises UnsupportedPlatformException when we're not on a supported platform" do
- Gem::Platform.stub(:match_gem?, false) do # nothing is supported
+ stub_gem_platform_match_gem(false) do # nothing is supported
assert_raises(Tailwindcss::Commands::UnsupportedPlatformException) do
Tailwindcss::Commands.executable
end
@@ -66,7 +73,7 @@ def mock_local_tailwindcss_install
end
test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when we're not on a supported platform" do
- Gem::Platform.stub(:match_gem?, false) do # nothing is supported
+ stub_gem_platform_match_gem(false) do # nothing is supported
mock_local_tailwindcss_install do |local_install_dir, expected|
result = nil
begin
From 44b470d18b46467e7340378914f805ade485079a Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 27 Oct 2023 14:53:34 -0400
Subject: [PATCH 059/305] dep: rubygems >= 3.2.0 for Platform#match_gem?
Closes #286
---
.github/workflows/ci.yml | 1 +
tailwindcss-rails.gemspec | 2 ++
2 files changed, 3 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 01135a4a..c78545e4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,6 +26,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
+ rubygems: latest
bundler: latest
bundler-cache: true
- name: Run tests
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 672c9885..02c10fb5 100644
--- a/tailwindcss-rails.gemspec
+++ b/tailwindcss-rails.gemspec
@@ -14,6 +14,8 @@ Gem::Specification.new do |spec|
"rubygems_mfa_required" => "true"
}
+ 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"
From 8f33c4ff7b7a076f7634ce2c7e55bd742d8f0592 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Fri, 27 Oct 2023 15:22:28 -0400
Subject: [PATCH 060/305] version bump to v2.0.32
---
CHANGELOG.md | 3 ++-
Gemfile.lock | 2 +-
lib/tailwindcss/version.rb | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe3cb3c2..99031742 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,8 @@
-## next / unreleased
+## v2.0.32 / 2023-10-27
* Update to [Tailwind CSS v3.3.5](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.5) from v3.3.3 by @flavorjones
* Also see [v3.3.4 release notes](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.4)
+* Restore support for Ruby 2.7, broken in v2.0.31, by explicitly setting `required_rubygems_version = ">= 3.2.0"`. (#286) by @flavorjones
## v2.0.31 / 2023-10-10
diff --git a/Gemfile.lock b/Gemfile.lock
index 270b56d7..5c4d2d0b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.30)
+ tailwindcss-rails (2.0.32)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index bb255445..892ad7b1 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.31"
+ VERSION = "2.0.32"
end
From ce371859952b5938a3695501a559cf0b889b1431 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:20:28 -0500
Subject: [PATCH 061/305] ci: introduce a new empty workflow for upstream
testing
---
.github/workflows/upstream.yml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 .github/workflows/upstream.yml
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
new file mode 100644
index 00000000..a9a64a00
--- /dev/null
+++ b/.github/workflows/upstream.yml
@@ -0,0 +1,20 @@
+name: upstream
+concurrency:
+ group: "${{github.workflow}}-${{github.ref}}"
+ cancel-in-progress: true
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: "0 8 * * 3" # At 08:00 on Wednesday # https://crontab.guru/#0_8_*_*_3
+ pull_request:
+ types: [opened, synchronize]
+ branches:
+ - '*'
+ paths:
+ - .github/workflows/upstream.yml # this file
+
+jobs:
+ rails:
+ name: empty job
+ steps:
+ run: echo hello world
From 67910e0bdf54371ae903a8720aba796a2be36525 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:22:05 -0500
Subject: [PATCH 062/305] ci: fix upstream pipeline
---
.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 a9a64a00..df1a3305 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -17,4 +17,4 @@ jobs:
rails:
name: empty job
steps:
- run: echo hello world
+ - run: echo hello world
From 9539fe525f89ba8d7649d1a7551e5e0ce4a2283d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:22:59 -0500
Subject: [PATCH 063/305] ci: another fix for the upstream workflow
---
.github/workflows/upstream.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index df1a3305..ab773d7e 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -16,5 +16,6 @@ on:
jobs:
rails:
name: empty job
+ runs-on: ubuntu-latest
steps:
- run: echo hello world
From faed80f38ee5e66a5fa250984844775b2f6f14b1 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:25:57 -0500
Subject: [PATCH 064/305] ci: more thorough user journey, integrated with rails
main
---
.github/workflows/ci.yml | 4 +---
.github/workflows/upstream.yml | 20 +++++++++++++----
test/integration/user_journey_test.sh | 32 ++++++++++++++++++++-------
3 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c78545e4..131f660d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -40,11 +40,9 @@ jobs:
runs-on: ${{matrix.plat}}-latest
steps:
- uses: actions/checkout@v3
- - run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
- bundler-cache: true
+ ruby-version: "3.2"
bundler: latest
- run: test/integration/user_journey_test.sh
shell: bash
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index ab773d7e..4af7c643 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -14,8 +14,20 @@ on:
- .github/workflows/upstream.yml # this file
jobs:
- rails:
- name: empty job
- runs-on: ubuntu-latest
+ user-journey:
+ name: "user-journey (rails main)"
+ 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:
- - run: echo hello world
+ - uses: actions/checkout@v3
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: "3.2"
+ bundler: latest
+ - run: test/integration/user_journey_test.sh
+ shell: bash
diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh
index 0656ba55..95c3174d 100755
--- a/test/integration/user_journey_test.sh
+++ b/test/integration/user_journey_test.sh
@@ -5,29 +5,45 @@
set -o pipefail
set -eux
+# set up dependencies
+rm -f Gemfile.lock
+bundle remove actionmailer
+bundle add rails --skip-install ${RAILSOPTS:-}
+bundle install
+
# fetch the upstream executables
bundle exec rake download
-# create a rails app in a directory with spaces in the name (#176, #184)
-rm -rf "Has A Space"
-mkdir "Has A Space"
-pushd "Has A Space"
+# do our work a directory with spaces in the name (#176, #184)
+rm -rf "My Workspace"
+mkdir "My Workspace"
+pushd "My Workspace"
-gem install rails
-rails new test-app --skip-bundle
+# create a rails app
+bundle exec rails -v
+bundle exec rails new test-app --skip-bundle
pushd test-app
-# install tailwindcss-rails
+# make sure to use the same version of rails (e.g., install from git source if necessary)
+bundle remove rails
+bundle add rails --skip-install ${RAILSOPTS:-}
+
+# use the tailwindcss-rails under test
bundle add tailwindcss-rails --path="../.."
bundle install
+bundle show --paths
+# install tailwindcss
bin/rails tailwindcss:install
+# TEST: tailwind was installed correctly
+grep tailwind app/views/layouts/application.html.erb
+
+# TEST: rake tasks don't exec (#188)
cat <> Rakefile
task :still_here do
puts "Rake process did not exit early"
end
EOF
-# ensure rake tasks don't exec (#188)
bin/rails tailwindcss:build still_here | grep "Rake process did not exit early"
From 13ceea6f9fde6ffbb4af07869f7cd4738bf05f4c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:37:03 -0500
Subject: [PATCH 065/305] ci: latest alpine builds don't have build-base
let's install it so we can compile C extensions when needed
---
.github/workflows/gem-install.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index 6f537004..0e569863 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -74,6 +74,7 @@ jobs:
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"
From 5933a40bfa5337726edc882a9115c6c5ec163bc3 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 2 Dec 2023 15:39:04 -0500
Subject: [PATCH 066/305] ci: update to test ruby 3.2, and add ruby-head
coverage
---
.github/workflows/ci.yml | 2 +-
.github/workflows/gem-install.yml | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 131f660d..1239459b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ["2.7", "3.0", "3.1", "3.2"]
+ ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
steps:
- uses: actions/checkout@v3
- run: rm Gemfile.lock
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index 0e569863..8b2fc1fa 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -26,7 +26,7 @@ jobs:
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
+ ruby-version: "3.2"
bundler: latest
bundler-cache: true
- run: "bundle exec rake gem:${{matrix.platform}}"
@@ -42,7 +42,7 @@ jobs:
steps:
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
+ ruby-version: "3.2"
- uses: actions/download-artifact@v3
with:
name: gem-ruby
@@ -56,7 +56,7 @@ jobs:
steps:
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
+ ruby-version: "3.2"
- uses: actions/download-artifact@v3
with:
name: gem-x86_64-linux
@@ -68,7 +68,7 @@ jobs:
needs: ["package"]
runs-on: ubuntu-latest
container:
- image: ruby:3.1-alpine
+ image: ruby:3.2-alpine
steps:
- uses: actions/download-artifact@v3
with:
@@ -89,7 +89,7 @@ jobs:
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.1 \
+ 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
@@ -102,7 +102,7 @@ jobs:
steps:
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
+ ruby-version: "3.2"
- uses: actions/download-artifact@v3
with:
name: gem-x86_64-darwin
@@ -130,7 +130,7 @@ jobs:
steps:
- uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.1"
+ ruby-version: "3.2"
- uses: actions/download-artifact@v3
with:
name: gem-x64-mingw-ucrt
From 0e62569bc587afc3bdce4fa36df506031f7b2858 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 9 Dec 2023 13:35:59 -0500
Subject: [PATCH 067/305] dep: update tailwindcss to 3.3.6
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99031742..93f9d4bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.6) from v3.3.5 by @flavorjones
+
+
## v2.0.32 / 2023-10-27
* Update to [Tailwind CSS v3.3.5](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.5) from v3.3.3 by @flavorjones
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index 83f4daed..ffb2d85e 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.3.5"
+ VERSION = "v3.3.6"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 674551bd53f192fcc16bb14f34b7cbd90a923c68 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sat, 9 Dec 2023 13:44:49 -0500
Subject: [PATCH 068/305] version bump to v2.0.33
---
CHANGELOG.md | 2 +-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93f9d4bf..73e33b30 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.0.33 / 2023-12-09
* Update to [Tailwind CSS v3.3.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.6) from v3.3.5 by @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 892ad7b1..70ff0fcc 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.32"
+ VERSION = "2.0.33"
end
From 3d43f91c6133fa5f3aca1080111d3b84a3f7a3d8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 09:19:35 -0500
Subject: [PATCH 069/305] dep(lockfile): bundle update
---
Gemfile.lock | 87 ++++++++++++++++++++++++++--------------------------
1 file changed, 44 insertions(+), 43 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 5c4d2d0b..859c7b81 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,41 +1,42 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.32)
+ tailwindcss-rails (2.0.33)
railties (>= 6.0.0)
GEM
remote: https://rubygems.org/
specs:
- actionmailer (7.1.0)
- actionpack (= 7.1.0)
- actionview (= 7.1.0)
- activejob (= 7.1.0)
- activesupport (= 7.1.0)
+ actionmailer (7.1.2)
+ actionpack (= 7.1.2)
+ actionview (= 7.1.2)
+ activejob (= 7.1.2)
+ activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
- actionpack (7.1.0)
- actionview (= 7.1.0)
- activesupport (= 7.1.0)
+ actionpack (7.1.2)
+ actionview (= 7.1.2)
+ activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
+ racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- actionview (7.1.0)
- activesupport (= 7.1.0)
+ actionview (7.1.2)
+ activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.1.0)
- activesupport (= 7.1.0)
+ activejob (7.1.2)
+ activesupport (= 7.1.2)
globalid (>= 0.3.6)
- activesupport (7.1.0)
+ activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -45,28 +46,28 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
- base64 (0.1.1)
- bigdecimal (3.1.4)
+ base64 (0.2.0)
+ bigdecimal (3.1.5)
builder (3.2.4)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
- date (3.3.3)
- debug (1.8.0)
- irb (>= 1.5.0)
- reline (>= 0.3.1)
- drb (2.1.1)
+ date (3.3.4)
+ debug (1.9.0)
+ irb (~> 1.10)
+ reline (>= 0.3.8)
+ drb (2.2.0)
ruby2_keywords
erubi (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
- io-console (0.6.0)
- irb (1.8.1)
+ io-console (0.7.1)
+ irb (1.10.1)
rdoc
reline (>= 0.3.8)
- loofah (2.21.4)
+ loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -75,28 +76,28 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
- mini_portile2 (2.8.4)
+ mini_portile2 (2.8.5)
minitest (5.20.0)
- mutex_m (0.1.2)
- net-imap (0.4.1)
+ mutex_m (0.2.0)
+ net-imap (0.4.8)
date
net-protocol
net-pop (0.1.2)
net-protocol
- net-protocol (0.2.1)
+ net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-protocol
- nokogiri (1.15.4)
+ nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.15.4-x86_64-darwin)
+ nokogiri (1.15.5-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.15.4-x86_64-linux)
+ nokogiri (1.15.5-x86_64-linux)
racc (~> 1.4)
- psych (5.1.0)
+ psych (5.1.2)
stringio
- racc (1.7.1)
+ racc (1.7.3)
rack (3.0.8)
rack-session (2.0.0)
rack (>= 3.0.0)
@@ -112,23 +113,23 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.1.0)
- actionpack (= 7.1.0)
- activesupport (= 7.1.0)
+ railties (7.1.2)
+ actionpack (= 7.1.2)
+ activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
- rake (13.0.6)
- rdoc (6.5.0)
+ rake (13.1.0)
+ rdoc (6.6.2)
psych (>= 4.0.0)
- reline (0.3.9)
+ reline (0.4.1)
io-console (~> 0.5)
ruby2_keywords (0.0.5)
- stringio (3.0.8)
- thor (1.2.2)
- timeout (0.4.0)
+ stringio (3.1.0)
+ thor (1.3.0)
+ timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
@@ -145,4 +146,4 @@ DEPENDENCIES
tailwindcss-rails!
BUNDLED WITH
- 2.4.7
+ 2.5.1
From f995da2b3d6f145fadb64aab739240025c6164d9 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 09:20:27 -0500
Subject: [PATCH 070/305] dep: bump tailwindcss to v3.3.7
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.7
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73e33b30..40676c25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.3.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.7) from v3.3.6 by @flavorjones
+
+
## v2.0.33 / 2023-12-09
* Update to [Tailwind CSS v3.3.6](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.6) from v3.3.5 by @flavorjones
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index ffb2d85e..a64f6b34 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.3.6"
+ VERSION = "v3.3.7"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 05bc2d3963aa4045ca24c9286c56eb365c63f5c8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 10:10:33 -0500
Subject: [PATCH 071/305] ci: do not fail fast
---
.github/workflows/ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1239459b..066f9460 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,6 +18,7 @@ jobs:
tests:
runs-on: ubuntu-latest
strategy:
+ fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
steps:
From 62339402ac980a5b68649b173e7553a718b0ee42 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 10:16:14 -0500
Subject: [PATCH 072/305] ci: pin rubygems update
because latest rubygems-update doesn't support Ruby 2.7
---
.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 066f9460..a35639b0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
- rubygems: latest
+ rubygems: "3.4.22" # last version to support Ruby 2.7
bundler: latest
bundler-cache: true
- name: Run tests
From 2523760fd11e41e11594ff8c40e4adba9e49a843 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 13:43:58 -0500
Subject: [PATCH 073/305] dep: update tailwindcss to v3.4.0
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.0
---
CHANGELOG.md | 2 +-
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 40676c25..301dc562 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
## next / unreleased
-* Update to [Tailwind CSS v3.3.7](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.7) from v3.3.6 by @flavorjones
+* Update to [Tailwind CSS v3.4.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.0) from v3.3.6 by @flavorjones
## v2.0.33 / 2023-12-09
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index a64f6b34..ed11a88f 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.3.7"
+ VERSION = "v3.4.0"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 172b08086c06441aad9812dfb90e2579c71c2f82 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 14:57:40 -0500
Subject: [PATCH 074/305] version bump to v2.1.0
---
CHANGELOG.md | 2 +-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 301dc562..d1a7f5da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.1.0 / 2023-12-19
* Update to [Tailwind CSS v3.4.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.0) from v3.3.6 by @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 70ff0fcc..75b38451 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.0.33"
+ VERSION = "2.1.0"
end
From 8f7c0a3d52d4c3a1982dff0551989925bdec1746 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Tue, 19 Dec 2023 15:02:02 -0500
Subject: [PATCH 075/305] dep: bump Gemfile.lock
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 859c7b81..0a7c4626 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.0.33)
+ tailwindcss-rails (2.1.0)
railties (>= 6.0.0)
GEM
From 79c1943d5d5ccee191b36e5f901e245612948f06 Mon Sep 17 00:00:00 2001
From: m-nakamura145
Date: Wed, 3 Jan 2024 21:38:36 +0900
Subject: [PATCH 076/305] Add Ruby 3.3 to CI matrix
---
.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 a35639b0..9aa5a379 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
+ ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "head"]
steps:
- uses: actions/checkout@v3
- run: rm Gemfile.lock
From cf872d6d1935d127ac067dfd668d656acc8ce336 Mon Sep 17 00:00:00 2001
From: Nick Pezza
Date: Wed, 20 Dec 2023 19:43:20 -0500
Subject: [PATCH 077/305] Add puma plugin
---
README.md | 7 ++++
lib/puma/plugin/tailwindcss.rb | 63 ++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100644 lib/puma/plugin/tailwindcss.rb
diff --git a/README.md b/README.md
index 4c540e8c..91075bb0 100644
--- a/README.md
+++ b/README.md
@@ -171,6 +171,13 @@ The inline version also works:
Has the image as it's background
```
+## Puma plugin
+We provide a Puma plugin if you want to run the Tailwind watcher together with Puma and have Puma monitor and manage it. Add
+```ruby
+plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
+```
+to your `puma.rb` configuration.
+
## License
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
diff --git a/lib/puma/plugin/tailwindcss.rb b/lib/puma/plugin/tailwindcss.rb
new file mode 100644
index 00000000..d78b068e
--- /dev/null
+++ b/lib/puma/plugin/tailwindcss.rb
@@ -0,0 +1,63 @@
+require "puma/plugin"
+
+Puma::Plugin.create do
+ attr_reader :puma_pid, :tailwind_pid, :log_writer
+
+ def start(launcher)
+ @log_writer = launcher.log_writer
+ @puma_pid = $$
+ @tailwind_pid = fork do
+ Thread.new { monitor_puma }
+ system(*Tailwindcss::Commands.watch_command)
+ end
+
+ launcher.events.on_stopped { stop_tailwind }
+
+ in_background do
+ monitor_tailwind
+ end
+ end
+
+ private
+ def stop_tailwind
+ Process.waitpid(tailwind_pid, Process::WNOHANG)
+ log "Stopping tailwind..."
+ Process.kill(:INT, tailwind_pid) if tailwind_pid
+ Process.wait(tailwind_pid)
+ rescue Errno::ECHILD, Errno::ESRCH
+ end
+
+ def monitor_puma
+ monitor(:puma_dead?, "Detected Puma has gone away, stopping tailwind...")
+ end
+
+ def monitor_tailwind
+ monitor(:tailwind_dead?, "Detected tailwind has gone away, stopping Puma...")
+ end
+
+ def monitor(process_dead, message)
+ loop do
+ if send(process_dead)
+ log message
+ Process.kill(:INT, $$)
+ break
+ end
+ sleep 2
+ end
+ end
+
+ def tailwind_dead?
+ Process.waitpid(tailwind_pid, Process::WNOHANG)
+ false
+ rescue Errno::ECHILD, Errno::ESRCH
+ true
+ end
+
+ def puma_dead?
+ Process.ppid != puma_pid
+ end
+
+ def log(...)
+ log_writer.log(...)
+ end
+end
From 18a721ec77bd6f95561b1f9544efb44e7b3dded8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 4 Jan 2024 16:52:17 -0500
Subject: [PATCH 078/305] doc: rework README to feature the Puma plugin
and add a CHANGELOG entry
---
CHANGELOG.md | 5 +++++
README.md | 34 ++++++++++++++++++++++++----------
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1a7f5da..d79f9986 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Introduce a Puma plugin to manage the Tailwind "watch" process from `rails server`. (#300) @npezza93
+
+
## v2.1.0 / 2023-12-19
* Update to [Tailwind CSS v3.4.0](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.0) from v3.3.6 by @flavorjones
diff --git a/README.md b/README.md
index 91075bb0..a78f6c8b 100644
--- a/README.md
+++ b/README.md
@@ -60,10 +60,26 @@ The `tailwindcss:build` task is automatically attached to the `test:prepare` Rak
### Update assets automatically
-While you're developing your application, you want to run Tailwind in "watch" mode, so changes are automatically reflected in the generated CSS output. You can do this by:
+While you're developing your application, you want to run Tailwind in "watch" mode, so changes are automatically reflected in the generated CSS output. You can do this in a few different ways:
-- running `rails tailwindcss:watch` as a separate process,
-- or by running `./bin/dev` which uses [foreman](https://github.com/ddollar/foreman) to start both the Tailwind watch process and the rails server in development mode.
+- use the [Puma](https://puma.io/) plugin to integrate "watch" with `rails server`, or
+- run `rails tailwindcss:watch` as a separate process, or
+- run `bin/dev` which uses [Foreman](https://github.com/ddollar/foreman)
+
+#### Puma plugin
+
+The Puma plugin requires you to add this line to your `puma.rb` configuration:
+
+```ruby
+plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
+```
+
+and then running `rails server` will run the Tailwind watch process in the background
+
+
+#### Run `rails tailwindcss:watch`
+
+This is a flexible command, which can be run with a few different options.
If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling: `rails tailwindcss:watch[poll]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
@@ -72,6 +88,11 @@ If you are running `rails tailwindcss:watch` as a process in a Docker container,
If you are running `rails tailwindcss:watch` in a docker container without a tty, pass the `always` argument to the task to instruct tailwindcss to keep the watcher alive even when `stdin` is closed: `rails tailwindcss:watch[always]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
+#### Foreman
+
+Running `bin/dev` invokes Foreman to start both the Tailwind watch process and the rails server in development mode based on your `Procfile.dev` file.
+
+
### Debugging with unminified assets
If you want unminified assets, you can pass a `debug` argument to the rake task, i.e. `rails tailwindcss:build[debug]` or `rails tailwindcss:watch[debug]`.
@@ -171,13 +192,6 @@ The inline version also works:
Has the image as it's background
```
-## Puma plugin
-We provide a Puma plugin if you want to run the Tailwind watcher together with Puma and have Puma monitor and manage it. Add
-```ruby
-plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
-```
-to your `puma.rb` configuration.
-
## License
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
From cbc1ca7f70db18c4fb90aa1e13be564be603609a Mon Sep 17 00:00:00 2001
From: Elia Schito
Date: Thu, 16 Nov 2023 11:58:36 +0100
Subject: [PATCH 079/305] Default to port 3000 while allowing override
With this configuration `bin/dev` will use port 3000,
but `bin/dev -p 3001` will correctly start the server on port 3001.
---
lib/install/Procfile.dev | 2 +-
lib/install/dev | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/install/Procfile.dev b/lib/install/Procfile.dev
index 59915d58..cce5ded9 100644
--- a/lib/install/Procfile.dev
+++ b/lib/install/Procfile.dev
@@ -1,2 +1,2 @@
-web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
+web: env RUBY_DEBUG_OPEN=true bin/rails server
css: bin/rails tailwindcss:watch
diff --git a/lib/install/dev b/lib/install/dev
index 74ade166..a4e05fa1 100755
--- a/lib/install/dev
+++ b/lib/install/dev
@@ -5,4 +5,7 @@ if ! gem list foreman -i --silent; then
gem install foreman
fi
+# Default to port 3000 if not specified
+export PORT="${PORT:-3000}"
+
exec foreman start -f Procfile.dev "$@"
From 313f257697ff5ca3a637905f811064c8576f4276 Mon Sep 17 00:00:00 2001
From: Elia Schito
Date: Thu, 16 Nov 2023 12:01:26 +0100
Subject: [PATCH 080/305] Lazily load the debugger gem
Some docker environments will trigger an error related to unix sockets
and permissions on temporary folders. Loading the debugger lazily
mitigates the issue so at least rails can be started without crashing,
while keeping the remote debugging available for other environments
that support it.
---
lib/install/Procfile.dev | 2 +-
lib/install/dev | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/install/Procfile.dev b/lib/install/Procfile.dev
index cce5ded9..da151fee 100644
--- a/lib/install/Procfile.dev
+++ b/lib/install/Procfile.dev
@@ -1,2 +1,2 @@
-web: env RUBY_DEBUG_OPEN=true bin/rails server
+web: bin/rails server
css: bin/rails tailwindcss:watch
diff --git a/lib/install/dev b/lib/install/dev
index a4e05fa1..ad72c7d5 100755
--- a/lib/install/dev
+++ b/lib/install/dev
@@ -8,4 +8,9 @@ fi
# Default to port 3000 if not specified
export PORT="${PORT:-3000}"
+# Let the debug gem allow remote connections,
+# but avoid loading until `debugger` is called
+export RUBY_DEBUG_OPEN="true"
+export RUBY_DEBUG_LAZY="true"
+
exec foreman start -f Procfile.dev "$@"
From c8851a62688ed9b6b071cb749fe8fdec3a8b98ca Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 4 Jan 2024 17:13:18 -0500
Subject: [PATCH 081/305] doc: update CHANGELOG
[skip ci]
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d79f9986..e01afaa5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
## next / unreleased
* Introduce a Puma plugin to manage the Tailwind "watch" process from `rails server`. (#300) @npezza93
+* Lazily load the debugger gem when running `bin/dev` (#292) @elia
+* Allow choosing a custom port with a `PORT` environment variable when running `bin/dev` (#292) @elia
## v2.1.0 / 2023-12-19
From 8658b4bfba528f5d26422bb9012f9fc9d957ea84 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 4 Jan 2024 17:20:04 -0500
Subject: [PATCH 082/305] version bump to v2.2.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 e01afaa5..b165388d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.2.0 / 2023-01-04
* Introduce a Puma plugin to manage the Tailwind "watch" process from `rails server`. (#300) @npezza93
* Lazily load the debugger gem when running `bin/dev` (#292) @elia
diff --git a/Gemfile.lock b/Gemfile.lock
index 0a7c4626..6a50164e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.1.0)
+ tailwindcss-rails (2.2.0)
railties (>= 6.0.0)
GEM
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 75b38451..8c83c66c 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.1.0"
+ VERSION = "2.2.0"
end
From f989541ccfd8029fd0fdc967bb50ee6d62e8b51c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 09:54:04 -0500
Subject: [PATCH 083/305] dep: update tailwindcss to v3.4.1
https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1
---
CHANGELOG.md | 5 +++++
lib/tailwindcss/upstream.rb | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b165388d..38f93f37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## next / unreleased
+
+* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
+
+
## v2.2.0 / 2023-01-04
* Introduce a Puma plugin to manage the Tailwind "watch" process from `rails server`. (#300) @npezza93
diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb
index ed11a88f..8dd7d8e5 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.0"
+ VERSION = "v3.4.1"
# rubygems platform name => upstream release filename
NATIVE_PLATFORMS = {
From 66d81141499cf6b3602ac7fa54dd6d89e7831e1c Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 11:57:59 -0500
Subject: [PATCH 084/305] dev: validate sha256 checksums from upstream when
packaging
---
rakelib/package.rake | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/rakelib/package.rake b/rakelib/package.rake
index 53416ac5..095ef445 100644
--- a/rakelib/package.rake
+++ b/rakelib/package.rake
@@ -74,6 +74,9 @@ 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]
@@ -110,7 +113,33 @@ Tailwindcss::Upstream::NATIVE_PLATFORMS.each do |platform, filename|
end
end
+desc "Validate checksums for tailwindcss binaries"
+task "check" => exepaths do
+ sha_filename = "sha256sums.txt"
+ sha_url = tailwindcss_download_url(sha_filename)
+ 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" => exepaths
+task "download" => :check
CLOBBER.add(exepaths.map { |p| File.dirname(p) })
From bfe600b96c8b6f4a8a95632db1e23a4dd9fc1bcd Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 12:32:56 -0500
Subject: [PATCH 085/305] fix: password form field classes
Fixes #304
---
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 ed1a4e1c..adbd5b7e 100644
--- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
+++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
@@ -15,7 +15,7 @@
<% if attribute.password_digest? -%>
<%%= form.label :password %>
- <%%= form.password_field :password %>
+ <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
From 2cbf5cce86dc4afb451ee5774e4a5869691bc31f Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 13:37:17 -0500
Subject: [PATCH 086/305] fix: mailer generation with namespaces
Fixes #272
---
.../mailer/templates/layout.html.erb.tt | 13 ++++++++
.../mailer/templates/layout.text.erb.tt | 1 +
.../tailwindcss/mailer_generator_test.rb | 32 ++++++++++++++++++-
3 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 lib/generators/tailwindcss/mailer/templates/layout.html.erb.tt
create mode 100644 lib/generators/tailwindcss/mailer/templates/layout.text.erb.tt
diff --git a/lib/generators/tailwindcss/mailer/templates/layout.html.erb.tt b/lib/generators/tailwindcss/mailer/templates/layout.html.erb.tt
new file mode 100644
index 00000000..116e625b
--- /dev/null
+++ b/lib/generators/tailwindcss/mailer/templates/layout.html.erb.tt
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+ <%%= yield %>
+
+
diff --git a/lib/generators/tailwindcss/mailer/templates/layout.text.erb.tt b/lib/generators/tailwindcss/mailer/templates/layout.text.erb.tt
new file mode 100644
index 00000000..6363733e
--- /dev/null
+++ b/lib/generators/tailwindcss/mailer/templates/layout.text.erb.tt
@@ -0,0 +1 @@
+<%%= yield %>
diff --git a/test/lib/generators/tailwindcss/mailer_generator_test.rb b/test/lib/generators/tailwindcss/mailer_generator_test.rb
index db604bd3..a8a65d96 100644
--- a/test/lib/generators/tailwindcss/mailer_generator_test.rb
+++ b/test/lib/generators/tailwindcss/mailer_generator_test.rb
@@ -3,7 +3,7 @@
require "generators/tailwindcss/mailer/mailer_generator"
class Tailwindcss::Generators::MailerGeneratorTest < Rails::Generators::TestCase
- tests Rails::Generators::MailerGenerator
+ tests Tailwindcss::Generators::MailerGenerator
destination Dir.mktmpdir
arguments %w(Notifications invoice)
@@ -20,6 +20,36 @@ class Tailwindcss::Generators::MailerGeneratorTest < Rails::Generators::TestCase
assert_match %r(app/views/notifications_mailer/invoice\.text\.erb), view
assert_match(/\= @greeting/, view)
end
+
+ assert_file "app/views/layouts/mailer.text.erb" do |view|
+ assert_match("<%= yield %>", view)
+ end
+
+ assert_file "app/views/layouts/mailer.html.erb" do |view|
+ assert_match("<%= yield %>", view)
+ end
+ end
+
+ test "generates correct mailer view templates with namespace" do
+ run_generator ["admin/notifications", "invoice"]
+
+ assert_file "app/views/admin/notifications_mailer/invoice.html.erb" do |view|
+ assert_match %r(app/views/admin/notifications_mailer/invoice\.html\.erb), view
+ assert_match(/\= @greeting/, view)
+ end
+
+ assert_file "app/views/admin/notifications_mailer/invoice.text.erb" do |view|
+ assert_match %r(app/views/admin/notifications_mailer/invoice\.text\.erb), view
+ assert_match(/\= @greeting/, view)
+ end
+
+ assert_file "app/views/layouts/admin/mailer.text.erb" do |view|
+ assert_match("<%= yield %>", view)
+ end
+
+ assert_file "app/views/layouts/admin/mailer.html.erb" do |view|
+ assert_match("<%= yield %>", view)
+ end
end
end
From e22c8cee8f7e7b92d2cfd3cf3fffdd5e922ae3fe Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 14:13:41 -0500
Subject: [PATCH 087/305] doc: update CHANGELOG.md and CONTRIBUTING.md
[skip ci]
---
CHANGELOG.md | 1 +
CONTRIBUTING.md | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38f93f37..98cc3cbe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
## next / unreleased
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
+* Fix `password` form field styling in generated scaffold forms. (#304, #307) @flavorjones
## v2.2.0 / 2023-01-04
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index dd892f92..8c68f93c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,6 +2,27 @@
This doc is a brief introduction on modifying and maintaining this gem.
+
+## Testing this gem
+
+### Running the test suite
+
+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.
+
+
+### Testing in a Rails app
+
+If you want to test modifications to this gem, you must run `rake download` once to download the upstream `tailwindcss` executables.
+
+Then you can point your Rails application's `Gemfile` at the local version of the gem as you normally would:
+
+``` ruby
+gem "tailwindcss-rails", path: "/path/to/tailwindcss-rails"
+```
+
+
## Updating to the latest upstream tailwindcss version
Update `lib/tailwindcss/upstream.rb` with the upstream version.
From 682658b6be2e24ffa8aac2579ca269c5f874d44e Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 14:24:34 -0500
Subject: [PATCH 088/305] dev: bundle update
---
Gemfile.lock | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 6a50164e..2a9461bb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -53,7 +53,7 @@ GEM
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
- debug (1.9.0)
+ debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.0)
@@ -64,7 +64,7 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.7.1)
- irb (1.10.1)
+ irb (1.11.0)
rdoc
reline (>= 0.3.8)
loofah (2.22.0)
@@ -79,21 +79,23 @@ GEM
mini_portile2 (2.8.5)
minitest (5.20.0)
mutex_m (0.2.0)
- net-imap (0.4.8)
+ net-imap (0.4.9.1)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
- net-smtp (0.4.0)
+ net-smtp (0.4.0.1)
net-protocol
- nokogiri (1.15.5)
+ nokogiri (1.16.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.15.5-x86_64-darwin)
+ nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.15.5-x86_64-linux)
+ nokogiri (1.16.0-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
@@ -124,7 +126,7 @@ GEM
rake (13.1.0)
rdoc (6.6.2)
psych (>= 4.0.0)
- reline (0.4.1)
+ reline (0.4.2)
io-console (~> 0.5)
ruby2_keywords (0.0.5)
stringio (3.1.0)
@@ -136,6 +138,7 @@ GEM
zeitwerk (2.6.12)
PLATFORMS
+ arm64-darwin
ruby
x86_64-darwin
x86_64-linux
@@ -146,4 +149,4 @@ DEPENDENCIES
tailwindcss-rails!
BUNDLED WITH
- 2.5.1
+ 2.5.4
From 67e6d670047315c576e4cb151af24ebbddeedf4d Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 14:24:53 -0500
Subject: [PATCH 089/305] doc: update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98cc3cbe..4726dfe6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
* Fix `password` form field styling in generated scaffold forms. (#304, #307) @flavorjones
+* Fix namespaced mailer generation. (#272, #308) @flavorjones
## v2.2.0 / 2023-01-04
From 45a182e2767515099dec5a2f14905c3303e2fe69 Mon Sep 17 00:00:00 2001
From: Florian Ebeling
Date: Sun, 7 Jan 2024 20:52:14 +0100
Subject: [PATCH 090/305] Add section about conflict with with asset pipeline
Add a paragraph to the Troubleshooting section about resolving a misconfiguration that otherwise causes double-processing of Tailwind's entry file, as described in issue #190.
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index a78f6c8b..59f71cf5 100644
--- a/README.md
+++ b/README.md
@@ -192,6 +192,12 @@ The inline version also works:
Has the image as it's background
```
+### Conflict with pre-existing asset pipeline stylesheets
+
+If you get a warning `Unrecognized at-rule or error parsing at-rule ‘@tailwind’.` in the browser console after installation, you incorrectly double-process `application.tailwind.css`. This is a misconfiguration, even though the styles will be fully effective in many cases. The file `application.tailwind.css` is installed when running `rails tailwindcss:install` and is placed alongside the common `application.css` in `app/assets/stylesheets`. Because the `application.css` in a newly generated Rails app includes a `require_tree .` directive, the asset pipeline incorrectly processes `application.tailwind.css`, where it should be taken care of by `tailwindcss`. The asset pipeline ignores TailwindCSS's at-directives, and the browser can't process them.
+
+To fix the warning, you can either remove the `application.css`, if you don't plan to use the asset pipeline for stylesheets, and instead rely on TailwindCSS completely for styles. This is what this installer assumes. Else, if you do want to keep using the asset pipeline in parallel, make sure to remove the `require_tree .` line from the `application.css`.
+
## License
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
From de635629dc41b1928ca612e410f45672c9fa1431 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 17:51:11 -0500
Subject: [PATCH 091/305] ci: add a job that tests against Rails 6.1
because the scaffold generation changed in Rails 7
---
.github/workflows/ci.yml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9aa5a379..d7ece617 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,6 +33,24 @@ jobs:
- name: Run tests
run: bin/test
+ rails6:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - 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
From 7d35f299ea935a14eb06761b9ec38957e7f025ce Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 21:33:45 -0500
Subject: [PATCH 092/305] version bump to v2.2.1
---
CHANGELOG.md | 2 +-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4726dfe6..7049d673 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.2.1 / 2023-01-07
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
* Fix `password` form field styling in generated scaffold forms. (#304, #307) @flavorjones
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 8c83c66c..405219b2 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.2.0"
+ VERSION = "2.2.1"
end
From 17f18a5735faef051cdbfaa9e7f3480fbc8651fe Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Mon, 8 Jan 2024 15:39:59 -0500
Subject: [PATCH 093/305] dev: update tailwindcss-rails version in Gemfile.lock
[skip ci]
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 2a9461bb..5502d297 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.2.0)
+ tailwindcss-rails (2.2.1)
railties (>= 6.0.0)
GEM
From 23869f560dcebe7a1eb39dfb198210927a23816e Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 16:55:17 -0500
Subject: [PATCH 094/305] style: prefer __dir__ to __FILE__
See rails/rails@40bdbce1
---
lib/generators/tailwindcss/controller/controller_generator.rb | 2 +-
lib/generators/tailwindcss/mailer/mailer_generator.rb | 2 +-
lib/generators/tailwindcss/scaffold/scaffold_generator.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/generators/tailwindcss/controller/controller_generator.rb b/lib/generators/tailwindcss/controller/controller_generator.rb
index 77cc4cc5..1fee0873 100644
--- a/lib/generators/tailwindcss/controller/controller_generator.rb
+++ b/lib/generators/tailwindcss/controller/controller_generator.rb
@@ -3,7 +3,7 @@
module Tailwindcss
module Generators
class ControllerGenerator < Erb::Generators::ControllerGenerator
- source_root File.expand_path("../templates", __FILE__)
+ source_root File.expand_path("templates", __dir__)
end
end
end
diff --git a/lib/generators/tailwindcss/mailer/mailer_generator.rb b/lib/generators/tailwindcss/mailer/mailer_generator.rb
index 730b78c2..eb96b2c7 100644
--- a/lib/generators/tailwindcss/mailer/mailer_generator.rb
+++ b/lib/generators/tailwindcss/mailer/mailer_generator.rb
@@ -3,7 +3,7 @@
module Tailwindcss
module Generators
class MailerGenerator < Erb::Generators::MailerGenerator
- source_root File.expand_path("../templates", __FILE__)
+ source_root File.expand_path("templates", __dir__)
end
end
end
diff --git a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
index e50ea3e8..ee2b0fad 100644
--- a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
+++ b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
@@ -6,7 +6,7 @@ module Generators
class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
include Rails::Generators::ResourceHelpers
- source_root File.expand_path("../templates", __FILE__)
+ source_root File.expand_path("templates", __dir__)
argument :attributes, type: :array, default: [], banner: "field:type field:type"
From 8f0cd5096fd55c8d59ef37a81591425514844ab5 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 17:20:08 -0500
Subject: [PATCH 095/305] test: use the same temporary directory for the whole
test suite
and set Rails::Generators.templates_path to include it before the
generator classes are instantiated so that the local 'lib/templates'
directory is part of the generators' `source_paths`.
Also see railties/lib/rails/generators/base.rb and
`Rails::Generators::Base.inherited`
---
.../tailwindcss/controller_generator_test.rb | 2 +-
.../tailwindcss/mailer_generator_test.rb | 2 +-
.../tailwindcss/scaffold_generator_test.rb | 14 +++++++++-----
test/test_helper.rb | 14 +++++++++++++-
4 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/test/lib/generators/tailwindcss/controller_generator_test.rb b/test/lib/generators/tailwindcss/controller_generator_test.rb
index 42b67ec6..d20fdbf5 100644
--- a/test/lib/generators/tailwindcss/controller_generator_test.rb
+++ b/test/lib/generators/tailwindcss/controller_generator_test.rb
@@ -3,7 +3,7 @@
class Tailwindcss::Generators::ControllerGeneratorTest < Rails::Generators::TestCase
tests Tailwindcss::Generators::ControllerGenerator
- destination Dir.mktmpdir
+ destination TAILWINDCSS_TEST_APP_ROOT
arguments %w(Messages index show)
diff --git a/test/lib/generators/tailwindcss/mailer_generator_test.rb b/test/lib/generators/tailwindcss/mailer_generator_test.rb
index a8a65d96..32d3d34f 100644
--- a/test/lib/generators/tailwindcss/mailer_generator_test.rb
+++ b/test/lib/generators/tailwindcss/mailer_generator_test.rb
@@ -4,7 +4,7 @@
class Tailwindcss::Generators::MailerGeneratorTest < Rails::Generators::TestCase
tests Tailwindcss::Generators::MailerGenerator
- destination Dir.mktmpdir
+ destination TAILWINDCSS_TEST_APP_ROOT
arguments %w(Notifications invoice)
diff --git a/test/lib/generators/tailwindcss/scaffold_generator_test.rb b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
index 01d892b2..68e0fe28 100644
--- a/test/lib/generators/tailwindcss/scaffold_generator_test.rb
+++ b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
@@ -3,19 +3,23 @@
class Tailwindcss::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase
tests Tailwindcss::Generators::ScaffoldGenerator
- destination Dir.mktmpdir
+ destination TAILWINDCSS_TEST_APP_ROOT
arguments %w(message title:string content:text)
- test "generates correct view templates" do
+ test "generates view templates" do
run_generator
- %w(index edit new show _form _message).each { |view| assert_file "app/views/messages/#{view}.html.erb" }
+ %w(index edit new show _form _message).each do |view|
+ assert_file "app/views/messages/#{view}.html.erb"
+ end
end
- test "with namespace invoked" do
+ test "generates view templates with namespace" do
run_generator [ "admin/role", "name:string", "description:string" ]
- %w(index edit new show _form _role).each { |view| assert_file "app/views/admin/roles/#{view}.html.erb" }
+ %w(index edit new show _form _role).each do |view|
+ assert_file "app/views/admin/roles/#{view}.html.erb"
+ end
end
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index da96cabe..68614219 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -4,10 +4,22 @@
require "rails"
require "rails/test_help"
require "debug"
-require_relative "../lib/tailwindcss-rails"
require "rails/test_unit/reporter"
Rails::TestUnitReporter.executable = "bin/test"
+TAILWINDCSS_TEST_APP_ROOT = Dir.mktmpdir
+Rails::Generators.templates_path << File.join(TAILWINDCSS_TEST_APP_ROOT, "lib/templates")
+
class ActiveSupport::TestCase
+ def setup
+ FileUtils.rm_rf(TAILWINDCSS_TEST_APP_ROOT)
+ FileUtils.mkdir_p(TAILWINDCSS_TEST_APP_ROOT)
+ end
+
+ def teardown
+ FileUtils.rm_rf(TAILWINDCSS_TEST_APP_ROOT)
+ end
end
+
+require_relative "../lib/tailwindcss-rails"
From 85c2c4a8a6f9f359d586cf27f4af5a92341dbfc2 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Sun, 7 Jan 2024 17:35:24 -0500
Subject: [PATCH 096/305] fix: allow applications to override templates
Note that developers can override by placing templates in either:
- lib/templates/tailwindcss/{scaffold,mailer,controller}
- lib/templates/erb/{scaffold,mailer,controller}
---
CHANGELOG.md | 1 +
.../controller/controller_generator.rb | 1 +
.../tailwindcss/mailer/mailer_generator.rb | 1 +
.../scaffold/scaffold_generator.rb | 1 +
.../tailwindcss/controller_generator_test.rb | 37 +++++++++++++++++--
.../tailwindcss/mailer_generator_test.rb | 26 ++++++++++++-
.../tailwindcss/scaffold_generator_test.rb | 24 ++++++++++++
7 files changed, 87 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7049d673..4403ce10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
* Fix `password` form field styling in generated scaffold forms. (#304, #307) @flavorjones
* Fix namespaced mailer generation. (#272, #308) @flavorjones
+* Allow overriding the generator templates by placing application templates in either `lib/templates/tailwindcss/{scaffold,mailer,controller}` or `lib/templates/erb/{scaffold,mailer,controller}`. (#164, #314) @flavorjones
## v2.2.0 / 2023-01-04
diff --git a/lib/generators/tailwindcss/controller/controller_generator.rb b/lib/generators/tailwindcss/controller/controller_generator.rb
index 1fee0873..1022bff6 100644
--- a/lib/generators/tailwindcss/controller/controller_generator.rb
+++ b/lib/generators/tailwindcss/controller/controller_generator.rb
@@ -4,6 +4,7 @@ module Tailwindcss
module Generators
class ControllerGenerator < Erb::Generators::ControllerGenerator
source_root File.expand_path("templates", __dir__)
+ source_paths << "lib/templates/erb/controller"
end
end
end
diff --git a/lib/generators/tailwindcss/mailer/mailer_generator.rb b/lib/generators/tailwindcss/mailer/mailer_generator.rb
index eb96b2c7..b0c9b5d6 100644
--- a/lib/generators/tailwindcss/mailer/mailer_generator.rb
+++ b/lib/generators/tailwindcss/mailer/mailer_generator.rb
@@ -4,6 +4,7 @@ module Tailwindcss
module Generators
class MailerGenerator < Erb::Generators::MailerGenerator
source_root File.expand_path("templates", __dir__)
+ source_paths << "lib/templates/erb/mailer"
end
end
end
diff --git a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
index ee2b0fad..39c2da1f 100644
--- a/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
+++ b/lib/generators/tailwindcss/scaffold/scaffold_generator.rb
@@ -7,6 +7,7 @@ class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
include Rails::Generators::ResourceHelpers
source_root File.expand_path("templates", __dir__)
+ source_paths << "lib/templates/erb/scaffold"
argument :attributes, type: :array, default: [], banner: "field:type field:type"
diff --git a/test/lib/generators/tailwindcss/controller_generator_test.rb b/test/lib/generators/tailwindcss/controller_generator_test.rb
index d20fdbf5..62f3b1ee 100644
--- a/test/lib/generators/tailwindcss/controller_generator_test.rb
+++ b/test/lib/generators/tailwindcss/controller_generator_test.rb
@@ -9,8 +9,39 @@ class Tailwindcss::Generators::ControllerGeneratorTest < Rails::Generators::Test
test "generates correct view templates" do
run_generator
- assert_file "app/views/messages/index.html.erb"
- assert_file "app/views/messages/show.html.erb"
+
+ ["index", "show"].each do |view|
+ assert_file "app/views/messages/#{view}.html.erb"
+ end
+ end
+
+ test "generates correct view templates when namespaced" do
+ run_generator ["admin/messages", "index", "show"]
+
+ ["index", "show"].each do |view|
+ assert_file "app/views/admin/messages/#{view}.html.erb"
+ end
end
-end
+ [
+ "lib/templates/erb/controller",
+ "lib/templates/tailwindcss/controller",
+ ].each do |templates_path|
+ test "overriding generator templates in #{templates_path}" do
+ override_dir = File.join(destination_root, templates_path)
+ FileUtils.mkdir_p override_dir
+ File.open(File.join(override_dir, "view.html.erb"), "w") { |f| f.puts "This is a custom template" }
+
+ # change directory because the generator adds a relative path to source_paths
+ Dir.chdir(destination_root) do
+ run_generator
+ end
+
+ ["index", "show"].each do |view|
+ assert_file "app/views/messages/#{view}.html.erb" do |body|
+ assert_match("This is a custom template", body, "index custom template should be used")
+ end
+ end
+ end
+ end
+end
diff --git a/test/lib/generators/tailwindcss/mailer_generator_test.rb b/test/lib/generators/tailwindcss/mailer_generator_test.rb
index 32d3d34f..e6fa61cc 100644
--- a/test/lib/generators/tailwindcss/mailer_generator_test.rb
+++ b/test/lib/generators/tailwindcss/mailer_generator_test.rb
@@ -51,5 +51,29 @@ class Tailwindcss::Generators::MailerGeneratorTest < Rails::Generators::TestCase
assert_match("<%= yield %>", view)
end
end
-end
+ [
+ "lib/templates/erb/mailer",
+ "lib/templates/tailwindcss/mailer",
+ ].each do |templates_path|
+ test "overriding generator templates in #{templates_path}" do
+ override_dir = File.join(destination_root, templates_path)
+ FileUtils.mkdir_p override_dir
+ File.open(File.join(override_dir, "view.html.erb"), "w") { |f| f.puts "This is a custom template" }
+ File.open(File.join(override_dir, "layout.html.erb"), "w") { |f| f.puts "This is a custom layout" }
+
+ # change directory because the generator adds a relative path to source_paths
+ Dir.chdir(destination_root) do
+ run_generator
+ end
+
+ assert_file "app/views/notifications_mailer/invoice.html.erb" do |view|
+ assert_match("This is a custom template", view)
+ end
+
+ assert_file "app/views/layouts/mailer.html.erb" do |view|
+ assert_match("This is a custom layout", view)
+ end
+ end
+ end
+end
diff --git a/test/lib/generators/tailwindcss/scaffold_generator_test.rb b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
index 68e0fe28..fb7db462 100644
--- a/test/lib/generators/tailwindcss/scaffold_generator_test.rb
+++ b/test/lib/generators/tailwindcss/scaffold_generator_test.rb
@@ -22,4 +22,28 @@ class Tailwindcss::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCa
assert_file "app/views/admin/roles/#{view}.html.erb"
end
end
+
+ [
+ "lib/templates/tailwindcss/scaffold",
+ "lib/templates/erb/scaffold",
+ ].each do |templates_path|
+ test "overriding generator templates in #{templates_path}" do
+ override_dir = File.join(destination_root, templates_path)
+ FileUtils.mkdir_p override_dir
+ File.open(File.join(override_dir, "index.html.erb"), "w") { |f| f.puts "This is a custom template" }
+
+ # change directory because the generator adds a relative path to source_paths
+ Dir.chdir(destination_root) do
+ run_generator
+ end
+
+ %w(edit new show _form _message).each do |view|
+ assert_file "app/views/messages/#{view}.html.erb"
+ end
+
+ assert_file "app/views/messages/index.html.erb" do |body|
+ assert_match("This is a custom template", body, "index custom template should be used")
+ end
+ end
+ end
end
From d3fbaf3ff879d16002b7f391f65eab269452caac Mon Sep 17 00:00:00 2001
From: Andre Meij
Date: Mon, 8 Jan 2024 20:27:32 +0000
Subject: [PATCH 097/305] Allow custom postcss.config.js
Updating test and README for custom postcss.config.js
---
README.md | 14 ++++++++++++++
lib/tailwindcss/commands.rb | 1 +
test/lib/tailwindcss/commands_test.rb | 21 +++++++++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/README.md b/README.md
index 59f71cf5..6f73db9b 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,20 @@ This also works with relative paths. If you've installed into your app's directo
TAILWINDCSS_INSTALL_DIR=node_modules/.bin
```
+### Using a custom postcss.config.js
+
+If you want to use a custom `postcss.config.js`, for example to enable nesting, you can place it in the `config` folder and it will be loaded automatically.
+
+```
+module.exports = {
+ plugins: {
+ 'postcss-import': {},
+ 'tailwindcss/nesting': {},
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+}
+```
## Developing with Tailwindcss
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index b1367c66..60a17053 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -81,6 +81,7 @@ def compile_command(debug: false, **kwargs)
"-c", Rails.root.join("config/tailwind.config.js").to_s,
].tap do |command|
command << "--minify" unless (debug || rails_css_compressor?)
+ command << "--postcss #{Rails.root.join("config/postcss.config.js")}" if File.exist?(Rails.root.join("config/postcss.config.js"))
end
end
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index 47112225..c95123af 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -151,6 +151,27 @@ def mock_local_tailwindcss_install
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/postcss.config.js")
+
+ 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 #{config_file}")
+ end
+ 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
From 5caa7ebac34d2326e1c8b6162619fd65d09d147b Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 10 Jan 2024 16:34:03 -0500
Subject: [PATCH 098/305] command postcss flag argument is a separate array
member
following the convention used for assembling the overall command
---
lib/tailwindcss/commands.rb | 14 +++++++++-----
test/lib/tailwindcss/commands_test.rb | 6 ++++--
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb
index 60a17053..08b70d33 100644
--- a/lib/tailwindcss/commands.rb
+++ b/lib/tailwindcss/commands.rb
@@ -74,15 +74,19 @@ def executable(exe_path: DEFAULT_DIR)
end
def compile_command(debug: false, **kwargs)
- [
+ command = [
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,
- ].tap do |command|
- command << "--minify" unless (debug || rails_css_compressor?)
- command << "--postcss #{Rails.root.join("config/postcss.config.js")}" if File.exist?(Rails.root.join("config/postcss.config.js"))
- end
+ ]
+
+ command << "--minify" unless (debug || rails_css_compressor?)
+
+ postcss_path = Rails.root.join("config/postcss.config.js")
+ command += ["--postcss", postcss_path.to_s] if File.exist?(postcss_path)
+
+ command
end
def watch_command(always: false, poll: false, **kwargs)
diff --git a/test/lib/tailwindcss/commands_test.rb b/test/lib/tailwindcss/commands_test.rb
index c95123af..0be78894 100644
--- a/test/lib/tailwindcss/commands_test.rb
+++ b/test/lib/tailwindcss/commands_test.rb
@@ -158,7 +158,7 @@ def mock_local_tailwindcss_install
actual = Tailwindcss::Commands.compile_command(exe_path: dir)
assert_kind_of(Array, actual)
assert_equal(executable, actual.first)
- refute_includes(actual, "--postcss config/postcss.config.js")
+ refute_includes(actual, "--postcss")
config_file = Rails.root.join("config/postcss.config.js")
FileUtils.mkdir_p(Rails.root.join("config"))
@@ -166,7 +166,9 @@ def mock_local_tailwindcss_install
actual = Tailwindcss::Commands.compile_command(exe_path: dir)
assert_kind_of(Array, actual)
assert_equal(executable, actual.first)
- assert_includes(actual, "--postcss #{config_file}")
+ assert_includes(actual, "--postcss")
+ postcss_index = actual.index("--postcss")
+ assert_equal(actual[postcss_index + 1], config_file.to_s)
end
end
end
From a30ad61d553f707ae47dd87e6fe054d2aac8af0f Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 10 Jan 2024 16:41:26 -0500
Subject: [PATCH 099/305] doc: update README section on postcss
---
README.md | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 6f73db9b..1f13e498 100644
--- a/README.md
+++ b/README.md
@@ -38,21 +38,6 @@ This also works with relative paths. If you've installed into your app's directo
TAILWINDCSS_INSTALL_DIR=node_modules/.bin
```
-### Using a custom postcss.config.js
-
-If you want to use a custom `postcss.config.js`, for example to enable nesting, you can place it in the `config` folder and it will be loaded automatically.
-
-```
-module.exports = {
- plugins: {
- 'postcss-import': {},
- 'tailwindcss/nesting': {},
- tailwindcss: {},
- autoprefixer: {},
- },
-}
-```
-
## Developing with Tailwindcss
### Configuration
@@ -114,6 +99,24 @@ If you want unminified assets, you can pass a `debug` argument to the rake task,
Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`.
+### 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.
+
+For example, to enable nesting:
+
+```js
+// config/postcss.config.js
+module.exports = {
+ plugins: {
+ 'postcss-import': {},
+ 'tailwindcss/nesting': {},
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+}
+```
+
### 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 6ccd14b66b73300bd464ab4ff367759be8313544 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 10 Jan 2024 16:57:04 -0500
Subject: [PATCH 100/305] doc: update CHANGELOG
[skip ci]
---
CHANGELOG.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4403ce10..a832a6e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## next / unreleased
+
+* Allow applications to override the generator templates. (#314) @flavorjones
+* Support using PostCSS as a preprocessor. (#316) @ahmeij
+
+
## v2.2.1 / 2023-01-07
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
From 9118fbc6acd237a870bc94577c96adcdc9358712 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 10 Jan 2024 16:59:21 -0500
Subject: [PATCH 101/305] version bump to v2.3.0
---
CHANGELOG.md | 2 +-
lib/tailwindcss/version.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a832a6e9..8e7056bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## next / unreleased
+## v2.3.0 / 2023-01-10
* Allow applications to override the generator templates. (#314) @flavorjones
* Support using PostCSS as a preprocessor. (#316) @ahmeij
diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb
index 405219b2..bd5ad174 100644
--- a/lib/tailwindcss/version.rb
+++ b/lib/tailwindcss/version.rb
@@ -1,3 +1,3 @@
module Tailwindcss
- VERSION = "2.2.1"
+ VERSION = "2.3.0"
end
From 904facc0a34178a52c9f64223446b15225835ce4 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Thu, 18 Jan 2024 08:59:14 -0500
Subject: [PATCH 102/305] doc: fix dates in CHANGELOG
[skip ci]
---
CHANGELOG.md | 6 +++---
Gemfile.lock | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e7056bd..7736a540 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,10 @@
-## v2.3.0 / 2023-01-10
+## v2.3.0 / 2024-01-10
* Allow applications to override the generator templates. (#314) @flavorjones
* Support using PostCSS as a preprocessor. (#316) @ahmeij
-## v2.2.1 / 2023-01-07
+## v2.2.1 / 2024-01-07
* Update to [Tailwind CSS v3.4.1](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.1) from v3.4.0 by @flavorjones
* Fix `password` form field styling in generated scaffold forms. (#304, #307) @flavorjones
@@ -12,7 +12,7 @@
* Allow overriding the generator templates by placing application templates in either `lib/templates/tailwindcss/{scaffold,mailer,controller}` or `lib/templates/erb/{scaffold,mailer,controller}`. (#164, #314) @flavorjones
-## v2.2.0 / 2023-01-04
+## v2.2.0 / 2024-01-04
* Introduce a Puma plugin to manage the Tailwind "watch" process from `rails server`. (#300) @npezza93
* Lazily load the debugger gem when running `bin/dev` (#292) @elia
diff --git a/Gemfile.lock b/Gemfile.lock
index 5502d297..916b4c9e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- tailwindcss-rails (2.2.1)
+ tailwindcss-rails (2.3.0)
railties (>= 6.0.0)
GEM
From bbaf2dfdbdce290c7727b053c7636258d3ad5a3c Mon Sep 17 00:00:00 2001
From: m-nakamura145
Date: Mon, 5 Feb 2024 21:43:19 +0900
Subject: [PATCH 103/305] Bump actions/checkout
---
.github/workflows/ci.yml | 6 +++---
.github/workflows/gem-install.yml | 2 +-
.github/workflows/upstream.yml | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d7ece617..6af43c2a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,7 +22,7 @@ jobs:
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "head"]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
@@ -36,7 +36,7 @@ jobs:
rails6:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
@@ -58,7 +58,7 @@ jobs:
plat: ["ubuntu", "windows", "macos"]
runs-on: ${{matrix.plat}}-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index 8b2fc1fa..09271372 100644
--- a/.github/workflows/gem-install.yml
+++ b/.github/workflows/gem-install.yml
@@ -22,7 +22,7 @@ jobs:
platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux", "arm-linux"]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 4af7c643..b2dda2bc 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -24,7 +24,7 @@ jobs:
env:
RAILSOPTS: --git=https://github.com/rails/rails --branch main
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
From 88bf2915a3e29adcdf2c95afbd662f12957e3ef8 Mon Sep 17 00:00:00 2001
From: Mike Dalessio
Date: Wed, 7 Feb 2024 08:30:52 -0500
Subject: [PATCH 104/305] doc: improve README
- add table of contents
- new troubleshooting section on docker/tty
- add "commands" synopsis
- clarify language in a few sections
- remove musl section of troubleshooting (because https://github.com/tailwindlabs/tailwindcss/discussions/6785 was merged upstream)
---
README.md | 131 +++++++++++++++++++++++++++++++++++++++---------------
Rakefile | 12 +++++
2 files changed, 106 insertions(+), 37 deletions(-)
diff --git a/README.md b/README.md
index 1f13e498..ab0f5aa1 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,31 @@
[Tailwind CSS](https://tailwindcss.com) is a utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.
+
+
+
+
+- [Installation](#installation)
+ * [Using a local installation of `tailwindcss`](#using-a-local-installation-of-tailwindcss)
+- [Developing with Tailwindcss](#developing-with-tailwindcss)
+ * [Configuration and commands](#configuration-and-commands)
+ * [Building for production](#building-for-production)
+ * [Building for testing](#building-for-testing)
+ * [Building unminified assets](#building-unminified-assets)
+ * [Live rebuild](#live-rebuild)
+ * [Using with PostCSS](#using-with-postcss)
+ * [Custom inputs or outputs](#custom-inputs-or-outputs)
+- [Troubleshooting](#troubleshooting)
+ * [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)
+ * [`ERROR: Cannot find the tailwindcss executable` for supported platform](#error-cannot-find-the-tailwindcss-executable-for-supported-platform)
+ * [Using asset-pipeline assets](#using-asset-pipeline-assets)
+ * [Conflict with pre-existing asset pipeline stylesheets](#conflict-with-pre-existing-asset-pipeline-stylesheets)
+- [License](#license)
+
+
+
## Installation
With Rails 7 you can generate a new application preconfigured with Tailwind by using `--css tailwind`. If you're adding Tailwind later, you need to:
@@ -24,27 +49,56 @@ Supported platforms are:
### 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 containing the executable.
+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 `/node_modules/bin/tailwindcss`, then you should set your environment variable like so:
+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
```
-This also works with relative paths. If you've installed into your app's directory at `./node_modules/.bin/tailwindcss`:
+or, for relative paths like `./node_modules/.bin/tailwindcss`:
``` sh
TAILWINDCSS_INSTALL_DIR=node_modules/.bin
```
+
## Developing with Tailwindcss
-### Configuration
+### 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.
-The installer will create your 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. When you run `rails tailwindcss:build`, this 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).
+#### 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.
+
+#### 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).
+
+#### Commands
+
+This gem makes several Rails tasks available, some of which have multiple options which can be combined.
+
+Synopsis:
+
+- `bin/rails tailwindcss:install` - installs the configuration file, output file, and `Procfile.dev`
+- `bin/rails tailwindcss:build` - generate the output file
+ - `bin/rails tailwindcss:build[debug]` - generate unminimized output
+- `bin/rails tailwindcss:watch` - start live rebuilds, generating output on file changes
+ - `bin/rails tailwindcss:watch[debug]` - generate unminimized output
+ - `bin/rails tailwindcss:watch[poll]` - for systems without file system events
+ - `bin/rails tailwindcss:watch[always]` - for systems without TTY (e.g., some docker containers)
+
+Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`.
+
+This gem also makes available a Puma plugin to manage a live rebuild process when you run `rails server` (see "Live Rebuild" section below).
+
+This gem also generates a `Procfile.dev` file which will run both the rails server and a live rebuild process (see "Live Rebuild" section below).
### Building for production
@@ -57,17 +111,23 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. This task runs before test commands. If you run `bin/rails test` in your CI environment, your Tailwind output will be generated before tests run.
-### Update assets automatically
+### Building unminified assets
+
+If you want unminified assets, you can pass a `debug` argument to the rake task, i.e. `rails tailwindcss:build[debug]` or `rails tailwindcss:watch[debug]`.
+
+
+### Live rebuild
While you're developing your application, you want to run Tailwind in "watch" mode, so changes are automatically reflected in the generated CSS output. You can do this in a few different ways:
-- use the [Puma](https://puma.io/) plugin to integrate "watch" with `rails server`, or
-- run `rails tailwindcss:watch` as a separate process, or
-- run `bin/dev` which uses [Foreman](https://github.com/ddollar/foreman)
+- use this gem's [Puma](https://puma.io/) plugin to integrate "watch" with `rails server`,
+- or run `rails tailwindcss:watch` as a separate process,
+- or run `bin/dev` which uses [Foreman](https://github.com/ddollar/foreman)
+
#### Puma plugin
-The Puma plugin requires you to add this line to your `puma.rb` configuration:
+This gem ships with a Puma plugin. To use it, add this line to your `puma.rb` configuration:
```ruby
plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
@@ -80,7 +140,13 @@ and then running `rails server` will run the Tailwind watch process in the backg
This is a flexible command, which can be run with a few different options.
-If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling: `rails tailwindcss:watch[poll]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
+If you are running `rails tailwindcss:watch` on a system that doesn't fully support file system events, pass a `poll` argument to the task to instruct tailwindcss to instead use polling:
+
+```
+rails tailwindcss:watch[poll]
+```
+
+(If you use `bin/dev` then you should modify your `Procfile.dev` to use the `poll` option.)
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.
@@ -92,13 +158,6 @@ If you are running `rails tailwindcss:watch` in a docker container without a tty
Running `bin/dev` invokes Foreman to start both the Tailwind watch process and the rails server in development mode based on your `Procfile.dev` file.
-### Debugging with unminified assets
-
-If you want unminified assets, you can pass a `debug` argument to the rake task, i.e. `rails tailwindcss:build[debug]` or `rails tailwindcss:watch[debug]`.
-
-Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`.
-
-
### 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.
@@ -126,6 +185,12 @@ If you need to use a custom input or output file, you can run `bundle exec tailw
Some common problems experienced by users ...
+### 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.
+
+If you are running `rails tailwindcss:watch` in a docker container without a tty, pass the `always` argument to the task to instruct tailwindcss to keep the watcher alive even when `stdin` is closed: `rails tailwindcss:watch[always]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
+
### Conflict with sassc-rails
Tailwind uses modern CSS features that are not recognized by the `sassc-rails` extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like `SassC::SyntaxError`, you must remove that gem from your Gemfile.
@@ -134,7 +199,7 @@ Tailwind uses modern CSS features that are not recognized by the `sassc-rails` e
For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates class names that don't exist in your content files or that are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
-### ERROR: Cannot find the tailwindcss executable for <supported platform>
+### `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:
@@ -172,24 +237,11 @@ and re-bundle.
See https://bundler.io/man/bundle-config.1.html for more information.
-### "No such file or directory" running on Alpine (musl)
-
-When running `tailwindcss` on an Alpine system, some users report a "No such file or directory" error message.
-
-
-#### Install gnu libc compatibility
-
-The cause of this is the upstream `tailwindcss` binary executables being built on a gnu libc system, making them incompatible with standard musl libc systems.
-
-A fix for this has been proposed upstream at https://github.com/tailwindlabs/tailwindcss/discussions/6785, but in the meantime a workaround is to install compatibility libraries:
-
-``` sh
-apk add build-base gcompat
-```
-
### Using asset-pipeline assets
-In Rails, you want to use [assets from the asset pipeline to get fingerprinting](https://guides.rubyonrails.org/asset_pipeline.html#what-is-fingerprinting-and-why-should-i-care-questionmark). However, Tailwind isn't aware of those assets. To use assets from the pipeline, use `url(image.svg)`. [Since Sprockets v3.3.0](https://github.com/rails/sprockets-rails/pull/476) `url(image.svg)` will then automatically be rewritten to `/path/to/assets/image-7801e7538c6f1cc57aa75a5876ab0cac.svg`. So the output CSS will have the correct path to those assets.
+In Rails, you want to use [assets from the asset pipeline to get fingerprinting](https://guides.rubyonrails.org/asset_pipeline.html#what-is-fingerprinting-and-why-should-i-care-questionmark). However, Tailwind isn't aware of those assets.
+
+To use assets from the pipeline, use `url(image.svg)`. [Since Sprockets v3.3.0](https://github.com/rails/sprockets-rails/pull/476) `url(image.svg)` is rewritten to `/path/to/assets/image-7801e7538c6f1cc57aa75a5876ab0cac.svg` so output CSS will have the correct path to those assets.
```js
module.exports = {
@@ -211,9 +263,14 @@ The inline version also works:
### Conflict with pre-existing asset pipeline stylesheets
-If you get a warning `Unrecognized at-rule or error parsing at-rule ‘@tailwind’.` in the browser console after installation, you incorrectly double-process `application.tailwind.css`. This is a misconfiguration, even though the styles will be fully effective in many cases. The file `application.tailwind.css` is installed when running `rails tailwindcss:install` and is placed alongside the common `application.css` in `app/assets/stylesheets`. Because the `application.css` in a newly generated Rails app includes a `require_tree .` directive, the asset pipeline incorrectly processes `application.tailwind.css`, where it should be taken care of by `tailwindcss`. The asset pipeline ignores TailwindCSS's at-directives, and the browser can't process them.
+If you get a warning `Unrecognized at-rule or error parsing at-rule ‘@tailwind’.` in the browser console after installation, you are incorrectly double-processing `application.tailwind.css`. This is a misconfiguration, even though the styles will be fully effective in many cases.
+
+The file `application.tailwind.css` is installed when running `rails tailwindcss:install` and is placed alongside the common `application.css` in `app/assets/stylesheets`. Because the `application.css` in a newly generated Rails app includes a `require_tree .` directive, the asset pipeline incorrectly processes `application.tailwind.css`, where it should be taken care of by `tailwindcss`. The asset pipeline ignores TailwindCSS's at-directives, and the browser can't process them.
+
+To fix the warning, you can either remove the `application.css`, if you don't plan to use the asset pipeline for stylesheets, and instead rely on TailwindCSS completely for styles. This is what this installer assumes.
+
+Or, if you do want to keep using the asset pipeline in parallel, make sure to remove the `require_tree .` line from the `application.css`.
-To fix the warning, you can either remove the `application.css`, if you don't plan to use the asset pipeline for stylesheets, and instead rely on TailwindCSS completely for styles. This is what this installer assumes. Else, if you do want to keep using the asset pipeline in parallel, make sure to remove the `require_tree .` line from the `application.css`.
## License
diff --git a/Rakefile b/Rakefile
index 83a3a2fe..30b6a94c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -12,3 +12,15 @@ Rake::TestTask.new(:test) do |t|
end
task default: :test
+
+namespace "format" do
+ desc "Regenerate table of contents in README"
+ task "toc" do
+ require "mkmf"
+ if find_executable0("markdown-toc")
+ sh "markdown-toc --maxdepth=3 -i README.md"
+ else
+ puts "WARN: cannot find markdown-toc, skipping. install with 'npm install markdown-toc'"
+ end
+ end
+end
From 733b18e58e13464c197fbed1bf8618ad2a4f99bc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 7 Feb 2024 13:43:03 +0000
Subject: [PATCH 105/305] build(deps): bump nokogiri from 1.16.0 to 1.16.2
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.0...v1.16.2)
---
updated-dependencies:
- dependency-name: nokogiri
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 916b4c9e..10e60749 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -88,14 +88,14 @@ GEM
timeout
net-smtp (0.4.0.1)
net-protocol
- nokogiri (1.16.0)
+ nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- nokogiri (1.16.0-arm64-darwin)
+ nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.16.0-x86_64-darwin)
+ nokogiri (1.16.2-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.16.0-x86_64-linux)
+ nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
From 981fced9f935cef9be98c6ac01ca40ac264fd385 Mon Sep 17 00:00:00 2001
From: David Celis
Date: Fri, 23 Feb 2024 15:25:46 -0800
Subject: [PATCH 106/305] 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 107/305] 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 108/305] 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 109/305] 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 110/305] 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 111/305] 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 112/305] 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 113/305] 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 114/305] 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 115/305] 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 116/305] 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 117/305] 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 118/305] 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 119/305] 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 120/305] 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 121/305] 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 122/305] 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 123/305] 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 124/305] 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 125/305] 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 126/305] 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 127/305] 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 128/305] 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 129/305] 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 130/305] 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 131/305] 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 132/305] 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 133/305] 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 134/305] 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 135/305] 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 136/305] 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 137/305] 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 138/305] 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 139/305] 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 140/305] 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 141/305] 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 142/305] 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 143/305] 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 144/305] 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 145/305] 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 146/305] 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 147/305] 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 148/305] 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 149/305] 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 150/305] 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 151/305] 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 152/305] 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 153/305] 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 154/305] 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 155/305] 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 156/305] 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 157/305] 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 158/305] 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 159/305] 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 160/305] 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 161/305] 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 162/305] 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 163/305] 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 164/305] 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 165/305] 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 166/305] 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 167/305] 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 168/305] 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 169/305] 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 170/305] 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 171/305] 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 172/305] 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 173/305] 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 174/305] 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 175/305] 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 176/305] 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 177/305] 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 178/305] 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 179/305] 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 180/305] 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 181/305] 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 182/305] 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 183/305] 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 184/305] 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 185/305] 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 186/305] 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 187/305] 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 188/305] 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 189/305] 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 190/305] 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 191/305] 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 192/305] 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 193/305] 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 194/305] 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 195/305] 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 196/305] 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 197/305] 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 198/305] 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 199/305] 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 200/305] 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 201/305] 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 202/305] 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 203/305] 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 204/305] 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 205/305] 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 206/305] 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 207/305] 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 208/305] 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 209/305] 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 210/305] 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 211/305] 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 212/305] 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 213/305] 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 214/305] 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 215/305] 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 216/305] 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 217/305] 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 218/305] 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 219/305] 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 220/305] 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 221/305] 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 222/305] 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 223/305] 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 224/305] 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 225/305] 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 226/305] 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 227/305] 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 228/305] 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 229/305] 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 230/305] 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 231/305] 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 232/305] 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 233/305] 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 234/305] 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| -%>
-