diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a57688..8781d09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,50 +14,10 @@ jobs: strategy: matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "jruby-head"] - gemfile: ["4.2", "5.0", "5.1", "5.2", "6.0", "6.1", "7.0", "7.1"] + ruby: ["3.0", "3.1", "3.2", "3.3", "jruby-head"] + gemfile: ["6.0", "6.1", "7.0", "7.1"] exclude: - - gemfile: "4.2" - ruby: "3.0" - - gemfile: "4.2" - ruby: "3.1" - - gemfile: "4.2" - ruby: "3.2" - - gemfile: "4.2" - ruby: "3.3" - - gemfile: "4.2" - ruby: "jruby-head" - - gemfile: "5.0" - ruby: "3.0" - - gemfile: "5.0" - ruby: "3.1" - - gemfile: "5.0" - ruby: "3.2" - - gemfile: "5.0" - ruby: "3.3" - - gemfile: "5.0" - ruby: "jruby-head" - - gemfile: "5.1" - ruby: "3.0" - - gemfile: "5.1" - ruby: "3.1" - - gemfile: "5.1" - ruby: "3.2" - - gemfile: "5.1" - ruby: "3.3" - - gemfile: "5.1" - ruby: "jruby-head" - - gemfile: "5.2" - ruby: "3.0" - - gemfile: "5.2" - ruby: "3.1" - - gemfile: "5.2" - ruby: "3.2" - - gemfile: "5.2" - ruby: "3.3" - - gemfile: "5.2" - ruby: "jruby-head" - gemfile: "6.0" ruby: "3.2" - gemfile: "6.0" @@ -66,19 +26,6 @@ jobs: ruby: "3.2" - gemfile: "6.1" ruby: "3.3" - - gemfile: "7.0" - ruby: "2.5" - - gemfile: "7.0" - ruby: "2.6" - - gemfile: "7.0" - ruby: "2.7" - - gemfile: "7.1" - ruby: "2.5" - - gemfile: "7.1" - ruby: "2.6" - - gemfile: "7.1" - ruby: "2.7" - env: BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile @@ -87,13 +34,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Install Ruby ${{ matrix.ruby }}" - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 + - name: "Install Ruby ${{ matrix.ruby }}" uses: ruby/setup-ruby@v1 with: - bundler: 1 ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically @@ -102,4 +45,3 @@ jobs: - name: Run standard.rb run: bundle exec rake standard - if: ${{ ! startsWith(matrix.ruby, '2.') }} diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile deleted file mode 100644 index c8aff67..0000000 --- a/gemfiles/rails_4.2.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "rails", "~> 4.2.0" -gem "i18n", "< 1" - -gemspec path: "../" diff --git a/gemfiles/rails_5.0.gemfile b/gemfiles/rails_5.0.gemfile deleted file mode 100644 index d32321d..0000000 --- a/gemfiles/rails_5.0.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "rails", "~> 5.0.7", ">= 5.0.7.2" -gem "i18n", "< 1" - -gemspec path: "../" diff --git a/gemfiles/rails_5.1.gemfile b/gemfiles/rails_5.1.gemfile deleted file mode 100644 index cf78573..0000000 --- a/gemfiles/rails_5.1.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "rails", "~> 5.1.7" -gem "i18n", "< 1" - -gemspec path: "../" diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile deleted file mode 100644 index 93456ef..0000000 --- a/gemfiles/rails_5.2.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "rails", "~> 5.2.4", ">= 5.2.4.3" -gem "i18n", "< 1" - -gemspec path: "../" diff --git a/lib/validates_email_format_of.rb b/lib/validates_email_format_of.rb index 2e7e6f2..84258eb 100644 --- a/lib/validates_email_format_of.rb +++ b/lib/validates_email_format_of.rb @@ -297,11 +297,15 @@ def self.validate_domain_part_syntax(domain, idn: true) def self.deprecation_warn(msg) if defined?(ActiveSupport::Deprecation) - ActiveSupport::Deprecation.warn(msg) + deprecator.warn(msg) else warn(msg) end end + + def self.deprecator + @deprecator ||= ActiveSupport::Deprecation.new("2.0", "validates_email_format_of") + end end require "validates_email_format_of/active_model" if defined?(::ActiveModel) && !(ActiveModel::VERSION::MAJOR < 2 || (ActiveModel::VERSION::MAJOR == 2 && ActiveModel::VERSION::MINOR < 1))