Skip to content

Commit

Permalink
Merge pull request #14 from neighborland/ar6
Browse files Browse the repository at this point in the history
ActiveRecord 6
  • Loading branch information
teeparham authored Nov 6, 2024
2 parents ef49ef3 + 2451850 commit 0963781
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Ruby

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["3.0", "3.1", "3.2", "3.3"]

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
9 changes: 5 additions & 4 deletions sluggi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ Gem::Specification.new do |spec|
spec.files = Dir["lib/**/*.rb", "README.md", "LICENSE.txt"]
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.3.0"
spec.required_ruby_version = ">= 3.0.0"

spec.add_dependency "activerecord", "~> 5.1"
spec.add_dependency "railties", "~> 5.1"
spec.add_dependency "activerecord", "~> 6.0"
spec.add_dependency "railties", "~> 6.0"

spec.add_development_dependency "appraisal", "~> 2.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "minitest", "~> 5.22"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "sqlite3", "~> 1.3"
end
2 changes: 1 addition & 1 deletion test/history_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class BigDog < Dog
class LittleDog < Dog
end

class HistoryTest < MiniTest::Spec
class HistoryTest < Minitest::Spec
before do
Cat.delete_all
Sluggi::Slug.delete_all
Expand Down
2 changes: 1 addition & 1 deletion test/model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "test_helper"

class ModelTest < MiniTest::Spec
class ModelTest < Minitest::Spec
class IncompleteCat < ActiveRecord::Base
self.table_name = "cats"
include Sluggi::Model
Expand Down
2 changes: 1 addition & 1 deletion test/slug_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "test_helper"

module Sluggi
class SlugTest < MiniTest::Spec
class SlugTest < Minitest::Spec
describe "validation" do
it "is not valid" do
slug = Slug.new
Expand Down
2 changes: 1 addition & 1 deletion test/slugged_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "test_helper"

class SluggedTest < MiniTest::Spec
class SluggedTest < Minitest::Spec
class Cat < ActiveRecord::Base
include Sluggi::Slugged

Expand Down
2 changes: 1 addition & 1 deletion test/validate_presence_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "test_helper"

class ValidatePresenceTest < MiniTest::Spec
class ValidatePresenceTest < Minitest::Spec
class Cat < ActiveRecord::Base
include Sluggi::ValidatePresence
end
Expand Down
2 changes: 1 addition & 1 deletion test/validate_uniqueness_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "test_helper"

class ValidateUniquenessTest < MiniTest::Spec
class ValidateUniquenessTest < Minitest::Spec
class Cat < ActiveRecord::Base
include Sluggi::Model
include Sluggi::ValidateUniqueness
Expand Down
2 changes: 1 addition & 1 deletion test/validates_exclusion_of_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "test_helper"

class ValidatesExclusionOfTest < MiniTest::Spec
class ValidatesExclusionOfTest < Minitest::Spec
class Cat < ActiveRecord::Base
include Sluggi::ValidateExclusionOf
end
Expand Down

0 comments on commit 0963781

Please sign in to comment.