Skip to content
Browse files

Debugging config setup

  • Loading branch information...
1 parent a739e8e commit c06000757a5f9478c783ddb1bb47bc8b8edfcf30 @Digi-Cazter committed Apr 9, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −9 lib/omniship.rb
View
15 lib/omniship.rb
@@ -24,19 +24,16 @@
### TODO Working on creating code for using an initializer for configuration ###
def Omniship.config(carrier)
root = Rails.root
- boot = File.join(root, "config", "boot.rb")
config = File.join(root, "config", "omniship.yml")
keys = %w{ username password key }.map { |v| v }
- require boot unless defined? Rails.env
@@config = YAML.load_file(config)
raise "Invalid Omniship configuration file: #{config}" unless @@config.is_a?(Hash)
- if (@@config.keys & keys).sort == keys.sort and !@@config.has_key?(Rails.env)
- @@config[carrier][Rails.env] = {
- "username" => @@config[carrier][Rails.env]["username"],
- "password" => @@config[carrier][Rails.env]["password"],
- "key" => @@config[carrier][Rails.env]["key"]
- }
- end
+ @@config[carrier][Rails.env] = {
+ "username" => @@config[carrier]["username"],
+ "password" => @@config[carrier]["password"],
+ "key" => @@config[carrier]["key"]
+ }
+ debugger
end
$:.unshift File.dirname(__FILE__)

0 comments on commit c060007

Please sign in to comment.
Something went wrong with that request. Please try again.