captchme 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -7
  3. data/lib/captchme/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb8348471ef08134b464f7e71eb8237a672fcc44
4
- data.tar.gz: f850e0b383882b7bed156c7e52fdc5b8a88cb5a6
3
+ metadata.gz: a7d4f1d61e5df18d80ddb8bf8ea82cf1512a0d69
4
+ data.tar.gz: 30a82692c02db2d09099fefb2fd65ef021534216
5
5
  SHA512:
6
- metadata.gz: 0b14f81f09d9bb18ba749b8644d00f0376531be58204229c042ea7f1c97f94c4bdc6de49fb03269c238490eb543a9cba376fbec91a96920a9dc217ffa0573518
7
- data.tar.gz: 07642fcca16d4e9dbcf3daef822d5d08edc129632490c2d89d20434ea4a25283c9c303bd3d2c64860c28d7cb0371444aa87001511378b79296862debe3450f5b
6
+ metadata.gz: 60bb77f12ce29ed69e5ac344bd415c28fd0efc593061a818878277d95a1425439357c4702dfadee52dc337d732f90873d9b759a0cbdb4e948e7647797e818ac6
7
+ data.tar.gz: 2d344f22411ac80c5b7643e640cbd05d1699887d9cdbc9708628faf499d7b68520ed481985ceae9007167998eb4fddb195ca9d95badb4059cca3f5d791197ae3
data/README.md CHANGED
@@ -1,15 +1,12 @@
1
1
  # Rails::Captchme
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rails/captchme`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
3
 
7
4
  ## Installation
8
5
 
9
6
  Add this line to your application's Gemfile:
10
7
 
11
8
  ```ruby
12
- gem 'rails-captchme'
9
+ gem 'captchme'
13
10
  ```
14
11
 
15
12
  And then execute:
@@ -18,11 +15,33 @@ And then execute:
18
15
 
19
16
  Or install it yourself as:
20
17
 
21
- $ gem install rails-captchme
18
+ $ gem install captchme
22
19
 
23
20
  ## Usage
24
21
 
25
- TODO: Write usage instructions here
22
+ CONTROLLER
23
+
24
+ After a POST action, in your controller use:
25
+ ```ruby
26
+ captchme = CAPTCHME::Captchme.new(YOUR_PRIVATE_KEY, params, request.remote_ip)
27
+
28
+ # send POST request to captchme server
29
+ captchme.request
30
+
31
+ # return true if captchme is OK
32
+ captchme.is_valid?
33
+ ```
34
+
35
+ VIEWS
36
+ In your form
37
+ (slim)
38
+ ```ruby
39
+ = javascript_include_tag 'http://api.captchme.net/api/script?key=' + YOUR_PUBLIC_KEY
40
+ ```
41
+ (erb)
42
+ ```ruby
43
+ <%= javascript_include_tag 'http://api.captchme.net/api/script?key=' + YOUR_PUBLIC_KEY %>
44
+ ```
26
45
 
27
46
  ## Development
28
47
 
@@ -32,7 +51,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
51
 
33
52
  ## Contributing
34
53
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails-captchme. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/captchme. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
55
 
37
56
 
38
57
  ## License
@@ -1,3 +1,3 @@
1
1
  module CAPTCHME
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captchme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Debrunne