summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-12-13 17:12:19 +0000
committerRobert Speicher <rspeicher@gmail.com>2018-12-13 17:12:19 +0000
commitcdd9e12beb06354ff0babfb18907d3f184bac547 (patch)
tree20d752581e0a3e100cd6910307f40a89e8d4e97a
parent47dc17bce2e59b403dffa9eacc8b146618dba2c2 (diff)
parent7a020bf2d00f4b53134498313aefe6374e17da5a (diff)
downloadgitlab-shell-cdd9e12beb06354ff0babfb18907d3f184bac547.tar.gz
Merge branch 'remove-unused-names-helper' into 'master'
Remove unused lib/names_helper.rb See merge request gitlab-org/gitlab-shell!173
-rw-r--r--lib/gitlab_access.rb3
-rw-r--r--lib/gitlab_post_receive.rb2
-rw-r--r--lib/names_helper.rb5
-rw-r--r--spec/names_helper_spec.rb12
4 files changed, 0 insertions, 22 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb
index e1a5e35..72abd14 100644
--- a/lib/gitlab_access.rb
+++ b/lib/gitlab_access.rb
@@ -1,7 +1,6 @@
require_relative 'gitlab_init'
require_relative 'gitlab_net'
require_relative 'gitlab_access_status'
-require_relative 'names_helper'
require_relative 'gitlab_metrics'
require_relative 'object_dirs_helper'
require 'json'
@@ -9,8 +8,6 @@ require 'json'
class GitlabAccess
class AccessDeniedError < StandardError; end
- include NamesHelper
-
attr_reader :config, :gl_repository, :repo_path, :changes, :protocol
def initialize(gl_repository, repo_path, actor, changes, protocol)
diff --git a/lib/gitlab_post_receive.rb b/lib/gitlab_post_receive.rb
index cb9931d..ea57f6a 100644
--- a/lib/gitlab_post_receive.rb
+++ b/lib/gitlab_post_receive.rb
@@ -6,8 +6,6 @@ require 'base64'
require 'securerandom'
class GitlabPostReceive
- include NamesHelper
-
attr_reader :config, :gl_repository, :repo_path, :changes, :jid
def initialize(gl_repository, repo_path, actor, changes)
diff --git a/lib/names_helper.rb b/lib/names_helper.rb
deleted file mode 100644
index 1f9c56e..0000000
--- a/lib/names_helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module NamesHelper
- def extract_ref_name(ref)
- ref.gsub(/\Arefs\/(tags|heads)\//, '')
- end
-end
diff --git a/spec/names_helper_spec.rb b/spec/names_helper_spec.rb
deleted file mode 100644
index 6886cad..0000000
--- a/spec/names_helper_spec.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'spec_helper'
-require 'names_helper'
-
-describe NamesHelper do
- include NamesHelper
-
- describe :extract_ref_name do
- it { expect(extract_ref_name('refs/heads/awesome-feature')).to eq('awesome-feature') }
- it { expect(extract_ref_name('refs/tags/v2.2.1')).to eq('v2.2.1') }
- it { expect(extract_ref_name('refs/tags/releases/v2.2.1')).to eq('releases/v2.2.1') }
- end
-end