effective_addresses 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6c73a756a6065b2ae5b115a0af75bd6b0b21883
4
- data.tar.gz: cc0c0668a7c5d76f194b4aaaea23b15f7c3a5b12
3
+ metadata.gz: 7ee055f205c393e2696760339044b2a22fb528de
4
+ data.tar.gz: d54ee12d55465e5e744bcc11809211b86ad2bcc8
5
5
  SHA512:
6
- metadata.gz: 062cbb1cd37d50edcfd9544685dffde9126109411a2a3bc9102349615f7578ede85ee46f345ea34366f2a97afd29b0e55ff245b4cc5f57a90aa93869d9fce8b8
7
- data.tar.gz: 675e4cfc5b51c2231ea32c1e7fc327ae3880b508ffdcaf0ae4c535d6644d4def0a63bd13a706bf120062f205e0f526df0165b25aa33186b8f9a0d8ff418ce5fb
6
+ metadata.gz: c1db155e4237759d00a1b2eba93f8a994e1f8fcdfa5984730c91237e765995e6648f0385092985bd9ea971232f4020dea6957acf2e26d6bbcdad125c5aca4346
7
+ data.tar.gz: 205466113aace3c3ffbe2cec7d5665f6f82cc70a6cf400fa9d7b6f4e6b2d60dbe552b53ee8b1edde053b513637db0b4d935dd5cfb28b17532f9bd633ab61cc6a
@@ -123,17 +123,17 @@ module Effective
123
123
 
124
124
  def to_s
125
125
  output = ''
126
- output += "#{full_name}\n" if full_name.present?
127
- output += "#{address1}\n" if address1.present?
128
- output += "#{address2}\n" if address2.present?
129
- output += [city.presence, state.presence].compact.join(', ')
130
- output += '\n' if city.present? || state.present?
131
- output += [country.presence, postal_code.presence].compact.join(', ')
126
+ output += "#{full_name.upcase}\n" if full_name.present?
127
+ output += "#{address1.upcase}\n" if address1.present?
128
+ output += "#{address2.upcase}\n" if address2.present?
129
+ output += [city.try(:upcase).presence, state_code.try(:upcase).presence, ' ' + postal_code.presence].compact.join(' ')
130
+ output += "\n"
131
+ output += country.try(:upcase).to_s
132
132
  output
133
133
  end
134
134
 
135
135
  def to_html
136
- to_s.gsub(/\n/, '<br>').html_safe
136
+ to_s.gsub(/\n/, '<br>').gsub(' ', '&nbsp;&nbsp;').html_safe
137
137
  end
138
138
  end
139
139
  end
@@ -1,11 +1,11 @@
1
1
  - if address.full_name.present?
2
- = address.full_name
2
+ = address.full_name.upcase
3
3
  %br
4
- = address.address1
4
+ = address.address1.upcase
5
5
  %br
6
6
  - if address.address2.present?
7
- = address.address2
7
+ = address.address2.upcase
8
8
  %br
9
- = [address.city.presence, address.state.presence].compact.join(', ')
9
+ = [address.city.try(:upcase).presence, address.state_code.try(:upcase).presence, '&nbsp;' + address.postal_code.presence].compact.join('&nbsp;').html_safe
10
10
  %br
11
- = [address.country.presence, address.postal_code.presence].compact.join(', ')
11
+ = address.country.try(:upcase).to_s
@@ -1,3 +1,3 @@
1
1
  module EffectiveAddresses
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_addresses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-11 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails