new_base_60 1.1 → 1.1.1
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.
- data/CHANGELOG.md +30 -0
- data/Manifest.txt +2 -2
- data/README.md +71 -0
- data/Rakefile +2 -2
- data/lib/new_base_60.rb +1 -1
- metadata +10 -9
- data/CHANGELOG.rdoc +0 -38
- data/README.rdoc +0 -60
data/CHANGELOG.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# 1.1 / 2013-01-10
|
2
|
+
## 1 minor enhancement
|
3
|
+
* Added command line script `sxg_to_dec` and `dec_to_sxg` for converting on the command line by Aaron Parecki (@aaronpk)
|
4
|
+
|
5
|
+
# 1.0.4 / 2011-02-15
|
6
|
+
## 1 minor enhancement
|
7
|
+
|
8
|
+
* Changed class name from new_base_60 to NewBase60
|
9
|
+
|
10
|
+
# 1.0.3 / 2010-11-16
|
11
|
+
## 1 minor enhancement
|
12
|
+
|
13
|
+
* Changed named from newbase60 to new_base_60
|
14
|
+
|
15
|
+
# 1.0.2 / 2010-06-21
|
16
|
+
## 2 minor enhancements
|
17
|
+
|
18
|
+
* Code cleanup thanks to John Barnette (@jbarnette)
|
19
|
+
* Credits section added to README, props to Tantek Çelik (@tantek) for original idea
|
20
|
+
|
21
|
+
# 1.0.1 / 2010-06-11
|
22
|
+
## 1 minor enhancement
|
23
|
+
|
24
|
+
* Updated README to reflect changes to API
|
25
|
+
* Changed Newbase60#to_time to Newbase60#to_date
|
26
|
+
|
27
|
+
# 1.0.0 / 2010-06-11
|
28
|
+
## 1 major enhancement
|
29
|
+
|
30
|
+
* Birthday!
|
data/Manifest.txt
CHANGED
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# New Base 60
|
2
|
+
|
3
|
+
http://github.com/veganstraightedge/new_base_60
|
4
|
+
|
5
|
+
[http://github.com/veganstraightedge/new_base_60](http://github.com/veganstraightedge/new_base_60)
|
6
|
+
|
7
|
+
## Description
|
8
|
+
|
9
|
+
Handy Conversion Sexagesimal (base 60) for Short URLs
|
10
|
+
Cuts out ambiguous characters like:
|
11
|
+
|
12
|
+
* l : lowercase l (looks like a 1 : one)
|
13
|
+
* I : capital I (looks like a 1 : one)
|
14
|
+
* O : capital O (looks like a 0 : zero)
|
15
|
+
|
16
|
+
Based on work done by Tantek Çelik : [http://tantek.pbworks.com/New_base_60](http://tantek.pbworks.com/New_base_60 "tantek / New_base_60")
|
17
|
+
|
18
|
+
## Features/Problems
|
19
|
+
|
20
|
+
* Converts Base10 (like 147124) to Base60 (like fs4)
|
21
|
+
* Converts Base60 (like fs4) to Base10 (like 147124)
|
22
|
+
* Converts Base60 (like fs4) to a Time object (Mon Oct 23 23:00:00 -0800 2372)
|
23
|
+
|
24
|
+
## Synopsis
|
25
|
+
|
26
|
+
How to use:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require "new_base_60"
|
30
|
+
n = NewBase60.new("464")# => #<NewBase60:0x1011ea468 @base_60="464">
|
31
|
+
puts n.to_i # => 14764
|
32
|
+
puts n.to_i.to_sxg # => "464"
|
33
|
+
puts n.to_date # => #<Date: 4910703/2,0,2299161>
|
34
|
+
puts n.to_date.to_s # => "2010-06-04"
|
35
|
+
puts n.to_date.to_sxg # => "464"
|
36
|
+
```
|
37
|
+
|
38
|
+
Or, on the command line:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
$ dec_to_sxg 115727
|
42
|
+
Y8n
|
43
|
+
$ sxg_to_dec Y8n
|
44
|
+
115727
|
45
|
+
```
|
46
|
+
|
47
|
+
If you want a shortcut, add this to your .bash_profile:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
alias sd="sxg_to_dec"
|
51
|
+
alias ds="dec_to_sxg"
|
52
|
+
```
|
53
|
+
|
54
|
+
## Install
|
55
|
+
|
56
|
+
```bash
|
57
|
+
sudo gem install new_base_60
|
58
|
+
```
|
59
|
+
|
60
|
+
# Credits
|
61
|
+
|
62
|
+
* Original Idea : Tantek Çelik (@tantek)
|
63
|
+
* Ruby Port : Shane Becker (@veganstraightedge)
|
64
|
+
* Lotsa Cleanup : John Barnette (@jbarnette)
|
65
|
+
* Command Line Scripts : Aaron Parecki (@aaronpk)
|
66
|
+
|
67
|
+
## License
|
68
|
+
|
69
|
+
**PUBLIC DOMAIN.**
|
70
|
+
Your heart is as free as the air you breathe.
|
71
|
+
The ground you stand on is liberated territory.
|
data/Rakefile
CHANGED
@@ -9,6 +9,6 @@ Hoe.spec "new_base_60" do
|
|
9
9
|
developer "Shane Becker", "veganstraightedge@example.com"
|
10
10
|
|
11
11
|
self.extra_rdoc_files = Dir["*.rdoc"]
|
12
|
-
self.history_file = "CHANGELOG.
|
13
|
-
self.readme_file = "README.
|
12
|
+
self.history_file = "CHANGELOG.md"
|
13
|
+
self.readme_file = "README.md"
|
14
14
|
end
|
data/lib/new_base_60.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: new_base_60
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -47,6 +47,7 @@ description: ! 'Handy Conversion Sexagesimal (base 60) for Short URLs
|
|
47
47
|
|
48
48
|
Cuts out ambiguous characters like:
|
49
49
|
|
50
|
+
|
50
51
|
* l : lowercase l (looks like a 1 : one)
|
51
52
|
|
52
53
|
* I : capital I (looks like a 1 : one)
|
@@ -54,7 +55,8 @@ description: ! 'Handy Conversion Sexagesimal (base 60) for Short URLs
|
|
54
55
|
* O : capital O (looks like a 0 : zero)
|
55
56
|
|
56
57
|
|
57
|
-
Based on work done by Tantek Çelik : http://tantek.pbworks.com/New_base_60
|
58
|
+
Based on work done by Tantek Çelik : [http://tantek.pbworks.com/New_base_60](http://tantek.pbworks.com/New_base_60
|
59
|
+
"tantek / New_base_60")'
|
58
60
|
email:
|
59
61
|
- veganstraightedge@example.com
|
60
62
|
executables:
|
@@ -62,14 +64,12 @@ executables:
|
|
62
64
|
- sxg_to_dec
|
63
65
|
extensions: []
|
64
66
|
extra_rdoc_files:
|
65
|
-
- CHANGELOG.rdoc
|
66
67
|
- Manifest.txt
|
67
|
-
- README.rdoc
|
68
68
|
files:
|
69
69
|
- .autotest
|
70
|
-
- CHANGELOG.
|
70
|
+
- CHANGELOG.md
|
71
71
|
- Manifest.txt
|
72
|
-
- README.
|
72
|
+
- README.md
|
73
73
|
- Rakefile
|
74
74
|
- lib/new_base_60.rb
|
75
75
|
- bin/dec_to_sxg
|
@@ -81,7 +81,7 @@ licenses: []
|
|
81
81
|
post_install_message:
|
82
82
|
rdoc_options:
|
83
83
|
- --main
|
84
|
-
- README.
|
84
|
+
- README.md
|
85
85
|
require_paths:
|
86
86
|
- lib
|
87
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -102,8 +102,9 @@ rubygems_version: 1.8.24
|
|
102
102
|
signing_key:
|
103
103
|
specification_version: 3
|
104
104
|
summary: ! 'Handy Conversion Sexagesimal (base 60) for Short URLs Cuts out ambiguous
|
105
|
-
characters like:
|
105
|
+
characters like: * l : lowercase l (looks like a 1 : one) * I : capital I (looks
|
106
106
|
like a 1 : one) * O : capital O (looks like a 0 : zero) Based on work done by
|
107
|
-
Tantek Çelik : http://tantek.pbworks.com/New_base_60
|
107
|
+
Tantek Çelik : [http://tantek.pbworks.com/New_base_60](http://tantek.pbworks.com/New_base_60
|
108
|
+
"tantek / New_base_60")'
|
108
109
|
test_files:
|
109
110
|
- test/test_new_base_60.rb
|
data/CHANGELOG.rdoc
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
=== 1.1 / 2013-01-10
|
2
|
-
|
3
|
-
* 1 minor enhancement
|
4
|
-
|
5
|
-
* Added command line script `sxg_to_dec` and `dec_to_sxg` for converting on the command line by Aaron Parecki (@aaronpk)
|
6
|
-
|
7
|
-
=== 1.0.4 / 2011-02-15
|
8
|
-
|
9
|
-
* 1 minor enhancement
|
10
|
-
|
11
|
-
* Changed class name from new_base_60 to NewBase60
|
12
|
-
|
13
|
-
=== 1.0.3 / 2010-11-16
|
14
|
-
|
15
|
-
* 1 minor enhancement
|
16
|
-
|
17
|
-
* Changed named from newbase60 to new_base_60
|
18
|
-
|
19
|
-
=== 1.0.2 / 2010-06-21
|
20
|
-
|
21
|
-
* 2 minor enhancement
|
22
|
-
|
23
|
-
* Code cleanup thanks to John Barnette (@jbarnette)
|
24
|
-
* Credits section added to README, props to Tantek Çelik (@tantek) for original idea
|
25
|
-
|
26
|
-
=== 1.0.1 / 2010-06-11
|
27
|
-
|
28
|
-
* 1 minor enhancement
|
29
|
-
|
30
|
-
* Updated README to reflect changes to API
|
31
|
-
* Changed Newbase60#to_time to Newbase60#to_date
|
32
|
-
|
33
|
-
=== 1.0.0 / 2010-06-11
|
34
|
-
|
35
|
-
* 1 major enhancement
|
36
|
-
|
37
|
-
* Birthday!
|
38
|
-
|
data/README.rdoc
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
= new_base_60
|
2
|
-
|
3
|
-
* http://github.com/veganstraightedge/new_base_60
|
4
|
-
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
Handy Conversion Sexagesimal (base 60) for Short URLs
|
8
|
-
Cuts out ambiguous characters like:
|
9
|
-
* l : lowercase l (looks like a 1 : one)
|
10
|
-
* I : capital I (looks like a 1 : one)
|
11
|
-
* O : capital O (looks like a 0 : zero)
|
12
|
-
|
13
|
-
Based on work done by Tantek Çelik : http://tantek.pbworks.com/New_base_60
|
14
|
-
|
15
|
-
== FEATURES/PROBLEMS:
|
16
|
-
|
17
|
-
* Converts Base10 (like 147124) to Base60 (like fs4)
|
18
|
-
* Converts Base60 (like fs4) to Base10 (like 147124)
|
19
|
-
* Converts Base60 (like fs4) to a Time object (Mon Oct 23 23:00:00 -0800 2372)
|
20
|
-
|
21
|
-
== SYNOPSIS:
|
22
|
-
|
23
|
-
How to use:
|
24
|
-
|
25
|
-
require "new_base_60"
|
26
|
-
n = NewBase60.new("464")# => #<NewBase60:0x1011ea468 @base_60="464">
|
27
|
-
puts n.to_i # => 14764
|
28
|
-
puts n.to_i.to_sxg # => "464"
|
29
|
-
puts n.to_date # => #<Date: 4910703/2,0,2299161>
|
30
|
-
puts n.to_date.to_s # => "2010-06-04"
|
31
|
-
puts n.to_date.to_sxg # => "464"
|
32
|
-
|
33
|
-
Or, on the command line:
|
34
|
-
|
35
|
-
$ dec_to_sxg 115727
|
36
|
-
Y8n
|
37
|
-
$ sxg_to_dec Y8n
|
38
|
-
115727
|
39
|
-
|
40
|
-
If you want a shortcut, add this to your .bash_profile:
|
41
|
-
|
42
|
-
alias sd="sxg_to_dec"
|
43
|
-
alias ds="dec_to_sxg"
|
44
|
-
|
45
|
-
== INSTALL:
|
46
|
-
|
47
|
-
* sudo gem install new_base_60
|
48
|
-
|
49
|
-
== CREDITS:
|
50
|
-
|
51
|
-
* Original Idea : Tantek Çelik (@tantek)
|
52
|
-
* Ruby Port : Shane Becker (@veganstraightedge)
|
53
|
-
* Lotsa Cleanup : John Barnette (@jbarnette)
|
54
|
-
* Command Line Scripts : Aaron Parecki (@aaronpk)
|
55
|
-
|
56
|
-
== LICENSE:
|
57
|
-
|
58
|
-
PUBLIC DOMAIN.
|
59
|
-
Your heart is as free as the air you breathe.
|
60
|
-
The ground you stand on is liberated territory.
|