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
bda0f09c
Commit
bda0f09c
authored
Aug 20, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GitAccessStatus initializer sensible defaults
parent
4801e2de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
lib/gitlab_access_status.rb
lib/gitlab_access_status.rb
+1
-1
lib/gitlab_net.rb
lib/gitlab_net.rb
+1
-8
No files found.
lib/gitlab_access_status.rb
View file @
bda0f09c
...
...
@@ -3,7 +3,7 @@ require 'json'
class
GitAccessStatus
attr_reader
:message
,
:gl_repository
,
:gl_id
,
:gl_username
,
:gitaly
,
:git_protocol
,
:git_config_options
def
initialize
(
status
,
message
,
gl_repository
:
,
gl_id
:,
gl_username
:,
gitaly
:,
git_protocol
:,
git_config_options
:
)
def
initialize
(
status
,
message
,
gl_repository:
nil
,
gl_id:
nil
,
gl_username:
nil
,
gitaly:
nil
,
git_protocol:
nil
,
git_config_options:
nil
)
@status
=
status
@message
=
message
@gl_repository
=
gl_repository
...
...
lib/gitlab_net.rb
View file @
bda0f09c
...
...
@@ -37,14 +37,7 @@ class GitlabNet # rubocop:disable Metrics/ClassLength
when
HTTP_SUCCESS
,
HTTP_UNAUTHORIZED
,
HTTP_NOT_FOUND
GitAccessStatus
.
create_from_json
(
resp
.
body
)
else
GitAccessStatus
.
new
(
false
,
'API is not accessible'
,
gl_repository:
nil
,
gl_id:
nil
,
gl_username:
nil
,
git_config_options:
nil
,
gitaly:
nil
,
git_protocol:
nil
)
GitAccessStatus
.
new
(
false
,
resp
.
code
,
'API is not accessible'
)
end
end
...
...
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