23
23
# }
24
24
# auth => {
25
25
# user => "AzureDiamond"
26
- # pass => "hunter2"
26
+ # password => "hunter2"
27
27
# }
28
28
# }
29
29
# }
@@ -89,7 +89,7 @@ def normalize_request(url_or_spec)
89
89
url = spec . delete ( :url )
90
90
91
91
# We need these strings to be keywords!
92
- spec [ :auth ] = { user : spec [ :auth ] [ "user" ] , pass : spec [ :auth ] [ "pass " ] } if spec [ :auth ]
92
+ spec [ :auth ] = { user : spec [ :auth ] [ "user" ] , pass : spec [ :auth ] [ "password " ] } if spec [ :auth ]
93
93
94
94
res = [ method , url , spec ]
95
95
else
@@ -112,7 +112,7 @@ def validate_request!(url_or_spec, request)
112
112
raise LogStash ::ConfigurationError , "Auth was specified, but 'user' was not!"
113
113
end
114
114
if !spec [ :auth ] [ :pass ]
115
- raise LogStash ::ConfigurationError , "Auth was specified, but 'pass ' was not!"
115
+ raise LogStash ::ConfigurationError , "Auth was specified, but 'password ' was not!"
116
116
end
117
117
end
118
118
@@ -136,6 +136,8 @@ def run_once(queue)
136
136
# Some exceptions are only returned here! There is no callback,
137
137
# for example, if there is a bad port number.
138
138
# https://github.com/cheald/manticore/issues/22
139
+ # This issue is now fixed, but we'll leave this code in for older versions
140
+ # of manticore. Once the plugin ecosystem is more updated we can kill this.
139
141
client . execute! . each_with_index do |resp , i |
140
142
if resp . is_a? ( java . lang . Exception ) || resp . is_a? ( StandardError )
141
143
name = @requests . keys [ i ]
@@ -152,8 +154,8 @@ def request_async(queue, name, request)
152
154
@logger . debug? && @logger . debug ( "Fetching URL" , :name => name , :url => request )
153
155
started = Time . now
154
156
155
- method , request_opts = request
156
- client . async . send ( method , request_opts ) .
157
+ method , * request_opts = request
158
+ client . async . send ( method , * request_opts ) .
157
159
on_success { |response | handle_success ( queue , name , request , response , Time . now - started ) } .
158
160
on_failure { |exception |
159
161
handle_failure ( queue , name , request , exception , Time . now - started )
0 commit comments