2Performant 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/two_performant/oauth.rb +10 -3
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -9,6 +9,13 @@ class Hash
9
9
  end
10
10
  end
11
11
 
12
+ class Net::HTTPGenericRequest
13
+ def oauth_body_hash_required?
14
+ puts 'pac oac'
15
+
16
+ return false
17
+ end
18
+ end
12
19
 
13
20
  class TwoPerformant
14
21
  class OAuth
@@ -17,7 +24,7 @@ class TwoPerformant
17
24
  def initialize(options, host)
18
25
  consumer = ::OAuth::Consumer.new(options[:consumer_token], options[:consumer_secret], {:site => host})
19
26
  @access_token = ::OAuth::AccessToken.new(consumer, options[:access_token], options[:access_secret])
20
- @headers = { 'Accept' => 'application/json', 'Content-Type' => 'application/x-www-form-urlencoded' }
27
+ @headers = { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
21
28
  end
22
29
 
23
30
  def get(path, params_hash)
@@ -27,12 +34,12 @@ class TwoPerformant
27
34
  end
28
35
 
29
36
  def post(path, params_hash)
30
- response = access_token.post(path, params_hash.to_json, @headers)
37
+ response = access_token.post(path, params_hash, @headers)
31
38
  JSON.parse(response.body)
32
39
  end
33
40
 
34
41
  def put(path, params_hash)
35
- response = access_token.put(path, params_hash.to_json, @headers)
42
+ response = access_token.put(path, params_hash, @headers)
36
43
  JSON.parse(response.body)
37
44
  end
38
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 2Performant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: