tumblr_wrapper 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,7 @@ module TumblrWrapper::HTTP
5
5
  connection = Faraday.new TumblrWrapper.endpoint do |conn|
6
6
  conn.request :oauth, access_token if opts[:signed]
7
7
  conn.request :url_encoded
8
+ conn.response :json, :content_type => /\bjson$/
8
9
  conn.adapter Faraday.default_adapter
9
10
  end
10
11
  if opts[:signed]
@@ -20,6 +21,7 @@ module TumblrWrapper::HTTP
20
21
  connection = Faraday.new TumblrWrapper.endpoint do |conn|
21
22
  conn.request :oauth, access_token
22
23
  conn.request :url_encoded
24
+ conn.response :json, :content_type => /\bjson$/
23
25
  conn.adapter Faraday.default_adapter
24
26
  end
25
27
 
@@ -1,3 +1,3 @@
1
1
  module TumblrWrapper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -33,6 +33,9 @@ describe TumblrWrapper, type: :integration do
33
33
 
34
34
  blog_resource = TumblrWrapper::Blog.new(blogname, token)
35
35
  info = blog_resource.info
36
+
37
+ info.body["meta"]["status"].should == 200
38
+ info.body["response"]["blog"]["title"].should == blog_title
36
39
  end
37
40
  end
38
41
 
@@ -11,6 +11,10 @@ module TokenHelper
11
11
  ""
12
12
  end
13
13
 
14
+ def blog_title
15
+ ""
16
+ end
17
+
14
18
  def access_token
15
19
  ""
16
20
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - rheaton