antispam 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53c420a7a1e56c8bd54887bb7d9777d2356d2bfbe94c78398c7033277060792f
4
- data.tar.gz: 22513e56c23e8aa75d179dbf896ca950a8a5ef8d5beb4f5e7b97d472f363d9fe
3
+ metadata.gz: a68d75de5897063bea19649fbf62e3e75c56196412003615d22c1bf6d465150e
4
+ data.tar.gz: 5e731f9168becf1eb99e28bcd29b2b2b5d72cd251f6e08bcd2efccecdeb0139b
5
5
  SHA512:
6
- metadata.gz: f6f8bb3c319ef0548dae033a5f1b435b24ba67d8ac2a9b6d062f2c13bb89d9389b0c4e1cb3adf857d5b141835a7076260dee28d6d3989bea0b01fbaa9a76a497
7
- data.tar.gz: 1f466a72702dbc7cc97b7b5fc973d9264fcc9e9c597a242afbb1226b8f3b8270d3113dfe808922654cbc1cf3702451e63ed91d9ee0919127ff810780b3a81b94
6
+ metadata.gz: 6a1395289f3440fc68ff37f25bf33611a1d871bd70524d98e20d5ed1152939e94225eadfbf800ed28edadef06b7e14596cfd5ca7a6ec722a5532c81fb882e6f6
7
+ data.tar.gz: 1d33c4449ef09163e9454a36db0e82df7b5723ad429b9fef17467181394f6a231d4cf654549e86385f5b1bc7d9aacfb69a9b394bea76fa6e0439b2ab5082d36e
@@ -1,3 +1,3 @@
1
1
  module Antispam
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.8'
3
3
  end
data/lib/antispam.rb CHANGED
@@ -7,12 +7,15 @@ require "antispam/spamcheckers/defendium"
7
7
  require "antispam/results"
8
8
 
9
9
  module Antispam
10
- ActiveSupport.on_load(:action_controller) do
11
- Rails.application.config.to_prepare do
12
- unless ApplicationController.method_defined?(:is_admin?)
13
- raise "Antispam Error: ApplicationController must define `is_admin?` method to use Antispam."
10
+ ActiveSupport.on_load(:action_controller_base) do
11
+ # Include Antispam::Tools into the application's ApplicationController
12
+ # Use ::ApplicationController to reference the top-level class
13
+ if defined?(::ApplicationController)
14
+ ::ApplicationController.include Antispam::Tools
15
+ else
16
+ Rails.application.config.to_prepare do
17
+ ::ApplicationController.include Antispam::Tools
14
18
  end
15
- ActionController::Base.include Antispam::Tools
16
19
  end
17
20
  end
18
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antispam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Kopf