Sha256: 1efc1f0957a80f06c3a0b8cd23ff3c5a44dd763f9ba204bb4e6babafc1162c9d

Contents?: true

Size: 549 Bytes

Versions: 25

Compression:

Stored size: 549 Bytes

Contents

module Arql
  class Connection
    class << self
      def open(options)
        print "Establishing DB connection to #{options[:host]}:#{options[:port]}"
        ActiveRecord::Base.establish_connection(options)
        print "\u001b[2K"
        puts "\rDB connection to #{options[:host]}:#{options[:port]} established\n"
        $C = ActiveRecord::Base.connection
        $C.define_singleton_method(:dump) do |filename, no_create_db=false|
          Arql::Mysqldump.new.dump_database(filename, no_create_db)
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
arql-0.3.31 lib/arql/connection.rb
arql-0.3.30 lib/arql/connection.rb
arql-0.3.29 lib/arql/connection.rb
arql-0.3.28 lib/arql/connection.rb
arql-0.3.27 lib/arql/connection.rb
arql-0.3.26 lib/arql/connection.rb
arql-0.3.25 lib/arql/connection.rb
arql-0.3.24 lib/arql/connection.rb
arql-0.3.23 lib/arql/connection.rb
arql-0.3.22 lib/arql/connection.rb
arql-0.3.21 lib/arql/connection.rb
arql-0.3.20 lib/arql/connection.rb
arql-0.3.19 lib/arql/connection.rb
arql-0.3.18 lib/arql/connection.rb
arql-0.3.17 lib/arql/connection.rb
arql-0.3.16 lib/arql/connection.rb
arql-0.3.15 lib/arql/connection.rb
arql-0.3.14 lib/arql/connection.rb
arql-0.3.13 lib/arql/connection.rb
arql-0.3.12 lib/arql/connection.rb