koala 1.11.0 → 1.11.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
  SHA1:
3
- metadata.gz: 7c18d7418b80cc0f8659f1ed4e390a5ecae660d2
4
- data.tar.gz: 03350209620bdcf14e9173eb8ccabcc0572d2a3a
3
+ metadata.gz: 44887034b965ebbac49df6389117a3482918a215
4
+ data.tar.gz: 0e49cb623168d97da705aed316df81eb7a1dfebf
5
5
  SHA512:
6
- metadata.gz: d042dcd2dd67fa01043bd36de85eca5c85715003df73c9076da70fb5f4c6fa8a2df7510d8de1e7210839c475e15514b275861ed30e56c5de5ba92ac415c2be1c
7
- data.tar.gz: 3c07f360639e395f661fc6f8068d3a6120ea9f2ed98a4460d88fce0e57b34b4871230b5649118ec12daf52db47ac0234b68f5c6be8b2e62c43d9de9654d977c7
6
+ metadata.gz: 27f94913be28e196b58ff0934611007025f9374b0f08c3925dc6ce66670493f6dc06c7c6907c22b437765215435fd177b7f858c288466dfa1aa424eae3107344
7
+ data.tar.gz: f58743aef73431532ca4a8e206ede00abaf43522b5c1e6638f4cd8e4d2a74277661ca1a20f2911fb3aac57309879c10be66561e5b5d30dbbdd5c07664da564f9
@@ -1,3 +1,6 @@
1
+ language: ruby
2
+ sudo: false
3
+ cache: bundler
1
4
  rvm:
2
5
  # MRI
3
6
  - 1.9.3
@@ -1,3 +1,9 @@
1
+ v.1.11.1
2
+ =======
3
+
4
+ Bug fixes:
5
+ * Properly import Facebook error attributes (thanks, isra17!)
6
+
1
7
  v.1.11.0
2
8
  ========
3
9
 
@@ -14,7 +14,7 @@ module Koala
14
14
  # http_status, then the error was detected before making a call to Facebook. (e.g. missing access token)
15
15
  class APIError < ::Koala::KoalaError
16
16
  attr_accessor :fb_error_type, :fb_error_code, :fb_error_subcode, :fb_error_message,
17
- :fb_error_user_message, :fb_error_user_title, :http_status, :response_body
17
+ :fb_error_user_msg, :fb_error_user_title, :http_status, :response_body
18
18
 
19
19
  # Create a new API Error
20
20
  #
@@ -51,11 +51,11 @@ module Koala
51
51
  self.fb_error_code = error_info["code"]
52
52
  self.fb_error_subcode = error_info["error_subcode"]
53
53
  self.fb_error_message = error_info["message"]
54
- self.fb_error_user_message = error_info["error_user_message"]
54
+ self.fb_error_user_msg = error_info["error_user_msg"]
55
55
  self.fb_error_user_title = error_info["error_user_title"]
56
56
 
57
57
  error_array = []
58
- %w(type code error_subcode message error_user_title error_user_message).each do |key|
58
+ %w(type code error_subcode message error_user_title error_user_msg).each do |key|
59
59
  error_array << "#{key}: #{error_info[key]}" if error_info[key]
60
60
  end
61
61
 
@@ -1,3 +1,3 @@
1
1
  module Koala
2
- VERSION = "1.11.0"
2
+ VERSION = "1.11.1"
3
3
  end
@@ -5,7 +5,7 @@ describe Koala::Facebook::APIError do
5
5
  expect(Koala::Facebook::APIError.new(nil, nil)).to be_a(Koala::KoalaError)
6
6
  end
7
7
 
8
- [:fb_error_type, :fb_error_code, :fb_error_subcode, :fb_error_message, :fb_error_user_message, :fb_error_user_title, :http_status, :response_body].each do |accessor|
8
+ [:fb_error_type, :fb_error_code, :fb_error_subcode, :fb_error_message, :fb_error_user_msg, :fb_error_user_title, :http_status, :response_body].each do |accessor|
9
9
  it "has an accessor for #{accessor}" do
10
10
  expect(Koala::Facebook::APIError.instance_methods.map(&:to_sym)).to include(accessor)
11
11
  expect(Koala::Facebook::APIError.instance_methods.map(&:to_sym)).to include(:"#{accessor}=")
@@ -28,7 +28,7 @@ describe Koala::Facebook::APIError do
28
28
  'message' => 'message',
29
29
  'code' => 1,
30
30
  'error_subcode' => 'subcode',
31
- 'error_user_message' => 'error user message',
31
+ 'error_user_msg' => 'error user message',
32
32
  'error_user_title' => 'error user title'
33
33
  }
34
34
  Koala::Facebook::APIError.new(400, '', error_info)
@@ -39,7 +39,7 @@ describe Koala::Facebook::APIError do
39
39
  :fb_error_message => 'message',
40
40
  :fb_error_code => 1,
41
41
  :fb_error_subcode => 'subcode',
42
- :fb_error_user_message => 'error user message',
42
+ :fb_error_user_msg => 'error user message',
43
43
  :fb_error_user_title => 'error user title'
44
44
  }.each_pair do |accessor, value|
45
45
  it "sets #{accessor} to #{value}" do
@@ -48,7 +48,7 @@ describe Koala::Facebook::APIError do
48
48
  end
49
49
 
50
50
  it "sets the error message appropriately" do
51
- expect(error.message).to eq("type: type, code: 1, error_subcode: subcode, message: message, error_user_title: error user title, error_user_message: error user message [HTTP 400]")
51
+ expect(error.message).to eq("type: type, code: 1, error_subcode: subcode, message: message, error_user_title: error user title, error_user_msg: error user message [HTTP 400]")
52
52
  end
53
53
  end
54
54
 
@@ -62,14 +62,14 @@ describe Koala::Facebook::APIError do
62
62
 
63
63
  context "with no error_info and a response_body containing error JSON" do
64
64
  it "should extract the error info from the response body" do
65
- response_body = '{ "error": { "type": "type", "message": "message", "code": 1, "error_subcode": "subcode", "error_user_message": "error user message", "error_user_title": "error user title" } }'
65
+ response_body = '{ "error": { "type": "type", "message": "message", "code": 1, "error_subcode": "subcode", "error_user_msg": "error user message", "error_user_title": "error user title" } }'
66
66
  error = Koala::Facebook::APIError.new(400, response_body)
67
67
  {
68
68
  :fb_error_type => 'type',
69
69
  :fb_error_message => 'message',
70
70
  :fb_error_code => 1,
71
71
  :fb_error_subcode => 'subcode',
72
- :fb_error_user_message => 'error user message',
72
+ :fb_error_user_msg => 'error user message',
73
73
  :fb_error_user_title => 'error user title'
74
74
  }.each_pair do |accessor, value|
75
75
  expect(error.send(accessor)).to eq(value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koala
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Koppel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-15 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json