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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9830befd921edbdb4fe46511326c992d8844e9b4cf7aac93f4e498736ee20726
4
- data.tar.gz: f4f758abfcac2f00dd30b5193e0ef502521215de76629cf9c8465cad32fec5b2
3
+ metadata.gz: b99b4c70087827c514cbce927b5cd316c7023c74a778721e8ccfe2475da3c74b
4
+ data.tar.gz: 4139ec92153f1374ba3e212f080322b3d6b1479154cb7771bdeaec0f206d7feb
5
5
  SHA512:
6
- metadata.gz: 14bd2827633f38ce67fc74c82f333488faaa4ca6e32eeaee1c1a4e110584dc73876d58cf8842ce978ecbabc83891dd575a1ebd36434c887b95755f1428e64b0e
7
- data.tar.gz: 60054b985c93ec1665495914577ff0e6680bd1c160932debdc5018452d94e689dbe0f5082aa22bf5fd0043b1ed3928cc9892d3fd8ccd60603980ea7c56d4910f
6
+ metadata.gz: 82f482e795d5ee7c97d533f2d63da8e7a67c7a786d32e66cec0b828cdc1055cfaa29ce7810bdab08789a61acbe97db751c768d96a4d456acf23e7c4364409598
7
+ data.tar.gz: 3c7f02a42d4440bb97d590dee312d8c47724b38e5826a3e5d2264fcf2529f34eeba0f3cab2363aa11abe1029597e4ea5ee8e313ffe6da262338879d25f33b3cc
@@ -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, :auth
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
 
@@ -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.token_auth(client.auth.header)
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
@@ -1,3 +1,3 @@
1
1
  module Incentivale
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-10 00:00:00.000000000 Z
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: {}