simple_captcha2 0.4.2 → 0.4.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/README.md +7 -0
- data/lib/simple_captcha.rb +4 -0
- data/lib/simple_captcha/image.rb +3 -0
- data/lib/simple_captcha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c89e2fec1c40f57893d53697a221bf6ba4a9c3e6
|
4
|
+
data.tar.gz: 0d55c4ba052d020f19877571feac77daaf8c9231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b6168a217a5d62ede49d7ee0f9e9a5d6b43ad3e6be5cac54024ac760164a6a04f2667cee33f29d2e3a459143b344760c7f95e3e5d077af4b25e662371f807ad
|
7
|
+
data.tar.gz: a82a14b079d107788853cdc8caabfa94f218f1d84ba2c7daa88280eccb905af70365750f152924690f3f6bf0fd5368a3683d28ac187f8c9b04facda3e361f867
|
data/README.md
CHANGED
@@ -256,6 +256,13 @@ SimpleCaptcha.setup do |sc|
|
|
256
256
|
end
|
257
257
|
```
|
258
258
|
|
259
|
+
If needed, you can explicitly state the font used for generating the captcha:
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
SimpleCaptcha.setup do |sc|
|
263
|
+
sc.font = "DejaVu-Sans"
|
264
|
+
end
|
265
|
+
```
|
259
266
|
|
260
267
|
### How to change the CSS for SimpleCaptcha DOM elements?
|
261
268
|
|
data/lib/simple_captcha.rb
CHANGED
data/lib/simple_captcha/image.rb
CHANGED
@@ -75,6 +75,9 @@ module SimpleCaptcha #:nodoc
|
|
75
75
|
params << "-pointsize 22"
|
76
76
|
params << "-implode #{ImageHelpers.implode}"
|
77
77
|
params << "label:#{text}"
|
78
|
+
unless SimpleCaptcha.font.empty?
|
79
|
+
params << "-font #{SimpleCaptcha.font}"
|
80
|
+
end
|
78
81
|
if SimpleCaptcha.noise and SimpleCaptcha.noise > 0
|
79
82
|
params << "-evaluate Uniform-noise #{SimpleCaptcha.noise}"
|
80
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_captcha2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavlo Galeta
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-02-
|
14
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|