unageanu-clickclient_scrap 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jiji_plugin.rb +6 -3
- metadata +1 -1
data/lib/jiji_plugin.rb
CHANGED
@@ -20,7 +20,7 @@ class ClickSecuritiesPlugin
|
|
20
20
|
def input_infos
|
21
21
|
[ Input.new( :user, "Please input a user name of CLICK Securities.", false, nil ),
|
22
22
|
Input.new( :password, "Please input a password of CLICK Securities.", true, nil ),
|
23
|
-
Input.new( :proxy, "Please input a proxy. example:
|
23
|
+
Input.new( :proxy, "Please input a proxy. example: http://example.com:80 (default: nil )", false, nil ) ]
|
24
24
|
end
|
25
25
|
|
26
26
|
#プラグインを初期化します。
|
@@ -113,8 +113,11 @@ class ClickSecuritiesPluginSession
|
|
113
113
|
end
|
114
114
|
def session
|
115
115
|
begin
|
116
|
-
|
117
|
-
|
116
|
+
proxy = nil
|
117
|
+
if @props.key?(:proxy) && @props[:proxy] != nil && @props[:proxy].length > 0
|
118
|
+
proxy = @props[:proxy]
|
119
|
+
end
|
120
|
+
@client ||= ClickClientScrap::Client.new( proxy )
|
118
121
|
@session ||= @client.fx_session( @props[:user], @props[:password] )
|
119
122
|
rescue
|
120
123
|
@logger.error $!
|