rucaptcha 2.3.2 → 2.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a8c1de1ba0dfa866fb32ad0a56fe9a07a74986f6d849620b456b94d43031469
4
- data.tar.gz: 5089e1997cf65943e217b4a9926da4788d463f1eda3406c3b092039fe93697d1
3
+ metadata.gz: dedcdb1109660abdd7154eba8afa5aa4b22a1ce0093b61d018b30de0c7c00367
4
+ data.tar.gz: af218e451a34fd7a11a934c2a6d84f62a8c03342d87c9e7e4dc1534c79a2e07d
5
5
  SHA512:
6
- metadata.gz: d83740e79db780c3d2c08ebe48da44795e60b946810c5afd9e0943d1889ab8dff7619f0fdbf4125293e688e9941fb1bf61c02b49e25d55927ce528e25843044b
7
- data.tar.gz: 87e905b2138f4fe1f1a11375de13e7901801364b4551403953768e8e8ca0d48351cc628fa59d4deaedb6695d227fcf07bb0fd44aa1b2d3963463d1af4cd89fb1
6
+ metadata.gz: d29ad3b367a5dd326a9a3eb390a11b3dbcaf557d2520f68b7a244df3029e13e4ae878ea097ccde98ebcf3e7990402d679fde3082c3bf34b9d266d39f228d9174
7
+ data.tar.gz: 0b10c69dbe3f77210f4fa450f3fc9c86721d26a6656980660de3051193e9a8617c5d6b38d747fa35196bf768ecbb24db37dc5fd369cd6d364ff9f853710c7a76
@@ -1,7 +1,13 @@
1
+ 2.4.0
2
+ -------
3
+
4
+ - Add skip_cache_store_check configuration. (#63)
5
+ - Fix for generate captcha with relative path, not url. (#58)
6
+
1
7
  2.3.2
2
8
  -------
3
9
 
4
- - Change Yellow and Green colors to Pink and Deep Purple to pass WCAG 2.0's contrast test
10
+ - Change Yellow and Green colors to Pink and Deep Purple to pass WCAG 2.0's contrast test. (#70)
5
11
 
6
12
  2.3.1
7
13
  -------
data/README.md CHANGED
@@ -41,6 +41,8 @@ RuCaptcha.configure do
41
41
   # 默认:会从 Rails 配置的 cache_store 里面读取相同的配置信息,并尝试用可以运行的方式,用于存储验证码字符
42
42
   # 但如果是 [:null_store, :memory_store, :file_store] 之类的,你可以通过下面的配置项单独给 RuCaptcha 配置 cache_store
43
43
   self.cache_store = :mem_cache_store
44
+ # 如果想要 disable cache_store 的 warning,就设置为 true,default false
45
+ # self.skip_cache_store_check = true
44
46
  # Chars length, default: 5, allows: [3 - 7]
45
47
  # self.length = 5
46
48
  # enable/disable Strikethrough.
@@ -20,6 +20,7 @@ module RuCaptcha
20
20
  @config.strikethrough = true
21
21
  @config.outline = false
22
22
  @config.expires_in = 2.minutes
23
+ @config.skip_cache_store_check = false
23
24
 
24
25
  if Rails.application
25
26
  @config.cache_store = Rails.application.config.cache_store
@@ -13,5 +13,7 @@ module RuCaptcha
13
13
  attr_accessor :strikethrough
14
14
  # outline style for hard mode, default: false
15
15
  attr_accessor :outline
16
+ # skip_cache_store_check, default: false
17
+ attr_accessor :skip_cache_store_check
16
18
  end
17
19
  end
@@ -9,7 +9,7 @@ module RuCaptcha
9
9
  mount RuCaptcha::Engine => '/rucaptcha'
10
10
  end
11
11
 
12
- RuCaptcha.check_cache_store!
12
+ RuCaptcha.check_cache_store! unless RuCaptcha.config.skip_cache_store_check
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module RuCaptcha
2
- VERSION = '2.3.2'
2
+ VERSION = '2.4.0'
3
3
  end
@@ -13,7 +13,7 @@ module RuCaptcha
13
13
 
14
14
  def rucaptcha_image_tag(opts = {})
15
15
  opts[:class] = opts[:class] || 'rucaptcha-image'
16
- image_tag(ru_captcha.root_url, opts)
16
+ image_tag(ru_captcha.root_path, opts)
17
17
  end
18
18
  end
19
19
  end
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: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2019-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.7.8
87
+ rubygems_version: 3.0.1
89
88
  signing_key:
90
89
  specification_version: 4
91
90
  summary: This is a Captcha gem for Rails Applications. It drawing captcha image with