Skip to content

Commit

Permalink
Remove activerecord dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Dec 14, 2023
1 parent 1341a55 commit c5e19b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion features/fixtures/que/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ que_version = ENV.fetch("QUE_VERSION")
gem "que", "~> #{que_version}"

gem "pg", RUBY_VERSION < "2.2.0" ? "0.21.0" : "> 0.21.0"
gem "activerecord", RUBY_VERSION < "2.2.0" ? "4.2.11" : "> 4.2.11"

# Install a compatible Minitest version on Ruby <2.3
gem 'minitest', '5.11.3' if RUBY_VERSION < '2.3.0'
12 changes: 4 additions & 8 deletions features/fixtures/que/app/setup-que.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'que'
require 'socket'
require 'bugsnag'
require 'active_record'

QUE_VERSION = ENV.fetch("QUE_VERSION")

Expand Down Expand Up @@ -30,16 +29,13 @@

raise 'postgres was not ready in time!' unless postgres_ready

ActiveRecord::Base.establish_connection(
adapter: 'postgresql',
database: 'postgres',
username: 'postgres',
Que.connection = PG::Connection.open(
host: 'postgres',
user: 'postgres',
password: 'test_password',
host: 'postgres'
dbname: 'postgres'
)

Que.connection = ActiveRecord

# Workaround a bug in que/pg
# see https://github.com/que-rb/que/issues/247
if QUE_VERSION == '0.14'
Expand Down

0 comments on commit c5e19b4

Please sign in to comment.