Class: MerbSignupto::Configurator

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_signupto/configurator.rb

Class Method Summary collapse

Class Method Details

.load_config_from_fileObject

Attempt to load in the YAML formated configuration file which should be located in config/uproduce.yml. If no file exsists, you will need to run rake xmpie_icp:setup to get the stub configuration



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/merb_signupto/configurator.rb', line 7

def self.load_config_from_file
  if defined?(::Merb::Server)
    if ::Merb::Server.config[:merb_root]
      signupto_file_path = File.join(::Merb::Server.config[:merb_root],'config','signupto.yml')
      if FileTest.exist?(signupto_file_path) 
        return YAML.load_file(signupto_file_path)
      else
        puts "##############################"
        puts "Signupto configuration missing"
        puts "##############################"
        # exit()
      end
    else
      puts "[signupto] Running outside of the merb container..."
    end
  end
end