incentivale-sdk-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/incentivale/client.rb +3 -4
- data/lib/incentivale/request.rb +3 -1
- data/lib/incentivale/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b99b4c70087827c514cbce927b5cd316c7023c74a778721e8ccfe2475da3c74b
|
4
|
+
data.tar.gz: 4139ec92153f1374ba3e212f080322b3d6b1479154cb7771bdeaec0f206d7feb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82f482e795d5ee7c97d533f2d63da8e7a67c7a786d32e66cec0b828cdc1055cfaa29ce7810bdab08789a61acbe97db751c768d96a4d456acf23e7c4364409598
|
7
|
+
data.tar.gz: 3c7f02a42d4440bb97d590dee312d8c47724b38e5826a3e5d2264fcf2529f34eeba0f3cab2363aa11abe1029597e4ea5ee8e313ffe6da262338879d25f33b3cc
|
data/lib/incentivale/client.rb
CHANGED
@@ -2,18 +2,17 @@ module Incentivale
|
|
2
2
|
class Client
|
3
3
|
HOST = 'https://central-incentivale.herokuapp.com' # FIXME 'https://central.incentivale.com.br'
|
4
4
|
|
5
|
-
attr_accessor :token
|
5
|
+
attr_accessor :token
|
6
6
|
|
7
7
|
def initialize(token)
|
8
8
|
@token = token
|
9
|
-
@auth = Auth.new(self)
|
10
9
|
end
|
11
10
|
|
12
|
-
def get(path, params={})
|
11
|
+
def get(path, params = {})
|
13
12
|
request.get path, params.merge(campaign_token)
|
14
13
|
end
|
15
14
|
|
16
|
-
def post(path, resource={})
|
15
|
+
def post(path, resource = {})
|
17
16
|
request.post path, resource.merge(campaign_token)
|
18
17
|
end
|
19
18
|
|
data/lib/incentivale/request.rb
CHANGED
@@ -6,8 +6,10 @@ module Incentivale
|
|
6
6
|
|
7
7
|
def initialize(client)
|
8
8
|
@connection = Faraday.new(url: Client::HOST) do |conn|
|
9
|
-
conn.
|
9
|
+
conn.headers['Authorization'] = Auth.new(client).header
|
10
10
|
conn.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
11
|
+
conn.headers['Host'] = Client::HOST
|
12
|
+
conn.headers['Connection'] = 'Keep-Alive'
|
11
13
|
conn.request :url_encoded
|
12
14
|
conn.adapter Faraday.default_adapter
|
13
15
|
end
|
data/lib/incentivale/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incentivale-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.0'
|
111
|
-
description:
|
111
|
+
description: Gem to wrap incentivale.com.br API v3
|
112
112
|
email:
|
113
113
|
- aleotory@gmail.com
|
114
114
|
executables: []
|
@@ -130,7 +130,7 @@ files:
|
|
130
130
|
- lib/incentivale/response.rb
|
131
131
|
- lib/incentivale/token.rb
|
132
132
|
- lib/incentivale/version.rb
|
133
|
-
homepage:
|
133
|
+
homepage: https://github.com/leodcs/incentivale-sdk-ruby
|
134
134
|
licenses:
|
135
135
|
- MIT
|
136
136
|
metadata: {}
|