Sha256: 0eb379979077ba2fa1b61c9241ad902b121d744727ddff6386e6f59c7407c6e3

Contents?: true

Size: 635 Bytes

Versions: 17

Compression:

Stored size: 635 Bytes

Contents

module Mobility
  module Plugins
    module Sequel
=begin

Maps backend names to Sequel namespaced backends.

=end
      module Backend
        extend Plugin

        requires :backend, include: :before

        def load_backend(backend)
          if Symbol === backend
            require "mobility/backends/sequel/#{backend}"
            Backends.load_backend("sequel_#{backend}".to_sym)
          else
            super
          end
        rescue LoadError => e
          raise unless e.message =~ /sequel\/#{backend}/
          super
        end
      end
    end

    register_plugin(:sequel_backend, Sequel::Backend)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mobility-1.3.0.rc3 lib/mobility/plugins/sequel/backend.rb
mobility-1.3.0.rc2 lib/mobility/plugins/sequel/backend.rb
mobility-1.3.0.rc1 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.9 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.8 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.7 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.6 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.5 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.4 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.3 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.2 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.1 lib/mobility/plugins/sequel/backend.rb
mobility-1.2.0 lib/mobility/plugins/sequel/backend.rb
mobility-1.1.3 lib/mobility/plugins/sequel/backend.rb
mobility-1.1.2 lib/mobility/plugins/sequel/backend.rb
mobility-1.1.1 lib/mobility/plugins/sequel/backend.rb
mobility-1.1.0 lib/mobility/plugins/sequel/backend.rb