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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6324f066d5adb684494d274974aa86e071128aab06ad39014a483a88ef0c1fd6
4
- data.tar.gz: ae3e8560d9ba75e01538a1b976146314f10fe0d3e4b5cbd4bd4b66edecc9b192
3
+ metadata.gz: 362e673dc12d747bf4923df719ec27c866162cc76221cfd2bb51a92b0cf4169f
4
+ data.tar.gz: 2b0c0414609bd59f5cc3d12ad286b8285206d73e80755a065959b57a0fbc8d09
5
5
  SHA512:
6
- metadata.gz: a777cac742e07701ff22fe1f7bb6d60f852e60f572dce5efbec0d66c2b10d91b802a94661c6a11d3d2dde7a6b2f5dcdd853daa5d587702c35ffc3714e81c1853
7
- data.tar.gz: 56b6a34da4b7bfc956a1cd347a82a8b5a4b5401a94b72342486e0be37470cf9f323b130de45c20a85a227ba18fab81f08485a9a7214720da5e1e8fb084c8c317
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: 'VINDI_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
@@ -1,3 +1,3 @@
1
1
  module Vindi
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
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
- spec.add_dependency 'faraday', '~> 0.13.1'
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.3
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-02-12 00:00:00.000000000 Z
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.1
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.1
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.2
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