From 770a29181f2b14e9457d34eb81482cfe45d126d9 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 3 Oct 2024 12:19:54 -0400 Subject: [PATCH 1/8] ci(downstream): make sure the binaries are downloaded --- .github/workflows/downstream.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 6d32d4f..ffb82d0 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -36,6 +36,7 @@ jobs: ruby-version: ${{matrix.ruby}} - run: gem install bundler -v ">= 2.3.22" # for "add --path" - run: bundle install --local || bundle install + - run: bundle exec rake download - run: git clone --depth=1 ${{matrix.url}} ${{matrix.name}} - name: ${{matrix.name}} test suite working-directory: ${{matrix.name}} From 1eceb1cf0baa51d8a1a48fcc8d28d813326baa1e Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 5 Oct 2024 17:16:51 -0400 Subject: [PATCH 2/8] dev: configure dependabot --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..403b308 --- /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" From ef98971082a6ffa1eb6c7988c0b977a812821821 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 5 Oct 2024 17:23:35 -0400 Subject: [PATCH 3/8] style: standardrb --- exe/tailwindcss | 2 +- lib/tailwindcss/ruby/upstream.rb | 2 +- rakelib/package.rake | 17 +++++++---------- test/tailwindcss/test_ruby.rb | 12 +++++------- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/exe/tailwindcss b/exe/tailwindcss index 24b29b8..15b02ee 100755 --- a/exe/tailwindcss +++ b/exe/tailwindcss @@ -14,6 +14,6 @@ begin exec(*command) end rescue Tailwindcss::Ruby::UnsupportedPlatformException, Tailwindcss::Ruby::ExecutableNotFoundException => e - STDERR.puts("ERROR: " + e.message) + warn("ERROR: " + e.message) exit 1 end diff --git a/lib/tailwindcss/ruby/upstream.rb b/lib/tailwindcss/ruby/upstream.rb index ce7dab3..307c481 100644 --- a/lib/tailwindcss/ruby/upstream.rb +++ b/lib/tailwindcss/ruby/upstream.rb @@ -11,7 +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", + "arm-linux" => "tailwindcss-linux-armv7" } end end diff --git a/rakelib/package.rake b/rakelib/package.rake index 2b49fa8..55c73cc 100644 --- a/rakelib/package.rake +++ b/rakelib/package.rake @@ -1,4 +1,3 @@ -# coding: utf-8 # # Rake tasks to manage native gem packages with binary executables from tailwindlabs/tailwindcss # @@ -39,7 +38,7 @@ # - pkg/tailwindcss-ruby-1.0.0-x64-mingw-ucrt.gem # - pkg/tailwindcss-ruby-1.0.0-x86_64-darwin.gem # - pkg/tailwindcss-ruby-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. # @@ -75,7 +74,7 @@ end TAILWINDCSS_RUBY_GEMSPEC = Bundler.load_gemspec("tailwindcss-ruby.gemspec") # prepend the download task before the Gem::PackageTask tasks -task :package => :download +task package: :download gem_path = Gem::PackageTask.new(TAILWINDCSS_RUBY_GEMSPEC).define desc "Build the ruby gem" @@ -103,12 +102,10 @@ Tailwindcss::Ruby::Upstream::NATIVE_PLATFORMS.each do |platform, 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 + URI.parse(release_url).open do |remote| + File.binwrite(exepath, remote.read) end - FileUtils.chmod(0755, exepath, verbose: true) + FileUtils.chmod(0o755, exepath, verbose: true) end end end @@ -119,11 +116,11 @@ task "check" => exepaths do sha_url = if File.exist?(sha_filename) sha_filename else - sha_url = tailwindcss_download_url("sha256sums.txt") + tailwindcss_download_url("sha256sums.txt") end gemspec = TAILWINDCSS_RUBY_GEMSPEC - checksums = URI.open(sha_url).each_line.map do |line| + checksums = URI.parse(sha_url).open.each_line.map do |line| checksum, file = line.split [File.basename(file), checksum] end.to_h diff --git a/test/tailwindcss/test_ruby.rb b/test/tailwindcss/test_ruby.rb index ecdcbd2..02ea102 100644 --- a/test/tailwindcss/test_ruby.rb +++ b/test/tailwindcss/test_ruby.rb @@ -108,13 +108,11 @@ def mock_local_tailwindcss_install end it ".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::Ruby::DirectoryNotFoundException) do - Tailwindcss::Ruby.executable - end - ensure - ENV["TAILWINDCSS_INSTALL_DIR"] = nil + ENV["TAILWINDCSS_INSTALL_DIR"] = "/does/not/exist" + assert_raises(Tailwindcss::Ruby::DirectoryNotFoundException) do + Tailwindcss::Ruby.executable end + ensure + ENV["TAILWINDCSS_INSTALL_DIR"] = nil end end From caea6e6a04124f8aeddf93f4f14c238edc8f62d5 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 5 Oct 2024 17:37:16 -0400 Subject: [PATCH 4/8] ci: run standard in the suite --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2545da..bd9b6c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,20 @@ on: - '*' jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm Gemfile.lock + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler: latest + bundler-cache: true + - run: bundle exec rake standard + build: + needs: [ lint ] runs-on: ubuntu-latest strategy: fail-fast: false From a6261ffe8dbd3054fa02be93321ee93c157cb87d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Oct 2024 21:40:51 +0000 Subject: [PATCH 5/8] build(deps): bump standard from 1.40.0 to 1.40.1 Bumps [standard](https://github.com/standardrb/standard) from 1.40.0 to 1.40.1. - [Release notes](https://github.com/standardrb/standard/releases) - [Changelog](https://github.com/standardrb/standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/standardrb/standard/compare/v1.40.0...v1.40.1) --- updated-dependencies: - dependency-name: standard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index d616ad9..31deff2 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,4 @@ gem "rake", "~> 13.0" gem "minitest", "~> 5.16" -gem "standard", "~> 1.3" +gem "standard", "~> 1.40" diff --git a/Gemfile.lock b/Gemfile.lock index 3659cc4..de489cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,7 +19,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.7) + rexml (3.3.8) rubocop (1.65.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -37,7 +37,7 @@ GEM rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - standard (1.40.0) + standard (1.40.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) rubocop (~> 1.65.0) @@ -58,7 +58,7 @@ PLATFORMS DEPENDENCIES minitest (~> 5.16) rake (~> 13.0) - standard (~> 1.3) + standard (~> 1.40) tailwindcss-ruby! BUNDLED WITH From 92d9d237922491312a35fafed75d8155dd1959d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:18:47 +0000 Subject: [PATCH 6/8] build(deps): bump standard from 1.40.1 to 1.41.0 Bumps [standard](https://github.com/standardrb/standard) from 1.40.1 to 1.41.0. - [Release notes](https://github.com/standardrb/standard/releases) - [Changelog](https://github.com/standardrb/standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/standardrb/standard/compare/v1.40.1...v1.41.0) --- updated-dependencies: - dependency-name: standard dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 31deff2..4b34c62 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,4 @@ gem "rake", "~> 13.0" gem "minitest", "~> 5.16" -gem "standard", "~> 1.40" +gem "standard", "~> 1.41" diff --git a/Gemfile.lock b/Gemfile.lock index de489cb..5c649bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,36 +19,34 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.8) - rubocop (1.65.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - standard (1.40.1) + standard (1.41.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) unicode-display_width (2.6.0) PLATFORMS @@ -58,7 +56,7 @@ PLATFORMS DEPENDENCIES minitest (~> 5.16) rake (~> 13.0) - standard (~> 1.40) + standard (~> 1.41) tailwindcss-ruby! BUNDLED WITH From ed84083494faefdce469e389877e63c2955aac8c Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 15 Oct 2024 17:07:58 -0400 Subject: [PATCH 7/8] dep: bump tailwindcss to v3.4.14 --- lib/tailwindcss/ruby/upstream.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tailwindcss/ruby/upstream.rb b/lib/tailwindcss/ruby/upstream.rb index 307c481..aa23e2c 100644 --- a/lib/tailwindcss/ruby/upstream.rb +++ b/lib/tailwindcss/ruby/upstream.rb @@ -1,7 +1,7 @@ module Tailwindcss module Ruby module Upstream - VERSION = "v3.4.13" + VERSION = "v3.4.14" # rubygems platform name => upstream release filename NATIVE_PLATFORMS = { From ee18fd8ae2061330d65a4c96fe270f9153663667 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 15 Oct 2024 17:14:03 -0400 Subject: [PATCH 8/8] version bump to v3.4.14 --- CHANGELOG.md | 5 +++++ Gemfile.lock | 2 +- lib/tailwindcss/ruby/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e64b3db..4838e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## [Unreleased] +## v3.4.14 + +* Update `tailwindcss` to [v3.4.14](https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.4.14). (#8) @flavorjones + + ## v3.4.13 / 2023-09-26 * This gem was extracted from `tailwindcss-rails`. diff --git a/Gemfile.lock b/Gemfile.lock index 5c649bc..7d0cc59 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - tailwindcss-ruby (3.4.13) + tailwindcss-ruby (3.4.14) GEM remote: https://rubygems.org/ diff --git a/lib/tailwindcss/ruby/version.rb b/lib/tailwindcss/ruby/version.rb index fc1a5de..f0db692 100644 --- a/lib/tailwindcss/ruby/version.rb +++ b/lib/tailwindcss/ruby/version.rb @@ -2,6 +2,6 @@ module Tailwindcss module Ruby - VERSION = "3.4.13" + VERSION = "3.4.14" end end