Skip to content

Commit b050114

Browse files
committed
2 parents 37ccd7e + 2fa4f9f commit b050114

File tree

11 files changed

+53
-41
lines changed

11 files changed

+53
-41
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
ruby-version: ['2.7']
15+
ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7']
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Set up Ruby
20-
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
20+
uses: ruby/setup-ruby@v1
2121
with:
2222
ruby-version: ${{ matrix.ruby-version }}
2323
- name: Install dependencies
@@ -28,4 +28,6 @@ jobs:
2828
- name: Rubocop
2929
run: rubocop
3030
- name: Run tests
31-
run: bundle exec appraisal rspec
31+
run: |
32+
RAILS_ENV=test bundle exec rake dummy:db:schema:load
33+
bundle exec appraisal rspec

Appraisals

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# frozen_string_literal: true
22

33
appraise 'rails_6.1' do
4-
gem 'rails', '6.1'
4+
gem 'rails', '~> 6.1'
55
gem 'tzinfo-data'
66
end
77

88
appraise 'rails_7.0' do
9-
gem 'rails', '7.0'
9+
gem 'rails', '~> 7.0'
10+
gem 'tzinfo-data'
11+
end
12+
13+
appraise 'rails_7.1' do
14+
gem 'rails', '~> 7.1'
1015
gem 'tzinfo-data'
1116
end

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.7-buster
1+
FROM ruby:3.2-buster
22

33
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
44
build-essential \

bin/ssh_to_container

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
3+
docker-compose exec ruby bash

gemfiles/rails_6.1.gemfile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# frozen_string_literal: true
2-
31
# This file was generated by Appraisal
42

5-
source 'https://rubygems.org'
3+
source "https://rubygems.org"
64

7-
gem 'appraisal'
8-
gem 'byebug'
9-
gem 'nokogiri'
10-
gem 'rails', '6.1'
11-
gem 'rspec-rails'
12-
gem 'sqlite3'
13-
gem 'tzinfo-data'
5+
gem "appraisal"
6+
gem "byebug"
7+
gem "nokogiri"
8+
gem "rspec-rails"
9+
gem "sqlite3"
10+
gem "tzinfo-data"
11+
gem "rails", "~> 6.1"
1412

15-
gemspec path: '../'
13+
gemspec path: "../"

gemfiles/rails_7.0.gemfile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# frozen_string_literal: true
2-
31
# This file was generated by Appraisal
42

5-
source 'https://rubygems.org'
3+
source "https://rubygems.org"
64

7-
gem 'appraisal'
8-
gem 'byebug'
9-
gem 'nokogiri'
10-
gem 'rails', '7.0'
11-
gem 'rspec-rails'
12-
gem 'sqlite3'
13-
gem 'tzinfo-data'
5+
gem "appraisal"
6+
gem "byebug"
7+
gem "nokogiri"
8+
gem "rspec-rails"
9+
gem "sqlite3"
10+
gem "tzinfo-data"
11+
gem "rails", "~> 7.0"
1412

15-
gemspec path: '../'
13+
gemspec path: "../"

gemfiles/rails_7.1.gemfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "byebug"
7+
gem "nokogiri"
8+
gem "rspec-rails"
9+
gem "sqlite3"
10+
gem "tzinfo-data"
11+
gem "rails", "~> 7.1"
12+
13+
gemspec path: "../"

lib/slayer_rails/extensions/translation.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ module Translation
77

88
# rubocop:disable Metrics/BlockLength
99
included do
10-
def translate(key, options = {})
11-
I18n.translate(self.class.full_key(key), options.dup)
10+
def translate(key, **options)
11+
I18n.translate(self.class.full_key(key), **options)
1212
end
1313
alias_method :t, :translate
1414

15-
def localize(*args)
16-
I18n.localize(*args)
15+
def localize(*args, **kwargs)
16+
I18n.localize(*args, **kwargs)
1717
end
1818
alias_method :l, :localize
1919

slayer_rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
spec.require_paths = ['lib']
2424

2525
spec.add_runtime_dependency 'rails', '>= 4.2.0'
26-
spec.add_runtime_dependency 'slayer', '>= 0.5.0'
26+
spec.add_runtime_dependency 'slayer', '>= 0.5'
2727

2828
spec.add_development_dependency 'bundler', '~> 2.0'
2929
spec.add_development_dependency 'rake', '~> 12.0'

spec/dummy/application.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ class Application < Rails::Application
2121
config.paths['log'] = 'tmp/log/development.log'
2222
config.paths.add 'config/routes.rb', with: "#{APP_ROOT}/config/routes.rb"
2323

24-
if Rails.version.match?(/^6.0/)
25-
config.active_record.sqlite3.represent_boolean_as_integer = true
26-
else
27-
config.active_record.legacy_connection_handling = false
28-
end
29-
3024
def require_environment!
3125
initialize!
3226
end

0 commit comments

Comments
 (0)