lib/phase.rb in phase-0.0.2 vs lib/phase.rb in phase-0.0.4
- old
+ new
@@ -1,23 +1,26 @@
-require "terminal-table"
-require "active_support"
-require "progressbar"
-require "colorize"
-require "fog"
-require "sshkit"
+require 'terminal-table'
+require 'active_support'
+require 'progressbar'
+require 'colorize'
+require 'fog'
+require 'capistrano'
+require 'sshkit'
-require "dotenv"
+require 'dotenv'
::Dotenv.load if defined?(::Dotenv)
-require "phase/adapters/aws"
+require 'phase/adapter'
+require 'phase/adapters/abstract'
+require 'phase/adapters/aws'
-require "phase/ssh/backend"
-require "phase/ssh/command"
-require "phase/ssh/coordinator"
+require 'phase/ssh/backend'
+require 'phase/ssh/command'
+require 'phase/ssh/coordinator'
-require "phase/configuration"
-require "phase/version"
+require 'phase/configuration'
+require 'phase/version'
module Phase
class << self
@@ -25,9 +28,17 @@
@@config ||= Configuration.new
end
def reset_config!
@@config = nil
+ end
+
+ def configure(&block)
+ yield config
+ end
+
+ def adapter
+ config.adapter
end
end
config