Module: GhostAdapter::Internal
- Defined in:
- lib/ghost_adapter.rb
Constant Summary collapse
- @@ghost_migration_enabled =
rubocop:disable Style/ClassVars
false
Class Method Summary collapse
Class Method Details
.enable_ghost_migration! ⇒ Object
42 43 44 |
# File 'lib/ghost_adapter.rb', line 42 def self.enable_ghost_migration! @@ghost_migration_enabled = true # rubocop:disable Style/ClassVars end |
.ghost_migration_enabled? ⇒ Boolean
46 47 48 49 50 51 |
# File 'lib/ghost_adapter.rb', line 46 def self.ghost_migration_enabled? env_val = ENV.fetch('GHOST_MIGRATE', 'false').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 ⇒ Object
34 35 36 37 38 39 40 |
# 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 |