From 2fff66676239e5626a6a0e7b447738e345efe65d Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Wed, 6 Sep 2023 12:57:51 +0100 Subject: [PATCH 1/2] Update configuration.rb Rename regular to normal --- lib/rails_cloudflare_turnstile/configuration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rails_cloudflare_turnstile/configuration.rb b/lib/rails_cloudflare_turnstile/configuration.rb index b7c1ac0..bbaf1c3 100644 --- a/lib/rails_cloudflare_turnstile/configuration.rb +++ b/lib/rails_cloudflare_turnstile/configuration.rb @@ -16,7 +16,7 @@ class Configuration # Timeout for operations with Cloudflare attr_accessor :timeout - # size for the widget (:regular or :compact) + # size for the widget (:normal or :compact) attr_accessor :size # theme for the widget (:auto, :light, or :dark) @@ -33,7 +33,7 @@ def initialize @enabled = nil @mock_enabled = nil @timeout = 5.0 - @size = :regular + @size = :normal @theme = :auto @validation_url = "https://challenges.cloudflare.com/turnstile/v0/siteverify" end @@ -42,7 +42,7 @@ def validate! raise "Must set site key" if @site_key.nil? raise "Must set secret key" if @secret_key.nil? @size = @size.to_sym - raise "Size must be one of ':regular' or ':compact'" unless [:regular, :compact].include? @size + raise "Size must be one of ':normal' or ':compact'" unless [:normal, :compact].include? @size raise "Theme must be one of :auto, :light, or :dark" unless [:auto, :light, :dark].include? @theme end From 7708c49b20ff2eac6a4428dd8a86a33542554705 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Wed, 6 Sep 2023 13:16:55 +0100 Subject: [PATCH 2/2] rename regular to normal --- spec/rails_cloudflare_turnstile/view_helpers_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_cloudflare_turnstile/view_helpers_spec.rb b/spec/rails_cloudflare_turnstile/view_helpers_spec.rb index 7752cbd..582ed6a 100644 --- a/spec/rails_cloudflare_turnstile/view_helpers_spec.rb +++ b/spec/rails_cloudflare_turnstile/view_helpers_spec.rb @@ -60,7 +60,7 @@ def image_tag(name) describe "#cloudflare_turnstile" do it do - expect(subject.cloudflare_turnstile(action: "an-action")).to eq "
" + expect(subject.cloudflare_turnstile(action: "an-action")).to eq "
" end end end