postal_address 0.9.0 → 0.9.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.
- checksums.yaml +4 -4
- data/lib/postal_address/formatters/text.rb +1 -1
- data/lib/postal_address/version.rb +1 -1
- data/lib/postal_address.rb +0 -4
- data/postal_address.gemspec +0 -1
- metadata +1 -17
- data/spec/virtus_integration_spec.rb +0 -39
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f83668dafff4ede2c9d49c1c711cb5867167bd44
|
|
4
|
+
data.tar.gz: 535bb43703e2f420c0f5177973ae95845d0270dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dad66c7a372952a9ba32058e3a9bddbbe1f5c86704fd68d358ea304f3b6ce533025c5b06083f190ab523d6566f235a83f8ffacab5abea4421f2fd20f04ab0352
|
|
7
|
+
data.tar.gz: dc0a4a98c5b98429e355bbc43c765544f62ddd304ff7d115d2e67fbba19365ae2bab261cc9e50b9227a9f7f4ac51bace01f1f61197d6f5003e12e37eab29d9c5
|
data/lib/postal_address.rb
CHANGED
data/postal_address.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postal_address
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Melchert
|
|
@@ -66,20 +66,6 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: virtus
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
69
|
description: International postal address formatting
|
|
84
70
|
email:
|
|
85
71
|
- kevin.melchert@gmail.com
|
|
@@ -103,7 +89,6 @@ files:
|
|
|
103
89
|
- postal_address.gemspec
|
|
104
90
|
- spec/postal_address_spec.rb
|
|
105
91
|
- spec/spec_helper.rb
|
|
106
|
-
- spec/virtus_integration_spec.rb
|
|
107
92
|
homepage: ''
|
|
108
93
|
licenses:
|
|
109
94
|
- MIT
|
|
@@ -131,4 +116,3 @@ summary: International postal address formatting
|
|
|
131
116
|
test_files:
|
|
132
117
|
- spec/postal_address_spec.rb
|
|
133
118
|
- spec/spec_helper.rb
|
|
134
|
-
- spec/virtus_integration_spec.rb
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
require 'spec_helper'
|
|
3
|
-
require 'virtus'
|
|
4
|
-
|
|
5
|
-
class Address
|
|
6
|
-
include Virtus
|
|
7
|
-
attribute :id, Integer
|
|
8
|
-
attribute :recipient, String
|
|
9
|
-
attribute :street, String
|
|
10
|
-
attribute :zip, String
|
|
11
|
-
attribute :city, String
|
|
12
|
-
attribute :state, String
|
|
13
|
-
attribute :country_code, String
|
|
14
|
-
attribute :geolocation, Array
|
|
15
|
-
|
|
16
|
-
def postal_address
|
|
17
|
-
Postal::Address.new(self.attributes).to_s
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
describe Address do
|
|
22
|
-
let(:address) {
|
|
23
|
-
Address.new({
|
|
24
|
-
id: 1001,
|
|
25
|
-
recipient: 'Tobias Füncke',
|
|
26
|
-
street: '101 Broadway',
|
|
27
|
-
city: 'New York City',
|
|
28
|
-
zip: '10002',
|
|
29
|
-
state: 'NY',
|
|
30
|
-
country_code: 'us',
|
|
31
|
-
geolocation: [13,52]
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
it "should work" do
|
|
36
|
-
Postal.home_country = 'us'
|
|
37
|
-
address.postal_address.must_equal "Tobias Füncke\n101 Broadway\nNew York City NY 10002"
|
|
38
|
-
end
|
|
39
|
-
end
|