Skip to content

Commit

Permalink
Merge pull request #181 from janko/remove-spring-support-references
Browse files Browse the repository at this point in the history
Remove references to removed SpringSupport
  • Loading branch information
JonathanTron authored Oct 26, 2020
2 parents cf36943 + 8f40304 commit 0175b13
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/sequel_rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require 'sequel_rails/sequel/database/active_support_notification'
require 'action_dispatch/middleware/session/sequel_store'

Spring.after_fork { Sequel::DATABASES.each(&:disconnect) } if defined?(Spring)

module SequelRails
class Railtie < Rails::Railtie
::SequelRails::Railties::LogSubscriber.attach_to :sequel
Expand Down Expand Up @@ -77,13 +75,7 @@ class Railtie < Rails::Railtie
end

initializer 'sequel.spring' do |_app|
if defined?(::Spring::Application)
class ::Spring::Application # rubocop:disable Style/ClassAndModuleChildren
include ::SequelRails::SpringSupport
alias_method :disconnect_database_without_sequel, :disconnect_database
alias_method :disconnect_database, :disconnect_database_with_sequel
end
end
Spring.after_fork { Sequel::DATABASES.each(&:disconnect) } if defined?(Spring)
end

# Support overwriting crucial steps in subclasses
Expand Down

0 comments on commit 0175b13

Please sign in to comment.