blob: dc7d8feb7c7c22d5cbe2d81ef5057b3489d28017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
module Gitlab
module Import
module Github
class Options
def endpoint
client_options[:site]
end
def verify_ssl
options.fetch(:verify_ssl, true)
end
private
def client_options
@client_options ||= options.fetch(:args, options)[:client_options]
end
def custom_options
Gitlab.config.omniauth.providers.find { |provider| provider.name == 'github' }
end
def default_options
OmniAuth::Strategies::GitHub.default_options
end
def options
@options ||= (custom_options || default_options).deep_symbolize_keys
end
end
end
end
end
|