Class: GitProc::Process
- Inherits:
-
Object
show all
- Defined in:
- lib/git-process/git_process.rb
Instance Method Summary
collapse
Constructor Details
#initialize(gitlib, opts = {}) ⇒ Process
Returns a new instance of Process.
24
25
26
|
# File 'lib/git-process/git_process.rb', line 24
def initialize(gitlib, opts = {})
@gitlib = gitlib
end
|
Instance Method Details
#cleanup ⇒ Object
87
88
89
|
# File 'lib/git-process/git_process.rb', line 87
def cleanup
end
|
#config ⇒ Object
63
64
65
|
# File 'lib/git-process/git_process.rb', line 63
def config
gitlib.config
end
|
#fetch_remote_changes(remote_name = nil) ⇒ Object
92
93
94
|
# File 'lib/git-process/git_process.rb', line 92
def fetch_remote_changes(remote_name = nil)
gitlib.fetch_remote_changes(remote_name)
end
|
#gitlib ⇒ Object
29
30
31
|
# File 'lib/git-process/git_process.rb', line 29
def gitlib
@gitlib
end
|
#is_parked? ⇒ Boolean
97
98
99
|
# File 'lib/git-process/git_process.rb', line 97
def is_parked?
gitlib.is_parked?
end
|
#logger ⇒ Object
58
59
60
|
# File 'lib/git-process/git_process.rb', line 58
def logger
gitlib.logger
end
|
#master_branch ⇒ Object
68
69
70
|
# File 'lib/git-process/git_process.rb', line 68
def master_branch
gitlib.config.master_branch
end
|
#remote ⇒ Object
73
74
75
|
# File 'lib/git-process/git_process.rb', line 73
def remote
gitlib.remote
end
|
#run ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/git-process/git_process.rb', line 34
def run
begin
verify_preconditions
runner
rescue GitProc::GitProcessError => exp
puts exp.message
exit(-1)
ensure
cleanup
end
end
|
#runner ⇒ Object
48
49
50
|
# File 'lib/git-process/git_process.rb', line 48
def runner
end
|
#verify_preconditions ⇒ Object
78
79
80
81
82
83
84
|
# File 'lib/git-process/git_process.rb', line 78
def verify_preconditions
if should_remove_master?
if ask_about_removing_master
delete_master_branch!
end
end
end
|
#workdir ⇒ Object
53
54
55
|
# File 'lib/git-process/git_process.rb', line 53
def workdir
gitlib.workdir
end
|