Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f0342fd
Add log/*.log to .gitignore and remove development.log
koji-takao-sp Nov 1, 2025
77c9da2
Add comprehensive coverage measurement with SimpleCov
koji-takao-sp Oct 31, 2025
29e4e4f
Add Rails 7.1 compatibility (partial - 664/674 tests passing)
koji-takao-sp Oct 31, 2025
e2f6441
Complete Rails 7.1.6 support with Rack 3.0 compatibility
koji-takao-sp Oct 31, 2025
cda51a6
Complete Rails 7.2.3 support
koji-takao-sp Nov 1, 2025
de5dfea
Complete Rails 8.0.4 support
koji-takao-sp Nov 1, 2025
d277fc4
Add partial Rails 8.1.2 support (664/674 tests passing)
koji-takao-sp Nov 1, 2025
85d6cce
Add complete Rails 8.1.2 support
koji-takao-sp Nov 1, 2025
88e01a4
Fix Rails 5.2-6.1 compatibility in test_helper.rb
koji-takao-sp Jan 20, 2026
93cf21f
Sync test_helper.rb compatibility fixes from docker-support
koji-takao-sp Jan 20, 2026
878520c
Add Logger require for Ruby 2.6 compatibility
koji-takao-sp Jan 20, 2026
01bdcd4
Fix unstable ordering in BookCommentResource for PostgreSQL
koji-takao-sp Jan 20, 2026
0914344
Fix test_warn_on_joined_to_many for Ruby 2.7 with Rails 5.2
koji-takao-sp Jan 20, 2026
2c4e452
Fix unstable ordering in Book associations for PostgreSQL
koji-takao-sp Jan 20, 2026
013f87a
Update CI matrix for Ruby 3.3, 3.4 and Rails 6.1-8.1
koji-takao-sp Jan 20, 2026
ae2e6af
Add csv gem dependency for Ruby 3.4+ support
koji-takao-sp Jan 20, 2026
dbb5e1a
Add default_scope to BookComment for stable ordering
koji-takao-sp Jan 20, 2026
7a7b80e
Merge pull request #9 from speee/rails-8.1-support-core
koji-takao-sp Jan 20, 2026
3fbf28b
Add Docker support for multi-version Rails testing
koji-takao-sp Jan 20, 2026
9783d74
Add Docker services for Rails 7.1-8.1 testing
koji-takao-sp Jan 20, 2026
d51c6dd
Fix Docker command to remove Gemfile.lock before bundle install
koji-takao-sp Jan 20, 2026
d4203e2
Add SQLite WAL mode files to .gitignore
koji-takao-sp Jan 20, 2026
5ff7f95
Add Docker services for Rails 5.1, 5.2, and 6.0
koji-takao-sp Jan 20, 2026
74294a5
Add Ruby 2.7 Dockerfile for Rails 5.1-6.0 compatibility
koji-takao-sp Jan 20, 2026
44f9266
Fix bundler version for Ruby 2.7 compatibility
koji-takao-sp Jan 20, 2026
5c90b83
Fix Psych::DisallowedClass error for Rails 6.0 with Ruby 2.7+
koji-takao-sp Jan 20, 2026
d78b012
Change Rails 6.1-8.1 to use Ruby 3.1.5
koji-takao-sp Jan 20, 2026
49d75c6
Use Ruby 3.1.5 for Rails 6.1-7.2, Ruby 3.4 for Rails 8.0-8.1
koji-takao-sp Jan 20, 2026
37bad60
Merge pull request #10 from speee/docker-support-speee
koji-takao-sp Jan 20, 2026
005a426
Fix Rails 8.2 deprecation warnings and improve Rack compatibility
koji-takao-sp Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Docker support for multi-version Rails testing
- Add Dockerfile with Ruby 3.2 and required dependencies
- Add docker-compose.yml with services for Rails 6.1 and 7.0
- Add .dockerignore to exclude unnecessary files from Docker context
- Update .gitignore to use coverage/ directory and remove duplicate entry

This provides an easy way to test the gem with different Rails versions
in isolated Docker environments.
  • Loading branch information
koji-takao-sp committed Jan 20, 2026
commit 3fbf28b84ac3f3b51790b7984ee4c86a98a40a19
35 changes: 35 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Git
.git
.gitignore
.github

# Claude/AI configuration
.claude
.serena
CLAUDE.md

# Documentation
*.md
!README.md

# Test artifacts
coverage/
test_db
*.sqlite3
.last_run.json
.resultset.json

# Ruby/bundler
.bundle
vendor/bundle

# OS files
.DS_Store
Thumbs.db

# Editor files
.vscode
.idea
*.swp
*.swo
*~
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Gemfile.lock
InstalledFiles
_yardoc
coverage
coverage/
doc/
lib/bundler/man
pkg
Expand All @@ -17,7 +17,6 @@ spec/reports
test/tmp
test/version_tmp
tmp
coverage
test/log
log/*.log
test_db
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dockerfile for testing jsonapi-resources with multiple Rails versions

FROM ruby:3.2

# Install dependencies
RUN apt-get update -qq && \
apt-get install -y build-essential libpq-dev nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy Gemfile and gemspec
COPY Gemfile jsonapi-resources.gemspec ./
COPY lib/jsonapi/resources/version.rb ./lib/jsonapi/resources/

# Install bundler
RUN gem install bundler

# Note: bundle install will happen at runtime with specific RAILS_VERSION
# This allows testing multiple Rails versions without rebuilding the image
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
services:
# Base service definition
test-base: &test-base
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
- bundle-cache:/usr/local/bundle
working_dir: /app
stdin_open: true
tty: true

# Rails 6.1.7
rails-6.1:
<<: *test-base
container_name: jsonapi-rails-6.1
environment:
- RAILS_VERSION=6.1.7
command: bash -c "bundle update && bundle exec rake test"

# Rails 7.0.4
rails-7.0:
<<: *test-base
container_name: jsonapi-rails-7.0
environment:
- RAILS_VERSION=7.0.4
command: bash -c "bundle update && bundle exec rake test"

# Interactive shell for debugging (defaults to Rails 6.1)
shell:
<<: *test-base
container_name: jsonapi-shell
environment:
- RAILS_VERSION=${RAILS_VERSION:-6.1.7}
command: /bin/bash

volumes:
bundle-cache: