Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-09-18 20:25:23 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-09-18 20:29:32 +0300
commit6a4ee9aa7140862075cafae1ddebd133eec52b5b (patch)
tree9890bb5c906a0d6e207149ae5fe1df84d213fa7c /lib/api/helpers
parent9ae92b8caa6c11d8860f86b7d6378062215d1b72 (diff)
Allow simple ivar ||= form. Update accordingly
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/internal_helpers.rb9
-rw-r--r--lib/api/helpers/runner.rb1
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index a187517a66a..6bb85dd2619 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -1,4 +1,3 @@
-# rubocop:disable Cop/ModuleWithInstanceVariables
module API
module Helpers
module InternalHelpers
@@ -7,20 +6,20 @@ module API
'git-upload-pack' => :ssh_upload_pack
}.freeze
+ attr_reader :redirected_path
+
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def wiki?
set_project unless defined?(@wiki)
@wiki
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def project
set_project unless defined?(@project)
@project
end
- def redirected_path
- @redirected_path
- end
-
def ssh_authentication_abilities
[
:read_project,
diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb
index 1b21594487d..282af32ca94 100644
--- a/lib/api/helpers/runner.rb
+++ b/lib/api/helpers/runner.rb
@@ -21,7 +21,6 @@ module API
forbidden! unless current_runner
end
- # rubocop:disable Cop/ModuleWithInstanceVariables
def current_runner
@runner ||= ::Ci::Runner.find_by_token(params[:token].to_s)
end