rucaptcha 3.2.1 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69d5732ca5d694b77dd457aa7dc5656c6178563a6e7a8d450fd6c48f1d0cd452
4
- data.tar.gz: 16bf1270d6fca00cc28aa3439ed3c3111e16285ee77ab6049ecb55a4e634fe18
3
+ metadata.gz: ca95f22ebfb12cb9a94f72376e05a5ad8c5868116b5726a8a736a7b7c3a1bbeb
4
+ data.tar.gz: 740380e1f7a8280b39b68081e802f1ca68cdbb85eb12d2c4ca84a2779fa9c860
5
5
  SHA512:
6
- metadata.gz: c0aaeef33d8ac21f4d60b921c474803a23459314dfc3cdccd6bc0c2ef256c337ad0141525ea46c744a395ac98596a2a7472099dcd4011089365edf3de7c5447a
7
- data.tar.gz: 6793030fe52099c1adc81635f40325e3d2a1788bccea85e9b9d65d837080311e916e526c43acdac8d851c7bca34180b1894469ad698a94807338c418aa6d9d18
6
+ metadata.gz: 3a8861540a855b130b8f816eda52d3b5017877695ea00e28ec457391bce7d9bc7a18f85e75d15b541231e30c0f38dec69aef19eb5a0e00664054886f3490dda7
7
+ data.tar.gz: 185255d41f551db3b7d44934c0ab254c91336251e45107c596fbbe240ee9498a5e689550aead4abebf290afd6bb86a5b2dc49db4f7eeb4a73dfe7b984e99484d
data/README.md CHANGED
@@ -61,6 +61,9 @@ RuCaptcha.configure do
61
61
 
62
62
  # Set the image format, default: png, allows: [jpeg, png, webp]
63
63
  # self.format = 'png'
64
+
65
+ # Custom mount path, default: '/rucaptcha'
66
+ # self.mount_path = '/rucaptcha'
64
67
  end
65
68
  ```
66
69
 
@@ -7,8 +7,8 @@ version = "3.0.0"
7
7
  crate-type = ["cdylib"]
8
8
 
9
9
  [dependencies]
10
- image = "0.24.4"
11
- imageproc = "0.23.0"
12
- magnus = "0.4"
10
+ image = "0.24"
11
+ imageproc = "0.23"
12
+ magnus = "0.6"
13
13
  rand = "0.8.5"
14
14
  rusttype = "0.9.2"
@@ -23,7 +23,7 @@ pub fn create(
23
23
 
24
24
  #[magnus::init]
25
25
  fn init() -> Result<(), Error> {
26
- let class = define_class("RuCaptchaCore", Default::default())?;
26
+ let class = define_class("RuCaptchaCore", magnus::class::object())?;
27
27
  class.define_singleton_method("create", function!(create, 5))?;
28
28
 
29
29
  Ok(())
@@ -17,5 +17,7 @@ module RuCaptcha
17
17
  attr_accessor :format
18
18
  # skip_cache_store_check, default: false
19
19
  attr_accessor :skip_cache_store_check
20
+ # custom rucaptcha mount path, default: '/rucaptcha'
21
+ attr_accessor :mount_path
20
22
  end
21
23
  end
@@ -6,7 +6,7 @@ module RuCaptcha
6
6
  # https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/routing/route_set.rb#L268
7
7
  # `app.routes.prepend` start from Rails 3.2 - 5.0
8
8
  app.routes.prepend do
9
- mount RuCaptcha::Engine => "/rucaptcha"
9
+ mount RuCaptcha::Engine => RuCaptcha.config.mount_path
10
10
  end
11
11
 
12
12
  RuCaptcha.check_cache_store! unless RuCaptcha.config.skip_cache_store_check
@@ -1,3 +1,3 @@
1
1
  module RuCaptcha
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.3"
3
3
  end
data/lib/rucaptcha.rb CHANGED
@@ -31,6 +31,7 @@ module RuCaptcha
31
31
  @config.line = true
32
32
  @config.noise = true
33
33
  @config.format = "png"
34
+ @config.mount_path = "/rucaptcha"
34
35
 
35
36
  @config.cache_store = if Rails.application
36
37
  Rails.application.config.cache_store
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: 3.2.1
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-09 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,20 +24,21 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
+ force_ruby_platform: false
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rb_sys
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: 0.9.18
34
+ version: 0.9.86
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: 0.9.18
41
+ version: 0.9.86
41
42
  description:
42
43
  email: huacnlee@gmail.com
43
44
  executables: []
@@ -81,14 +82,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
82
  requirements:
82
83
  - - ">="
83
84
  - !ruby/object:Gem::Version
84
- version: 2.7.0
85
+ version: 3.1.0
85
86
  required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - ">="
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
91
  requirements: []
91
- rubygems_version: 3.4.10
92
+ rubygems_version: 3.4.4
92
93
  signing_key:
93
94
  specification_version: 4
94
95
  summary: Captcha Gem for Rails, which generates captcha image by Rust.