Skip to content

Conversation

@sufleR
Copy link
Owner

@sufleR sufleR commented Dec 11, 2025

  • 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

sufleR and others added 7 commits December 11, 2025 17:49
- 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
@sufleR sufleR linked an issue Dec 11, 2025 that may be closed by this pull request
- 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
@sufleR sufleR force-pushed the update_to_latest_libraries_in_development branch from acc4401 to 7ce1685 Compare December 11, 2025 20:39
- 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
@sufleR sufleR merged commit 40b4da4 into master Dec 12, 2025
11 checks passed
@sufleR sufleR deleted the update_to_latest_libraries_in_development branch December 12, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch CI to GitHub Actions from Travis

2 participants