Module: Capricorn::Actors::BaseActor::Config

Defined in:
lib/capricorn/actors/base_actor.rb

Instance Method Summary collapse

Instance Method Details

#gem_bin_path(&block) ⇒ Object

set the path to the gem executable.



225
226
227
# File 'lib/capricorn/actors/base_actor.rb', line 225

def gem_bin_path(&block)
  option(:gem_bin_path, block) { |s, v| v or find_bin('gem', 'gem1.8', 'gem18') }
end

#install_gems_with_web_user(&block) ⇒ Object

set whether gems should be installed with the web user.



253
254
255
# File 'lib/capricorn/actors/base_actor.rb', line 253

def install_gems_with_web_user(&block)
  option(:install_gems_with_web_user, block)
end

#rails_environment(&block) ⇒ Object

set the rails environment.



268
269
270
# File 'lib/capricorn/actors/base_actor.rb', line 268

def rails_environment(&block)
  satellite_option(:rails_environment, block) { |s,v| v or 'development' }
end

#rails_path(&block) ⇒ Object

set the path to the rails executable.



230
231
232
233
234
235
# File 'lib/capricorn/actors/base_actor.rb', line 230

def rails_path(&block)
  option(:rails_path, block) do |v|
    user = (install_gems_with_web_user ?  web_user : system_user)
    v or user_find_bin(user, 'rails')
  end
end

#ruby_path(&block) ⇒ Object

set the path to the ruby executable.



220
221
222
# File 'lib/capricorn/actors/base_actor.rb', line 220

def ruby_path(&block)
  option(:ruby_path, block) { |s, v| v or find_bin('ruby', 'ruby1.8', 'ruby18') }
end

#satellite_root(&block) ⇒ Object

set the path to the satellite’s root path



258
259
260
# File 'lib/capricorn/actors/base_actor.rb', line 258

def satellite_root(&block)
  satellite_option(:satellite_root, block)
end

#shared_root(&block) ⇒ Object

set the path to the satellite’s shared path



263
264
265
# File 'lib/capricorn/actors/base_actor.rb', line 263

def shared_root(&block)
  satellite_option(:shared_root, block)
end

#system_user(&block) ⇒ Object

set the system user (the user which runs the capricorn server).



248
249
250
# File 'lib/capricorn/actors/base_actor.rb', line 248

def system_user(&block)
  option(:system_user, block) { |v| v or 'root' }
end

#web_group(&block) ⇒ Object

set the owner group of the current satellite.



238
239
240
# File 'lib/capricorn/actors/base_actor.rb', line 238

def web_group(&block)
  satellite_option(:web_group, block)
end

#web_user(&block) ⇒ Object

set the owner of the current satellite.



243
244
245
# File 'lib/capricorn/actors/base_actor.rb', line 243

def web_user(&block)
  satellite_option(:web_user, block)
end