Skip to content
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

[DRAFT] Update to ActiveRecord 5 #20

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ jobs:
bundle install

- name: Run tests
run: bundle exec rspec
run: bundle exec rspec --backtrace
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ docker run --rm -it --publish=44200:4200 crate:5.1.1 \
Install project and invoke test suite.
```shell
bundle install
bundle exec rspec
bundle exec rspec --backtrace
```


Expand Down
2 changes: 1 addition & 1 deletion activerecord-crate-adapter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 2.14"

spec.add_dependency('activerecord', '~> 4.1.0')
spec.add_dependency('activerecord', '~> 5')
spec.add_dependency('arel', '>= 5.0.0')
spec.add_dependency('crate_ruby', '~> 0.2.0')
end
4 changes: 2 additions & 2 deletions lib/active_record/connection_adapters/crate_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require 'active_record/base'
require 'active_record/base'
require 'arel/arel_crate'
require 'arel/visitors/bind_visitor'
require 'arel/visitors/visitor'
require 'active_support/dependencies/autoload'
require 'active_support/callbacks'
require 'active_support/core_ext/string'
Expand Down Expand Up @@ -77,7 +77,7 @@ def schema_creation # :nodoc:
}

class BindSubstitution < Arel::Visitors::Crate # :nodoc:
include Arel::Visitors::BindVisitor
include Arel::Visitors
end

def initialize(connection, logger, pool, config)
Expand Down
2 changes: 1 addition & 1 deletion lib/arel/arel_crate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

require 'arel'
require 'arel/visitors/crate'
require 'arel/visitors/bind_visitor'
require 'arel/visitors/visitor'
2 changes: 0 additions & 2 deletions lib/arel/visitors/crate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ class ToSql < Arel::Visitors::Visitor
end
end
end

Arel::Visitors::VISITORS['crate'] = Arel::Visitors::Crate