duffy 0.3.3 → 0.3.4
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 +2 -1
- data/lib/duffy/version.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb8eb853b9f7031529ff8e262da8326f4fc71717
|
4
|
+
data.tar.gz: 3870efe3410dda8f56315c70131fd74bee2a9b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e70c4895da1389f502e4720fdb10cf015df66b83c525fa23786126ae1aec20061cfa31af56677dd1ed2069371ca16fd0e8d4ab0a5a031f1030e59e05b3c0a426
|
7
|
+
data.tar.gz: bc6794238f7fd77396bbd5ae5146ba84a13f152a6d89a506f951ded7c72d0bc35e2f63e5e59edc3d13ddb98aa8bd0c37987637a4e99020ad182ed70f3d5fa834
|
data/lib/duffy/string.rb
CHANGED
@@ -58,6 +58,7 @@ class String
|
|
58
58
|
def pretty_phone
|
59
59
|
number = self.to_s.gsub(/[^0-9\+]/, "")
|
60
60
|
return "(" + number[0..2] + ") " + number[3..5] + "-" + number[6..9] if number.length == 10
|
61
|
+
return number[0..2] + "-" + number[3..6] if number.length == 7
|
61
62
|
number
|
62
63
|
end
|
63
64
|
|
@@ -133,4 +134,4 @@ class String
|
|
133
134
|
result.gsub!(/\b(#{upcase_re})\b/i) { |w| w.upcase } unless upcase_re.blank?
|
134
135
|
result
|
135
136
|
end
|
136
|
-
end
|
137
|
+
end
|
data/lib/duffy/version.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
module Duffy
|
2
|
-
VERSION = "0.3.
|
2
|
+
VERSION = "0.3.4"
|
3
3
|
end
|
4
4
|
|
5
5
|
# History
|
6
|
+
# 0.3.4 - pretty_phone now adds the dash for 7 digit phone numbers.
|
6
7
|
# 0.3.3 - Added beginning_of_fiscal_year and end_of_fiscal_year methods to Date
|
7
8
|
# 0.3.2 - Added mem_percentage as a convenience and safeguard against div/0 in user code.
|
8
9
|
# 0.3.1 - Fixed mem_available for old linux distros.
|
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.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Duffy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|