Sha256: a6c940743f185366cab2a2d5e11e7e6f4b09f7cfb8a4f10b490cd806da3f4026
Contents?: true
Size: 711 Bytes
Versions: 11
Compression:
Stored size: 711 Bytes
Contents
class DatabaseConsole IRB = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' def initialize(arguments) @arguments = arguments end def run! libraries = ['irb/completion', 'rubygems','cli/database_console_init'] libaries_string = libraries.map { |l| "-r #{l}" }.join(' ') ENV['RLA_DBCONSOLE_DATABASE'] = @arguments[:database] if @arguments[:apache_format] ENV['RLA_DBCONSOLE_FORMAT'] = 'apache' ENV['RLA_DBCONSOLE_FORMAT_ARGUMENT'] = @arguments[:apache_format] else ENV['RLA_DBCONSOLE_FORMAT'] = @arguments[:format] end # ENV['RLA_DBCONSOLE_FORMAT_ARGS'] = arguments['database'] exec("#{IRB} #{libaries_string} --simple-prompt") end end
Version data entries
11 entries across 11 versions & 1 rubygems