Skip to content

Commit d2e802d

Browse files
author
root
committed
Rename methods
1 parent ce1fcdc commit d2e802d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: lib/redmine_git_hosting/commands.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def ssh_capture(*params)
5050
# i.e., executes 'ssh git@localhost <command>'
5151
#
5252
# Returns stdout, stderr and the exit code
53+
#
5354
def ssh_shell(*params)
5455
cmd = ssh.concat(params)
5556
execute(cmd)
@@ -105,6 +106,7 @@ def ssh
105106
# * (-p <gitolite_server_port>) Use port from settings
106107
# * (-o BatchMode=yes) Never ask for a password
107108
# * <gitolite_user>@<gitolite_server_host> (see +gitolite_url+)
109+
#
108110
def ssh_shell_params
109111
[
110112
'-T',
@@ -153,14 +155,14 @@ def hash_content(content)
153155

154156
# Return the content of a local (Redmine side) file.
155157
#
156-
def local_content(file)
158+
def content_from_redmine_side(file)
157159
File.read(file)
158160
end
159161

160162

161163
# Return the content of a file on Gitolite side.
162164
#
163-
def distant_content(destination_path)
165+
def content_from_gitolite_side(destination_path)
164166
sudo_cat(destination_path)
165167
end
166168

Diff for: lib/redmine_git_hosting/commands/sudo.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def sudo_cat(file)
135135
# Test if file content has changed
136136
#
137137
def sudo_file_changed?(source_file, dest_file)
138-
hash_content(local_content(source_file)) != hash_content(distant_content(dest_file))
138+
hash_content(content_from_redmine_side(source_file)) != hash_content(content_from_gitolite_side(dest_file))
139139
end
140140

141141
end

0 commit comments

Comments
 (0)