File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
spec/acceptance/github-server Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change 88require "webrick/https"
99require "openssl"
1010
11- webrick_options = {
12- Host : "0.0.0.0" ,
13- Port : 443 ,
14- Logger : WEBrick ::Log ::new ( $stderr, WEBrick ::Log ::DEBUG ) ,
15- SSLEnable : true ,
16- SSLVerifyClient : OpenSSL ::SSL ::VERIFY_NONE ,
17- SSLCertificate : OpenSSL ::X509 ::Certificate . new ( File . read ( "/acceptance/github-server/ssl.crt" ) ) ,
18- SSLPrivateKey : OpenSSL ::PKey ::RSA . new ( File . read ( "/acceptance/github-server/ssl.key" ) ) ,
19- SSLCertName : [ [ "CN" , "github.fake" ] ]
20- }
21-
2211class FakeGitHubApi < Sinatra ::Base
12+ set :server , %w[ webrick ]
13+ set :server_settings , {
14+ Host : "0.0.0.0" ,
15+ Port : 443 ,
16+ Logger : WEBrick ::Log ::new ( $stderr, WEBrick ::Log ::DEBUG ) ,
17+ SSLEnable : true ,
18+ SSLVerifyClient : OpenSSL ::SSL ::VERIFY_NONE ,
19+ SSLCertificate : OpenSSL ::X509 ::Certificate . new ( File . read ( "/acceptance/github-server/ssl.crt" ) ) ,
20+ SSLPrivateKey : OpenSSL ::PKey ::RSA . new ( File . read ( "/acceptance/github-server/ssl.key" ) ) ,
21+ SSLCertName : [ [ "CN" , "github.fake" ] ]
22+ }
23+
24+ set :port => 443
25+ set :bind => "0.0.0.0"
26+
2327 BASE_DIR = "/tmp/github"
2428
2529 TEAM_MAP_FILE = File . join ( BASE_DIR , "team_map.json" )
@@ -405,4 +409,4 @@ def graphql_pending_query(query)
405409 end
406410end
407411
408- Rack :: Handler :: WEBrick . run FakeGitHubApi , ** webrick_options
412+ FakeGitHubApi . run!
You can’t perform that action at this time.
0 commit comments