require 'typus'

if Typus.testing?
  Typus::Configuration.options[:config_folder] = 'vendor/plugins/typus/test/config/working'
end

##
# Do not Typus.enable or Typus.generate if we are running a generator.
#

scripts = %w( script/generate script/destroy )

unless scripts.include?($0)
  Typus.enable
  Typus.generator unless Typus.testing?
end
require 'typus'

if Typus.testing?
  Typus::Configuration.options[:config_folder] = 'vendor/plugins/typus/test/config/working'
end

##
# Do not Typus.enable or Typus.generate if we are running a generator.
#

scripts = %w( script/generate script/destroy )

unless scripts.include?($0)
  Typus.enable
  Typus.generator unless Typus.testing? || ENV['RAILS_ENV'] == 'production'
end
Stop generator from running in production (necessary for Heroku)
Stop generator from running in production (necessary for Heroku)

Signed-off-by: Francesc Esplugas <29df577256a046afced759d9a5c8d13bedb7a3de@intraducibles.com>