Commit 6bc22cb64bf23a142d934b7e1818ce02d073b578
1 parent
529946be
Exists in
master
Allows generic number of parameters
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
lib/serpro_captcha_plugin.rb
| @@ -12,7 +12,10 @@ class SerproCaptchaPlugin < Noosfero::Plugin | @@ -12,7 +12,10 @@ class SerproCaptchaPlugin < Noosfero::Plugin | ||
| 12 | [SerproCaptchaPlugin::API ] | 12 | [SerproCaptchaPlugin::API ] |
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | - def test_captcha(remote_ip, params, environment) | 15 | + def test_captcha(*args) |
| 16 | + remote_ip = args[0] | ||
| 17 | + params = args[1] | ||
| 18 | + environment = args[2] | ||
| 16 | scv = SerproCaptchaVerification.new | 19 | scv = SerproCaptchaVerification.new |
| 17 | return scv.verify_serpro_captcha(environment.serpro_captcha_client_id, params[:txtToken_captcha_serpro_gov_br], params[:captcha_text], environment.serpro_captcha_verify_uri) | 20 | return scv.verify_serpro_captcha(environment.serpro_captcha_client_id, params[:txtToken_captcha_serpro_gov_br], params[:captcha_text], environment.serpro_captcha_verify_uri) |
| 18 | end | 21 | end |