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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19def3df1322596d60ac2001478437990ca3bc36
4
- data.tar.gz: ec6c3281a8b0e5f3c1c03fe5369184acc64944c7
3
+ metadata.gz: eb8eb853b9f7031529ff8e262da8326f4fc71717
4
+ data.tar.gz: 3870efe3410dda8f56315c70131fd74bee2a9b13
5
5
  SHA512:
6
- metadata.gz: 34cae9c0336a238ea8ee3725b178be58fa4429a0f1d7e67281872a6e269fd4ab86cd423fb553899bc4ada59f9a86ef9ceec461bf0ee20a68c974e7c84d025233
7
- data.tar.gz: 04d8d1711b3ed59fd4ac3b8d9517c909fba3859ec11fa5a33c4f587a13e4bea35166c8f99402b382648483aed4faffe0fb45062f0da7a62548867e926f9a9926
6
+ metadata.gz: e70c4895da1389f502e4720fdb10cf015df66b83c525fa23786126ae1aec20061cfa31af56677dd1ed2069371ca16fd0e8d4ab0a5a031f1030e59e05b3c0a426
7
+ data.tar.gz: bc6794238f7fd77396bbd5ae5146ba84a13f152a6d89a506f951ded7c72d0bc35e2f63e5e59edc3d13ddb98aa8bd0c37987637a4e99020ad182ed70f3d5fa834
@@ -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
@@ -1,8 +1,9 @@
1
1
  module Duffy
2
- VERSION = "0.3.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.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-17 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport