libgss 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/libgss/network.rb +5 -4
- data/lib/libgss/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c505709088c670ad66152242ccf741dc6f496920
|
4
|
+
data.tar.gz: 8e47f642d28bfe7e46e672e73936ddc6cade5435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce9dd3a2c2db9ec6c2393ea04b80ef53adee5e7c62fde75c632ae526a4fac5db56e2b00c3da363d8c9fdd5094cc87523f85f4c80d373a415a61ff9c38a2ad7b1
|
7
|
+
data.tar.gz: ccf730d15575450a684561800874519047105d11ecd5bc68b4dd03a8e7ce2826e329654665cbc446d35f6c8e985c98fa2d7c23ce84c995513edad1e66fce0b43
|
data/Gemfile.lock
CHANGED
data/lib/libgss/network.rb
CHANGED
@@ -61,16 +61,17 @@ module Libgss
|
|
61
61
|
# @option options [Boolean] :skip_verifying_signature レスポンスのシグネチャキーによる署名の検証をスキップするかどうか
|
62
62
|
# @option options [Integer] :device_type_cd GSS/fontanaに登録されたデバイス種別
|
63
63
|
# @option options [String] :client_version GSS/fontanaに登録されたクライアントリリースのバージョン
|
64
|
+
# @option options [Integer] :https_port HTTPSで接続する際の接続先のポート番号
|
64
65
|
def initialize(base_url_or_host, options = {})
|
65
66
|
@ssl_disabled = options.delete(:ssl_disabled)
|
66
67
|
if base_url_or_host =~ URI.regexp
|
67
68
|
@base_url = base_url_or_host.sub(/\/\Z/, '')
|
68
69
|
uri = URI.parse(@base_url)
|
69
|
-
@ssl_base_url = build_https_url(uri)
|
70
|
+
@ssl_base_url = build_https_url(uri, options[:https_port])
|
70
71
|
else
|
71
72
|
uri = URI::Generic.build({scheme: "http", host: base_url_or_host, port: DEFAULT_HTTP_PORT}.update(options))
|
72
73
|
@base_url = uri.to_s
|
73
|
-
@ssl_base_url = build_https_url(uri)
|
74
|
+
@ssl_base_url = build_https_url(uri, options[:https_port])
|
74
75
|
end
|
75
76
|
@ssl_base_url = @base_url if @ssl_disabled
|
76
77
|
@platform = options[:platform] || "fontana"
|
@@ -260,9 +261,9 @@ module Libgss
|
|
260
261
|
end
|
261
262
|
end
|
262
263
|
|
263
|
-
def build_https_url(uri)
|
264
|
+
def build_https_url(uri, port = nil)
|
264
265
|
uri.scheme = "https"
|
265
|
-
uri.port = (uri.port == PRODUCTION_HTTP_PORT
|
266
|
+
uri.port = port || (uri.port == PRODUCTION_HTTP_PORT ? PRODUCTION_HTTPS_PORT : uri.port + 1)
|
266
267
|
uri.to_s
|
267
268
|
end
|
268
269
|
|
data/lib/libgss/version.rb
CHANGED