base_n 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87a9bdfaeb0fb3e0d1135b287b228ed7bb5ccd3d
4
- data.tar.gz: 39417a5452a106fdab6aaba753f3a0ae750bedde
3
+ metadata.gz: cc44f904032ae1d89015105c51a091e95aeaf017
4
+ data.tar.gz: f0d58f083f5e9943ce7c78e25bdac670d0341a64
5
5
  SHA512:
6
- metadata.gz: f60600856bcfefb2dc5202c5c9e18977377fd3a99d465306e121f25021149d01ba4d300ba9d6bd5fdee6e96093a5161742eeda69aa0e95b6b632f0fdb0136ab4
7
- data.tar.gz: bce44fdd41dafe2b651f35ed8915c87f94702fab5ba79183f41fbc820790ec3f3212de06b313696fffef25551492b7d4f2cb5d8ddbaf9aa2a43022580de85015
6
+ metadata.gz: 229c56c05698f09800d474508445a94cc5f0f4d0d92fc93b4a33d4079af6e5ee7ecc5c3d82e98e57558d9bf70a4108c239b14156c230260d3c8a8f9246338fcb
7
+ data.tar.gz: 1f844cddf8311057ed0010eb7833cbd693bf035234c272a321da7e19739a21dbc7498372c3fd92935a31ec7a2e05dc02bd45c5f87d9c85d31c2a5afc2d8bc391
data/lib/base_n.rb CHANGED
@@ -16,7 +16,7 @@ module BaseN
16
16
  end
17
17
 
18
18
  class Encoder
19
- PRIMITIVES = ((0..9).collect { |i| i.to_s } + ('A'..'Z').to_a + ('a'..'z').to_a + %w(- _)).map(&:freeze).freeze
19
+ PRIMITIVES = ((0..9).collect { |i| i.to_s } + ('A'..'Z').to_a + ('a'..'z').to_a + %w(! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \\ ] ^ _ ` { | } ~)).map(&:freeze).freeze
20
20
 
21
21
  attr_accessor :base
22
22
 
@@ -26,6 +26,10 @@ module BaseN
26
26
  raise "I only support up to base #{primitives.size}" if base > primitives.size
27
27
  end
28
28
 
29
+ def self.highest_supported
30
+ new PRIMITIVES.size
31
+ end
32
+
29
33
  def case_sensitive?
30
34
  base > 36
31
35
  end
@@ -1,3 +1,3 @@
1
1
  module BaseN
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig R Webster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-14 00:00:00.000000000 Z
11
+ date: 2014-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler