aritcaptcha 1.14.0 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.14.0
1
+ 1.15.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.14.0"
8
+ s.version = "1.15.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"]
@@ -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: 47
4
+ hash: 43
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 14
8
+ - 15
9
9
  - 0
10
- version: 1.14.0
10
+ version: 1.15.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Guilherme Nascimento