antispam 0.2.4 → 0.2.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f4eaa89b86871d012750c675f7a1549c5ec4e3d69335d3373cc483a08614558
4
- data.tar.gz: aaee9b79ac1be243b56b4e7a3981d997532a75f7671eec9c525b9939533e08b5
3
+ metadata.gz: 53c420a7a1e56c8bd54887bb7d9777d2356d2bfbe94c78398c7033277060792f
4
+ data.tar.gz: 22513e56c23e8aa75d179dbf896ca950a8a5ef8d5beb4f5e7b97d472f363d9fe
5
5
  SHA512:
6
- metadata.gz: e795a599f999f327c876c637956706fe0ddb698acb081c955bf17cfb6cc4e18975e51212793fda0a92cd73c18e3a0180b2f6970aa86dca9e7bc7a9d6a7f158cf
7
- data.tar.gz: c6bb8e1332f54717c0b00a12b46b994ff8993db3a84ca58353640a19b54cc61c4eec600896b3f93e1e63e39aecaa7a24962b76a2f45a14aef00e5f0eeb51f20b
6
+ metadata.gz: f6f8bb3c319ef0548dae033a5f1b435b24ba67d8ac2a9b6d062f2c13bb89d9389b0c4e1cb3adf857d5b141835a7076260dee28d6d3989bea0b01fbaa9a76a497
7
+ data.tar.gz: 1f466a72702dbc7cc97b7b5fc973d9264fcc9e9c597a242afbb1226b8f3b8270d3113dfe808922654cbc1cf3702451e63ed91d9ee0919127ff810780b3a81b94
data/README.md CHANGED
@@ -108,7 +108,7 @@ You need to add this to your routes.rb
108
108
  Then add to your application controller:
109
109
  ```
110
110
  before_action do
111
- check_ip_against_database(ip_blacklists: {default: 'your_api_key_here'}, verbose: true)
111
+ check_ip_against_database({ip_blacklists: {default: 'your_api_key_here'}, verbose: true})
112
112
  end
113
113
  ```
114
114
 
@@ -4,6 +4,7 @@
4
4
  <title>Antispam</title>
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
8
  <style>
8
9
  .row { width:100%;display: flex;}
9
10
  .cx { width: 50%; }
@@ -1,3 +1,3 @@
1
1
  module Antispam
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.6'
3
3
  end
data/lib/antispam.rb CHANGED
@@ -8,14 +8,11 @@ require "antispam/results"
8
8
 
9
9
  module Antispam
10
10
  ActiveSupport.on_load(:action_controller) do
11
- # Ensure ApplicationController has is_admin? defined
12
- unless ApplicationController.method_defined?(:is_admin?)
13
- raise "Antispam Error: ApplicationController must define `is_admin?` method to use Antispam."
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."
14
+ end
15
+ ActionController::Base.include Antispam::Tools
14
16
  end
15
- # self refers to ActionController::Base here
16
- # This way is removed because below may be more compatible.
17
- # self.include Antispam::Tools
18
- # Would the below be a better (clearer? more compatible?) way to do this?
19
- ActionController::Base.send(:include, Antispam::Tools)
20
17
  end
21
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antispam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Kopf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails