Sha256: ce322934d768e6a10cdd0279542394bd3ae9fecedf4b351479a33231b42157e6
Contents?: true
Size: 997 Bytes
Versions: 24
Compression:
Stored size: 997 Bytes
Contents
#!/usr/bin/env ruby require 'bundler/setup' require 'active_record' require 'rubypitaya' require 'rubypitaya/core/database_config' environment_name = ENV.fetch("RUBYPITAYA_ENV") { 'development' } database_config = RubyPitaya::DatabaseConfig.new(environment_name, RubyPitaya::Path::DATABASE_CONFIG_PATH) ActiveRecord::Base.establish_connection(database_config.connection_data) ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) ActiveSupport::LogSubscriber.colorize_logging = true Gem.find_files('rubypitaya/**/*.rb').each do |path| require path unless path.end_with?('spec.rb') || path.include?('db/migration') || path.include?('app-template') end app_files_path = File.join(RubyPitaya::Path::APP_FOLDER_PATH, '**/*.rb') Dir[app_files_path].each do |path| require path unless path.end_with?('spec.rb') || path.include?('db/migration') end require 'irb' IRB.start(__FILE__) ActiveRecord::Base.connection.close
Version data entries
24 entries across 24 versions & 1 rubygems