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
b963018e
Commit
b963018e
authored
Feb 09, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually use the read_timeout config option
parent
08c8f308
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lib/gitlab_net.rb
lib/gitlab_net.rb
+5
-1
spec/gitlab_net_spec.rb
spec/gitlab_net_spec.rb
+1
-1
No files found.
lib/gitlab_net.rb
View file @
b963018e
...
...
@@ -73,7 +73,7 @@ class GitlabNet
http
=
Net
::
HTTP
.
new
(
uri
.
host
,
uri
.
port
)
end
http
.
read_timeout
=
options
[
:read_timeout
]
||
READ_TIMEOUT
http
.
read_timeout
=
options
[
:read_timeout
]
||
read_timeout
if
uri
.
is_a?
(
URI
::
HTTPS
)
http
.
use_ssl
=
true
...
...
@@ -154,4 +154,8 @@ class GitlabNet
def
secret_token
@secret_token
||=
File
.
read
config
.
secret_file
end
def
read_timeout
config
.
http_settings
[
'read_timeout'
]
||
READ_TIMEOUT
end
end
spec/gitlab_net_spec.rb
View file @
b963018e
...
...
@@ -143,7 +143,7 @@ describe GitlabNet, vcr: true do
subject
{
gitlab_net
.
send
:http_client_for
,
URI
(
'https://localhost/'
)
}
before
do
gitlab_net
.
stub!
:cert_store
gitlab_net
.
send
(
:config
).
http_settings
.
stub
(
:[]
).
with
(
'self_signed_cert'
)
{
true
}
gitlab_net
.
send
(
:config
).
stub
(
:http_settings
)
{
{
'self_signed_cert'
=>
true
}
}
end
its
(
:verify_mode
)
{
should
eq
(
OpenSSL
::
SSL
::
VERIFY_NONE
)
}
...
...
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