captchator 0.0.2

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.
Files changed (59) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +37 -0
  4. data/lib/captchator.rb +5 -0
  5. data/lib/captchator/controller.rb +35 -0
  6. data/lib/captchator/version.rb +3 -0
  7. data/lib/captchator/view.rb +44 -0
  8. data/lib/tasks/captchator_tasks.rake +4 -0
  9. data/test/captchator_test.rb +20 -0
  10. data/test/dummy/Rakefile +7 -0
  11. data/test/dummy/app/assets/javascripts/application.js +9 -0
  12. data/test/dummy/app/assets/javascripts/users.js +2 -0
  13. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  14. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  15. data/test/dummy/app/assets/stylesheets/users.css +4 -0
  16. data/test/dummy/app/controllers/application_controller.rb +3 -0
  17. data/test/dummy/app/controllers/users_controller.rb +83 -0
  18. data/test/dummy/app/helpers/application_helper.rb +2 -0
  19. data/test/dummy/app/helpers/users_helper.rb +2 -0
  20. data/test/dummy/app/models/user.rb +2 -0
  21. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/test/dummy/app/views/users/_form.html.erb +28 -0
  23. data/test/dummy/app/views/users/edit.html.erb +6 -0
  24. data/test/dummy/app/views/users/index.html.erb +25 -0
  25. data/test/dummy/app/views/users/new.html.erb +5 -0
  26. data/test/dummy/app/views/users/show.html.erb +15 -0
  27. data/test/dummy/config.ru +4 -0
  28. data/test/dummy/config/application.rb +45 -0
  29. data/test/dummy/config/boot.rb +10 -0
  30. data/test/dummy/config/database.yml +25 -0
  31. data/test/dummy/config/environment.rb +5 -0
  32. data/test/dummy/config/environments/development.rb +30 -0
  33. data/test/dummy/config/environments/production.rb +60 -0
  34. data/test/dummy/config/environments/test.rb +39 -0
  35. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/test/dummy/config/initializers/inflections.rb +10 -0
  37. data/test/dummy/config/initializers/mime_types.rb +5 -0
  38. data/test/dummy/config/initializers/secret_token.rb +7 -0
  39. data/test/dummy/config/initializers/session_store.rb +8 -0
  40. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  41. data/test/dummy/config/locales/en.yml +5 -0
  42. data/test/dummy/config/routes.rb +60 -0
  43. data/test/dummy/db/development.sqlite3 +0 -0
  44. data/test/dummy/db/migrate/20120107171706_create_users.rb +10 -0
  45. data/test/dummy/db/schema.rb +23 -0
  46. data/test/dummy/db/test.sqlite3 +0 -0
  47. data/test/dummy/log/development.log +48 -0
  48. data/test/dummy/log/test.log +70 -0
  49. data/test/dummy/public/404.html +26 -0
  50. data/test/dummy/public/422.html +26 -0
  51. data/test/dummy/public/500.html +26 -0
  52. data/test/dummy/public/favicon.ico +0 -0
  53. data/test/dummy/script/rails +6 -0
  54. data/test/dummy/test/fixtures/users.yml +9 -0
  55. data/test/dummy/test/functional/users_controller_test.rb +10 -0
  56. data/test/dummy/test/unit/helpers/users_helper_test.rb +4 -0
  57. data/test/dummy/test/unit/user_test.rb +7 -0
  58. data/test/test_helper.rb +10 -0
  59. metadata +183 -0
@@ -0,0 +1,70 @@
1
+  (0.1ms) SAVEPOINT active_record_1
2
+ SQL (198.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 07 Jan 2012 07:12:44 UTC +00:00], ["email", nil], ["updated_at", Sat, 07 Jan 2012 07:12:44 UTC +00:00]]
3
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4
+ Processing by UsersController#index as HTML
5
+ User Load (0.3ms) SELECT "users".* FROM "users" 
6
+ Completed 200 OK in 70ms (Views: 67.8ms | ActiveRecord: 0.3ms)
7
+ Processing by UsersController#index as HTML
8
+ User Load (0.2ms) SELECT "users".* FROM "users" 
9
+ Rendered users/index.html.erb within layouts/application (13.3ms)
10
+ Completed 200 OK in 64ms (Views: 61.5ms | ActiveRecord: 0.2ms)
11
+ Processing by UsersController#index as HTML
12
+ User Load (0.3ms) SELECT "users".* FROM "users" 
13
+ Rendered users/index.html.erb within layouts/application (13.3ms)
14
+ Completed 200 OK in 60ms (Views: 58.2ms | ActiveRecord: 0.3ms)
15
+
16
+ ***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
17
+ Processing by UsersController#index as HTML
18
+ User Load (0.3ms) SELECT "users".* FROM "users" 
19
+ Rendered users/index.html.erb within layouts/application (13.1ms)
20
+ Completed 200 OK in 59ms (Views: 57.3ms | ActiveRecord: 0.3ms)
21
+
22
+ ***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
23
+ Processing by UsersController#index as HTML
24
+ User Load (0.2ms) SELECT "users".* FROM "users" 
25
+ Rendered users/index.html.erb within layouts/application (14.8ms)
26
+ Completed 200 OK in 63ms (Views: 61.6ms | ActiveRecord: 0.2ms)
27
+ Processing by UsersController#new as HTML
28
+ Rendered users/_form.html.erb (37.6ms)
29
+ Rendered users/new.html.erb within layouts/application (81.5ms)
30
+ Completed 500 Internal Server Error in 127ms
31
+ Processing by UsersController#new as HTML
32
+ Rendered users/_form.html.erb (41.4ms)
33
+ Rendered users/new.html.erb within layouts/application (77.8ms)
34
+ Completed 500 Internal Server Error in 130ms
35
+ Processing by UsersController#new as HTML
36
+ Rendered users/_form.html.erb (36.8ms)
37
+ Rendered users/new.html.erb within layouts/application (62.0ms)
38
+ Completed 500 Internal Server Error in 116ms
39
+ Processing by UsersController#new as HTML
40
+ Rendered users/_form.html.erb (36.8ms)
41
+ Rendered users/new.html.erb within layouts/application (62.1ms)
42
+ Completed 500 Internal Server Error in 109ms
43
+ Processing by UsersController#index as HTML
44
+ User Load (0.2ms) SELECT "users".* FROM "users" 
45
+ Rendered users/index.html.erb within layouts/application (14.7ms)
46
+ Completed 200 OK in 62ms (Views: 60.7ms | ActiveRecord: 0.2ms)
47
+ Processing by UsersController#index as HTML
48
+ User Load (0.2ms) SELECT "users".* FROM "users" 
49
+ Rendered users/index.html.erb within layouts/application (14.6ms)
50
+ Completed 200 OK in 62ms (Views: 60.7ms | ActiveRecord: 0.2ms)
51
+ Processing by UsersController#new as HTML
52
+ Rendered users/_form.html.erb (12.2ms)
53
+ Rendered users/new.html.erb within layouts/application (37.8ms)
54
+ Completed 200 OK in 85ms (Views: 84.0ms | ActiveRecord: 0.3ms)
55
+ Processing by UsersController#new as HTML
56
+ Rendered users/_form.html.erb (36.4ms)
57
+ Rendered users/new.html.erb within layouts/application (61.2ms)
58
+ Completed 500 Internal Server Error in 107ms
59
+ Processing by UsersController#new as HTML
60
+ Rendered users/_form.html.erb (12.4ms)
61
+ Rendered users/new.html.erb within layouts/application (38.3ms)
62
+ Completed 200 OK in 86ms (Views: 85.1ms | ActiveRecord: 0.3ms)
63
+ Processing by UsersController#new as HTML
64
+ Rendered users/_form.html.erb (12.2ms)
65
+ Rendered users/new.html.erb within layouts/application (37.2ms)
66
+ Completed 200 OK in 84ms (Views: 82.8ms | ActiveRecord: 0.3ms)
67
+ Processing by UsersController#new as HTML
68
+ Rendered users/_form.html.erb (13.7ms)
69
+ Rendered users/new.html.erb within layouts/application (26.9ms)
70
+ Completed 200 OK in 48ms (Views: 47.0ms | ActiveRecord: 0.3ms)
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ email: MyString
5
+ name: MyString
6
+
7
+ two:
8
+ email: MyString
9
+ name: MyString
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class UsersControllerTest < ActionController::TestCase
4
+
5
+ test "testing view" do
6
+ get :new
7
+ assert_match "http://captchator.com/captcha/image", @response.body
8
+ end
9
+
10
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class UsersHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: captchator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Gabriel Odess-Gillett
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-01-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &2156942660 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2156942660
25
+ - !ruby/object:Gem::Dependency
26
+ name: sqlite3
27
+ requirement: &2156941540 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *2156941540
36
+ description: Due to many unrequited complaints to the recaptcha gem with regard to
37
+ it unreadability for real human users, this gem offers a more readable selection
38
+ of captcha images.
39
+ email:
40
+ - gabeodess@gmail.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - lib/captchator/controller.rb
46
+ - lib/captchator/version.rb
47
+ - lib/captchator/view.rb
48
+ - lib/captchator.rb
49
+ - lib/tasks/captchator_tasks.rake
50
+ - MIT-LICENSE
51
+ - Rakefile
52
+ - README.rdoc
53
+ - test/captchator_test.rb
54
+ - test/dummy/app/assets/javascripts/application.js
55
+ - test/dummy/app/assets/javascripts/users.js
56
+ - test/dummy/app/assets/stylesheets/application.css
57
+ - test/dummy/app/assets/stylesheets/scaffold.css
58
+ - test/dummy/app/assets/stylesheets/users.css
59
+ - test/dummy/app/controllers/application_controller.rb
60
+ - test/dummy/app/controllers/users_controller.rb
61
+ - test/dummy/app/helpers/application_helper.rb
62
+ - test/dummy/app/helpers/users_helper.rb
63
+ - test/dummy/app/models/user.rb
64
+ - test/dummy/app/views/layouts/application.html.erb
65
+ - test/dummy/app/views/users/_form.html.erb
66
+ - test/dummy/app/views/users/edit.html.erb
67
+ - test/dummy/app/views/users/index.html.erb
68
+ - test/dummy/app/views/users/new.html.erb
69
+ - test/dummy/app/views/users/show.html.erb
70
+ - test/dummy/config/application.rb
71
+ - test/dummy/config/boot.rb
72
+ - test/dummy/config/database.yml
73
+ - test/dummy/config/environment.rb
74
+ - test/dummy/config/environments/development.rb
75
+ - test/dummy/config/environments/production.rb
76
+ - test/dummy/config/environments/test.rb
77
+ - test/dummy/config/initializers/backtrace_silencers.rb
78
+ - test/dummy/config/initializers/inflections.rb
79
+ - test/dummy/config/initializers/mime_types.rb
80
+ - test/dummy/config/initializers/secret_token.rb
81
+ - test/dummy/config/initializers/session_store.rb
82
+ - test/dummy/config/initializers/wrap_parameters.rb
83
+ - test/dummy/config/locales/en.yml
84
+ - test/dummy/config/routes.rb
85
+ - test/dummy/config.ru
86
+ - test/dummy/db/development.sqlite3
87
+ - test/dummy/db/migrate/20120107171706_create_users.rb
88
+ - test/dummy/db/schema.rb
89
+ - test/dummy/db/test.sqlite3
90
+ - test/dummy/log/development.log
91
+ - test/dummy/log/test.log
92
+ - test/dummy/public/404.html
93
+ - test/dummy/public/422.html
94
+ - test/dummy/public/500.html
95
+ - test/dummy/public/favicon.ico
96
+ - test/dummy/Rakefile
97
+ - test/dummy/script/rails
98
+ - test/dummy/test/fixtures/users.yml
99
+ - test/dummy/test/functional/users_controller_test.rb
100
+ - test/dummy/test/unit/helpers/users_helper_test.rb
101
+ - test/dummy/test/unit/user_test.rb
102
+ - test/test_helper.rb
103
+ homepage: https://github.com/gabeodess/captchator
104
+ licenses: []
105
+ post_install_message:
106
+ rdoc_options: []
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ! '>='
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ segments:
116
+ - 0
117
+ hash: -756704545994850958
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ segments:
125
+ - 0
126
+ hash: -756704545994850958
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 1.8.15
130
+ signing_key:
131
+ specification_version: 3
132
+ summary: A more readable captcha library alternative to recaptcha.
133
+ test_files:
134
+ - test/captchator_test.rb
135
+ - test/dummy/app/assets/javascripts/application.js
136
+ - test/dummy/app/assets/javascripts/users.js
137
+ - test/dummy/app/assets/stylesheets/application.css
138
+ - test/dummy/app/assets/stylesheets/scaffold.css
139
+ - test/dummy/app/assets/stylesheets/users.css
140
+ - test/dummy/app/controllers/application_controller.rb
141
+ - test/dummy/app/controllers/users_controller.rb
142
+ - test/dummy/app/helpers/application_helper.rb
143
+ - test/dummy/app/helpers/users_helper.rb
144
+ - test/dummy/app/models/user.rb
145
+ - test/dummy/app/views/layouts/application.html.erb
146
+ - test/dummy/app/views/users/_form.html.erb
147
+ - test/dummy/app/views/users/edit.html.erb
148
+ - test/dummy/app/views/users/index.html.erb
149
+ - test/dummy/app/views/users/new.html.erb
150
+ - test/dummy/app/views/users/show.html.erb
151
+ - test/dummy/config/application.rb
152
+ - test/dummy/config/boot.rb
153
+ - test/dummy/config/database.yml
154
+ - test/dummy/config/environment.rb
155
+ - test/dummy/config/environments/development.rb
156
+ - test/dummy/config/environments/production.rb
157
+ - test/dummy/config/environments/test.rb
158
+ - test/dummy/config/initializers/backtrace_silencers.rb
159
+ - test/dummy/config/initializers/inflections.rb
160
+ - test/dummy/config/initializers/mime_types.rb
161
+ - test/dummy/config/initializers/secret_token.rb
162
+ - test/dummy/config/initializers/session_store.rb
163
+ - test/dummy/config/initializers/wrap_parameters.rb
164
+ - test/dummy/config/locales/en.yml
165
+ - test/dummy/config/routes.rb
166
+ - test/dummy/config.ru
167
+ - test/dummy/db/development.sqlite3
168
+ - test/dummy/db/migrate/20120107171706_create_users.rb
169
+ - test/dummy/db/schema.rb
170
+ - test/dummy/db/test.sqlite3
171
+ - test/dummy/log/development.log
172
+ - test/dummy/log/test.log
173
+ - test/dummy/public/404.html
174
+ - test/dummy/public/422.html
175
+ - test/dummy/public/500.html
176
+ - test/dummy/public/favicon.ico
177
+ - test/dummy/Rakefile
178
+ - test/dummy/script/rails
179
+ - test/dummy/test/fixtures/users.yml
180
+ - test/dummy/test/functional/users_controller_test.rb
181
+ - test/dummy/test/unit/helpers/users_helper_test.rb
182
+ - test/dummy/test/unit/user_test.rb
183
+ - test/test_helper.rb