turnstiled 0.1.6 → 0.1.14

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: a32a09ad88a97061e38c24454aa58dc406e6c382b86292a1b4b720258d1863d9
4
- data.tar.gz: aec6006e4170d14db36aa5d44a87845731b77bef5b042f822ef7cc529ebec6b7
3
+ metadata.gz: 5904d6f7f613e77aa764ec719c1f30cdbd958c1442877d60a85a1fa50dc9538e
4
+ data.tar.gz: eeef751a7d14ff18e81b1f1660690584eea34948d0c122038c3f715a3c37eabd
5
5
  SHA512:
6
- metadata.gz: 398e12cac0a7abbb4134e43e440111344f20e620b66ca84bbe7bd2d95b760c302aa12ebb096f73f41e9d6e3580d7bc3fabb0eef9b38de60e641807ba2564340c
7
- data.tar.gz: abf94b64ff8558c7e89cc0be09ab5f4a51183f8adcc7eb2c497bfcba3a87ed937e609a734b5274a33791eda04aaa083a1c573c2afe1cc4608062e77be0fc77f3
6
+ metadata.gz: 8fd45d8cba7c33148081ff18e776f59729ad587f64092313a74837c60bc8260cfdfcc3783bc1d8cff6368ebecdadbb44df541bc942a1ba9f048f2b8f8cd951ba
7
+ data.tar.gz: be9140d5a590c04461b079574cef13734523df9c4d35be47e2ff6507f02fbdfac0c6ecfbf6c080a030cd5b8781fcf4227354958a2c1c7935eef9f5aab5f1fb96
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/Rakefile CHANGED
@@ -1,3 +1,7 @@
1
1
  require "bundler/setup"
2
2
 
3
3
  require "bundler/gem_tasks"
4
+
5
+ task :version do
6
+ puts Turnstiled::VERSION
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Turnstiled
2
- VERSION = File.read(File.expand_path("../../../VERSION", __FILE__)).strip
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
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.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Displayful
8
8
  - Henrik Hauge Bjørnskov
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2025-02-25 00:00:00.000000000 Z
11
+ date: 2025-03-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
@@ -39,7 +38,6 @@ dependencies:
39
38
  - - ">="
40
39
  - !ruby/object:Gem::Version
41
40
  version: '0'
42
- description:
43
41
  email:
44
42
  - hb@displayful.co
45
43
  executables: []
@@ -49,7 +47,6 @@ files:
49
47
  - LICENSE
50
48
  - README.md
51
49
  - Rakefile
52
- - VERSION
53
50
  - app/assets/config/turnstiled/manifest.js
54
51
  - app/javascript/turnstiled/controllers/turnstile_controller.js
55
52
  - app/javascript/turnstiled/mock_turnstile_widget.js
@@ -64,7 +61,9 @@ licenses:
64
61
  - MIT
65
62
  metadata:
66
63
  allowed_push_host: https://rubygems.org
67
- post_install_message:
64
+ source_code_uri: https://github.com/displayful/turnstiled
65
+ homepage_uri: https://github.com/displayful/turnstiled
66
+ bug_tracker_uri: https://github.com/displayful/turnstiled/issues
68
67
  rdoc_options: []
69
68
  require_paths:
70
69
  - lib
@@ -72,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - ">="
74
73
  - !ruby/object:Gem::Version
75
- version: '0'
74
+ version: 3.3.0
76
75
  required_rubygems_version: !ruby/object:Gem::Requirement
77
76
  requirements:
78
77
  - - ">="
79
78
  - !ruby/object:Gem::Version
80
79
  version: '0'
81
80
  requirements: []
82
- rubygems_version: 3.5.22
83
- signing_key:
81
+ rubygems_version: 3.6.2
84
82
  specification_version: 4
85
83
  summary: Cloudflare Turnstile for Rails
86
84
  test_files: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.6