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.



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

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.



270
271
272
# File 'lib/capricorn/actors/base_actor.rb', line 270

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

#rails_environment(&block) ⇒ Object

set the rails environment.



285
286
287
# File 'lib/capricorn/actors/base_actor.rb', line 285

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.



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

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.



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

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



275
276
277
# File 'lib/capricorn/actors/base_actor.rb', line 275

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

#shared_root(&block) ⇒ Object

set the path to the satellite’s shared path



280
281
282
# File 'lib/capricorn/actors/base_actor.rb', line 280

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).



265
266
267
# File 'lib/capricorn/actors/base_actor.rb', line 265

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.



255
256
257
# File 'lib/capricorn/actors/base_actor.rb', line 255

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

#web_user(&block) ⇒ Object

set the owner of the current satellite.



260
261
262
# File 'lib/capricorn/actors/base_actor.rb', line 260

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