Skip to content

Commit

Permalink
Check against Rails to 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kivanio committed Oct 30, 2023
1 parent 123681b commit f246726
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 95 deletions.
139 changes: 58 additions & 81 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,61 @@ name: ci
on: [push, pull_request]

jobs:
test:
if: github.actor != 'dependabot[bot]' && github.event_name == 'push' ||
github.event_name == 'pull_request'

strategy:
matrix:
rails: ['5.2', '6.0', '6.1', '7.0', 'master']

ruby: ['2.6', '2.7', '3.0', '3.1']

exclude:
- rails: master

ruby: '2.6'

- rails: '7.0'

ruby: '2.6'

- rails: '7.0'

ruby: '3.1'

- rails: '6.0'

ruby: '3.0'

- rails: '6.0'

ruby: '3.1'

- rails: '5.2'

ruby: '2.7'

- rails: '5.2'

ruby: '3.0'

- rails: '5.2'

ruby: '3.1'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1

with:
ruby-version: ${{ matrix.ruby }}

- name: Install toolchain

run: |
sudo apt-get update
sudo apt-get install \
build-essential \
libsqlite3-dev
- name: Install bundler

run: gem install bundler

- env:
RAILS_VERSION: ${{ matrix.rails }}

name: Install dependencies

run: bundle install

- env:
RAILS_VERSION: ${{ matrix.rails }}

name: Test

run: bundle exec rspec


test:
if: github.actor != 'dependabot[bot]' && github.event_name == 'push' ||
github.event_name == 'pull_request'

strategy:
matrix:
rails: ['5.2', '6.0', '6.1', '7.0', '7.1', 'edge']
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']

exclude:
- rails: edge
ruby: '2.6'
- rails: '7.1'
ruby: '2.6'
- rails: '7.1'
ruby: '3.1'
- rails: '7.0'
ruby: '2.6'
- rails: '7.0'
ruby: '3.1'
- rails: '6.0'
ruby: '3.0'
- rails: '6.0'
ruby: '3.1'
- rails: '5.2'
ruby: '2.7'
- rails: '5.2'
ruby: '3.0'
- rails: '5.2'
ruby: '3.1'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install \
build-essential \
libsqlite3-dev
- name: Install bundler
run: gem install bundler

- env:
RAILS_VERSION: ${{ matrix.rails }}
name: Install dependencies
run: bundle install

- env:
RAILS_VERSION: ${{ matrix.rails }}
name: Test
run: bundle exec rspec
27 changes: 13 additions & 14 deletions paranoia_uniqueness_validator.gemspec
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'paranoia_uniqueness_validator/version'

Gem::Specification.new do |gem|
gem.name = "paranoia_uniqueness_validator"
gem.name = 'paranoia_uniqueness_validator'
gem.version = ParanoiaUniquenessValidator::VERSION
gem.licenses = ['MIT']
gem.authors = ["Anthony Smith"]
gem.email = ["anthony@sticksnleaves.com"]
gem.description = %q{Adds the validates_uniqueness_without_deleted validator to ignore deleted fields when validating for uniqueness.}
gem.summary = %q{Validate unique fields without letting those pesky deleted records get in the way. Great for use with Paranoia.}
gem.homepage = "https://github.com/anthonator/paranoia_uniqueness_validator"
gem.authors = ['Anthony Smith']
gem.email = ['anthony@sticksnleaves.com']
gem.description = 'Adds the validates_uniqueness_without_deleted validator to ignore deleted fields when validating for uniqueness.'
gem.summary = 'Validate unique fields without letting those pesky deleted records get in the way. Great for use with Paranoia.'
gem.homepage = 'https://github.com/anthonator/paranoia_uniqueness_validator'

gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
gem.require_paths = ['lib']

gem.add_dependency "activerecord", ">= 5.2.0", "< 7.1"
gem.add_dependency 'activerecord', '>= 5.2.0', '< 7.2'

gem.add_development_dependency "paranoia", "~> 2.3"
gem.add_development_dependency "database_cleaner", "~> 2.0"
gem.add_development_dependency "rspec-rails", "~> 5.0"
gem.add_development_dependency 'database_cleaner', '~> 2.0'
gem.add_development_dependency 'paranoia', '~> 2.3'
gem.add_development_dependency 'rspec-rails', '~> 5.0'
end

0 comments on commit f246726

Please sign in to comment.