ncirlMailParser 0.0.0 → 0.0.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.
- checksums.yaml +4 -4
- data/lib/mailParser.rb +6 -6
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ebd4d602909a6c04c9abf38e8cdcd200fcbe76a
|
4
|
+
data.tar.gz: d524e3a7408eff07f969fd7a696a4ab9b84f1ebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b192225d8046f882d6457efd863f77b826c203838bc69691592109fde57601b115d054497f1eed9f70c1e7f3d9acd8411b10b3fa3c85d9cedd5c0454fbe00f4
|
7
|
+
data.tar.gz: 67f55c94586180ed838890d0f4c9d48462ba8da0e39eb0f6c036f1603b77ac82e068493a79de5db662b18f41ed347bcb40b221a2479c4169a8c375b2322897bb
|
data/lib/mailParser.rb
CHANGED
@@ -20,35 +20,35 @@ module MailParser
|
|
20
20
|
|
21
21
|
airplane.each do |word|
|
22
22
|
if @email.body.include?(word)
|
23
|
-
trip.
|
23
|
+
trip.category = "plane"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
train.each do |word|
|
27
27
|
if @email.body.include?(word)
|
28
|
-
trip.
|
28
|
+
trip.category = "train"
|
29
29
|
end
|
30
30
|
end
|
31
31
|
bus.each do |word|
|
32
32
|
if @email.body.include?(word)
|
33
|
-
trip.
|
33
|
+
trip.category = "bus"
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
if trip.
|
37
|
+
if trip.category == "plane"
|
38
38
|
airlines.each do |word|
|
39
39
|
if @email.body.include?(word)
|
40
40
|
trip.carrier = word
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
elsif trip.
|
44
|
+
elsif trip.category == "train"
|
45
45
|
railcarriers.each do |word|
|
46
46
|
if @email.body.include?(word)
|
47
47
|
trip.carrier = word
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
elsif trip.
|
51
|
+
elsif trip.category == "bus"
|
52
52
|
buscarriers.each do |word|
|
53
53
|
if @email.body.include?(word)
|
54
54
|
trip.carrier = word
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ncirlMailParser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John o Bruachail
|
8
|
-
- Duwayne Petty
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: mailman
|