forked from rtweeks/baby_squeel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to 2.0: Pull original fork master (rzane's fork) (#3)
* Find the table * Use polyamorous from master * With activerecord-hackery/ransack#1004, all but one polymorphism test is fixed. There are still several failures. Basically, any test that does an outer join is still doing an inner join. * Explain how this is completely broken * Add byebug for development/testing * Have Active Record build tables for their aliases This may help with rzane#97. * Fix test for equivalent logic The new version of Active Record or Polyamorous seems to switch the order of these two SQL conditions, but the new statement is logically equivalent to the old one. * Use `variants` for SQL snapshot change * Make it possible to get good polymorphic joins Actually getting polymorphic joins to work correctly will require either explicitly specifying the master branch of the `ransack` project (commit c9cc20de9e0f or something with equivalent functionality) in the project `Gemfile` or the `ransack` project releasing a new 2.x (> 2.3.2) version with that functionality. Addresses most of the Active Record 5.2.x (>= 5.2.1) problems in rzane#97. The only remaining issues are around inner joins after left joins. * Track all associations used to find correct alias By tracking the associations accumulated within an expression, we can best even Active Record's own `#where` method's ability to correctly set conditions on column values via associations. * Reimplement #find_join_association iteratively Replacing recursive method calls with plain iteration is almost certainly more performant. * Revert unnecessary changes from commit 90e02e2 * Lock down the supported versions of ActiveRecord * Update rspec, rake, and sqlite3 * Run against Ruby 2.6 * Drop support for Active Record versions that have reached EOL * Remove old variants * Remove broken image from the readme * Install latest bundler * Explicit require test dependencies * Remove filewatcher * Run on GitHub actions * Require coveralls * Run as a matrix * Share the environment variables * Use the coveralls action * Not sure what is going on here... * Run against 5.2.0 and 5.2.5 * Give each job a name * Remove coverage * Mark failing tests as pending * Get 5.2.0 passing again * Remove coverage * Bump * Merge `join_dependency` back into this project, because my dreams did not really come true * Fix checking for version as string * Add changes from 1.4.0.beta1 to CHANGELOG.md * Build pull requests * remove old code from activerecord < 5.2 * removed BabySqueel::Pluck * reduce complexety after merging `join_dependency` back into this project * Fix table alias when joining a polymorphic table twice (rzane#108) * Update changelog for v1.4.0 * Bump version to v1.4.0 * Tidy up version comparison code * Bump version to v1.4.1 * add support for activerecord 6.0 * add support for activerecord 6.1 * speed up BabySqueel::ActiveRecord::VersionHelper * add support for activerecord 7.0 * update .github/workflows/build.yml to test rails 7.0 and ruby 3.0 / 3.1 * Apply version-specific monkey-patches outside of the method definition * Update changelog for v1.4.2 * v1.4.2 * ISSUE-117: left_joins performs INNER JOIN with ActiveRecord 6.1.4.4 * Update changelog for 1.4.3 release * Bump to v1.4.3 * ISSUE-119: Nested merge-joins query causes NoMethodError with ActiveRecord 6.1.4.4 rzane#119 * Prepare v1.4.4 * ISSUE-121: Drop support for ActiveRecord older than 6.0 * AR 6.1: fix - FrozenError: can't modify frozen object: [] * Bump v2.0.0 Co-authored-by: Ray Zane <[email protected]> Co-authored-by: Richard Weeks <[email protected]> Co-authored-by: Jonas S <[email protected]>
- Loading branch information
1 parent
a71a462
commit 12d7421
Showing
43 changed files
with
638 additions
and
513 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Active Record ${{ matrix.activerecord }} on ruby ${{ matrix.ruby }} (compat=${{ matrix.compat }}) | ||
strategy: | ||
matrix: | ||
activerecord: ["~> 6.0", "~> 6.1", "~> 7.0"] | ||
compat: ["0", "1"] | ||
ruby: [ "2.6", "2.7", "3.0", "3.1"] | ||
exclude: | ||
- activerecord: "~> 7.0" | ||
ruby: "2.6" | ||
env: | ||
AR: ${{ matrix.activerecord }} | ||
COMPAT: ${{ matrix.compat }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- name: Install packages | ||
run: sudo apt-get install libsqlite3-dev | ||
|
||
- name: Install bundler | ||
run: gem install bundler | ||
|
||
- name: Install dependencies | ||
run: bundle install | ||
|
||
- name: Test | ||
run: bundle exec rspec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
.byebug_history | ||
.idea/ |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.