rebase 1.0.0 → 1.1.0
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.
- checksums.yaml +4 -4
- data/lib/rebase.rb +5 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d641632580c58d89129f709ce80683e5551351f7
|
4
|
+
data.tar.gz: 1061c9faf985ffbfb0e94a60e1dade19705e73f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a0d7492ca2599e403b752db2557424c19e42f9c212130b21901b6598313f43d62b2e60dc373b0fe41f2226fbfcf434308d823e707cd47a13a05a573111ca6d
|
7
|
+
data.tar.gz: 1e2e0a45b72441aef567f8cfdc36d63e43b3fa5c9ddfe61d7a7d33776da6e75bd0b533fe4239e97c6843d1ed9f04c26a8a5a86e77509e6efa7435e9d6721ced2
|
data/lib/rebase.rb
CHANGED
@@ -56,7 +56,7 @@ class Rebase
|
|
56
56
|
|
57
57
|
def get_base(int)
|
58
58
|
raise ArgumentError, "Invalid base: #{int}" if int < 2 || int > 62
|
59
|
-
|
59
|
+
(int > 36 ? B62 : B36)[0...int]
|
60
60
|
end
|
61
61
|
|
62
62
|
B62 = %w[
|
@@ -65,7 +65,10 @@ class Rebase
|
|
65
65
|
a b c d e f g h i j k l m n o p q r s t u v w x y z
|
66
66
|
]
|
67
67
|
|
68
|
-
|
68
|
+
B36 = %w[
|
69
|
+
0 1 2 3 4 5 6 7 8 9
|
70
|
+
a b c d e f g h i j k l m n o p q r s t u v w x y z
|
71
|
+
]
|
69
72
|
end
|
70
73
|
|
71
74
|
def Rebase(alphabet, int=nil)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Fox
|
@@ -10,8 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
2—62, or an array of an arbitrary alphabet.
|
13
|
+
description: Convert integers to a given base and back again
|
15
14
|
email:
|
16
15
|
- l@rryfox.us
|
17
16
|
executables: []
|
@@ -45,5 +44,5 @@ rubyforge_project:
|
|
45
44
|
rubygems_version: 2.4.1
|
46
45
|
signing_key:
|
47
46
|
specification_version: 4
|
48
|
-
summary: Convert integers to a given base
|
47
|
+
summary: Convert integers to a given base and back again
|
49
48
|
test_files: []
|