spamtrap 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spamtrap/controller.rb +2 -1
- data/lib/spamtrap/version.rb +1 -1
- metadata +4 -4
data/lib/spamtrap/controller.rb
CHANGED
@@ -6,8 +6,9 @@ module Spamtrap
|
|
6
6
|
|
7
7
|
module ActsAsMethods
|
8
8
|
def spamtrap(actions, parameter='spamtrap')
|
9
|
+
actions = [actions] unless actions.is_a?(Array)
|
9
10
|
raise 'Spamtrap must have actions defined.' if actions.empty?
|
10
|
-
before_filter(:only => actions
|
11
|
+
before_filter(:only => actions) do |controller|
|
11
12
|
controller.instance_eval do
|
12
13
|
if params[parameter.to_s].present?
|
13
14
|
Rails.logger.warn "Spamtrap triggered by #{request.remote_ip}."
|
data/lib/spamtrap/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spamtrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cedric Howe
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-26 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|