rucaptcha 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccd765f9ebc13571f084bf1837a5ac6f106343df
4
- data.tar.gz: 1322b0e7d63a098c2a62bf14f75ee8eadad623fe
3
+ metadata.gz: 712ce2bac91dc2b4f87fceb7bfd7a5766e585b20
4
+ data.tar.gz: 00e1a973557977e5fc5cbf419d1c94e4acedf62c
5
5
  SHA512:
6
- metadata.gz: 78516faa943ed475cd405ae69987a6ae113e9d4e0bcc8ca3271991c89a10501324a59c28fe89ab2eb2e04ea4b6908cb06119f87bc4ade5e264f25962777cab44
7
- data.tar.gz: 4e6d4e20380512ba8c195070cb0757dc37ff24788e7d1a46e42aadc9e91bc9ae9a86728d70d17a7563f2108e59608ad87c6b1135a0fefdfbac2728e8dc083d03
6
+ metadata.gz: 75432af6e4122fe48247859a54223884ae772f98b178892d31b9c3653ad6ef7873a266c92864a50022de4dbfea8c5c164cbb8c8885ee03090b5a35d0764fc911
7
+ data.tar.gz: c0766f05b40f9718a7b27d8e01d4185ee7e5f267278a1cff9838beeb7e76047d2b4dbb672bc2068fda5d44416e8d3ee0635cd500a3f18200d6529b66be861684
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.3
2
+ -----
3
+
4
+ - `zh-TW` translate file fixed.
5
+ - Use xxx_url to fix bad captcha URL for `config.action_controller.asset_host` enabled case.
6
+
1
7
  0.1.2
2
8
  -----
3
9
 
data/README.md CHANGED
@@ -1,16 +1,24 @@
1
1
  # RuCaptcha
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/rucaptcha.svg)](https://badge.fury.io/rb/rucaptcha)
3
4
 
4
- This is a Captcha gem for Rails Application. It run ImageMagick command to draw Captcha image.
5
+ This is a Captcha gem for Rails Applications. It runs an ImageMagick command to draw Captcha image - so it has NO performance issues or memory leak issues.
5
6
 
6
- So it's NO performance issue, and memory leak issue.
7
+ **There is NO: RMagick**
7
8
 
8
9
  Idea by: https://ruby-china.org/topics/20558#reply4
9
10
 
11
+ [中文介绍和使用说明](https://ruby-china.org/topics/27832)
12
+
10
13
  ### Requirements
11
14
 
12
15
  - ImageMagick
13
16
 
17
+ ### Example
18
+
19
+ ![simple4](https://cloud.githubusercontent.com/assets/5518/10726106/9442b1fe-7c0b-11e5-8c06-f88fce5e7a58.png) ![simple3](https://cloud.githubusercontent.com/assets/5518/10726119/a844dfce-7c0b-11e5-99c3-a818f3ef3dd2.png)
20
+
21
+
14
22
  ### Usage
15
23
 
16
24
  Put rucaptcha in your `Gemfile`:
@@ -60,3 +68,19 @@ View `app/views/account/new.html.erb`
60
68
  </form>
61
69
  ```
62
70
 
71
+ ## Test skip captcha validation
72
+
73
+ ```rb
74
+ describe 'sign up and login', type: :feature do
75
+ before do
76
+ allow_any_instance_of(ActionController::Base).to receive(:verify_rucaptcha?).and_return(true)
77
+ end
78
+
79
+ it { ... }
80
+ end
81
+ ```
82
+
83
+ ## TODO
84
+
85
+ - Use [rtesseract](https://github.com/dannnylo/rtesseract) to test OCR.
86
+
@@ -1,3 +1,3 @@
1
- 'zh-CN':
1
+ 'zh-TW':
2
2
  rucaptcha:
3
3
  invalid: "验证码不正确"
@@ -1,4 +1,3 @@
1
1
  module RuCaptcha
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
4
-
@@ -7,7 +7,7 @@ module RuCaptcha
7
7
 
8
8
  def rucaptcha_image_tag(opts = {})
9
9
  opts[:class] = opts[:class] || 'rucaptcha-image'
10
- image_tag(ru_captcha.root_path, opts)
10
+ image_tag(ru_captcha.root_url, opts)
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rucaptcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee