rails_qaptcha 0.0.3 → 0.0.3.1
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.
- data/README.markdown +28 -24
- data/lib/generators/rails_qaptcha/install_generator.rb +1 -1
- data/lib/rails_qaptcha/version.rb +1 -1
- metadata +3 -2
data/README.markdown
CHANGED
@@ -7,27 +7,31 @@ Support Env:
|
|
7
7
|
------------
|
8
8
|
Rails3.0.8+/Ruby1.8.7+
|
9
9
|
|
10
|
-
Usage:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
10
|
+
##Usage:
|
11
|
+
|
12
|
+
In Gemfile:
|
13
|
+
|
14
|
+
gem 'rails_qaptcha'
|
15
|
+
|
16
|
+
Then:
|
17
|
+
|
18
|
+
rails g rails_qaptcha:install
|
19
|
+
|
20
|
+
In layout:
|
21
|
+
|
22
|
+
= stylesheet_link_tag :qaptcha
|
23
|
+
= javascript_include_tag :qaptcha
|
24
|
+
|
25
|
+
In your haml page place the following div:
|
26
|
+
|
27
|
+
#QapTcha
|
28
|
+
|
29
|
+
In your application.js:
|
30
|
+
|
31
|
+
$(document).ready(function(){
|
32
|
+
$('#QapTcha').QapTcha({autoRevert:true});
|
33
|
+
// or
|
34
|
+
$('.QapTcha').QapTcha({autoRevert:true});
|
35
|
+
});
|
36
|
+
|
37
|
+
##If you want to control it in server side, you need to judge session[:iQapTcha]##
|
@@ -11,7 +11,7 @@ module RailsQaptcha
|
|
11
11
|
|
12
12
|
source_root File.expand_path('../media', __FILE__)
|
13
13
|
desc "Copies media files to main project"
|
14
|
-
def
|
14
|
+
def copy_media_files
|
15
15
|
copy_file "../media/images/bg_QapTcha.png", "public/stylesheets/image/qaptcha/bg_QapTcha.png"
|
16
16
|
copy_file "../media/images/sprites.png", "public/stylesheets/image/qaptcha/sprites.png"
|
17
17
|
copy_file "../media/javascripts/jquery-ui.js", "public/javascripts/qaptcha/jquery-ui.js"
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_qaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 65
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 3
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.0.3.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- AlexZhang
|