turnstiled 0.1.6 → 0.1.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -6
  3. data/VERSION +1 -1
  4. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a32a09ad88a97061e38c24454aa58dc406e6c382b86292a1b4b720258d1863d9
4
- data.tar.gz: aec6006e4170d14db36aa5d44a87845731b77bef5b042f822ef7cc529ebec6b7
3
+ metadata.gz: f5be2592ba97ffc2a5b8139bf4c8c77115e63b6d84a13b3750839b70343a80d9
4
+ data.tar.gz: 0bd77e79bdaf6209dfe66420ccbcb31a647c760fdd4697b893744008561f07ae
5
5
  SHA512:
6
- metadata.gz: 398e12cac0a7abbb4134e43e440111344f20e620b66ca84bbe7bd2d95b760c302aa12ebb096f73f41e9d6e3580d7bc3fabb0eef9b38de60e641807ba2564340c
7
- data.tar.gz: abf94b64ff8558c7e89cc0be09ab5f4a51183f8adcc7eb2c497bfcba3a87ed937e609a734b5274a33791eda04aaa083a1c573c2afe1cc4608062e77be0fc77f3
6
+ metadata.gz: d95688510363dd08b5d5d40e7939831c3d348956bf574f0502a4dcaabfe25c07efbbd6c294c87f40627d9b925dfb93f34d06009295edeec2645be8425c08999f
7
+ data.tar.gz: e5c2d82d9c0cb713e5cb452658da51a05d3b89168f0ec8676f01d2c8675c35d0fd6a447af945d97e2578a38e6728474a2b1dde7da4d741549aa7fa5c6b85d822
data/README.md CHANGED
@@ -27,10 +27,8 @@ $ bundle
27
27
  Create a file called `config/initializers/turnstiled.rb` and add the following:
28
28
 
29
29
  ``` ruby
30
- Turnstiled.configure do |config|
31
- config.api_key = "YOUR_API_KEY"
32
- config.api_secret = "YOUR_API_SECRET"
33
- end
30
+ Turnstiled.site_key = "YOUR SITE KEY"
31
+ Turnstiled.site_secret = "YOUR SITE SECRET"
34
32
  ```
35
33
 
36
34
  In your layout, add the widget to the head of the document:
@@ -43,12 +41,20 @@ In test and development, it will include a mock widget that fires the callback a
43
41
 
44
42
  The mock widget will send the `cf-turnstile-response` parameter with a value of `1`.
45
43
 
44
+ Within a form make sure to render the widget:
45
+
46
+ ``` erb
47
+ <%= form_with model: @some_model do %>
48
+ <%= turnstile_tag %>
49
+ <% end %>
50
+ ```
51
+
46
52
  In your controller, you also need to verify the response with the following:
47
53
 
48
54
  ``` ruby
49
55
  class PostsController < ApplicationController
50
- verify_turnstile_requwst only: %i[create]
56
+ verify_turnstile_request only: %i[create]
51
57
  end
52
58
  ```
53
59
 
54
- The `verify_turnstile_requwst` takes the same options as a `before_action` method call.
60
+ The `verify_turnstile_request` takes the same options as a `before_action` method call.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turnstiled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Displayful
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-02-25 00:00:00.000000000 Z
12
+ date: 2025-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -64,6 +64,9 @@ licenses:
64
64
  - MIT
65
65
  metadata:
66
66
  allowed_push_host: https://rubygems.org
67
+ source_code_uri: https://github.com/displayful/turnstiled
68
+ homepage_uri: https://github.com/displayful/turnstiled
69
+ bug_tracker_uri: https://github.com/displayful/turnstiled/issues
67
70
  post_install_message:
68
71
  rdoc_options: []
69
72
  require_paths: