basecustom 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +65 -34
- data/lib/basecustom.rb +1 -1
- data/lib/basecustom/version.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Yjg4ZDY3OTlmYWUzYTEwZjQ3ZDIwMmQ3ZjhjOWEyMDY2MWUzNWRkNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWRiNDFiY2NkNDBjYTMyNDk0NDRiYzNhMmNkYTA3MjZkMzUwYmQzOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzFmZjhlOGY3ZDRhYzFiMmZiNGZlOTdlYTBkYWRlY2MyMTZhMmFhZTZlMjQ1
|
10
|
+
M2QzNjBiMmUwM2RlZjg0YjM5Njk5NTJmNzAzMTg2Nzg3YTljNWMwMzc5OTE1
|
11
|
+
YzQ5YTNmNzc4MmI3ZWMyOGUxNWY0NWQxMzc2OWJjNjI3NWMwNWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGZiMzE3MzllNDEzMmY0ZmY4YzcyMWVkYjcwMzMzYTFlNzU3OWQyYzFhYTgz
|
14
|
+
YzFiMzEwY2U2YmNmMjE5ZWVmMTE1ODBmZDI4NjU1NTE1OTU3M2QzZmJlZDU2
|
15
|
+
MzViZDk3OGEzZWVhMWU5NTU3Njg2N2YwYzZlZGRlNDA0ZTlhZjI=
|
data/README.md
CHANGED
@@ -1,34 +1,65 @@
|
|
1
|
-
BaseCustom
|
2
|
-
by Daniel P. Clark
|
3
|
-
|
4
|
-
Inspired by:
|
5
|
-
* base62 by "JT Zemp" and contributors "Saadiq Rodgers-King", "Derrick Camerino"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
base2.base('
|
17
|
-
=>
|
18
|
-
base2.base(
|
19
|
-
=>
|
20
|
-
base2.base(
|
21
|
-
=> "
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
baseABC.base(
|
27
|
-
=>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
1
|
+
# BaseCustom
|
2
|
+
by Daniel P. Clark
|
3
|
+
|
4
|
+
Inspired by:
|
5
|
+
* base62 by "JT Zemp" and contributors "Saadiq Rodgers-King", "Derrick Camerino"
|
6
|
+
|
7
|
+
**Description**
|
8
|
+
* Define any base conversion with any identifier for each value.
|
9
|
+
|
10
|
+
|
11
|
+
<code>require 'basecustom'
|
12
|
+
|
13
|
+
base2 = BaseCustom.new('01')
|
14
|
+
base2.base('00001')
|
15
|
+
=> 1
|
16
|
+
base2.base('100110101')
|
17
|
+
=> 309
|
18
|
+
base2.base(340)
|
19
|
+
=> "101010100"
|
20
|
+
base2.base(0xF45)
|
21
|
+
=> "111101000101"
|
22
|
+
|
23
|
+
baseABC = BaseCustom.new('ABC')
|
24
|
+
baseABC.base('ABC')
|
25
|
+
=> 5
|
26
|
+
baseABC.base(123)
|
27
|
+
=> "BBBCA"</code>
|
28
|
+
|
29
|
+
|
30
|
+
# Usage Video
|
31
|
+
|
32
|
+
[![ScreenShot](http://img.youtube.com/vi/b7TdvicxIrs/0.jpg)](http://www.youtube.com/embed/b7TdvicxIrs)
|
33
|
+
|
34
|
+
# Version History
|
35
|
+
|
36
|
+
Version 0.1.8
|
37
|
+
* Changed .all() to join by delimiter
|
38
|
+
|
39
|
+
Version 0.1.7
|
40
|
+
* added features .length() and .all()
|
41
|
+
|
42
|
+
Version 0.1.6
|
43
|
+
* Fixed 0 as 0 bug.
|
44
|
+
|
45
|
+
Version 0.1.5
|
46
|
+
* Added jmchambers' debug from jtzemp/base62 to avoid infinite loop in Rails 3.0.7
|
47
|
+
|
48
|
+
Version 0.1.4
|
49
|
+
* My father suggested delimiter splitting on String initialization made more sense.
|
50
|
+
* Test-Unit assertions fixed/updated.
|
51
|
+
|
52
|
+
Version 0.1.3
|
53
|
+
* Fixed multicharacter numbering units
|
54
|
+
* Added delimiter for multicharacter numbering units
|
55
|
+
* Safe base type creation. Each situation checked for and proper error messages.
|
56
|
+
|
57
|
+
Version 0.1.2
|
58
|
+
* Added unique to string init declaration
|
59
|
+
* Added unique to array as well as checking that all array elements are strings
|
60
|
+
|
61
|
+
Version 0.1.1
|
62
|
+
* Flatten array's on input initialization
|
63
|
+
|
64
|
+
Version 0.1.0
|
65
|
+
* Complete Release
|
data/lib/basecustom.rb
CHANGED
data/lib/basecustom/version.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
class BaseCustom
|
2
|
-
VERSION = "0.1.
|
2
|
+
VERSION = "0.1.8"
|
3
3
|
end
|
4
4
|
|
5
|
+
# Version 0.1.8
|
6
|
+
# * Changed .all() to join by delimiter
|
5
7
|
# Version 0.1.7
|
6
|
-
# * added
|
8
|
+
# * added features .length() and .all()
|
7
9
|
# Version 0.1.6
|
8
10
|
# * Fixed 0 as 0 bug.
|
9
11
|
# Version 0.1.5
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecustom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark / 6ftDan(TM)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Define your own numberic base! Highly advanced and ultimately simple!
|
14
14
|
email: webmaster@6ftdan.com
|