antispam 0.2.3 → 0.2.4
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 +4 -4
- data/README.md +12 -0
- data/app/controllers/antispam/challenges_controller.rb +1 -1
- data/lib/antispam/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f4eaa89b86871d012750c675f7a1549c5ec4e3d69335d3373cc483a08614558
|
4
|
+
data.tar.gz: aaee9b79ac1be243b56b4e7a3981d997532a75f7671eec9c525b9939533e08b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e795a599f999f327c876c637956706fe0ddb698acb081c955bf17cfb6cc4e18975e51212793fda0a92cd73c18e3a0180b2f6970aa86dca9e7bc7a9d6a7f158cf
|
7
|
+
data.tar.gz: c6bb8e1332f54717c0b00a12b46b994ff8993db3a84ca58353640a19b54cc61c4eec600896b3f93e1e63e39aecaa7a24962b76a2f45a14aef00e5f0eeb51f20b
|
data/README.md
CHANGED
@@ -100,6 +100,18 @@ generate captcha images.
|
|
100
100
|
sudo apt install libvips-tools
|
101
101
|
```
|
102
102
|
|
103
|
+
You need to add this to your routes.rb
|
104
|
+
```
|
105
|
+
mount Antispam::Engine => "/antispam"
|
106
|
+
```
|
107
|
+
|
108
|
+
Then add to your application controller:
|
109
|
+
```
|
110
|
+
before_action do
|
111
|
+
check_ip_against_database(ip_blacklists: {default: 'your_api_key_here'}, verbose: true)
|
112
|
+
end
|
113
|
+
```
|
114
|
+
|
103
115
|
## Development
|
104
116
|
|
105
117
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -2,7 +2,7 @@ require_dependency "antispam/application_controller"
|
|
2
2
|
|
3
3
|
module Antispam
|
4
4
|
class ChallengesController < ApplicationController
|
5
|
-
before_action :set_challenge, only: [:show, :edit, :update
|
5
|
+
before_action :set_challenge, only: [:show, :edit, :update]
|
6
6
|
|
7
7
|
# GET /challenges/1
|
8
8
|
def show
|
data/lib/antispam/version.rb
CHANGED