module ConfigHelpers
Constants
- CONFIG_PATH
Public Class Methods
create_config(app_dir, options = {})
click to toggle source
# File lib/railsbricks/config_helpers.rb, line 8 def self.create_config(app_dir, options = {}) FileUtils::mkdir_p "#{app_dir}/#{CONFIG_PATH}" dup_options = options.dup dup_options[:email_config][:password] = "******" saved_options = dup_options.to_json File.open("#{app_dir}/#{CONFIG_PATH}/config", "w") { |f| f.write(saved_options)} end
load_config()
click to toggle source
# File lib/railsbricks/config_helpers.rb, line 18 def self.load_config config_json = File.read("#{CONFIG_PATH}/config") JSON.parse(config_json) rescue options = {} options["rake_command"] = "rake" options end