dropmire 0.1.4 → 0.1.5
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 +12 -1
- data/lib/dropmire/parser.rb +3 -1
- data/lib/dropmire/version.rb +1 -1
- data/spec/parser_spec.rb +8 -0
- metadata +1 -1
data/README.md
CHANGED
@@ -54,7 +54,7 @@ person.drivers_license_number
|
|
54
54
|
# => 'D21242193207'
|
55
55
|
|
56
56
|
person.drivers_license_expiration_date
|
57
|
-
# => '2015-06'
|
57
|
+
# => '2015-06-07'
|
58
58
|
|
59
59
|
person.street
|
60
60
|
# => '1234 Main St'
|
@@ -69,6 +69,17 @@ person.zipcode
|
|
69
69
|
# => '12345'
|
70
70
|
```
|
71
71
|
|
72
|
+
## Testing
|
73
|
+
|
74
|
+
To run the test suite:
|
75
|
+
```bash
|
76
|
+
rspec spec/
|
77
|
+
|
78
|
+
# or the individual files
|
79
|
+
rspec spec/parser_spec.rb
|
80
|
+
rspec spec/identity_spec.rb
|
81
|
+
```
|
82
|
+
|
72
83
|
## Contributing
|
73
84
|
|
74
85
|
1. Fork it ( https://github.com/[my-github-username]/dropmire/fork )
|
data/lib/dropmire/parser.rb
CHANGED
data/lib/dropmire/version.rb
CHANGED
data/spec/parser_spec.rb
CHANGED
@@ -36,6 +36,14 @@ describe Dropmire::Parser do
|
|
36
36
|
|
37
37
|
expect(subject.city(addr)).to eql "Tallahassee"
|
38
38
|
end
|
39
|
+
|
40
|
+
describe "when city is two words" do
|
41
|
+
it "returns the correct city" do
|
42
|
+
@demo_text2 = """%FLPALM CITY^JACOBSEN$CONNOR$ALAN^6357 SINKOLA DR^ ?;6360101021210193207=1506199306070=?+! 323124522 E 1602 ECCECC00000?"""
|
43
|
+
addr = subject.address(@demo_text2)
|
44
|
+
expect(subject.city(addr)).to eql "Palm City"
|
45
|
+
end
|
46
|
+
end
|
39
47
|
end
|
40
48
|
|
41
49
|
describe "#parse_address" do
|