to_insane 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGELOG +11 -1
  2. data/VERSION +1 -1
  3. data/lib/to_insane.rb +2 -2
  4. data/to_insane.gemspec +1 -1
  5. metadata +1 -1
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ = 0.2.1
2
+ - Fixed lower base limit
3
+
4
+ = 0.2.0
5
+ - Fixed :max
6
+
7
+ = 0.1.0
8
+ -initial conversion
9
+ -FORK to to_insane
10
+
1
11
  = 0.0.4
2
12
  - Gracefully deals with bad input. Thanks to isnotvalid on Github.
3
13
 
@@ -8,4 +18,4 @@
8
18
  - Fixed typos.
9
19
 
10
20
  = 0.0.1
11
- - Initial release.
21
+ - Initial release.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/lib/to_insane.rb CHANGED
@@ -13,7 +13,7 @@ class String
13
13
  alpha = INSANECHARACTERS
14
14
  end
15
15
  raise ArgumentError, "Base Value is not valid. Integer, :max, :url_safe" unless base_val.kind_of? Integer
16
- raise ArgumentError, "Base size is too large for given character set. Please use a Base value larger than 0 and less than #{alpha.length}" if base_val > alpha.length or base_val <= 0
16
+ raise ArgumentError, "Base size is too large for given character set. Please use a Base value larger than 1 and less than #{alpha.length}" if base_val > alpha.length or base_val <= 1
17
17
  raise ArgumentError, "Character set needs to be larger than 0" if alpha.size <= 0
18
18
  raise ArgumentError, "Character set has duplicate characters" if alpha.size != alpha.split(//).uniq.size
19
19
  int_val = 0
@@ -35,7 +35,7 @@ class Integer
35
35
  alpha = INSANECHARACTERS
36
36
  end
37
37
  raise ArgumentError, "Base Value is not valid. Integer, :max, :url_safe" unless base_val.kind_of? Integer
38
- raise ArgumentError, "Base size is too large for given character set. Please use a Base value larger than 0 and less than #{alpha.length}" if base_val > alpha.length or base_val <= 0
38
+ raise ArgumentError, "Base size is too large for given character set. Please use a Base value larger than 1 and less than #{alpha.length}" if base_val > alpha.length or base_val <= 2
39
39
  raise ArgumentError, "Character set needs to be larger than 0" if alpha.size <= 0
40
40
  raise ArgumentError, "Character set has duplicate characters" if alpha.size != alpha.split(//).uniq.size
41
41
  char_ref = alpha[0..base_val]
data/to_insane.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{to_insane}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Ong"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: to_insane
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ryan Ong