contact_sport 1.0.1 → 1.0.2

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.
@@ -55,7 +55,8 @@ module ContactSport
55
55
 
56
56
  def address_first_line(card)
57
57
  if card.address && card.address.street
58
- card.address.street.split("\n").first
58
+ parts = card.address.street.split("\n")
59
+ parts.empty? ? EMPTY_FIELD : parts.first
59
60
  else
60
61
  EMPTY_FIELD
61
62
  end
@@ -63,7 +64,8 @@ module ContactSport
63
64
 
64
65
  def address_second_line(card)
65
66
  if card.address && card.address.street
66
- card.address.street.split("\n")[1..-1].join "\n"
67
+ parts = card.address.street.split("\n")
68
+ parts.empty? ? EMPTY_FIELD : parts[1..-1].join("\n")
67
69
  else
68
70
  EMPTY_FIELD
69
71
  end
@@ -1,3 +1,3 @@
1
1
  module ContactSport
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contact_sport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  segments:
84
84
  - 0
85
- hash: -2244736602631739616
85
+ hash: 3024111821449460803
86
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  none: false
88
88
  requirements:
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -2244736602631739616
94
+ hash: 3024111821449460803
95
95
  requirements: []
96
96
  rubyforge_project:
97
97
  rubygems_version: 1.8.23