Class: Vagabund::Settler::Projects::Ruby
- Inherits:
-
Base
- Object
- Base
- Vagabund::Settler::Projects::Ruby
show all
- Defined in:
- lib/vagabund/settler/projects/ruby.rb
Direct Known Subclasses
Rails
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
#action_exec, #configure, #exec_after, #exec_before, #hook_exec, #name, #project_path, #pull
Instance Method Details
#bundle(machine) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/vagabund/settler/projects/ruby.rb', line 13
def bundle(machine)
exec_before :bundle, machine
machine.ui.detail "Bundling #{self.class.name.split('::').last.downcase} project #{name}..."
if config.bundler.nil?
machine.communicate.execute "cd #{config.project_path}; bundle install" do |type,data|
color = type == :stderr ? :red : :green
options = {
color: color,
new_line: false,
prefix: false
}
machine.ui.detail(data, options)
end
else
action_exec config.bundler, machine
end
exec_after :bundle, machine
rescue StandardError => e
raise Settler::Errors::ProjectError, e
end
|
#provision(machine) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/vagabund/settler/projects/ruby.rb', line 6
def provision(machine)
exec_before :project, machine
pull machine
bundle machine
exec_after :project, machine
end
|