mathcha 0.4.5 → 0.4.6
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/lib/mathcha/mathcha_helper.rb +2 -2
- data/mathcha.gemspec +61 -0
- data/pkg/mathcha-0.4.5.gem +0 -0
- metadata +3 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
@@ -33,13 +33,13 @@ module Mathcha
|
|
33
33
|
# * The default session key for this thing is :solv, I'd suggest you leave it be.
|
34
34
|
# * Only one mathcha can exist at a time, for now.
|
35
35
|
def mathcha_tag(options={})
|
36
|
-
options.reverse_merge!({:seed_one =>
|
36
|
+
options.reverse_merge!({:seed_one => 300, :seed_two => 100})
|
37
37
|
|
38
38
|
solv_key = Time.now.to_i
|
39
39
|
result, eq = nil, nil
|
40
40
|
|
41
41
|
while result.nil? or !result.is_a?(Integer) or result < 0
|
42
|
-
result, eq = generate_solv(SOLV_OPS[rand(SOLV_OPS.size)],
|
42
|
+
result, eq = generate_solv(SOLV_OPS[rand(SOLV_OPS.size)], options[:seed_one], options[:seed_two])
|
43
43
|
end
|
44
44
|
|
45
45
|
session[:solv] = [solv_key, eval(eq)]
|
data/mathcha.gemspec
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{mathcha}
|
8
|
+
s.version = "0.4.6"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Cory Wilkerson"]
|
12
|
+
s.date = %q{2009-10-16}
|
13
|
+
s.description = %q{Quick little arithmetic plain-text captcha}
|
14
|
+
s.email = %q{coryjwilkerson@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"MIT-LICENSE",
|
20
|
+
"README",
|
21
|
+
"Rakefile",
|
22
|
+
"VERSION",
|
23
|
+
"install.rb",
|
24
|
+
"lib/mathcha.rb",
|
25
|
+
"lib/mathcha/mathcha_helper.rb",
|
26
|
+
"lib/mathcha/mathcha_verify.rb",
|
27
|
+
"mathcha.gemspec",
|
28
|
+
"pkg/mathcha-0.0.0.gem",
|
29
|
+
"pkg/mathcha-0.2.0.gem",
|
30
|
+
"pkg/mathcha-0.4.0.gem",
|
31
|
+
"pkg/mathcha-0.4.1.gem",
|
32
|
+
"pkg/mathcha-0.4.2.gem",
|
33
|
+
"pkg/mathcha-0.4.3.gem",
|
34
|
+
"pkg/mathcha-0.4.4.gem",
|
35
|
+
"pkg/mathcha-0.4.5.gem",
|
36
|
+
"rails/init.rb",
|
37
|
+
"tasks/mathcha_tasks.rake",
|
38
|
+
"test/mathcha_test.rb",
|
39
|
+
"test/test_helper.rb",
|
40
|
+
"uninstall.rb"
|
41
|
+
]
|
42
|
+
s.homepage = %q{http://github.com/corywilkerson/mathcha}
|
43
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
s.rubygems_version = %q{1.3.5}
|
46
|
+
s.summary = %q{Quick little arithmetic plain-text captcha}
|
47
|
+
s.test_files = [
|
48
|
+
"test/mathcha_test.rb",
|
49
|
+
"test/test_helper.rb"
|
50
|
+
]
|
51
|
+
|
52
|
+
if s.respond_to? :specification_version then
|
53
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
|
+
s.specification_version = 3
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
57
|
+
else
|
58
|
+
end
|
59
|
+
else
|
60
|
+
end
|
61
|
+
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mathcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cory Wilkerson
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- lib/mathcha.rb
|
31
31
|
- lib/mathcha/mathcha_helper.rb
|
32
32
|
- lib/mathcha/mathcha_verify.rb
|
33
|
+
- mathcha.gemspec
|
33
34
|
- pkg/mathcha-0.0.0.gem
|
34
35
|
- pkg/mathcha-0.2.0.gem
|
35
36
|
- pkg/mathcha-0.4.0.gem
|
@@ -37,6 +38,7 @@ files:
|
|
37
38
|
- pkg/mathcha-0.4.2.gem
|
38
39
|
- pkg/mathcha-0.4.3.gem
|
39
40
|
- pkg/mathcha-0.4.4.gem
|
41
|
+
- pkg/mathcha-0.4.5.gem
|
40
42
|
- rails/init.rb
|
41
43
|
- tasks/mathcha_tasks.rake
|
42
44
|
- test/mathcha_test.rb
|