rucaptcha 3.0.0.beta1 → 3.0.0.beta2

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: f5b2533811c90fe898f944c4e680171223eae24d6a064325e7675874df062f38
4
- data.tar.gz: a5580a8d7b93d5aa340fb7c3f34897a71ad253551edc5488a280f8d29810a5ad
3
+ metadata.gz: 9bbd4b8b851e790f62f2f6db911ae64b9498a0928036e8b7ea67856a4da547ee
4
+ data.tar.gz: 3eefb7d5585af340e86f704862bfcc98500bc2e3d3be0cf6b29e52617d3bd634
5
5
  SHA512:
6
- metadata.gz: 19c9b89dd9752ec30778f3c8b5ebcd959df61b04df1ddb26dc8496c7b1383c935cd9cfcf7cfb2e80358a2aa732be2dc797b266f1d6a46ece618f162faa0474c8
7
- data.tar.gz: 4fd7d61c12480361c640e0974908a9ae91f1b5a0a063da632b19b1627803ce047ea035a3816459615926408c927aa793de8e5571c9e4dc419013b3ba72c8d2e6
6
+ metadata.gz: a64af8e3bc25b2b1dc97ee8bc2eb64c1f27e548f604cbcea82991b1234f745c478796339ffedbb4c7374c7639389f2be385343f5aee2b2c8f7f3fab911ab986d
7
+ data.tar.gz: fac3e233072a46d5c8c9b1ad24a518cf30fbc53ca0e675d3f6ee8a17f1971db7e109077e05b5dc212b833b40b582ac0226ab7cbbc6c299bd4f8bbe8ad11033e9
@@ -0,0 +1,14 @@
1
+ module RuCaptcha
2
+ class CaptchaController < ActionController::Base
3
+ def index
4
+ return head :ok if request.head?
5
+
6
+ headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
7
+ headers["Pragma"] = "no-cache"
8
+ data = generate_rucaptcha
9
+
10
+ opts = { disposition: "inline", type: "image/png" }
11
+ send_data data, opts
12
+ end
13
+ end
14
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ RuCaptcha::Engine.routes.draw do
2
+ root to: "captcha#index"
3
+ end
@@ -1,3 +1,3 @@
1
1
  module RuCaptcha
2
- VERSION = "3.0.0.beta1"
2
+ VERSION = "3.0.0.beta2"
3
3
  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: 3.0.0.beta1
4
+ version: 3.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
@@ -47,6 +47,8 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - README.md
49
49
  - Rakefile
50
+ - app/controllers/ru_captcha/captcha_controller.rb
51
+ - config/routes.rb
50
52
  - ext/rucaptcha/Cargo.lock
51
53
  - ext/rucaptcha/Cargo.toml
52
54
  - ext/rucaptcha/extconf.rb
@@ -79,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
81
  - !ruby/object:Gem::Version
80
82
  version: 1.3.1
81
83
  requirements: []
82
- rubygems_version: 3.4.0.dev
84
+ rubygems_version: 3.3.3
83
85
  signing_key:
84
86
  specification_version: 4
85
87
  summary: Captcha Gem for Rails, which generates captcha image by Rust.