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 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 )
@@ -53,7 +53,9 @@ module Dropmire
53
53
 
54
54
  def city(addr)
55
55
  l = addr.length-1
56
- addr[3..l].capitalize
56
+ city_arr = addr[3..l].split(' ')
57
+ city_arr.each { |c| c.capitalize! }
58
+ city_arr.join(' ')
57
59
  end
58
60
 
59
61
  def carrot_string(text)
@@ -1,3 +1,3 @@
1
1
  module Dropmire
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropmire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: