Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
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-shell
Commits
7a2c47f2
Commit
7a2c47f2
authored
Jul 26, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move common exceptions into errors.rb
parent
aa4d2ba8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
lib/errors.rb
lib/errors.rb
+4
-0
lib/gitlab_access.rb
lib/gitlab_access.rb
+3
-2
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+0
-3
No files found.
lib/errors.rb
0 → 100644
View file @
7a2c47f2
class
UnknownError
<
StandardError
;
end
class
AccessDeniedError
<
StandardError
;
end
class
InvalidRepositoryPathError
<
StandardError
;
end
class
DisallowedCommandError
<
StandardError
;
end
lib/gitlab_access.rb
View file @
7a2c47f2
require
'json'
require_relative
'errors'
require_relative
'gitlab_init'
require_relative
'gitlab_init'
require_relative
'gitlab_net'
require_relative
'gitlab_net'
require_relative
'gitlab_access_status'
require_relative
'gitlab_access_status'
...
@@ -7,8 +10,6 @@ require_relative 'object_dirs_helper'
...
@@ -7,8 +10,6 @@ require_relative 'object_dirs_helper'
require
'json'
require
'json'
class
GitlabAccess
class
GitlabAccess
class
AccessDeniedError
<
StandardError
;
end
include
NamesHelper
include
NamesHelper
attr_reader
:config
,
:gl_repository
,
:repo_path
,
:changes
,
:protocol
attr_reader
:config
,
:gl_repository
,
:repo_path
,
:changes
,
:protocol
...
...
lib/gitlab_shell.rb
View file @
7a2c47f2
...
@@ -5,9 +5,6 @@ require_relative 'gitlab_net'
...
@@ -5,9 +5,6 @@ require_relative 'gitlab_net'
require_relative
'gitlab_metrics'
require_relative
'gitlab_metrics'
class
GitlabShell
# rubocop:disable Metrics/ClassLength
class
GitlabShell
# rubocop:disable Metrics/ClassLength
class
AccessDeniedError
<
StandardError
;
end
class
DisallowedCommandError
<
StandardError
;
end
class
InvalidRepositoryPathError
<
StandardError
;
end
GIT_COMMANDS
=
%w(git-upload-pack git-receive-pack git-upload-archive git-lfs-authenticate)
.
freeze
GIT_COMMANDS
=
%w(git-upload-pack git-receive-pack git-upload-archive git-lfs-authenticate)
.
freeze
GITALY_MIGRATED_COMMANDS
=
{
GITALY_MIGRATED_COMMANDS
=
{
...
...
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