Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4a676c32
Commit
4a676c32
authored
Mar 10, 2020
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code from Gitlab::Shell
parent
53a9b4cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+0
-13
spec/lib/gitlab/shell_spec.rb
spec/lib/gitlab/shell_spec.rb
+0
-7
No files found.
lib/gitlab/shell.rb
View file @
4a676c32
...
...
@@ -6,8 +6,6 @@ require 'securerandom'
module
Gitlab
class
Shell
GITLAB_SHELL_ENV_VARS
=
%w(GIT_TERMINAL_PROMPT)
.
freeze
Error
=
Class
.
new
(
StandardError
)
class
<<
self
...
...
@@ -271,23 +269,12 @@ module Gitlab
false
end
# Return hooks folder path used by projects
#
# @return [String] path
def
hooks_path
File
.
join
(
gitlab_shell_path
,
'hooks'
)
end
protected
def
gitlab_shell_path
File
.
expand_path
(
Gitlab
.
config
.
gitlab_shell
.
path
)
end
def
gitlab_shell_user_home
File
.
expand_path
(
"~
#{
Gitlab
.
config
.
gitlab_shell
.
ssh_user
}
"
)
end
def
full_path
(
storage
,
dir_name
)
raise
ArgumentError
.
new
(
"Directory name can't be blank"
)
if
dir_name
.
blank?
...
...
spec/lib/gitlab/shell_spec.rb
View file @
4a676c32
...
...
@@ -7,12 +7,6 @@ describe Gitlab::Shell do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
let
(
:gitlab_shell
)
{
described_class
.
new
}
let
(
:popen_vars
)
{
{
'GIT_TERMINAL_PROMPT'
=>
ENV
[
'GIT_TERMINAL_PROMPT'
]
}
}
let
(
:timeout
)
{
Gitlab
.
config
.
gitlab_shell
.
git_timeout
}
before
do
allow
(
Project
).
to
receive
(
:find
).
and_return
(
project
)
end
it
{
is_expected
.
to
respond_to
:create_repository
}
it
{
is_expected
.
to
respond_to
:remove_repository
}
...
...
@@ -49,7 +43,6 @@ describe Gitlab::Shell do
describe
'projects commands'
do
let
(
:gitlab_shell_path
)
{
File
.
expand_path
(
'tmp/tests/gitlab-shell'
)
}
let
(
:projects_path
)
{
File
.
join
(
gitlab_shell_path
,
'bin/gitlab-projects'
)
}
let
(
:gitlab_shell_hooks_path
)
{
File
.
join
(
gitlab_shell_path
,
'hooks'
)
}
before
do
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:path
).
and_return
(
gitlab_shell_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment