simple_captcha_guard 0.1.2 → 0.1.3
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/lib/simple_captcha_guard/captcha.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aad0b318a7f552c812ac752888c14e3f925af9e32899788e3e97d0b9d56b166
|
4
|
+
data.tar.gz: 4efd1ed97444cdfb8d34a13c408232d2743fd9ba62f74c9cdcdb9a164f9f4c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6050749606272ba172366261f40412b386e5024f141da8d0c88739809caf93d22ac661cc2c841533da24d71586a85ed45d79a8f60a2d30412c9913da54d528a3
|
7
|
+
data.tar.gz: 0d5cc83fe8027660298f4c2ed7f8fbceb5abb09bd6fde7257fa9b843184007b4c5d91dad48eeea855bcefff71ecd413ab5a98b353af20f2bc4575b8a42ab98f6
|
@@ -22,15 +22,15 @@ module SimpleCaptchaGuard
|
|
22
22
|
convert.draw "text 0,0 '#{@code}'"
|
23
23
|
color_map = { 1 => "green", 2 => "red", 3 => "blue", 4 => "orange"}
|
24
24
|
# Add random lines (5 lines)
|
25
|
-
stroke_count = rand(
|
25
|
+
stroke_count = rand(6..7)
|
26
26
|
stroke_count.times do
|
27
27
|
convert.stroke "#{color_map[rand(1..4)]}" # line color
|
28
28
|
convert.strokewidth "#{rand(2)}" # line thickness
|
29
|
-
x1, y1 = rand(40), rand(
|
30
|
-
x2, y2 = rand(65..120), rand(
|
29
|
+
x1, y1 = rand(40), rand(38)
|
30
|
+
x2, y2 = rand(65..120), rand(38)
|
31
31
|
convert.draw "line #{x1},#{y1} #{x2},#{y2}"
|
32
32
|
end
|
33
|
-
convert.wave "
|
33
|
+
convert.wave "3x55"
|
34
34
|
convert << "png:-" # Output to stdout (returns binary blob)
|
35
35
|
|
36
36
|
end.to_blob
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_captcha_guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmed Mahir Tazwar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -34,7 +34,7 @@ files:
|
|
34
34
|
- lib/simple_captcha_guard/captcha.rb
|
35
35
|
- lib/simple_captcha_guard/captcha_helper.rb
|
36
36
|
- lib/simple_captcha_guard/railtie.rb
|
37
|
-
homepage: https://
|
37
|
+
homepage: https://medium.com/@tazwarutshas/simplecaptchaguard-add-captcha-protection-to-your-rails-forms-in-seconds-785413d3b807
|
38
38
|
licenses:
|
39
39
|
- MIT
|
40
40
|
metadata: {}
|