lib/pushwagner/environment.rb in pushwagner-0.0.1.1 vs lib/pushwagner/environment.rb in pushwagner-0.0.1.2
- old
+ new
@@ -1,7 +1,8 @@
require 'pushwagner/ext'
require 'pushwagner/maven'
+require 'yaml'
module Pushwagner
class Environment
attr_reader :config
@@ -9,10 +10,10 @@
def initialize(opts = {})
opts = HashWithIndifferentAccess.new(opts)
config_file = opts[:config_file] || File.join(File.dirname(__FILE__), '/config/deploy.yml')
- @version = opts[:version].to_s
+ @version = opts[:version] && opts[:version].to_s
@current = opts[:environment] || 'development'
@config = HashWithIndifferentAccess.new(YAML::load_file(config_file) || {})
end
\ No newline at end of file