lib/taketo/constructs/server.rb in taketo-0.0.6 vs lib/taketo/constructs/server.rb in taketo-0.0.7

- old
+ new

@@ -1,16 +1,15 @@ require 'taketo/constructs/base_construct' +require 'taketo/constructs/command' require 'taketo/support' module Taketo - class CommandNotFoundError < StandardError; end - module Constructs class Server < BaseConstruct attr_reader :environment_variables - attr_accessor :host, :port, :username, :default_location, :environment, :global_alias, :identity_file - + attr_accessor :host, :port, :username, :default_location, :default_command, :environment, :global_alias, :identity_file + has_nodes :commands, :command def initialize(name) super @environment_variables = {} @@ -21,9 +20,13 @@ end def environment=(environment) env(:RAILS_ENV => environment.name.to_s) @environment = environment + end + + def default_command + defined?(@default_command) ? @default_command : Command.default end end end end