-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'core' into update-method-call-test-for-has-many-through…
…-relationship
- Loading branch information
Showing
10 changed files
with
397 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | ||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | ||
|
||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- 3.1 | ||
- '3.0' | ||
- 2.7 | ||
- 2.6 | ||
- 2.5 | ||
# - jruby-9.2.19.0 | ||
# - jruby-9.3.1.0 | ||
rails: | ||
- '~> 5.1.0' | ||
- '~> 5.2.0' | ||
- '~> 6.0.0' | ||
- '~> 6.1.0' | ||
- '~> 7.0.0' | ||
- 'edge' | ||
exclude: | ||
# Rails edge is now 7.x and requires ruby 2.7 | ||
- rails: 'edge' | ||
ruby: 2.6 | ||
- rails: 'edge' | ||
ruby: 2.5 | ||
- rails: '~> 7.0.0' | ||
ruby: 2.6 | ||
- rails: '~> 7.0.0' | ||
ruby: 2.5 | ||
# Legacy Rails with newer rubies | ||
- rails: '~> 5.1.0' | ||
ruby: '3.0' | ||
- rails: '~> 5.2.0' | ||
ruby: '3.0' | ||
- rails: '~> 5.1.0' | ||
ruby: 3.1 | ||
- rails: '~> 5.2.0' | ||
ruby: 3.1 | ||
|
||
env: | ||
RAILS: ${{ matrix.rails }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: bundle exec rake |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'sqlite3', platforms: [:ruby] | ||
sqlite = ENV['SQLITE_VERSION'] | ||
|
||
if sqlite | ||
gem 'sqlite3', sqlite, platforms: [:ruby] | ||
else | ||
gem 'sqlite3', platforms: [:ruby] | ||
end | ||
|
||
platforms :jruby do | ||
gem 'activerecord-jdbcsqlite3-adapter' | ||
end | ||
|
||
platforms :rbx do | ||
gem 'rubysl', '~> 2.0' | ||
gem 'rubysl-test-unit' | ||
gem 'rubinius-developer_tools' | ||
if RUBY_ENGINE == 'rbx' | ||
platforms :rbx do | ||
gem 'rubinius-developer_tools' | ||
gem 'rubysl', '~> 2.0' | ||
gem 'rubysl-test-unit' | ||
end | ||
end | ||
|
||
rails = ENV['RAILS'] || '~> 5.2.0' | ||
rails = ENV['RAILS'] || '~> 6.0.4' | ||
|
||
gem 'rails', rails | ||
if rails == 'edge' | ||
gem 'rails', github: 'rails/rails' | ||
else | ||
gem 'rails', rails | ||
end | ||
|
||
# Specify your gem's dependencies in paranoia.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
require 'rspec/expectations' | ||
if defined?(RSpec) | ||
require 'rspec/expectations' | ||
|
||
# Validate the subject's class did call "acts_as_paranoid" | ||
RSpec::Matchers.define :act_as_paranoid do | ||
match { |subject| subject.class.ancestors.include?(Paranoia) } | ||
# Validate the subject's class did call "acts_as_paranoid" | ||
RSpec::Matchers.define :act_as_paranoid do | ||
match { |subject| subject.class.ancestors.include?(Paranoia) } | ||
|
||
failure_message_proc = lambda do | ||
"expected #{subject.class} to use `acts_as_paranoid`" | ||
end | ||
failure_message_proc = lambda do | ||
"expected #{subject.class} to use `acts_as_paranoid`" | ||
end | ||
|
||
failure_message_when_negated_proc = lambda do | ||
"expected #{subject.class} not to use `acts_as_paranoid`" | ||
end | ||
failure_message_when_negated_proc = lambda do | ||
"expected #{subject.class} not to use `acts_as_paranoid`" | ||
end | ||
|
||
if respond_to?(:failure_message_when_negated) | ||
failure_message(&failure_message_proc) | ||
failure_message_when_negated(&failure_message_when_negated_proc) | ||
else | ||
# RSpec 2 compatibility: | ||
failure_message_for_should(&failure_message_proc) | ||
failure_message_for_should_not(&failure_message_when_negated_proc) | ||
if respond_to?(:failure_message_when_negated) | ||
failure_message(&failure_message_proc) | ||
failure_message_when_negated(&failure_message_when_negated_proc) | ||
else | ||
# RSpec 2 compatibility: | ||
failure_message_for_should(&failure_message_proc) | ||
failure_message_for_should_not(&failure_message_when_negated_proc) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Paranoia | ||
VERSION = '2.4.1'.freeze | ||
VERSION = '2.5.3'.freeze | ||
end |
Oops, something went wrong.