wheniwork_ext 0.0.13 → 0.0.14

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
  SHA1:
3
- metadata.gz: 0a60e2e5c69d662c7fec74859d5064bfe59d7c6a
4
- data.tar.gz: 7b9144ba8817067678598f29ca49c9bbe5d07fda
3
+ metadata.gz: 13e79663cda76510f16034afc3f65596fbdc8782
4
+ data.tar.gz: 7d039420e8ca6cc3e74a7ba1dda8532e6f65a2b4
5
5
  SHA512:
6
- metadata.gz: 3a5771ed2f9eb2595373a9f99fee0b73a9aba5b580cfa595bf46de913d21c5d82bedacf3a3ad6519228121eb91e29132fb25bb03cba0c20958f775fa86402db4
7
- data.tar.gz: a91d2bd3740c800009be15bef0c62327a201a31bd57a96fb3594e7fc83c3b77470c543909d08f9693fdc3bb9914a8f5f8083bc347e7346b7146b34e19bc57050
6
+ metadata.gz: f946049fb3e1487d47fb2b65b44eb10ff6866066293289a41ec9df05f7e9b9057363ed80fab7a1c6b533d7584c89f7be32fb11b0fb9643a5c75d3b7db148f33e
7
+ data.tar.gz: 177109e32d0412180999f86026542656793c30015febf6db0e443ed526393e3e38828238051d639ac13d49ef15bce5a54ceb2fc001afd00716cf0ec55dd3835f
@@ -14,14 +14,13 @@ module WhenIWork
14
14
  if cache_enabled
15
15
  key = cache_options.delete(:key) || cache_key_for(path, params)
16
16
  options = default_options.merge(cache_options)
17
-
18
17
  cache_store.fetch(key, options) do
19
18
  if method == :post
20
- puts json_params.to_s
21
- response = Faraday.post do |req|
22
- req.url endpoint+'/'+path
19
+ conn = connection
20
+ response = conn.post do |req|
21
+ req.url endpoint + path
23
22
  req.headers['Content-Type'] = 'application/json'
24
- req.headers['W-Token'] = token
23
+ req.headers['W-Token'] = token.to_s
25
24
  req.body = json_params.to_s
26
25
  end
27
26
  response.body
@@ -32,7 +31,6 @@ module WhenIWork
32
31
  else
33
32
  connection.send(method, path, params).body
34
33
  end
35
-
36
34
  end
37
35
 
38
36
  def cache_key_for(uri, params)
@@ -1,3 +1,3 @@
1
1
  module Wheniwork
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wheniwork_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Imran Haider
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-07 00:00:00.000000000 Z
11
+ date: 2014-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday