duffy 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/duffy/string.rb +6 -0
- data/lib/duffy/version.rb +1 -1
- data/lib/duffy.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 556f360a813a6208929b57b096c67b4d4a894656
|
4
|
+
data.tar.gz: e07cab0f27b5af742661c17f722a992ce429ccc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930cbb4a991c55836771a2053e0954ed589a0156ca54e6391efa2efcabe3a2449b350869cb88d1d0ef065f5dfde98603aff3a35f7a57a590142145a4829ee0e8
|
7
|
+
data.tar.gz: f3617f1249fc464384106a1ca2225171a45a6c53a5ad0d9bf97da7e144e7e5bce2589183f5e2472fd21f0eacc67373f0afbcdd51ede34b8cf4a5817f9f0207cc
|
data/lib/duffy/string.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Monkey Patch String adding useful methods.
|
2
2
|
class String
|
3
3
|
|
4
|
+
# Easier way to calculate the md5sum of a string.
|
5
|
+
def md5
|
6
|
+
Digest::MD5.hexdigest(self)
|
7
|
+
end
|
8
|
+
alias_method :md5sum, :md5
|
9
|
+
|
4
10
|
def to_ssn
|
5
11
|
ssn = "%09d" % self.to_numeric.to_i # strips string of non zeros, and pads leading zeros
|
6
12
|
ssn[0..2] + "-" + ssn[3..4] + "-" + ssn[5..8] # now it's like 123-45-6789
|
data/lib/duffy/version.rb
CHANGED
data/lib/duffy.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duffy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Duffy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.4.
|
134
|
+
rubygems_version: 2.4.5
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Library of things
|