-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dribbble/patrick/newer-rails
Update to modern versions of libraries
- Loading branch information
Showing
13 changed files
with
112 additions
and
54 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,45 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- gemfile: rails_5_1 | ||
ruby: 2.7 | ||
|
||
- gemfile: rails_5_2 | ||
ruby: 2.7 | ||
|
||
- gemfile: rails_6_0 | ||
ruby: 2.7 | ||
|
||
- gemfile: rails_6_1 | ||
ruby: 2.7 | ||
|
||
- gemfile: rails_6_1 | ||
ruby: 3.0 | ||
|
||
name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: false | ||
|
||
- name: Bundle install | ||
run: | | ||
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile" | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run tests | ||
run: | | ||
bundle exec rspec |
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,7 +1,10 @@ | ||
language: ruby | ||
rvm: | ||
- 2.0.0 | ||
- 2.1.1 | ||
- 2.6 | ||
- 2.7 | ||
- 3.0 | ||
gemfile: | ||
- gemfiles/rails_3.gemfile | ||
- gemfiles/rails_4.gemfile | ||
- gemfiles/rails_5_1.gemfile | ||
- gemfiles/rails_5_2.gemfile | ||
- gemfiles/rails_6_0.gemfile | ||
- gemfiles/rails_6_1.gemfile |
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,9 +1,19 @@ | ||
appraise "rails-3" do | ||
gem "activerecord", "~> 3" | ||
gem "activesupport", "~> 3" | ||
appraise "rails-5-1" do | ||
gem "activerecord", "~> 5.1.7" | ||
gem "activerecord", "~> 5.1.7" | ||
end | ||
|
||
appraise "rails-4" do | ||
gem "activerecord", "~> 4" | ||
gem "activesupport", "~> 4" | ||
appraise "rails-5-2" do | ||
gem "activerecord", "~> 5.2.6" | ||
gem "activerecord", "~> 5.2.6" | ||
end | ||
|
||
appraise "rails-6-0" do | ||
gem "activerecord", "~> 6.0.4" | ||
gem "activerecord", "~> 6.0.4" | ||
end | ||
|
||
appraise "rails-6-1" do | ||
gem "activerecord", "~> 6.1.4" | ||
gem "activerecord", "~> 6.1.4" | ||
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "activerecord", "~> 5.1.7" | ||
|
||
gemspec path: "../" |
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,7 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "activerecord", "~> 5.2.6" | ||
|
||
gemspec path: "../" |
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,7 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "activerecord", "~> 6.0.4" | ||
|
||
gemspec path: "../" |
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,7 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "activerecord", "~> 6.1.4" | ||
|
||
gemspec path: "../" |
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,20 +1,8 @@ | ||
RSpec::Matchers.define :have_callback do |type, name, options| | ||
RSpec::Matchers.define :have_callback do |kind, type, name| | ||
match do |record| | ||
options ||= {} | ||
callbacks = record.__send__(:"_#{type}_callbacks") | ||
callbacks.any? do |callback| | ||
return false unless callback.raw_filter == name | ||
return false unless options[:kind].nil? || callback.kind == options[:kind] | ||
return true if options[:on].nil? | ||
|
||
if callback.respond_to?(:options) | ||
options[:on] == callback.options[:on] | ||
else | ||
if_options = callback.instance_variable_get("@if") | ||
if_options.any? do |if_option| | ||
if_option =~ /#{options[:on]}/ | ||
end | ||
end | ||
callback.matches?(kind, name) | ||
end | ||
end | ||
end |