captcha 1.2.1 → 1.2.2

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.
@@ -14,6 +14,11 @@ Goals
14
14
  * Colors, wave, implode
15
15
  * Handle lots of users
16
16
 
17
+ Compatibility
18
+ -------------
19
+
20
+ Tested with Ruby 1.8.6, 1.8.7, and 1.9.1.
21
+
17
22
  Install
18
23
  -------
19
24
 
data/Rakefile CHANGED
@@ -26,7 +26,6 @@ end
26
26
 
27
27
  desc "Run specs"
28
28
  Spec::Rake::SpecTask.new do |t|
29
- t.rcov = true
30
29
  t.spec_opts = ["--format", "specdoc", "--colour"]
31
30
  t.spec_files = FileList["spec/**/*_spec.rb"]
32
31
  end
data/gemspec.rb CHANGED
@@ -17,5 +17,5 @@ GEM_SPEC = Gem::Specification.new do |s|
17
17
  s.name = GEM_NAME
18
18
  s.platform = Gem::Platform::RUBY
19
19
  s.require_path = "lib"
20
- s.version = "1.2.1"
20
+ s.version = "1.2.2"
21
21
  end
@@ -16,8 +16,12 @@ module Captcha
16
16
  encrypted << cipher.final
17
17
  # Turn into chr codes separated by underscores
18
18
  # 135_14_163_53_43_135_172_31_1_23_169_81_49_110_49_230
19
- encrypted = (0..encrypted.length-1).collect do |x|
20
- encrypted[x]
19
+ if encrypted.respond_to?(:codepoints)
20
+ encrypted = encrypted.codepoints.to_a
21
+ else
22
+ encrypted = (0..encrypted.length-1).collect do |x|
23
+ encrypted[x]
24
+ end
21
25
  end
22
26
  encrypted.join('_')
23
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-06 00:00:00 -08:00
12
+ date: 2009-11-28 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency