panda_mask 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -18,11 +18,11 @@ Usage
18
18
  =====
19
19
 
20
20
  ```
21
- "contact us at tommytcchan [at] asf.com now".panda_mask # 'contact us at [removed as it violates our terms of service] now.'
21
+ "contact us at tommytcchan [at] asf.com now".panda_mask # 'contact us at [removed as it violates our terms of service] now'
22
22
  ```
23
23
 
24
24
  ```
25
- "contact us at 415.123.3333 now.".panda_mask('[removed]') # 'contact us at [removed] now.'
25
+ "contact us at 415.123.3333 now".panda_mask('[removed]') # 'contact us at [removed] now'
26
26
  ```
27
27
 
28
28
  Why the name?
@@ -43,5 +43,5 @@ Contributing to panda_mask
43
43
  Copyright
44
44
  =========
45
45
 
46
- Copyright (c) 2014 Tommy Chan. See LICENSE.txt for
46
+ Copyright (c) 2014 Tommy Chan and www.venuespot.co. See LICENSE.txt for
47
47
  further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/panda_mask.rb CHANGED
@@ -5,7 +5,7 @@ class String
5
5
 
6
6
  rules = [
7
7
  /[A-Za-z0-9._%+-]+\s*(\s*(\[|\()\s*at\s*(\]|\))\s*|\s*(\[|\()*@(\]|\))*\s*)\s*[A-Za-z0-9.-]+\s*(\[|\()*(\s*dot\s*|\.)(\]|\))*\s*[A-Za-z0-9]+/, #std email or any replacement with [at] or [dot]
8
- /[A-Za-z0-9._%+-]+\s*at\s*[A-Za-z0-9.-]+\sdot\s*[A-Za-z0-9]+/, #no symbols (ie. ) tommytcchan at asdf dot com
8
+ /[A-Za-z0-9._%+-]+\s*at\s*[A-Za-z0-9.-]+\s*(dot|\.)\s*[A-Za-z0-9]+/, #no symbols (ie. ) tommytcchan at asdf dot com
9
9
  /\+*[-_.\dO]{7,}/,
10
10
  /\+*[\dO]{3,}.[\dO]{3,}.[\dO]{3,}/, #ie. 12O-4567
11
11
  /\+*[-_.\dO]{3,}.[\dA-Z]{4,}/, #ie. +1-800-GOTRICE
data/panda_mask.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "panda_mask"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tommy Chan"]
@@ -58,7 +58,12 @@ describe "PandaMask tests with e-mail" do
58
58
  end
59
59
 
60
60
  it "catches emails with parenthesis variation 3" do
61
- "contact us at tommytcchan at asdf dot com now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
61
+ "contact us tommytcchan at asdf dot com now.".panda_mask.should == 'contact us [removed as it violates our terms of service] now.'
62
+ end
63
+
64
+ it "catches emails with text email and ." do
65
+ "contact us at tommytcchan at asdf.com now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
66
+
62
67
  end
63
68
  end
64
69
 
@@ -71,47 +76,47 @@ describe "PandaMask tests with phone #" do
71
76
  "contact us at 415-123-3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
72
77
  end
73
78
 
74
- it "basic phone strip 2" do
79
+ it "basic phone strip 3" do
75
80
  "contact us at 415_123_3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
76
81
  end
77
82
 
78
- it "basic phone strip 3" do
83
+ it "basic phone strip with intl code" do
79
84
  "contact us at 1-415-123-3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
80
85
  end
81
86
 
82
- it "basic phone strip 4" do
87
+ it "basic phone strip with intl code and plus" do
83
88
  "contact us at +1-415-123-3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
84
89
  end
85
90
 
86
- it "basic phone strip 2" do
91
+ it "basic phone strip with itnl code and plus 2" do
87
92
  "contact us at +415-123-3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
88
93
  end
89
94
 
90
- it "basic phone strip 2" do
95
+ it "basic phone strip with +" do
91
96
  "contact us at +4151233333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
92
97
  end
93
98
 
94
- it "basic phone strip 2" do
99
+ it "basic phone strip with spaces" do
95
100
  "contact us at 415 123 3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
96
101
  end
97
102
 
98
- it "basic phone strip 2" do
99
- "contact us at 415.123.3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
103
+ it "basic phone strip with dots" do
104
+ "contact us at 415.123.3333 now.".panda_mask.should == 'contact [removed as it violates our terms of service] now.'
100
105
  end
101
106
 
102
- it "basic phone strip 2" do
107
+ it "basic phone strip intl and dashes" do
103
108
  "contact us at 1-41O-123-3333 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
104
109
  end
105
110
 
106
- it "basic phone strip 2" do
111
+ it "basic phone strip with 1800 num and text" do
107
112
  "contact us at 1-800-GOTRICE now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
108
113
  end
109
114
 
110
- it "basic phone strip 2" do
115
+ it "basic phone strip with 1800 num and text 2" do
111
116
  "contact us at +1-800-GOTRICE now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
112
117
  end
113
118
 
114
- it "basic phone strip 2" do
119
+ it "basic phone strip only 7 charcs" do
115
120
  "contact us at 123-4567 now.".panda_mask.should == 'contact us at [removed as it violates our terms of service] now.'
116
121
  end
117
122
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_mask
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -3026554921122129715
135
+ hash: 1324679052867466791
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements: