File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 8
8
GEM
9
9
remote: http://rubygems.org/
10
10
specs:
11
- crack (0.1.8 )
11
+ crack (0.3.2 )
12
12
diff-lcs (1.1.2 )
13
13
fakeweb (1.3.0 )
14
- httparty (0.7.4 )
15
- crack (= 0.1.8 )
14
+ httparty (0.10.2 )
15
+ multi_json (~> 1.0 )
16
+ multi_xml (>= 0.5.2 )
17
+ multi_json (1.6.1 )
18
+ multi_xml (0.5.3 )
16
19
rspec (2.5.0 )
17
20
rspec-core (~> 2.5.0 )
18
21
rspec-expectations (~> 2.5.0 )
@@ -27,8 +30,6 @@ PLATFORMS
27
30
28
31
DEPENDENCIES
29
32
bundler (>= 1.0.0 )
30
- crack
31
33
fakeweb
32
- httparty
33
34
rspec
34
35
ruby-pardot !
Original file line number Diff line number Diff line change @@ -47,8 +47,9 @@ def check_response http_response
47
47
48
48
error = rsp [ "err" ] if rsp
49
49
error ||= "Unknown Failure: #{ rsp . inspect } " if rsp && rsp [ "stat" ] == "fail"
50
+ content = error [ '__content__' ] if error . is_a? ( Hash )
50
51
51
- if error == "Invalid API key or user key" && @api_key
52
+ if [ error , content ] . include? ( "Invalid API key or user key" ) && @api_key
52
53
raise ExpiredApiKeyError . new @api_key
53
54
end
54
55
Original file line number Diff line number Diff line change 8
8
9
9
require 'ruby-pardot'
10
10
11
- Dir [ File . join ( "spec /support/**/*.rb") ] . each { |f | require f }
11
+ Dir [ " #{ File . dirname ( __FILE__ ) } /support/**/*.rb"] . each { |f | require f }
You can’t perform that action at this time.
0 commit comments