racaptcha 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/racaptcha.rb +7 -1
- data/lib/racaptcha/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a80c7408ad417d8f3fea20f1d934334f37de3289fc90165d16f23b3c84715d13
|
4
|
+
data.tar.gz: f1d66f613aee6a35590db8ead09bb92cebe8bb75e44f371c80290eeaf2e3597d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef9ca7b1aa9eef11426535e5c09e3ce64325e5674c691c1e3c2e87d42980c5ec1082262c2cd73c6ae6ba934f3919134709e8921a78de01517e2841cd5e1d3ac
|
7
|
+
data.tar.gz: 22c419b540e631434119e0bc6903f4c564493d4154a7d805c9afa4b20dffb6193b9713fedbfc26e412adc5d0b78b23b7e45e1163638d2d1e2239f1f03966de40
|
data/lib/racaptcha.rb
CHANGED
@@ -2,7 +2,6 @@ require "active_support/all"
|
|
2
2
|
require "racaptcha/racaptcha"
|
3
3
|
require "racaptcha/version"
|
4
4
|
require "racaptcha/configuration"
|
5
|
-
require "racaptcha/cache"
|
6
5
|
require "racaptcha/errors/configuration"
|
7
6
|
|
8
7
|
module RaCaptcha
|
@@ -27,6 +26,13 @@ module RaCaptcha
|
|
27
26
|
config.instance_exec(&block)
|
28
27
|
end
|
29
28
|
|
29
|
+
def cache
|
30
|
+
return @cache if defined? @cache
|
31
|
+
|
32
|
+
@cache = ActiveSupport::Cache.lookup_store(RaCaptcha.config.cache_store)
|
33
|
+
@cache
|
34
|
+
end
|
35
|
+
|
30
36
|
# generate new captcha without cache
|
31
37
|
def generate
|
32
38
|
style = config.style == :colorful ? 1 : 0
|
data/lib/racaptcha/version.rb
CHANGED