summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-06-22 12:54:27 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-07-05 18:03:29 -0500
commit6aa601866c66a62b4ab3db3fa55ab1b5e84e444d (patch)
tree68b55e83b11c5ee03b23b58a9c8ee9e8ee142181 /lib
parent4cd4cf673844f8f381609f9c3264c33f2843935d (diff)
downloadgitlab-shell-6aa601866c66a62b4ab3db3fa55ab1b5e84e444d.tar.gz
Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] and make it mandatory with no fallback value
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab_access.rb2
-rw-r--r--lib/gitlab_net.rb2
-rw-r--r--lib/gitlab_shell.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb
index bab2c4c..04806b2 100644
--- a/lib/gitlab_access.rb
+++ b/lib/gitlab_access.rb
@@ -11,7 +11,7 @@ class GitlabAccess
attr_reader :config, :repo_path, :repo_name, :changes, :protocol
- def initialize(repo_path, actor, changes, protocol = nil)
+ def initialize(repo_path, actor, changes, protocol)
@config = GitlabConfig.new
@repo_path = repo_path.strip
@actor = actor
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 24e97be..e10a07a 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -14,7 +14,7 @@ class GitlabNet
CHECK_TIMEOUT = 5
READ_TIMEOUT = 300
- def check_access(cmd, repo, actor, changes, protocol = nil)
+ def check_access(cmd, repo, actor, changes, protocol)
project_name = repo.gsub("'", "")
project_name = project_name.gsub(/\.git\Z/, "")
project_name = project_name.gsub(/\A\//, "")
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 3dc10b6..1e94369 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -132,7 +132,7 @@ class GitlabShell
'LD_LIBRARY_PATH' => ENV['LD_LIBRARY_PATH'],
'LANG' => ENV['LANG'],
'GL_ID' => @key_id,
- 'PROTOCOL' => 'ssh'
+ 'GL_PROTOCOL' => 'ssh'
}
if @config.git_annex_enabled?