rucaptcha 3.0.0.beta2 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/rucaptcha.en.yml +3 -0
- data/config/locales/rucaptcha.pt-BR.yml +3 -0
- data/config/locales/rucaptcha.zh-CN.yml +3 -0
- data/config/locales/rucaptcha.zh-TW.yml +3 -0
- data/ext/rucaptcha/fonts/FuzzyBubbles-Regular.ttf +0 -0
- data/ext/rucaptcha/fonts/Handlee-Regular.ttf +0 -0
- data/ext/rucaptcha/src/captcha.rs +4 -4
- data/lib/rucaptcha/version.rb +1 -1
- data/lib/rucaptcha.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb32b93e6a58016c5fb75bc0f74ef9db13f3642748eda7962739680612725bf3
|
4
|
+
data.tar.gz: 39fbbece91c7e0ae082d6f2c25c73cecc083366e6881502483b978e75883eddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e46623dd14ba547ac2b569b5ad6e9debfb20ccc5275b7c3860cd4de391c0bc221edfae10efbf5b946fb40467b9a55a66a311876da5dba6941ad94162fb5e79e
|
7
|
+
data.tar.gz: e3c22ba0b553b491908b88b898d84c4764f7fa8fbb8b994454e1883f91e185032ba3acc1076791831bcaf46574914fbd68d1cbc5653338b7cf64a6f71b54ff69
|
Binary file
|
Binary file
|
@@ -105,8 +105,8 @@ fn cyclic_write_character(res: &[String], image: &mut ImageBuffer<Rgb<u8>, Vec<u
|
|
105
105
|
let font = get_font();
|
106
106
|
let line_color = colors[rand_num(colors.len() - 1)];
|
107
107
|
|
108
|
-
for j in 0..(rand_num(
|
109
|
-
let offset = j * (rand_num(
|
108
|
+
for j in 0..(rand_num(3) + 1) as i32 {
|
109
|
+
let offset = j * (rand_num(2) as i32 + 1);
|
110
110
|
draw_text_mut(
|
111
111
|
image,
|
112
112
|
color,
|
@@ -182,8 +182,8 @@ impl CaptchaBuilder {
|
|
182
182
|
pub fn new() -> Self {
|
183
183
|
CaptchaBuilder {
|
184
184
|
length: 4,
|
185
|
-
width:
|
186
|
-
height:
|
185
|
+
width: 300,
|
186
|
+
height: 100,
|
187
187
|
complexity: 5,
|
188
188
|
}
|
189
189
|
}
|
data/lib/rucaptcha/version.rb
CHANGED
data/lib/rucaptcha.rb
CHANGED
@@ -48,7 +48,7 @@ module RuCaptcha
|
|
48
48
|
raise RuCaptcha::Errors::Configuration, "length config error, value must in 3..7" unless length.in?(3..7)
|
49
49
|
|
50
50
|
result = RuCaptchaCore.create(length, config.difficulty || 5)
|
51
|
-
[result[0], result[1].pack("c*")]
|
51
|
+
[result[0].downcase, result[1].pack("c*")]
|
52
52
|
end
|
53
53
|
|
54
54
|
def check_cache_store!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rucaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -48,10 +48,16 @@ files:
|
|
48
48
|
- README.md
|
49
49
|
- Rakefile
|
50
50
|
- app/controllers/ru_captcha/captcha_controller.rb
|
51
|
+
- config/locales/rucaptcha.en.yml
|
52
|
+
- config/locales/rucaptcha.pt-BR.yml
|
53
|
+
- config/locales/rucaptcha.zh-CN.yml
|
54
|
+
- config/locales/rucaptcha.zh-TW.yml
|
51
55
|
- config/routes.rb
|
52
56
|
- ext/rucaptcha/Cargo.lock
|
53
57
|
- ext/rucaptcha/Cargo.toml
|
54
58
|
- ext/rucaptcha/extconf.rb
|
59
|
+
- ext/rucaptcha/fonts/FuzzyBubbles-Regular.ttf
|
60
|
+
- ext/rucaptcha/fonts/Handlee-Regular.ttf
|
55
61
|
- ext/rucaptcha/src/captcha.rs
|
56
62
|
- ext/rucaptcha/src/lib.rs
|
57
63
|
- lib/rucaptcha.rb
|
@@ -77,11 +83,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
83
|
version: 2.7.0
|
78
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
|
-
- - "
|
86
|
+
- - ">="
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
88
|
+
version: '0'
|
83
89
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.4.0.dev
|
85
91
|
signing_key:
|
86
92
|
specification_version: 4
|
87
93
|
summary: Captcha Gem for Rails, which generates captcha image by Rust.
|