aritcaptcha 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/aritcaptcha.gemspec +1 -1
- data/lib/aritcaptcha/aritcaptcha_helper.rb +7 -7
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.15.0
|
data/aritcaptcha.gemspec
CHANGED
@@ -12,13 +12,6 @@ module Aritcaptcha
|
|
12
12
|
equation_key = Time.now.to_i
|
13
13
|
operations = {:add => "+", :sub => "-", :mul => "*", :div => "/"}
|
14
14
|
|
15
|
-
equation, result = Aritcaptcha::Calculation.generate_calculation number1, number2, operation
|
16
|
-
session[:equation] = [equation_key, eval(equation)]
|
17
|
-
puts "=========================================================="
|
18
|
-
puts equation
|
19
|
-
puts result
|
20
|
-
puts "=========================================================="
|
21
|
-
|
22
15
|
operator = nil
|
23
16
|
if options[:op] == nil
|
24
17
|
operator = operations.to_a[rand(operations.size)][1]
|
@@ -35,6 +28,13 @@ module Aritcaptcha
|
|
35
28
|
:two => 50
|
36
29
|
}.merge options
|
37
30
|
|
31
|
+
equation, result = Aritcaptcha::Calculation.generate_calculation options, options[:one], options[:two]
|
32
|
+
session[:equation] = [equation_key, eval(equation)]
|
33
|
+
puts "=========================================================="
|
34
|
+
puts equation
|
35
|
+
puts result
|
36
|
+
puts "=========================================================="
|
37
|
+
|
38
38
|
options[:op] = operator
|
39
39
|
|
40
40
|
if options[:html]
|
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: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 15
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.15.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Guilherme Nascimento
|