surveyor 0.9.3 → 0.9.4

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/surveyor.rb +6 -2
  3. data/surveyor.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.3
1
+ 0.9.4
@@ -5,10 +5,14 @@ require 'surveyor/config'
5
5
  require 'surveyor/acts_as_response'
6
6
 
7
7
  module Surveyor
8
- RAND_CHARS = [('a'..'z'), ('A'..'Z'), (0..9)].map(&:to_a).flatten.to_s
8
+ RAND_CHARS = [('a'..'z'), ('A'..'Z'), (0..9)].map{|r| r.to_a}.flatten.to_s
9
9
 
10
10
  def self.make_tiny_code(len = 10)
11
- len.times.map{|i| RAND_CHARS[rand(RAND_CHARS.size), 1] }.to_s
11
+ if RUBY_VERSION < "1.8.7"
12
+ (1..len).to_a.map{|i| RAND_CHARS[rand(RAND_CHARS.size), 1] }.to_s
13
+ else
14
+ len.times.map{|i| RAND_CHARS[rand(RAND_CHARS.size), 1] }.to_s
15
+ end
12
16
  end
13
17
 
14
18
  def self.to_normalized_string(text)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{surveyor}
8
- s.version = "0.9.3"
8
+ s.version = "0.9.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Chamberlain", "Mark Yoon"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surveyor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Chamberlain