module GhostAdapter::Internal

Public Class Methods

enable_ghost_migration!() click to toggle source
# File lib/ghost_adapter.rb, line 42
def self.enable_ghost_migration!
  @@ghost_migration_enabled = true # rubocop:disable Style/ClassVars
end
ghost_migration_enabeld?() click to toggle source
# File lib/ghost_adapter.rb, line 46
def self.ghost_migration_enabeld?
  env_val = ENV['GHOST_MIGRATE']&.downcase
  return false if %w[0 n no f false].include?(env_val)

  !!@@ghost_migration_enabled || %w[1 y yes t true].include?(env_val)
end
load_task() click to toggle source
# File lib/ghost_adapter.rb, line 34
def self.load_task
  return if @loaded

  load File.join(File.dirname(__FILE__), 'tasks', 'ghost_adapter.rake')

  @loaded = true
end