Sha256: 3fbd50e1158107e5524b16980c8448cebf094e0ef690f1f5e3984fedaac5a09f

Contents?: true

Size: 862 Bytes

Versions: 1

Compression:

Stored size: 862 Bytes

Contents

module Fabricator
  module Configuration
     APP_ROOT = File.expand_path(".")
     
     def extract_config()
       begin      
           puts "loading config file #{APP_ROOT}/script/fabricator.yml"
           config = YAML.load(File.open("#{APP_ROOT}/script/fabricator.yml"))
           puts config.inspect
           app_name = config['app_name'] 
           base_src_folder = config['base_src_folder']
           base_package_folder = config['base_package_folder']
           base_package = base_package_folder.gsub('/', '.').gsub(/\s/, '')
           module_names = config['module_names'].split(' ')
         rescue
           #base_folder = base_package = project_name_downcase
           #controller_name = "ApplicationController"
         end
         [app_name, base_src_folder, base_package_folder, base_package, module_names]
     end     
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fabricator-0.0.5 lib/fabricator/configuration.rb