-
Notifications
You must be signed in to change notification settings - Fork 14
Add GitHub Actions CI workflow and update dependencies #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
- Add GitHub Actions workflow for continuous integration * Tests with Ruby 3.2 and PostgreSQL 15 * Runs RSpec test suite with coverage reporting * Includes RuboCop linting job * Uploads coverage artifacts - Update development dependencies to latest versions * pg: 0.18 → 1.5 (Ruby 3.2 compatibility) * rspec: 3.4 → 3.12 * rubocop: ≤0.81 → 1.60 * with_model: 1.2 → 2.2 - Update Ruby version to 3.2.2 All tests passing: 25 examples, 0 failures, 98.63% coverage 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
GitHub Actions Improvements: - Change test database from travis_ci_test to sqlquery_test - Replace BUILDER=travis with standard CI environment variable - Fix database creation to avoid "already exists" error - Add password to CI database connection string - Prepare for Travis CI removal RuboCop Fixes: - Add .rubocop.yml configuration for gem project - Fix memoized variable naming (@sql_for_logs → @prepared_for_logs) - Add empty line after attr_writer for better readability - Fix comment spacing in spec_helper.rb - Remove deprecated test_files assignment from gemspec - Configure sensible defaults for gem development All RuboCop offenses resolved: 8 files inspected, no offenses detected
- Remove manual 'Setup database' step that tried to CREATE DATABASE - PostgreSQL service already creates the database via POSTGRES_DB env var - This fixes the 'database already exists' error in CI - Add MFA requirement metadata to gemspec
- Remove .travis.yml configuration - Add GitHub Actions matrix testing workflow for Ruby 2.7-3.3 against Rails 4.2-8.0 - Update Appraisals to test against Rails 5.2, 6.0, 6.1, 7.0, 7.1, 8.0 - Remove old gemfiles for Rails 3.2, 4.0, 4.1, 5.0 - Generate new gemfiles for all supported Rails versions - Configure proper Ruby/Rails compatibility exclusions in matrix
- Reduce Ruby versions from 5 to 2 (2.7 and 3.2) - Ruby 2.7 tests Rails 4.2, 5.2, 6.0, 6.1 - Ruby 3.2 tests Rails 5.2, 6.0, 6.1, 7.0, 7.1, 8.0 - Total of 10 test combinations instead of 18
- Remove fixed with_model version from gemspec - Add version-specific with_model constraints in Appraisals: - Rails 4.2: with_model ~> 2.0.0 (requires activerecord >= 4.2) - Rails 5.2-6.1: with_model ~> 2.1.6 (requires activerecord >= 5.2) - Rails 7.0-8.0: with_model ~> 2.2.0 (requires activerecord >= 7.0) - Regenerate all gemfiles with correct dependencies
- Update test matrix to only include officially supported combinations: - Ruby 2.7: Rails 5.2, 6.0, 6.1, 7.0 (4 combinations) - Ruby 3.2: Rails 7.0, 7.1, 8.0 (3 combinations) - Remove Rails 4.2 from CI (not compatible with Ruby 2.7+) - Fix spec_helper to use hash-based connection config for better Rails compatibility - Change from connection URL strings to explicit connection hashes Total: 7 test combinations covering all officially supported Rails versions
- Remove manual bundler installation that was incompatible with Ruby 2.7 (ruby/setup-ruby already installs appropriate bundler version) - Remove unnecessary bundle config path setting - Add --jobs=4 --retry=3 to bundle install for better CI performance - Fix RuboCop BlockLength rule to exclude all spec files, not just *_spec.rb (spec_helper.rb was being incorrectly linted)
- Change Rails 7.0-8.0 to use with_model ~> 2.1.7 instead of 2.2.0 (with_model 2.2.0 requires Ruby >= 3.1, incompatible with Ruby 2.7) - Add 'require logger' before 'require active_record' in spec_helper (fixes NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger) - This allows Ruby 2.7 to successfully test against Rails 6.0, 6.1, and 7.0
- Add Rails 4.2 to test matrix for Ruby 2.7 only - Rails 4.2 is excluded from Ruby 3.2 (not compatible) - This provides coverage for Rails 4.x with supported Ruby version - Total: 8 test combinations (5 for Ruby 2.7, 3 for Ruby 3.2)
- Rails 4.2 uses deprecated BigDecimal.new API - Ruby 2.7 deprecated BigDecimal.new in favor of BigDecimal() kernel method - Add compatibility shim to restore BigDecimal.new for Ruby 2.6-2.7 - Only activates for Ruby < 3.0 to avoid affecting modern Ruby versions
acc4401 to
7ce1685
Compare
- Use anonymous argument forwarding (*, **) instead of named arguments - Cleaner syntax for Ruby 2.7+ argument forwarding
- Use anonymous argument forwarding (*, **) instead of named arguments - Cleaner syntax for Ruby 2.7+ argument forwarding
- Rails 4.2: pg ~> 0.21 (compatible with both Rails 4.2 and Ruby 2.7) - Rails 5.2-6.1: pg ~> 1.1 (stable version for these Rails) - Rails 7.0+: pg ~> 1.5 (from gemspec, latest stable) Fixes version conflict where Rails 4.2 tried to load pg 0.15 but pg 1.6 was already loaded
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add GitHub Actions workflow for continuous integration
Update development dependencies to latest versions
Update Ruby version to 3.2.2
All tests passing: 25 examples, 0 failures, 98.63% coverage