From d42bf4c8e2844603c4e19184b7e47dad5582b843 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 20 May 2016 17:33:28 +0800 Subject: [PATCH] Change default implode to 0.3, version 0.4.3 --- CHANGELOG.md | 1 + Gemfile.lock | 2 +- lib/rucaptcha.rb | 2 +- lib/rucaptcha/captcha.rb | 2 +- lib/rucaptcha/configuration.rb | 2 +- lib/rucaptcha/version.rb | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e3ff6..e9b9391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Remove deprecated `width`, `height` config. - Delete session key after verify (#23). +- Lighter text color, improve style. 0.4.2 ----- diff --git a/Gemfile.lock b/Gemfile.lock index daad2dd..7067620 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rucaptcha (0.4.2) + rucaptcha (0.4.3) posix-spawn (>= 0.3.0) GEM diff --git a/lib/rucaptcha.rb b/lib/rucaptcha.rb index c139f84..14cc0a7 100644 --- a/lib/rucaptcha.rb +++ b/lib/rucaptcha.rb @@ -16,7 +16,7 @@ module RuCaptcha @config = Configuration.new @config.len = 4 @config.font_size = 45 - @config.implode = 0.4 + @config.implode = 0.3 @config.cache_limit = 100 @config.expires_in = 2.minutes @config.style = :colorful diff --git a/lib/rucaptcha/captcha.rb b/lib/rucaptcha/captcha.rb index 602c653..59b8b1a 100644 --- a/lib/rucaptcha/captcha.rb +++ b/lib/rucaptcha/captcha.rb @@ -61,7 +61,7 @@ module RuCaptcha #{line_opts.join(' ')} \ -pointsize #{font_size} -weight 500 \ #{text_opts.join(' ')} \ - -wave #{rand(2) + 1}x#{rand(2) + 1} \ + -wave #{rand(2) + 3}x#{rand(2) + 1} \ -rotate #{rand(10) - 5} \ -gravity NorthWest -sketch 1x10+#{rand(2)} \ -fill none \ diff --git a/lib/rucaptcha/configuration.rb b/lib/rucaptcha/configuration.rb index 667fc44..7a87cf7 100644 --- a/lib/rucaptcha/configuration.rb +++ b/lib/rucaptcha/configuration.rb @@ -4,7 +4,7 @@ module RuCaptcha attr_accessor :font_size # Number of chars, default 4 attr_accessor :len - # implode, default 0.4 + # implode, default 0.3 attr_accessor :implode # Number of Captcha codes limit # set 0 to disable limit and file cache, default: 100 diff --git a/lib/rucaptcha/version.rb b/lib/rucaptcha/version.rb index 2164093..77ea63e 100644 --- a/lib/rucaptcha/version.rb +++ b/lib/rucaptcha/version.rb @@ -1,3 +1,3 @@ module RuCaptcha - VERSION = '0.4.2' + VERSION = '0.4.3' end