turing 0.0.7
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/CHANGES +138 -0
- data/COPYING +340 -0
- data/COPYRIGHT +19 -0
- data/README +26 -0
- data/Rakefile +75 -0
- data/TODO +1 -0
- data/lib/turing.rb +38 -0
- data/lib/turing/cgi_handler.rb +251 -0
- data/lib/turing/challenge.rb +214 -0
- data/lib/turing/image.rb +245 -0
- data/lib/turing/image_plugins/__squaring_helper.rb +66 -0
- data/lib/turing/image_plugins/black_squaring.rb +23 -0
- data/lib/turing/image_plugins/blending.rb +44 -0
- data/lib/turing/image_plugins/random_noise.rb +32 -0
- data/lib/turing/image_plugins/spiral.rb +56 -0
- data/lib/turing/image_plugins/white_squaring.rb +23 -0
- data/rdoc.jamis.rb +591 -0
- data/shared/README +9 -0
- data/shared/bgs/04.jpeg +0 -0
- data/shared/bgs/06.jpeg +0 -0
- data/shared/bgs/07.jpeg +0 -0
- data/shared/bgs/08.jpeg +0 -0
- data/shared/bgs/09.jpeg +0 -0
- data/shared/bgs/13.jpeg +0 -0
- data/shared/bgs/18.jpeg +0 -0
- data/shared/bgs/19.jpeg +0 -0
- data/shared/bgs/21.jpeg +0 -0
- data/shared/bgs/26.jpeg +0 -0
- data/shared/bgs/28.jpeg +0 -0
- data/shared/bgs/29.jpeg +0 -0
- data/shared/dictionary +411 -0
- data/shared/fonts/cour.ttf +0 -0
- data/shared/fonts/georgiai.ttf +0 -0
- data/shared/templates/challenge.rhtml +40 -0
- data/shared/templates/error.rhtml +32 -0
- data/shared/templates/success.rhtml +26 -0
- metadata +102 -0
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Turing challenge</title>
|
|
6
|
+
<style type="text/css">
|
|
7
|
+
/* <![CDATA[ */
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
font-family: "Trebuchet MS", sans-serif;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
div.error {
|
|
15
|
+
border: 1px dashed red;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
a:link { color: #FF8000; font-weight:bold; }
|
|
19
|
+
a:visited { color: #BF8F5F; }
|
|
20
|
+
a:hover { background-color:#6291CA; color:white; }
|
|
21
|
+
/* ]]> */
|
|
22
|
+
</style>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<% if @already_failed %>
|
|
26
|
+
<div class="error">Wrong solution, please try it again!</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
<h1>Please solve following:</h1>
|
|
29
|
+
<p>
|
|
30
|
+
<img src="<%= @file %>" />
|
|
31
|
+
</p>
|
|
32
|
+
<form method="post">
|
|
33
|
+
<input type="hidden" name="id" value="<%= @id %>" />
|
|
34
|
+
<label for="solution">Your solution?</label><br />
|
|
35
|
+
<input type="text" name="solution" /><br />
|
|
36
|
+
<input type="submit" value="OK" />
|
|
37
|
+
</form>
|
|
38
|
+
</form>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Turing challenge: fatal error</title>
|
|
6
|
+
<style type="text/css">
|
|
7
|
+
/* <![CDATA[ */
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
font-family: "Trebuchet MS", sans-serif;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
a:link { color: #FF8000; font-weight:bold; }
|
|
15
|
+
a:visited { color: #BF8F5F; }
|
|
16
|
+
a:hover { background-color:#6291CA; color:white; }
|
|
17
|
+
/* ]]> */
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<h1>Fatal error!</h1>
|
|
22
|
+
<pre>
|
|
23
|
+
<%=h what %>
|
|
24
|
+
</pre>
|
|
25
|
+
<pre>
|
|
26
|
+
<%=h @explanation %>
|
|
27
|
+
</pre>
|
|
28
|
+
<pre>
|
|
29
|
+
<%=h @backtrace %>
|
|
30
|
+
</pre>
|
|
31
|
+
</body>
|
|
32
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Turing challenge: success</title>
|
|
6
|
+
<style type="text/css">
|
|
7
|
+
/* <![CDATA[ */
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
font-family: "Trebuchet MS", sans-serif;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
a:link { color: #FF8000; font-weight:bold; }
|
|
15
|
+
a:visited { color: #BF8F5F; }
|
|
16
|
+
a:hover { background-color:#6291CA; color:white; }
|
|
17
|
+
/* ]]> */
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<h1>Success!</h1>
|
|
22
|
+
<p>
|
|
23
|
+
You have successfully passed the Turing test.
|
|
24
|
+
</p>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
metadata
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
!ruby/object:Gem::Specification
|
|
2
|
+
rubygems_version: 0.8.11
|
|
3
|
+
specification_version: 1
|
|
4
|
+
name: turing
|
|
5
|
+
version: !ruby/object:Gem::Version
|
|
6
|
+
version: 0.0.7
|
|
7
|
+
date: 2005-11-26 00:00:00 +01:00
|
|
8
|
+
summary: Another implementation of captcha (http://captcha.net/)
|
|
9
|
+
require_paths:
|
|
10
|
+
- lib
|
|
11
|
+
email: wejn@box.cz
|
|
12
|
+
homepage: http://turing.rubyforge.org/
|
|
13
|
+
rubyforge_project: turing
|
|
14
|
+
description: Implementation of captcha (Completely Automated Public Turing-Test to Tell Computers and Humans Apart) that is both easy to use and easy to customize/extend.
|
|
15
|
+
autorequire: turing
|
|
16
|
+
default_executable:
|
|
17
|
+
bindir: bin
|
|
18
|
+
has_rdoc: true
|
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
20
|
+
requirements:
|
|
21
|
+
- - ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 1.8.2
|
|
24
|
+
version:
|
|
25
|
+
platform: ruby
|
|
26
|
+
signing_key:
|
|
27
|
+
cert_chain:
|
|
28
|
+
authors:
|
|
29
|
+
- Michal Safranek
|
|
30
|
+
files:
|
|
31
|
+
- lib/turing
|
|
32
|
+
- lib/turing.rb
|
|
33
|
+
- lib/turing/image_plugins
|
|
34
|
+
- lib/turing/cgi_handler.rb
|
|
35
|
+
- lib/turing/challenge.rb
|
|
36
|
+
- lib/turing/image.rb
|
|
37
|
+
- lib/turing/image_plugins/black_squaring.rb
|
|
38
|
+
- lib/turing/image_plugins/random_noise.rb
|
|
39
|
+
- lib/turing/image_plugins/blending.rb
|
|
40
|
+
- lib/turing/image_plugins/__squaring_helper.rb
|
|
41
|
+
- lib/turing/image_plugins/white_squaring.rb
|
|
42
|
+
- lib/turing/image_plugins/spiral.rb
|
|
43
|
+
- shared/fonts
|
|
44
|
+
- shared/bgs
|
|
45
|
+
- shared/templates
|
|
46
|
+
- shared/dictionary
|
|
47
|
+
- shared/README
|
|
48
|
+
- shared/fonts/georgiai.ttf
|
|
49
|
+
- shared/fonts/cour.ttf
|
|
50
|
+
- shared/bgs/21.jpeg
|
|
51
|
+
- shared/bgs/04.jpeg
|
|
52
|
+
- shared/bgs/13.jpeg
|
|
53
|
+
- shared/bgs/06.jpeg
|
|
54
|
+
- shared/bgs/07.jpeg
|
|
55
|
+
- shared/bgs/08.jpeg
|
|
56
|
+
- shared/bgs/26.jpeg
|
|
57
|
+
- shared/bgs/09.jpeg
|
|
58
|
+
- shared/bgs/18.jpeg
|
|
59
|
+
- shared/bgs/19.jpeg
|
|
60
|
+
- shared/bgs/28.jpeg
|
|
61
|
+
- shared/bgs/29.jpeg
|
|
62
|
+
- shared/templates/challenge.rhtml
|
|
63
|
+
- shared/templates/success.rhtml
|
|
64
|
+
- shared/templates/error.rhtml
|
|
65
|
+
- README
|
|
66
|
+
- CHANGES
|
|
67
|
+
- TODO
|
|
68
|
+
- COPYING
|
|
69
|
+
- COPYRIGHT
|
|
70
|
+
- Rakefile
|
|
71
|
+
- rdoc.jamis.rb
|
|
72
|
+
test_files: []
|
|
73
|
+
|
|
74
|
+
rdoc_options:
|
|
75
|
+
- --title
|
|
76
|
+
- Turing Documentation
|
|
77
|
+
- --charset
|
|
78
|
+
- utf-8
|
|
79
|
+
- --line-numbers
|
|
80
|
+
- --inline-source
|
|
81
|
+
- --main
|
|
82
|
+
- README
|
|
83
|
+
- -T
|
|
84
|
+
- ./rdoc.jamis.rb
|
|
85
|
+
extra_rdoc_files:
|
|
86
|
+
- README
|
|
87
|
+
executables: []
|
|
88
|
+
|
|
89
|
+
extensions: []
|
|
90
|
+
|
|
91
|
+
requirements: []
|
|
92
|
+
|
|
93
|
+
dependencies:
|
|
94
|
+
- !ruby/object:Gem::Dependency
|
|
95
|
+
name: gd2
|
|
96
|
+
version_requirement:
|
|
97
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: "1.0"
|
|
102
|
+
version:
|