vindi 0.0.3 → 0.0.4
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/README.md +14 -1
- data/lib/vindi/error.rb +3 -0
- data/lib/vindi/version.rb +1 -1
- data/vindi.gemspec +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 362e673dc12d747bf4923df719ec27c866162cc76221cfd2bb51a92b0cf4169f
|
4
|
+
data.tar.gz: 2b0c0414609bd59f5cc3d12ad286b8285206d73e80755a065959b57a0fbc8d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64d4514d64c82a8df57d29ad7f7c4bc0658c9e313c9f8ccac1a28453efa418e4de104dca042c79ab320dfd4ec53b39a8d1821376f4a9ea4b05f55daaad1f7c1a
|
7
|
+
data.tar.gz: bcd957ab1acc508f36d0728237f374edac3c465ccf7c104f51d5f0d4067a18a1d317c59ca2bad6a1a94c2a165f1db5f4169c6da6f4386575ee8520a4612d6e03
|
data/README.md
CHANGED
@@ -30,7 +30,20 @@ Ou instale você mesmo:
|
|
30
30
|
Os métodos da API estão disponíveis atraves dos métodos da instancia de um cliente
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
client = Vindi::Client.new(key: '
|
33
|
+
client = Vindi::Client.new(key: '<sua_vindi_api_key>')
|
34
|
+
```
|
35
|
+
|
36
|
+
Para testar no ambiente Sandbox, use o endpoint da API para efetuar requisições:
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
client = Vindi::Client.new(key: '<sua_vindi_api_key>', api_endpoint: 'https://sandbox-app.vindi.com.br/api/v1')
|
40
|
+
```
|
41
|
+
|
42
|
+
Caso prefira utilizar variáveis de ambiente para prover credenciais de acesso:
|
43
|
+
|
44
|
+
```
|
45
|
+
export VINDI_KEY="<sua_vindi_api_key>"
|
46
|
+
export VINDI_API_ENDPOINT="https://sandbox-app.vindi.com.br/api/v1"
|
34
47
|
```
|
35
48
|
|
36
49
|
### Consumindo recursos
|
data/lib/vindi/error.rb
CHANGED
@@ -30,6 +30,9 @@ module Vindi
|
|
30
30
|
# Raised when Vindi returns a 5xx HTTP status code
|
31
31
|
ServerError = Class.new(self)
|
32
32
|
|
33
|
+
# Raised when Vindi returns the HTTP status code 500
|
34
|
+
InternalServerError = Class.new(ServerError)
|
35
|
+
|
33
36
|
# Raised when Vindi returns the HTTP status code 502
|
34
37
|
BadGateway = Class.new(ServerError)
|
35
38
|
|
data/lib/vindi/version.rb
CHANGED
data/vindi.gemspec
CHANGED
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files += Dir.glob("lib/**/*.rb")
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
|
18
|
-
|
18
|
+
|
19
|
+
spec.add_dependency 'faraday', '~> 0.13'
|
19
20
|
spec.add_development_dependency "bundler"
|
20
21
|
spec.add_development_dependency "rake", "~> 10.0"
|
21
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vindi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.13
|
19
|
+
version: '0.13'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.13
|
26
|
+
version: '0.13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
rubygems_version: 3.0.
|
116
|
+
rubygems_version: 3.0.1
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Ruby toolkit for working with the Vindi API
|