turnstile-captcha 0.1.3 → 0.1.5

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: 90f0930df0270dc3176b2f4ffbb9313b67b6ec5e754e8dcaede32eb423d8b1d3
4
- data.tar.gz: 588984312cb99edfe8a1ce598b97a6d8bf0595ba22e21218c41c5d1578d9da43
3
+ metadata.gz: 0f403d0270ccb1c42e38525450c74948c7393b1244931b957ba66c647d186888
4
+ data.tar.gz: 2b8910a7fe0e00b7194e913115a001647c7bdc66c35b8a23a4810ef3540bbe26
5
5
  SHA512:
6
- metadata.gz: 3329bec1812bfa6716bc06f49c4e7ef5d470bf1b07d8e79853d468353a28a6d53f86203e092720c481e76e6f4be1d3efa930b6f3a87ea080bbd3454a53391c4b
7
- data.tar.gz: 8e491f31f09d8f18f03cc4f53b5a42cb7b6b71e2850942835adcbbc297af8794dc5155fc4db42c8b7b3edaf0dfdbcac8cb099daa05e0371687c85954a524a4a5
6
+ metadata.gz: d2e9bd600158141d79a674fff364e96ad57a86bd9ad448cf6ea9ad7a2a7e70dbf419ab6c935c45cee544eff4071e4f02453344ddcb2d580d6b1c1d59fcd2afd5
7
+ data.tar.gz: 564a5cbe5ad4cd16efab56f7e5e07e4f9d77dbc70ab76bce16c9f4dd44433c7b6025f25038fa631fb40bf66b5b648c570c8d3acf811b4ab8905c6f37463a58e0
@@ -37,6 +37,7 @@ class Turnstile::Verification
37
37
  @client ||= Faraday.new do |conn|
38
38
  conn.request :url_encoded
39
39
  conn.response :json
40
+ conn.adapter Faraday.default_adapter
40
41
  end
41
42
  end
42
43
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turnstile
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -2,14 +2,16 @@
2
2
 
3
3
  module Turnstile::ViewHelpers
4
4
  def captcha_tags(options = {})
5
+ javascript_tag_options = options.delete(:javascript_tag) || {}
6
+
5
7
  [
6
- captcha_javascript_tag,
8
+ captcha_javascript_tag(javascript_tag_options),
7
9
  captcha_placeholder_tag(options)
8
10
  ].join.html_safe
9
11
  end
10
12
 
11
- def captcha_javascript_tag
12
- javascript_include_tag Turnstile.configuration.script_url, async: true, defer: true
13
+ def captcha_javascript_tag(options = {})
14
+ javascript_include_tag Turnstile.configuration.script_url, **options.reverse_merge(async: true, defer: true)
13
15
  end
14
16
 
15
17
  def captcha_placeholder_tag(options = {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turnstile-captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattias Pfeiffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-01 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock