Class: TorqueBox::RemoteDeploy

Inherits:
Object
  • Object
show all
Defined in:
lib/torquebox/remote_deploy_utils.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(blk) ⇒ RemoteDeploy

Returns a new instance of RemoteDeploy.



157
158
159
160
161
# File 'lib/torquebox/remote_deploy_utils.rb', line 157

def initialize(blk)
  @config = RemoteConfig.new
  @configs = []
  instance_eval &blk
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



163
164
165
# File 'lib/torquebox/remote_deploy_utils.rb', line 163

def config
  @config
end

Class Method Details

.configure(&blk) ⇒ Object



153
154
155
# File 'lib/torquebox/remote_deploy_utils.rb', line 153

def self.configure(&blk)
  new(blk)
end

Instance Method Details

#configurationsObject



165
166
167
168
# File 'lib/torquebox/remote_deploy_utils.rb', line 165

def configurations
  # evenually, we should merge the base @config settings into the @configs
  @configs.empty? ? [@config] : @configs
end

#host(&block) ⇒ Object



202
203
204
# File 'lib/torquebox/remote_deploy_utils.rb', line 202

def host(&block)
  @configs << RemoteDeploy.new(block).config
end

#hostname(h) ⇒ Object



170
171
172
# File 'lib/torquebox/remote_deploy_utils.rb', line 170

def hostname(h)
  @config.hostname = h
end

#jboss_home(jbh) ⇒ Object



190
191
192
# File 'lib/torquebox/remote_deploy_utils.rb', line 190

def jboss_home(jbh)
  @config.jboss_home = jbh
end

#key(k) ⇒ Object



182
183
184
# File 'lib/torquebox/remote_deploy_utils.rb', line 182

def key(k)
  @config.key = k
end

#local(l) ⇒ Object



198
199
200
# File 'lib/torquebox/remote_deploy_utils.rb', line 198

def local(l)
  @config.local = l
end

#port(p) ⇒ Object



174
175
176
# File 'lib/torquebox/remote_deploy_utils.rb', line 174

def port(p)
  @config.port = p
end

#sudo(sudo) ⇒ Object



194
195
196
# File 'lib/torquebox/remote_deploy_utils.rb', line 194

def sudo(sudo)
  @config.sudo = sudo
end

#torquebox_home(tbh) ⇒ Object



186
187
188
# File 'lib/torquebox/remote_deploy_utils.rb', line 186

def torquebox_home(tbh)
  @config.torquebox_home = tbh
end

#user(u) ⇒ Object



178
179
180
# File 'lib/torquebox/remote_deploy_utils.rb', line 178

def user(u)
  @config.user = u
end