toon 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/toon.rb +2 -1
- data/toon.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a01c56ff22ef3cde73e495afbb9a44f41ee27dc2c48dee868b76ee74a9074a1
|
4
|
+
data.tar.gz: c5bae834b94e306ba3c55fa0dffdf3168273c3c97b89c394a2c9a26027724b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04306c335899bb48c46a254255d2cc73e94d0d2d7b51dc1be1188c39ec9c613b1313254e7b7ca48d19cd729e8813b24aec4493aba04176df8c53de001b7a0f3
|
7
|
+
data.tar.gz: 0cff96cf3c7986465d7cb397b0cbfc8fbaf4d1b71503dec1f4faeebd314f683fc5a0527c89d8ec88281d0c7f9c0514363a1c15ef4b4e40f3304887a1b58d3815
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5
|
1
|
+
2.6.5
|
data/lib/toon.rb
CHANGED
@@ -114,6 +114,8 @@ def toon(str, func=nil, *args, **opts, &code)
|
|
114
114
|
toon(str, 'to_yyyymmdd') =~ /^(\d{4})(\d{2})(\d{2})$/ ? "#{$2}/#{$3}/#{$1}" : str
|
115
115
|
when 'to_yyyymmdd_ymd_iso'
|
116
116
|
str.to_tz.utc.to_s[0...-4]
|
117
|
+
when 'address'
|
118
|
+
toon(str, 'tune', opts: [:address])
|
117
119
|
when 'tune'
|
118
120
|
o = {}; opts.each {|e| o[e]=true}
|
119
121
|
s = str
|
@@ -136,7 +138,6 @@ def toon(str, func=nil, *args, **opts, &code)
|
|
136
138
|
when 'zip', 'to_zip'
|
137
139
|
str =~ /^(\d{5})-?\d{4}?$/ ? $1 : '' # only allow 5-digit zip codes
|
138
140
|
when 'yn'
|
139
|
-
# {"Y"=>"Y","N"=>"N"}[str.to_s[0].upcase] || ""
|
140
141
|
str =~ /\A(y|yes|n|no)\z/i ? $1[0].upcase : '' # yes/no
|
141
142
|
else
|
142
143
|
if str.respond_to?(func)
|
data/toon.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem is helpful for ETL or other general data cleaning.
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
|
-
rubygems_version: 3.
|
44
|
+
rubygems_version: 3.2.16
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: A Ruby gem that makes it easy to cleanup and format data
|