diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..403b3087
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+ - package-ecosystem: "bundler"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
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/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml
index d2babe6a..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
@@ -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
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02a804bd..90c49f9d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 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. (#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
* 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/Gemfile b/Gemfile
index cf00e45c..46788894 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", ">= 7.0.0"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index c3fe8c8a..0b99151e 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 (>= 7.0.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 (>= 7.0.0)
debug (>= 1.0.0)
tailwindcss-rails!
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 -%>
diff --git a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
index 34756518..fab779d1 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 "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 "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" %>
diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt
index c29d5e6e..65cf06b5 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 %>", <%= 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/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..17d0febf 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_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 <%= 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" %>
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
diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec
index 02c10fb5..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.0.0"
+ spec.add_dependency "railties", ">= 7.0.0"
end