toon 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/toon.rb +2 -1
  4. data/toon.gemspec +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d6cf985e078b219d993e72c6e005e832aa11a8ec36618070cbce6d2b66ced19
4
- data.tar.gz: d6b70b49aea4aa2b63ccd31140e0631fb1ed811000089eb1263cf7008dd29ad4
3
+ metadata.gz: 2a01c56ff22ef3cde73e495afbb9a44f41ee27dc2c48dee868b76ee74a9074a1
4
+ data.tar.gz: c5bae834b94e306ba3c55fa0dffdf3168273c3c97b89c394a2c9a26027724b1a
5
5
  SHA512:
6
- metadata.gz: 43cacbf79727cb022f7d3eb9349f943c04b343990ec1011ae56dfd23b6b092d1a211d27302eb386646caedf72210d8e720180a246f1606e2d54318b0ede473f6
7
- data.tar.gz: 5deb98da771611c870f48c6510f743b2d7be03203de0fcd5040ad38d3550e9ca78ff3fef305943a56735dce0e4227d2df868743eef0b0deb6584fbf6bee45fe7
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "toon"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary = "A Ruby gem that makes it easy to cleanup and format data"
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.3
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: 2020-11-03 00:00:00.000000000 Z
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.1.4
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