summaryrefslogtreecommitdiff
path: root/lib/api/helpers
diff options
context:
space:
mode:
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