aritcaptcha 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/aritcaptcha.gemspec +2 -1
- data/lib/aritcaptcha/aritcaptcha_verify.rb +16 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.10.0
|
data/aritcaptcha.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{aritcaptcha}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.10.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Guilherme Nascimento"]
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"aritcaptcha.gemspec",
|
27
27
|
"lib/aritcaptcha.rb",
|
28
28
|
"lib/aritcaptcha/aritcaptcha_helper.rb",
|
29
|
+
"lib/aritcaptcha/aritcaptcha_verify.rb",
|
29
30
|
"lib/aritcaptcha/calculation.rb",
|
30
31
|
"spec/aritcaptcha_helper_spec.rb",
|
31
32
|
"spec/aritcaptcha_spec.rb",
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Aritcaptcha
|
2
|
+
|
3
|
+
module AritcaptchaVerify
|
4
|
+
SOLV_KEY = 0
|
5
|
+
SOLV = 1
|
6
|
+
|
7
|
+
def verify_aritcaptcha(params)
|
8
|
+
puts params[:equation_key]
|
9
|
+
puts params[:equation]
|
10
|
+
if (solv_key = params[:equation_key]) and (solv = params[:equation])
|
11
|
+
return (session[:equation] and session[:equation][SOLV_KEY] == solv_key.to_i and session[:equation][SOLV] == solv.to_i)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aritcaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 10
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.10.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Guilherme Nascimento
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- aritcaptcha.gemspec
|
54
54
|
- lib/aritcaptcha.rb
|
55
55
|
- lib/aritcaptcha/aritcaptcha_helper.rb
|
56
|
+
- lib/aritcaptcha/aritcaptcha_verify.rb
|
56
57
|
- lib/aritcaptcha/calculation.rb
|
57
58
|
- spec/aritcaptcha_helper_spec.rb
|
58
59
|
- spec/aritcaptcha_spec.rb
|