diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 107c0d6..4073a11 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -34,11 +34,8 @@ jobs: --health-retries 3 strategy: matrix: - ruby: ["2.5", "2.7", "3.0", "3.1"] - gemfile: ["activerecord_6.0", "activerecord_6.1", "activerecord_7.0"] - exclude: - - { ruby: "2.5", gemfile: "activerecord_7.0" } - - { ruby: "3.1", gemfile: "activerecord_6.0" } + ruby: ["3.0", "3.1", "3.2", "3.3"] + gemfile: ["activerecord_6.1", "activerecord_7.0", "activerecord_7.1"] env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: @@ -49,10 +46,9 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - run: sudo apt-get -yqq install libpq-dev libmysqlclient-dev - env: DB_CONFIG: github-actions PGPORT: ${{ job.services.postgres.ports[5432] }} MYSQLPORT: ${{ job.services.mysql.ports[3306] }} - run: | - sudo apt-get -yqq install libpq-dev libmysqlclient-dev - bundle exec rspec + run: bundle exec rspec diff --git a/.gitignore b/.gitignore index 4c35738..6f35c62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /Gemfile.lock -/gemfiles/*.lock /gemfiles/.bundle /*.gem /pkg diff --git a/Appraisals b/Appraisals index 21f9d75..23c303c 100644 --- a/Appraisals +++ b/Appraisals @@ -1,25 +1,26 @@ -appraise "activerecord-6.0" do - gem "activerecord", "~> 6.0.0" - gem "activerecord-trilogy-adapter", "~> 3.0.0" - gem "mysql2", "~> 0.4.10" +appraise "activerecord-6.1" do + gem "activerecord", "~> 6.1.0" + gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" + gem "racc", '~> 1.7.3', platforms: [:ruby_33] end -appraise "activerecord-6.1" do - gem "activerecord", "~> 6.1.0" +appraise "activerecord-7.0" do + gem "activerecord", "~> 7.0.0" gem "activerecord-trilogy-adapter", "~> 3.0.0" gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" + gem "racc", '~> 1.7.3', platforms: [:ruby_33] end -appraise "activerecord-7.0" do +appraise "activerecord-7.1" do gem "activerecord", "~> 7.0.0" - gem "activerecord-trilogy-adapter", "~> 3.0.0" gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" + gem "racc", '~> 1.7.3', platforms: [:ruby_33] end appraise "activerecord-edge" do @@ -28,4 +29,5 @@ appraise "activerecord-edge" do gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" + gem "racc", '~> 1.7.3', platforms: [:ruby_33] end diff --git a/Gemfile b/Gemfile index a0d3878..a76356d 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,8 @@ source "https://rubygems.org" gemspec +# TODO: seems like this should be fixed in ruby_parser 🤔 +gem "racc", '~> 1.7.3', platforms: [:ruby_33] group :development do gem 'appraisal' diff --git a/gemfiles/activerecord_6.1.gemfile b/gemfiles/activerecord_6.1.gemfile index b6fa822..8d60f7a 100644 --- a/gemfiles/activerecord_6.1.gemfile +++ b/gemfiles/activerecord_6.1.gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" +gem "racc", "~> 1.7.3", platforms: [:ruby_33] gem "activerecord", "~> 6.1.0" -gem "activerecord-trilogy-adapter" gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" diff --git a/gemfiles/activerecord_6.1.gemfile.lock b/gemfiles/activerecord_6.1.gemfile.lock new file mode 100644 index 0000000..3a6fe82 --- /dev/null +++ b/gemfiles/activerecord_6.1.gemfile.lock @@ -0,0 +1,79 @@ +PATH + remote: .. + specs: + hairtrigger (1.0.0) + activerecord (>= 6.0, < 8) + ruby2ruby (~> 2.4) + ruby_parser (~> 3.10) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) + activesupport (6.1.7.6) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + byebug (11.1.3) + concurrent-ruby (1.2.2) + diff-lcs (1.5.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + minitest (5.20.0) + mysql2 (0.5.5) + pg (1.5.4) + racc (1.7.3) + rake (13.0.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + ruby2ruby (2.5.0) + ruby_parser (~> 3.1) + sexp_processor (~> 4.6) + ruby_parser (3.20.3) + sexp_processor (~> 4.16) + sexp_processor (4.17.0) + sqlite3 (1.4.4) + thor (1.3.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + zeitwerk (2.6.12) + +PLATFORMS + arm64-darwin-22 + ruby + +DEPENDENCIES + activerecord (~> 6.1.0) + appraisal + byebug + hairtrigger! + mysql2 (~> 0.5) + pg (>= 0.18, < 2.0) + racc (~> 1.7.3) + rake (~> 13.0.6) + rspec (~> 3.12.0) + sqlite3 (~> 1.4.0) + +BUNDLED WITH + 2.5.3 diff --git a/gemfiles/activerecord_7.0.gemfile b/gemfiles/activerecord_7.0.gemfile index 5a31a32..4edc4e2 100644 --- a/gemfiles/activerecord_7.0.gemfile +++ b/gemfiles/activerecord_7.0.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "racc", "~> 1.7.3", platforms: [:ruby_33] gem "activerecord", "~> 7.0.0" gem "activerecord-trilogy-adapter", "~> 3.0.0" gem "mysql2", "~> 0.5" diff --git a/gemfiles/activerecord_7.0.gemfile.lock b/gemfiles/activerecord_7.0.gemfile.lock new file mode 100644 index 0000000..52876ed --- /dev/null +++ b/gemfiles/activerecord_7.0.gemfile.lock @@ -0,0 +1,82 @@ +PATH + remote: .. + specs: + hairtrigger (1.0.0) + activerecord (>= 6.0, < 8) + ruby2ruby (~> 2.4) + ruby_parser (~> 3.10) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.0.8) + activesupport (= 7.0.8) + activerecord (7.0.8) + activemodel (= 7.0.8) + activesupport (= 7.0.8) + activerecord-trilogy-adapter (3.0.0) + activerecord (>= 7.0, < 7.1a) + trilogy (>= 2.4.0) + activesupport (7.0.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + byebug (11.1.3) + concurrent-ruby (1.2.2) + diff-lcs (1.5.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + minitest (5.20.0) + mysql2 (0.5.5) + pg (1.5.4) + racc (1.7.3) + rake (13.0.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + ruby2ruby (2.5.0) + ruby_parser (~> 3.1) + sexp_processor (~> 4.6) + ruby_parser (3.20.3) + sexp_processor (~> 4.16) + sexp_processor (4.17.0) + sqlite3 (1.4.4) + thor (1.3.0) + trilogy (2.6.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + +PLATFORMS + arm64-darwin-22 + ruby + +DEPENDENCIES + activerecord (~> 7.0.0) + activerecord-trilogy-adapter (~> 3.0.0) + appraisal + byebug + hairtrigger! + mysql2 (~> 0.5) + pg (>= 0.18, < 2.0) + racc (~> 1.7.3) + rake (~> 13.0.6) + rspec (~> 3.12.0) + sqlite3 (~> 1.4.0) + +BUNDLED WITH + 2.5.3 diff --git a/gemfiles/activerecord_6.0.gemfile b/gemfiles/activerecord_7.1.gemfile similarity index 73% rename from gemfiles/activerecord_6.0.gemfile rename to gemfiles/activerecord_7.1.gemfile index b925be9..d386057 100644 --- a/gemfiles/activerecord_6.0.gemfile +++ b/gemfiles/activerecord_7.1.gemfile @@ -2,9 +2,9 @@ source "https://rubygems.org" -gem "activerecord", "~> 6.0.0" -gem "activerecord-trilogy-adapter" -gem "mysql2", "~> 0.4.10" +gem "racc", "~> 1.7.3", platforms: [:ruby_33] +gem "activerecord", "~> 7.0.0" +gem "mysql2", "~> 0.5" gem "pg", ">= 0.18", "< 2.0" gem "sqlite3", "~> 1.4.0" diff --git a/gemfiles/activerecord_7.1.gemfile.lock b/gemfiles/activerecord_7.1.gemfile.lock new file mode 100644 index 0000000..5d21ef0 --- /dev/null +++ b/gemfiles/activerecord_7.1.gemfile.lock @@ -0,0 +1,77 @@ +PATH + remote: .. + specs: + hairtrigger (1.0.0) + activerecord (>= 6.0, < 8) + ruby2ruby (~> 2.4) + ruby_parser (~> 3.10) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.0.8) + activesupport (= 7.0.8) + activerecord (7.0.8) + activemodel (= 7.0.8) + activesupport (= 7.0.8) + activesupport (7.0.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + byebug (11.1.3) + concurrent-ruby (1.2.2) + diff-lcs (1.5.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + minitest (5.20.0) + mysql2 (0.5.5) + pg (1.5.4) + racc (1.7.3) + rake (13.0.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + ruby2ruby (2.5.0) + ruby_parser (~> 3.1) + sexp_processor (~> 4.6) + ruby_parser (3.20.3) + sexp_processor (~> 4.16) + sexp_processor (4.17.0) + sqlite3 (1.4.4) + thor (1.3.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + +PLATFORMS + arm64-darwin-22 + ruby + +DEPENDENCIES + activerecord (~> 7.0.0) + appraisal + byebug + hairtrigger! + mysql2 (~> 0.5) + pg (>= 0.18, < 2.0) + racc (~> 1.7.3) + rake (~> 13.0.6) + rspec (~> 3.12.0) + sqlite3 (~> 1.4.0) + +BUNDLED WITH + 2.5.3 diff --git a/gemfiles/activerecord_edge.gemfile b/gemfiles/activerecord_edge.gemfile index 0db6068..f72e482 100644 --- a/gemfiles/activerecord_edge.gemfile +++ b/gemfiles/activerecord_edge.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "racc", "~> 1.7.3", platforms: [:ruby_33] gem "arel", github: "rails/arel" gem "activerecord", github: "rails/rails", branch: "main" gem "mysql2", "~> 0.5" diff --git a/gemfiles/activerecord_edge.gemfile.lock b/gemfiles/activerecord_edge.gemfile.lock new file mode 100644 index 0000000..64efdf9 --- /dev/null +++ b/gemfiles/activerecord_edge.gemfile.lock @@ -0,0 +1,103 @@ +GIT + remote: https://github.com/rails/arel.git + revision: aae413b0339417d4d23a07f3bf902341bd452c24 + specs: + arel (10.0.0.pre) + activerecord (>= 6.a) + +GIT + remote: https://github.com/rails/rails.git + revision: 42ca4de429524e64c8ab33db62639ecaedc4d2fa + branch: main + specs: + activemodel (7.2.0.alpha) + activesupport (= 7.2.0.alpha) + activerecord (7.2.0.alpha) + activemodel (= 7.2.0.alpha) + activesupport (= 7.2.0.alpha) + timeout (>= 0.4.0) + activesupport (7.2.0.alpha) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0, >= 2.0.5) + +PATH + remote: .. + specs: + hairtrigger (1.0.0) + activerecord (>= 6.0, < 8) + ruby2ruby (~> 2.4) + ruby_parser (~> 3.10) + +GEM + remote: https://rubygems.org/ + specs: + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.2.0) + bigdecimal (3.1.5) + byebug (11.1.3) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) + diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords + i18n (1.14.1) + concurrent-ruby (~> 1.0) + minitest (5.20.0) + mysql2 (0.5.5) + pg (1.5.4) + racc (1.7.3) + rake (13.0.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + ruby2_keywords (0.0.5) + ruby2ruby (2.5.0) + ruby_parser (~> 3.1) + sexp_processor (~> 4.6) + ruby_parser (3.20.3) + sexp_processor (~> 4.16) + sexp_processor (4.17.0) + sqlite3 (1.4.4) + thor (1.3.0) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + +PLATFORMS + arm64-darwin-22 + ruby + +DEPENDENCIES + activerecord! + appraisal + arel! + byebug + hairtrigger! + mysql2 (~> 0.5) + pg (>= 0.18, < 2.0) + racc (~> 1.7.3) + rake (~> 13.0.6) + rspec (~> 3.12.0) + sqlite3 (~> 1.4.0) + +BUNDLED WITH + 2.5.3 diff --git a/hairtrigger.gemspec b/hairtrigger.gemspec index 9c28fad..b3899ec 100644 --- a/hairtrigger.gemspec +++ b/hairtrigger.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.summary = 'easy database triggers for active record' s.description = 'allows you to declare database triggers in ruby in your models, and then generate appropriate migrations as they change' - s.required_ruby_version = '>= 2.5.0' + s.required_ruby_version = '>= 3.0' s.author = 'Jon Jensen' s.email = 'jenseng@gmail.com'