captcha3 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Captcha3
2
- VERSION = "1.0.5"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/captcha3.rb CHANGED
@@ -5,4 +5,10 @@ require "captcha3/image_generator"
5
5
  module Captcha3
6
6
  require 'captcha3/railtie' if defined?(Rails)
7
7
  ActionController::Base.send(:include, ValidateCaptcha)
8
+ if defined?(Rails)
9
+ environment = File.open("#{Rails.root}/config/environment.rb", "a")
10
+ salt = SecureRandom.base64(32).tr("+/=", "xyz")
11
+ environment.puts("CAPTCHA_SALT = #{salt}")
12
+ environment.close
13
+ end
8
14
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captcha3
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 5
10
- version: 1.0.5
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - victordong