lib/rom/sql/gateway.rb in rom-sql-1.2.2 vs lib/rom/sql/gateway.rb in rom-sql-1.3.0
- old
+ new
@@ -15,16 +15,10 @@
# @api public
class Gateway < ROM::Gateway
include Dry::Core::Constants
include Migration
- class << self
- # FIXME: get rid of this and figure out a nicer way of handling migration DSL
- # we want to have global access ONLY when running migration tasks
- attr_accessor :instance
- end
-
adapter :sql
CONNECTION_EXTENSIONS = {
postgres: %i(pg_array pg_json pg_enum pg_hstore)
}.freeze
@@ -46,11 +40,11 @@
# Connects to a database via URI
#
# @example
# ROM.container(:sql, 'postgres://localhost/db_name')
#
- # @param [Sequel::Database] connection a connection instance
+ # @param [String,Symbol] uri connection URI
#
# @overload initialize(uri, options)
# Connects to a database via URI and options
#
# @example
@@ -94,11 +88,9 @@
load_extensions(Array(options[:extensions]))
@options = options
super
-
- self.class.instance = self
end
# Disconnect from the gateway's database
#
# @api public