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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
e7a4d233
Commit
e7a4d233
authored
Feb 05, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitlab-url config
parent
02f4cb52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
config.yml.example
config.yml.example
+1
-0
lib/gitlab_config.rb
lib/gitlab_config.rb
+6
-2
lib/gitlab_net.rb
lib/gitlab_net.rb
+3
-1
No files found.
config.yml.example
View file @
e7a4d233
user: git
gitlab_url: "http://localhost/"
repos_path: "/home/git/repositories"
auth_file: "/home/git/.ssh/authorized_keys"
lib/gitlab_config.rb
View file @
e7a4d233
...
...
@@ -8,10 +8,14 @@ class GitlabConfig
end
def
repos_path
@config
[
'repos_path'
]
=
"/home/git/repositories"
@config
[
'repos_path'
]
||
=
"/home/git/repositories"
end
def
auth_file
@config
[
'auth_file'
]
=
"/home/git/.ssh/authorized_keys"
@config
[
'auth_file'
]
||=
"/home/git/.ssh/authorized_keys"
end
def
gitlab_url
@config
[
'gitlab_url'
]
||=
"http://localhost/"
end
end
lib/gitlab_net.rb
View file @
e7a4d233
require
'net/http'
require
'json'
require_relative
'gitlab_config'
class
GitlabNet
def
allowed?
(
cmd
,
repo
,
key
,
ref
)
project_name
=
repo
.
gsub
(
"'"
,
""
)
...
...
@@ -23,7 +25,7 @@ class GitlabNet
protected
def
host
"
http://127.0.0.1:3000/
api/v3/internal"
"
#{
GitlabConfig
.
new
.
gitlab_url
}
api/v3/internal"
end
def
get
(
url
)
...
...
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