intelipost 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/Rakefile +4 -0
- data/intelipost.gemspec +1 -1
- data/lib/intelipost.rb +2 -1
- data/lib/intelipost/client.rb +1 -0
- data/lib/intelipost/version.rb +1 -1
- data/spec/lib/intelipost/client_spec.rb +2 -2
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f25b204e3cf8bfb468eeafcba50a04f188c243f1
|
4
|
+
data.tar.gz: b1349e5f37a08e0c6c3fb31385ee5ab8036c6a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecd0064e1f33834f600f3580b99d3b6309b761d99bbc02a1d67134207fea23a07223f097bf871713aaefd6bf8998f50275074967c5c94e7a276d495401952ac7
|
7
|
+
data.tar.gz: 3ad76c9ac138e6f3a658899cd3717d8fa4f786e3875b02e305a524aa11a159e24f34c932fcce27cd86aecf4297a8ac9fd3c4d2e1613d70aff4da2556c7799c50
|
data/README.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# intelipost
|
2
2
|
Gem for the Intelipost API
|
3
3
|
|
4
|
+
### Usage:
|
5
|
+
|
6
|
+
````ruby
|
7
|
+
require 'intelipost'
|
8
|
+
|
9
|
+
client = Intelipost::Client.new api_key: <your api key>
|
10
|
+
address = client.cep.address_complete '05307000'
|
11
|
+
# => #<Hashie::Mash content=#<Hashie::Mash bairro="Vila Ribeiro de Barros" city="São Paulo" ibge="3550308" neighborhood="Vila Ribeiro de Barros" state="São Paulo" state_short="SP" street="R Maj Paladino"> messages=[] status="OK" time="0.6 ms">
|
12
|
+
address.content.street
|
13
|
+
# => "R Maj Paladino"
|
14
|
+
````
|
15
|
+
|
16
|
+
### Development:
|
17
|
+
|
4
18
|
For testing, create a `.env` file with the following content:
|
5
19
|
````bash
|
6
20
|
INTELIPOST_API_KEY=<YOUR API KEY>
|
data/Rakefile
CHANGED
data/intelipost.gemspec
CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "faraday", "~> 0.9.1"
|
22
22
|
spec.add_dependency "faraday_middleware", "~> 0.9.1"
|
23
23
|
spec.add_dependency "hashie", "~> 3.4.1"
|
24
|
-
spec.add_dependency "dotenv", "~> 2.0.1"
|
25
24
|
|
26
25
|
spec.add_development_dependency "bundler", "~> 1.9.4"
|
27
26
|
spec.add_development_dependency "rake", "~> 10.4.2"
|
@@ -29,4 +28,5 @@ Gem::Specification.new do |spec|
|
|
29
28
|
spec.add_development_dependency "vcr", "~> 2.9.3"
|
30
29
|
spec.add_development_dependency "webmock", "~> 1.21"
|
31
30
|
spec.add_development_dependency "simplecov", "~> 0.10"
|
31
|
+
spec.add_development_dependency "dotenv", "~> 2.0.1"
|
32
32
|
end
|
data/lib/intelipost.rb
CHANGED
data/lib/intelipost/client.rb
CHANGED
data/lib/intelipost/version.rb
CHANGED
@@ -33,8 +33,8 @@ describe Intelipost::Client, :vcr do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
describe '#cep' do
|
36
|
-
it 'returns
|
37
|
-
expect(subject.cep.address_complete('04661100')).to
|
36
|
+
it 'returns a Hashie::Mash' do
|
37
|
+
expect(subject.cep.address_complete('04661100').class).to be Hashie::Mash
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intelipost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Sampaio
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.4.1
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: dotenv
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.1
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.0.1
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: bundler
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +136,20 @@ dependencies:
|
|
150
136
|
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: '0.10'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: dotenv
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.0.1
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.0.1
|
153
153
|
description: Gem to access the REST API of Intelipost
|
154
154
|
email:
|
155
155
|
- eduardo@sampa.io
|