Module: GitCompound::Command
- Extended by:
- Logger::Debugger
- Included in:
- GitCompound
- Defined in:
- lib/git_compound.rb,
lib/git_compound/command.rb,
lib/git_compound/command/options.rb,
lib/git_compound/logger/debug/command.rb
Overview
Defined Under Namespace
Classes: Options
Instance Method Summary
collapse
debug_after, debug_before
Instance Method Details
#build(*args) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/git_compound/command.rb', line 5
def build(*args)
if Lock.exist?
builder(args)
.locked_manifest_verify
.locked_components_build
.tasks_execute
else
builder(args)
.dependencies_check
.manifest_build
.tasks_execute
.manifest_lock
end
end
|
#check(*args) ⇒ Object
34
35
36
37
|
# File 'lib/git_compound/command.rb', line 34
def check(*args)
builder(args).dependencies_check
Logger.info 'OK'
end
|
#help(*_args) ⇒ Object
43
44
45
|
# File 'lib/git_compound/command.rb', line 43
def help(*_args)
Logger.info(usage)
end
|
#run(command, args) ⇒ Object
47
48
49
50
51
52
|
# File 'lib/git_compound/command.rb', line 47
def run(command, args)
abort(usage) unless methods.include?(command.to_sym)
public_send(command, *args)
rescue GitCompoundError => e
abort Logger.parse("Error: #{e.message}".on_red.white.bold)
end
|
#show(*args) ⇒ Object
39
40
41
|
# File 'lib/git_compound/command.rb', line 39
def show(*args)
builder(args).components_show
end
|
#update(*args) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/git_compound/command.rb', line 20
def update(*args)
raise GitCompoundError,
"Lockfile `#{Lock::FILENAME}` does not exist ! " \
'You should use `build` command.' unless Lock.exist?
builder(args)
.locked_components_guard
.dependencies_check
.manifest_update
.tasks_execute
.manifest_lock
.locked_dormant_components_remove
end
|