lib/jets/commands/import/rail.rb
# We add jets-rails gem even though it's only activated within the megamode
# rackup wrapper script so user can check run bundle install and determine early
# if dependencies are met. The jets-rails gem is also added as part of the deploy
# process but we add it here also so the user gets earlier possible errors and
# can fix before they hit the deploy phase.
We add jets-rails gem even though it's only activated within the megamode
rackup wrapper script so user can check run bundle install and determine early
if dependencies are met. The jets-rails gem is also added as part of the deploy
process but we add it here also so the user gets earlier possible errors and
can fix before they hit the deploy phase.
We add jets - rails gem even though it ' s only activated within the megamode rackup wrapper script so user can check run bundle install and determine early if dependencies are met . The jets - rails gem is also added as part of the deploy process but we add it here also so the user gets earlier possible errors and can fix before they hit the deploy phase .
def infer_database_name(current_database)
      vars = {}
      %w[development test production].each do |env|
        if !current_database[env]['database'].include?('<%') 
          vars["database_#{env}"] = current_database[env]['database']
        else
          lines = IO.readlines("#{Jets.root}rack/config/application.rb")
          module_line = lines.find { |l| l =~ /^module / }
          app_module = module_line.gsub(/^module /,'').strip
          app_name = app_module.underscore
          vars["database_#{env}"] = "#{app_name}_#{env}"
        end
      end
      vars
    end
def infer_database_name ( current_database ) vars = { } %w[ development test production ] . each do | env | if ! current_database [ env ] [ 'database' ] . include? ( '<%' ) vars [ "database_#{env}" ] = current_database [ env ] [ 'database' ] else lines = IO . readlines ( "#{Jets.root}rack/config/application.rb" ) module_line = lines . find { | l | l =~ / ^module  / } app_module = module_line . gsub ( / ^module  / , '' ) . strip app_name = app_module . underscore vars [ "database_#{env}" ] = "#{app_name}_#{env}" end end vars end
We add jets-rails gem even though it's only activated within the megamode
rackup wrapper script so user can check run bundle install and determine early
if dependencies are met.
We add jets - rails gem even though it ' s only activated within the megamode rackup wrapper script so user can check run bundle install and determine early if dependencies are met .
# already has ERB
current_database
<not_specific>