From 0b1214ebd208105b6ddb84a7121db0ace631b0fb Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 5 Oct 2023 17:27:11 +0200 Subject: [PATCH] Add Rails 7.1 compatibility --- .github/workflows/javascript.yml | 2 +- .github/workflows/ruby.yml | 5 +++- Appraisals | 4 +++ CHANGELOG.md | 4 +++ client_side_validations.gemspec | 2 +- gemfiles/rails_6.1.gemfile | 36 +++++++++++++------------- gemfiles/rails_7.0.gemfile | 36 +++++++++++++------------- gemfiles/rails_7.1.gemfile | 25 ++++++++++++++++++ gemfiles/rails_edge.gemfile | 36 +++++++++++++------------- lib/client_side_validations/version.rb | 2 +- package.json | 12 ++++----- 11 files changed, 100 insertions(+), 64 deletions(-) create mode 100644 gemfiles/rails_7.1.gemfile diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index b05bc817..e6b70d8c 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '18' - name: Get yarn cache directory path id: yarn-cache-dir-path run: diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 265fbf0f..513a9735 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: ruby-version: ['2.7', '3.0', '3.1', '3.2'] - gemfile: [rails_6.1, rails_7.0] + gemfile: [rails_6.1, rails_7.0, rails_7.1] channel: ['stable'] include: @@ -38,6 +38,9 @@ jobs: - ruby-version: 'head' gemfile: rails_7.0 channel: 'experimental' + - ruby-version: 'head' + gemfile: rails_7.1 + channel: 'experimental' - ruby-version: 'head' gemfile: rails_edge channel: 'experimental' diff --git a/Appraisals b/Appraisals index 428badd4..55a3c323 100644 --- a/Appraisals +++ b/Appraisals @@ -8,6 +8,10 @@ appraise 'rails-7.0' do gem 'rails', '~> 7.0.0' end +appraise 'rails-7.1' do + gem 'rails', '~> 7.1.0' +end + appraise 'rails-edge' do gem 'rails', git: 'https://github.com/rails/rails.git', branch: 'main' end diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d52a00..64b5887f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 22.1.0 / 2023-10-05 + +* [FEATURE] Rails 7.1 compatibility + ## 22.0.0 / 2023-09-02 * [FEATURE] Drop Rails 5.2 and 6.0 support diff --git a/client_side_validations.gemspec b/client_side_validations.gemspec index f58bbb47..6706929d 100644 --- a/client_side_validations.gemspec +++ b/client_side_validations.gemspec @@ -28,5 +28,5 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.7' spec.add_dependency 'js_regex', '~> 3.7' - spec.add_dependency 'rails', '>= 6.1', '< 7.1' + spec.add_dependency 'rails', '>= 6.1', '< 7.2' end diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index 9c65c5b9..f13f77b3 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -2,24 +2,24 @@ source "https://rubygems.org" -gem "appraisal", "~> 2.5" -gem "byebug", "~> 11.1" -gem "m", "~> 1.6" -gem "minitest", "~> 5.19" -gem "mocha", "~> 2.1" -gem "rake", "~> 13.0" -gem "rubocop", "~> 1.56" -gem "rubocop-minitest", "~> 0.31.0" -gem "rubocop-packaging", "~> 0.5.2" -gem "rubocop-performance", "~> 1.19" -gem "rubocop-rails", "~> 2.20" -gem "rubocop-rake", "~> 0.6.0" -gem "shotgun", "~> 0.9.2" -gem "simplecov", "~> 0.22.0" -gem "simplecov-lcov", "~> 0.8.0" -gem "sinatra", "~> 3.1" -gem "sqlite3", "~> 1.6" -gem "webrick", "~> 1.7" +gem "appraisal" +gem "byebug" +gem "m" +gem "minitest" +gem "mocha" +gem "rake" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-packaging" +gem "rubocop-performance" +gem "rubocop-rails" +gem "rubocop-rake" +gem "shotgun" +gem "simplecov" +gem "simplecov-lcov" +gem "sinatra" +gem "sqlite3" +gem "webrick" gem "rails", "~> 6.1.0" gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index d38f5391..cc8794a4 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -2,24 +2,24 @@ source "https://rubygems.org" -gem "appraisal", "~> 2.5" -gem "byebug", "~> 11.1" -gem "m", "~> 1.6" -gem "minitest", "~> 5.19" -gem "mocha", "~> 2.1" -gem "rake", "~> 13.0" -gem "rubocop", "~> 1.56" -gem "rubocop-minitest", "~> 0.31.0" -gem "rubocop-packaging", "~> 0.5.2" -gem "rubocop-performance", "~> 1.19" -gem "rubocop-rails", "~> 2.20" -gem "rubocop-rake", "~> 0.6.0" -gem "shotgun", "~> 0.9.2" -gem "simplecov", "~> 0.22.0" -gem "simplecov-lcov", "~> 0.8.0" -gem "sinatra", "~> 3.1" -gem "sqlite3", "~> 1.6" -gem "webrick", "~> 1.7" +gem "appraisal" +gem "byebug" +gem "m" +gem "minitest" +gem "mocha" +gem "rake" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-packaging" +gem "rubocop-performance" +gem "rubocop-rails" +gem "rubocop-rake" +gem "shotgun" +gem "simplecov" +gem "simplecov-lcov" +gem "sinatra" +gem "sqlite3" +gem "webrick" gem "rails", "~> 7.0.0" gemspec path: "../" diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile new file mode 100644 index 00000000..fd09126a --- /dev/null +++ b/gemfiles/rails_7.1.gemfile @@ -0,0 +1,25 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal" +gem "byebug" +gem "m" +gem "minitest" +gem "mocha" +gem "rake" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-packaging" +gem "rubocop-performance" +gem "rubocop-rails" +gem "rubocop-rake" +gem "shotgun" +gem "simplecov" +gem "simplecov-lcov" +gem "sinatra" +gem "sqlite3" +gem "webrick" +gem "rails", "~> 7.1.0" + +gemspec path: "../" diff --git a/gemfiles/rails_edge.gemfile b/gemfiles/rails_edge.gemfile index ea762111..7d77767f 100644 --- a/gemfiles/rails_edge.gemfile +++ b/gemfiles/rails_edge.gemfile @@ -2,24 +2,24 @@ source "https://rubygems.org" -gem "appraisal", "~> 2.5" -gem "byebug", "~> 11.1" -gem "m", "~> 1.6" -gem "minitest", "~> 5.19" -gem "mocha", "~> 2.1" -gem "rake", "~> 13.0" -gem "rubocop", "~> 1.56" -gem "rubocop-minitest", "~> 0.31.0" -gem "rubocop-packaging", "~> 0.5.2" -gem "rubocop-performance", "~> 1.19" -gem "rubocop-rails", "~> 2.20" -gem "rubocop-rake", "~> 0.6.0" -gem "shotgun", "~> 0.9.2" -gem "simplecov", "~> 0.22.0" -gem "simplecov-lcov", "~> 0.8.0" -gem "sinatra", "~> 3.1" -gem "sqlite3", "~> 1.6" -gem "webrick", "~> 1.7" +gem "appraisal" +gem "byebug" +gem "m" +gem "minitest" +gem "mocha" +gem "rake" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-packaging" +gem "rubocop-performance" +gem "rubocop-rails" +gem "rubocop-rake" +gem "shotgun" +gem "simplecov" +gem "simplecov-lcov" +gem "sinatra" +gem "sqlite3" +gem "webrick" gem "rails", git: "https://github.com/rails/rails.git", branch: "main" gemspec path: "../" diff --git a/lib/client_side_validations/version.rb b/lib/client_side_validations/version.rb index b229a367..071870d7 100644 --- a/lib/client_side_validations/version.rb +++ b/lib/client_side_validations/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ClientSideValidations - VERSION = '22.0.0' + VERSION = '22.1.0' end diff --git a/package.json b/package.json index 9eafcd60..3641e443 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ "test": "test/javascript/run-qunit.mjs" }, "devDependencies": { - "@babel/core": "^7.22.20", + "@babel/core": "^7.23.0", "@babel/preset-env": "^7.22.20", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-node-resolve": "^15.2.1", - "chrome-launcher": "^1.0.0", - "puppeteer-core": "^21.3.3", - "rollup": "^3.29.2", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-node-resolve": "^15.2.2", + "chrome-launcher": "^1.1.0", + "puppeteer-core": "^21.3.7", + "rollup": "^4.0.0", "rollup-plugin-copy": "^3.5.0", "standard": "^17.1.0" },