Sha256: 64b9e72d7d021c03055a7435bb2c72f70b11014a3aecc09bd4069b7bb311a43b

Contents?: true

Size: 1.3 KB

Versions: 15

Compression:

Stored size: 1.3 KB

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'active_record'

require 'rubypitaya'
require 'rubypitaya/core/database_config'

# Database connection
database_config = RubyPitaya::DatabaseConfig.new(RubyPitaya::Setup.new)
ActiveRecord::Base.establish_connection(database_config.connection_data)
ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT)
ActiveSupport::LogSubscriber.colorize_logging = true

# Loading core files
Gem.find_files('rubypitaya/**/*.rb').each do |path|
  require path unless path.end_with?('spec.rb') ||
                      path.include?('app/migrations') ||
                      path.include?('core/templates') ||
                      path.include?('core/spec-helpers') ||
                      path.include?('app-template')
end

# Loading application files
app_folder_paths = RubyPitaya::Path::Plugins::APP_FOLDER_PATHS + [RubyPitaya::Path::APP_FOLDER_PATH]
app_folder_paths.each do |app_folder_path|
  app_files_path = File.join(app_folder_path, '**/*.rb')

  Dir[app_files_path].each do |path|
    require path unless path.end_with?('spec.rb') ||
                        path.include?('app/migrations') ||
                        path.include?('spec_helper.rb')
  end
end

# Starting irb
require 'irb'
IRB.start(__FILE__)

# Closing database connection
ActiveRecord::Base.connection.close

Version data entries

15 entries across 11 versions & 1 rubygems

Version Path
rubypitaya-3.14.0 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.13.1 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.13.0 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.1 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.12.0 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.11.0 ./lib/rubypitaya/app-template/bin/console
rubypitaya-3.10.0 ./lib/rubypitaya/app-template/bin/console