green_eggs_and_spam 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/.travis.yml +6 -0
- data/Gemfile +0 -2
- data/README.md +44 -24
- data/Rakefile +2 -22
- data/green_eggs_and_spam.gemspec +6 -5
- data/lib/green_eggs_and_spam.rb +11 -6
- data/lib/green_eggs_and_spam/action_controller.rb +1 -1
- data/lib/green_eggs_and_spam/active_record.rb +1 -1
- data/lib/green_eggs_and_spam/anti_spam_validator.rb +2 -2
- data/lib/green_eggs_and_spam/form_helper.rb +1 -1
- data/lib/green_eggs_and_spam/options.rb +1 -1
- data/lib/green_eggs_and_spam/version.rb +1 -1
- data/test/dummy/config/initializers/green_eggs_and_spam.rb +2 -0
- data/test/dummy/public/images/named/firetruck.png +0 -0
- data/test/dummy/public/images/named/lime.png +0 -0
- data/test/dummy/public/images/named/ocean.png +0 -0
- data/test/helper.rb +4 -13
- data/test/test_green_eggs_and_ham.rb +23 -8
- data/test/test_options.rb +2 -2
- metadata +62 -70
- data/test/integration/navigation_test.rb +0 -7
- data/test/support/integration_case.rb +0 -5
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
Green Eggs and Spam
|
2
|
-
===================
|
1
|
+
# Green Eggs and Spam [![Build Status](https://secure.travis-ci.org/citrus/green_eggs_and_spam.png)](http://travis-ci.org/citrus/green_eggs_and_spam)
|
3
2
|
|
4
|
-
A simple way to filter spam in your rails forms. Green eggs and spam presents users with a simple question: **What color is this image?**
|
5
|
-
|
6
|
-
You'll supply the images and a key of which one's which. The gem will handle the rest.
|
7
3
|
|
4
|
+
A simple way to filter spam in your rails forms. GreenEggsAndSpam presents users with an easy question: **What color is this image?**
|
8
5
|
|
9
|
-
|
6
|
+
You'll supply the images and a key of which one's which. The gem will handle the rest.
|
10
7
|
|
11
8
|
|
12
9
|
Usage
|
@@ -18,7 +15,7 @@ Install the gem just like you would any other:
|
|
18
15
|
|
19
16
|
# or with bundler
|
20
17
|
|
21
|
-
gem 'green_eggs_and_spam', '>= 0.
|
18
|
+
gem 'green_eggs_and_spam', '>= 0.2.0'
|
22
19
|
|
23
20
|
|
24
21
|
Create a handful of color coded images and name them something other than their color or design. `1.png`, `banana.png` or `firetruck.png` for example. Tell GreenEggsandSpam which ones which with an initializer:
|
@@ -26,33 +23,41 @@ Create a handful of color coded images and name them something other than their
|
|
26
23
|
# config/initializers/green_eggs_and_spam.rb
|
27
24
|
|
28
25
|
GreenEggsAndSpam.options[:key_index] = { "1" => "blue", "banana" => "yellow", "firetruck" => "red" }
|
26
|
+
|
27
|
+
|
28
|
+
Or just use the defaults, making your images `1.png`, `2.png`, `3.png`:
|
29
29
|
|
30
|
+
{ "1" => "red", "2" => "green", "3" => "blue" }
|
31
|
+
|
30
32
|
|
31
|
-
|
32
|
-
Include the helper form:
|
33
|
+
Include the helper in your form:
|
33
34
|
|
34
35
|
= form_for @comment, :url => comment_path do |f|
|
35
36
|
%p
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
= f.label :comment
|
38
|
+
= f.text_field :comment
|
39
|
+
|
40
|
+
// Here's what your interested in:
|
41
|
+
%p
|
42
|
+
= anti_spam_form, "What color is this piece of bacon?"
|
43
|
+
|
44
|
+
// the first optional argument is your custom question, the second is the form options hash
|
42
45
|
|
43
|
-
|
46
|
+
= f.submit 'send'
|
44
47
|
|
45
48
|
|
46
49
|
|
47
|
-
Chances are your form is interacting with a model. If that's the case,
|
50
|
+
Chances are your form is interacting with a model. If that's the case, hook up the validator to your model like so:
|
48
51
|
|
49
52
|
class Egg < ActiveRecord::Base
|
53
|
+
|
50
54
|
validates_anti_spam
|
55
|
+
|
51
56
|
end
|
52
57
|
|
53
58
|
|
54
59
|
|
55
|
-
Next, setup your controller with the
|
60
|
+
Next, setup your controller with the `has_anti_spam` method. This will prepare the controller and give you access to the helper methods.
|
56
61
|
|
57
62
|
class EggsController < ApplicationController
|
58
63
|
|
@@ -60,24 +65,26 @@ Next, setup your controller with the 'magic' `has_anti_spam` method. This will p
|
|
60
65
|
|
61
66
|
...
|
62
67
|
|
63
|
-
# merge the antispam params into your model's params before validation
|
64
68
|
def create
|
69
|
+
|
70
|
+
# merge the antispam params into your model's params before validation
|
65
71
|
@egg = Egg.new(params[:egg].merge(:antispam => params[:antispam]))
|
66
72
|
|
67
73
|
# validate as usual
|
68
74
|
if @egg.valid? && @egg.save
|
69
75
|
# do something
|
70
76
|
end
|
77
|
+
|
71
78
|
end
|
72
79
|
|
73
80
|
end
|
74
81
|
|
75
82
|
|
76
83
|
|
77
|
-
### That's it!
|
84
|
+
### That's it!
|
78
85
|
|
79
86
|
|
80
|
-
But what if my form isn't validating a model? No big deal, just use the `anti_spam_valid?` helper method.
|
87
|
+
But what if my form isn't validating a model? No big deal, just use the `anti_spam_valid?` helper method in your controller.
|
81
88
|
|
82
89
|
class CommentsController < ApplicationController
|
83
90
|
|
@@ -87,10 +94,12 @@ But what if my form isn't validating a model? No big deal, just use the `anti_sp
|
|
87
94
|
|
88
95
|
# merge the antispam params into your model's params before validation
|
89
96
|
def create
|
97
|
+
|
90
98
|
# validate with the anti spam helper method
|
91
99
|
if anti_spam_valid?
|
92
100
|
# do something
|
93
101
|
end
|
102
|
+
|
94
103
|
end
|
95
104
|
|
96
105
|
end
|
@@ -102,7 +111,7 @@ But what if my form isn't validating a model? No big deal, just use the `anti_sp
|
|
102
111
|
Customization
|
103
112
|
-------------
|
104
113
|
|
105
|
-
So you're using `.gif`'s or you
|
114
|
+
So you're using `.gif`'s or you're images aren't stored in `/images/antispam`. Here's some available options for the form helper.
|
106
115
|
|
107
116
|
# the defaults
|
108
117
|
{
|
@@ -124,7 +133,7 @@ So you're using `.gif`'s or you don't want the images stored in `/images/antispa
|
|
124
133
|
Demo
|
125
134
|
----
|
126
135
|
|
127
|
-
If you'd like to see GreenEggsAndSpam in action, there is a demo app located in `test/dummy
|
136
|
+
If you'd like to see GreenEggsAndSpam in action, there is a demo app running on heroku at [http://green-eggs-and-spam-demo.heroku.com](http://green-eggs-and-spam-demo.heroku.com). There's a similar demo/test-app located in `test/dummy` if you'd like to run it locally.
|
128
137
|
|
129
138
|
git://github.com/citrus/green_eggs_and_spam.git
|
130
139
|
cd green_eggs_and_spam
|
@@ -134,16 +143,27 @@ If you'd like to see GreenEggsAndSpam in action, there is a demo app located in
|
|
134
143
|
rails s
|
135
144
|
|
136
145
|
|
146
|
+
|
137
147
|
Testing
|
138
148
|
-------
|
139
149
|
|
140
|
-
|
150
|
+
Tests can be run with `rake test` or just `rake`.
|
141
151
|
|
142
152
|
git://github.com/citrus/green_eggs_and_spam.git
|
143
153
|
cd green_eggs_and_spam
|
154
|
+
bundle
|
144
155
|
rake
|
145
156
|
|
146
157
|
|
158
|
+
|
159
|
+
To Do
|
160
|
+
-----
|
161
|
+
|
162
|
+
* Write more tests
|
163
|
+
* Write more documentation
|
164
|
+
* Include default images
|
165
|
+
|
166
|
+
|
147
167
|
License
|
148
168
|
-------
|
149
169
|
|
data/Rakefile
CHANGED
@@ -1,30 +1,10 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
begin
|
4
|
-
require 'bundler/setup'
|
5
|
-
rescue LoadError
|
6
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
-
end
|
8
|
-
|
9
|
-
require 'rake'
|
10
|
-
require 'rake/rdoctask'
|
11
|
-
require 'rake/testtask'
|
12
|
-
|
13
|
-
Bundler::GemHelper.install_tasks
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
14
3
|
|
15
4
|
Rake::TestTask.new(:test) do |t|
|
16
5
|
t.libs << 'lib'
|
17
6
|
t.libs << 'test'
|
18
|
-
#t.pattern = 'test/**/*_test.rb'
|
19
7
|
t.verbose = true
|
20
8
|
end
|
21
9
|
|
22
10
|
task :default => :test
|
23
|
-
|
24
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
25
|
-
rdoc.rdoc_dir = 'rdoc'
|
26
|
-
rdoc.title = 'SpreeMail'
|
27
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
28
|
-
rdoc.rdoc_files.include('README.rdoc')
|
29
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
30
|
-
end
|
data/green_eggs_and_spam.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Spencer Steffen"]
|
10
10
|
s.email = ["spencer@citrusme.com"]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "https://github.com/citrus/green_eggs_and_spam"
|
12
12
|
s.summary = %q{A simple way to filter spam in your rails forms.}
|
13
13
|
s.description = %q{Green eggs and spam presents the user with a simple question: What color is this image? You'll supply the images and a key of which one's which, and the gem will help with the rest.}
|
14
14
|
|
@@ -21,7 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.add_dependency("rails", ">= 3.0.0")
|
23
23
|
|
24
|
-
s.add_development_dependency("
|
25
|
-
s.add_development_dependency("
|
26
|
-
s.add_development_dependency("sqlite3",
|
27
|
-
|
24
|
+
s.add_development_dependency("minitest", ">= 2.1.0")
|
25
|
+
s.add_development_dependency("minitest_should", ">= 0.1.0")
|
26
|
+
s.add_development_dependency("sqlite3", ">= 1.3.3")
|
27
|
+
|
28
|
+
end
|
data/lib/green_eggs_and_spam.rb
CHANGED
@@ -23,13 +23,18 @@ module GreenEggsAndSpam
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# Validates a key and answer combo
|
26
|
-
def validates?(params)
|
27
|
-
key = params
|
28
|
-
val = params[:answer].to_s
|
26
|
+
def validates?(params)
|
27
|
+
key, val = normalized_params(params)
|
29
28
|
return false if key.empty? || val.empty?
|
30
|
-
answer = key_index[key
|
31
|
-
|
32
|
-
return val.match(regex) != nil
|
29
|
+
answer = key_index[key] rescue ""
|
30
|
+
return val =~ Regexp.new("^#{answer}$", 'i')
|
33
31
|
end
|
34
32
|
|
33
|
+
private
|
34
|
+
|
35
|
+
def normalized_params(params)
|
36
|
+
params ||= {}
|
37
|
+
[ params[:key].to_s, params[:answer].to_s ]
|
38
|
+
end
|
39
|
+
|
35
40
|
end
|
@@ -3,9 +3,9 @@ module GreenEggsAndSpam
|
|
3
3
|
class AntiSpamValidator < ActiveModel::Validator
|
4
4
|
|
5
5
|
def validate(record)
|
6
|
-
record.errors
|
6
|
+
record.errors.add :base, GreenEggsAndSpam.options[:error_message] unless GreenEggsAndSpam.validates?(record.antispam)
|
7
7
|
end
|
8
8
|
|
9
9
|
end
|
10
10
|
|
11
|
-
end
|
11
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
data/test/helper.rb
CHANGED
@@ -1,23 +1,14 @@
|
|
1
1
|
# Configure Rails Envinronment
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
3
|
|
4
|
+
gem "minitest"
|
5
|
+
|
4
6
|
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
7
|
require "rails/test_help"
|
6
|
-
require "
|
7
|
-
|
8
|
-
ActionMailer::Base.delivery_method = :test
|
9
|
-
ActionMailer::Base.perform_deliveries = true
|
10
|
-
ActionMailer::Base.default_url_options[:host] = "test.com"
|
8
|
+
require "minitest/autorun"
|
9
|
+
require "minitest/should"
|
11
10
|
|
12
11
|
Rails.backtrace_cleaner.remove_silencers!
|
13
12
|
|
14
|
-
# Configure capybara for integration testing
|
15
|
-
require "capybara/rails"
|
16
|
-
Capybara.default_driver = :rack_test
|
17
|
-
Capybara.default_selector = :css
|
18
|
-
|
19
13
|
# Run any available migration
|
20
14
|
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
21
|
-
|
22
|
-
# Load support files
|
23
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
|
-
class TestGreenEggsAndSpam <
|
3
|
+
class TestGreenEggsAndSpam < MiniTest::Unit::TestCase
|
4
4
|
|
5
5
|
should "get key index" do
|
6
6
|
assert GreenEggsAndSpam.key_index.is_a?(Hash)
|
@@ -14,20 +14,20 @@ class TestGreenEggsAndSpam < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
should "validate key index" do
|
17
|
-
assert_raises RuntimeError do
|
17
|
+
assert_raises RuntimeError do |*e|
|
18
18
|
GreenEggsAndSpam.options[:key_index] = {}
|
19
|
-
asset_equal "InvalidKeyIndex", e.message
|
19
|
+
asset_equal "InvalidKeyIndex", e.first.message
|
20
20
|
end
|
21
|
-
assert_raises RuntimeError do
|
21
|
+
assert_raises RuntimeError do |*e|
|
22
22
|
GreenEggsAndSpam.options[:key_index] = "some string"
|
23
|
-
asset_equal "InvalidKeyIndex", e.message
|
23
|
+
asset_equal "InvalidKeyIndex", e.first.message
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
should "validate form options" do
|
28
|
-
assert_raises RuntimeError do
|
28
|
+
assert_raises RuntimeError do |*e|
|
29
29
|
GreenEggsAndSpam.options[:form_options] = "some string"
|
30
|
-
asset_equal "InvalidKeyIndex", e.message
|
30
|
+
asset_equal "InvalidKeyIndex", e.first.message
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -50,4 +50,19 @@ class TestGreenEggsAndSpam < Test::Unit::TestCase
|
|
50
50
|
assert GreenEggsAndSpam.key_index.include?(key)
|
51
51
|
end
|
52
52
|
|
53
|
-
|
53
|
+
should "validate key/answer combo" do
|
54
|
+
key = GreenEggsAndSpam.random_key
|
55
|
+
answer = { :key => key, :answer => GreenEggsAndSpam.key_index[key] }
|
56
|
+
assert GreenEggsAndSpam.validates?(answer)
|
57
|
+
end
|
58
|
+
|
59
|
+
should "return false when validation params are incorrect" do
|
60
|
+
answer = { :key => "foo", :answer => "bar" }
|
61
|
+
assert !GreenEggsAndSpam.validates?(answer)
|
62
|
+
end
|
63
|
+
|
64
|
+
should "return false when validation params are nil" do
|
65
|
+
assert !GreenEggsAndSpam.validates?(nil)
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
data/test/test_options.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
|
-
class TestOptions <
|
3
|
+
class TestOptions < MiniTest::Unit::TestCase
|
4
4
|
|
5
5
|
def setup
|
6
6
|
GreenEggsAndSpam.options.default!
|
@@ -34,4 +34,4 @@ class TestOptions < Test::Unit::TestCase
|
|
34
34
|
assert_equal 'nothing', GreenEggsAndSpam.options['something']
|
35
35
|
end
|
36
36
|
|
37
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,73 +1,71 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: green_eggs_and_spam
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Spencer Steffen
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-11-08 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: rails
|
18
|
-
requirement: &
|
16
|
+
requirement: &2157479080 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 3.0.0
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
-
requirement: &
|
24
|
+
version_requirements: *2157479080
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: minitest
|
27
|
+
requirement: &2157478320 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.1.0
|
35
33
|
type: :development
|
36
34
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
40
|
-
requirement: &
|
35
|
+
version_requirements: *2157478320
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: minitest_should
|
38
|
+
requirement: &2157477800 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.1.0
|
46
44
|
type: :development
|
47
45
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *2157477800
|
47
|
+
- !ruby/object:Gem::Dependency
|
50
48
|
name: sqlite3
|
51
|
-
requirement: &
|
49
|
+
requirement: &2157477340 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
56
54
|
version: 1.3.3
|
57
55
|
type: :development
|
58
56
|
prerelease: false
|
59
|
-
version_requirements: *
|
60
|
-
description:
|
61
|
-
|
57
|
+
version_requirements: *2157477340
|
58
|
+
description: ! 'Green eggs and spam presents the user with a simple question: What
|
59
|
+
color is this image? You''ll supply the images and a key of which one''s which,
|
60
|
+
and the gem will help with the rest.'
|
61
|
+
email:
|
62
62
|
- spencer@citrusme.com
|
63
63
|
executables: []
|
64
|
-
|
65
64
|
extensions: []
|
66
|
-
|
67
65
|
extra_rdoc_files: []
|
68
|
-
|
69
|
-
files:
|
66
|
+
files:
|
70
67
|
- .gitignore
|
68
|
+
- .travis.yml
|
71
69
|
- Gemfile
|
72
70
|
- README.md
|
73
71
|
- Rakefile
|
@@ -101,6 +99,7 @@ files:
|
|
101
99
|
- test/dummy/config/environments/production.rb
|
102
100
|
- test/dummy/config/environments/test.rb
|
103
101
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
102
|
+
- test/dummy/config/initializers/green_eggs_and_spam.rb
|
104
103
|
- test/dummy/config/initializers/inflections.rb
|
105
104
|
- test/dummy/config/initializers/mime_types.rb
|
106
105
|
- test/dummy/config/initializers/secret_token.rb
|
@@ -116,47 +115,38 @@ files:
|
|
116
115
|
- test/dummy/public/images/antispam/1.png
|
117
116
|
- test/dummy/public/images/antispam/2.png
|
118
117
|
- test/dummy/public/images/antispam/3.png
|
118
|
+
- test/dummy/public/images/named/firetruck.png
|
119
|
+
- test/dummy/public/images/named/lime.png
|
120
|
+
- test/dummy/public/images/named/ocean.png
|
119
121
|
- test/dummy/script/rails
|
120
122
|
- test/helper.rb
|
121
|
-
- test/integration/navigation_test.rb
|
122
|
-
- test/support/integration_case.rb
|
123
123
|
- test/test_green_eggs_and_ham.rb
|
124
124
|
- test/test_options.rb
|
125
|
-
|
126
|
-
homepage: ""
|
125
|
+
homepage: https://github.com/citrus/green_eggs_and_spam
|
127
126
|
licenses: []
|
128
|
-
|
129
127
|
post_install_message:
|
130
128
|
rdoc_options: []
|
131
|
-
|
132
|
-
require_paths:
|
129
|
+
require_paths:
|
133
130
|
- lib
|
134
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
132
|
none: false
|
136
|
-
requirements:
|
137
|
-
- -
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
|
141
|
-
- 0
|
142
|
-
version: "0"
|
143
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
138
|
none: false
|
145
|
-
requirements:
|
146
|
-
- -
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
|
149
|
-
segments:
|
150
|
-
- 0
|
151
|
-
version: "0"
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
152
143
|
requirements: []
|
153
|
-
|
154
144
|
rubyforge_project: green_eggs_and_spam
|
155
|
-
rubygems_version: 1.
|
145
|
+
rubygems_version: 1.8.11
|
156
146
|
signing_key:
|
157
147
|
specification_version: 3
|
158
148
|
summary: A simple way to filter spam in your rails forms.
|
159
|
-
test_files:
|
149
|
+
test_files:
|
160
150
|
- test/dummy/Rakefile
|
161
151
|
- test/dummy/app/controllers/application_controller.rb
|
162
152
|
- test/dummy/app/controllers/comments_controller.rb
|
@@ -176,6 +166,7 @@ test_files:
|
|
176
166
|
- test/dummy/config/environments/production.rb
|
177
167
|
- test/dummy/config/environments/test.rb
|
178
168
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
169
|
+
- test/dummy/config/initializers/green_eggs_and_spam.rb
|
179
170
|
- test/dummy/config/initializers/inflections.rb
|
180
171
|
- test/dummy/config/initializers/mime_types.rb
|
181
172
|
- test/dummy/config/initializers/secret_token.rb
|
@@ -191,9 +182,10 @@ test_files:
|
|
191
182
|
- test/dummy/public/images/antispam/1.png
|
192
183
|
- test/dummy/public/images/antispam/2.png
|
193
184
|
- test/dummy/public/images/antispam/3.png
|
185
|
+
- test/dummy/public/images/named/firetruck.png
|
186
|
+
- test/dummy/public/images/named/lime.png
|
187
|
+
- test/dummy/public/images/named/ocean.png
|
194
188
|
- test/dummy/script/rails
|
195
189
|
- test/helper.rb
|
196
|
-
- test/integration/navigation_test.rb
|
197
|
-
- test/support/integration_case.rb
|
198
190
|
- test/test_green_eggs_and_ham.rb
|
199
191
|
- test/test_options.rb
|