Module: Rbdock
- Defined in:
- lib/rbdock.rb,
lib/rbdock/command.rb,
lib/rbdock/helpers.rb,
lib/rbdock/version.rb,
lib/rbdock/generate.rb,
lib/rbdock/command/options.rb
Defined Under Namespace
Classes: Command, Generate
Constant Summary
collapse
- VERSION =
"0.1.1"
Class Method Summary
collapse
Class Method Details
.clone_app_to_local(url) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/rbdock/helpers.rb', line 12
def clone_app_to_local url
raise StandardError, "command git not found." if `which git`.empty?
if local? url
if not File.exist? url
raise StandardError, "#{url} is not exit"
end
return url
end
if not already_cloned?
return exec_clone url
end
if already_cloned? and same_app?(url)
return update_app url
end
return replace_app url
end
|
.default_app_path ⇒ Object
34
35
36
|
# File 'lib/rbdock/helpers.rb', line 34
def default_app_path
'.rbdock_app'
end
|
.source_root ⇒ Object
8
9
10
|
# File 'lib/rbdock/helpers.rb', line 8
def source_root
@source_root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end
|