rightnow-client 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -203,7 +203,7 @@ module Rightnow
203
203
  end
204
204
  body
205
205
  rescue JSON::ParserError
206
- raise Rightnow::Error.new("Bad JSON received: #{response.body.inspect}")
206
+ raise Rightnow::JsonParseError.new(response.body)
207
207
  end
208
208
 
209
209
  def comment_xml_payload comment, opts = {}
@@ -9,4 +9,6 @@ module Rightnow
9
9
  super + (@code.nil? ? '' : " (#{@code})")
10
10
  end
11
11
  end
12
+
13
+ class JsonParseError < StandardError; end
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module Rightnow
2
- VERSION = "0.0.6"
2
+ VERSION = "0.1.0"
3
3
  end
data/spec/client_spec.rb CHANGED
@@ -151,7 +151,7 @@ describe Rightnow::Client do
151
151
  stub_request(:get, /.*/).to_return(:status => 200, :body => 'bad')
152
152
  expect {
153
153
  client.request 'UserList'
154
- }.to raise_error(Rightnow::Error, 'Bad JSON received: "bad"')
154
+ }.to raise_error(Rightnow::JsonParseError, 'bad')
155
155
  end
156
156
 
157
157
  it "parse JSON response correctly" do
metadata CHANGED
@@ -1,112 +1,112 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightnow-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
4
  prerelease:
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Adrien Jarthon
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: faraday
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
15
+ version_requirements: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.8.0
20
+ none: false
21
+ name: faraday
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
24
+ requirement: !ruby/object:Gem::Requirement
26
25
  requirements:
27
26
  - - ! '>='
28
27
  - !ruby/object:Gem::Version
29
28
  version: 0.8.0
30
- - !ruby/object:Gem::Dependency
31
- name: virtus
32
- requirement: !ruby/object:Gem::Requirement
33
29
  none: false
30
+ - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
34
32
  requirements:
35
33
  - - ! '>='
36
34
  - !ruby/object:Gem::Version
37
35
  version: 0.5.3
36
+ none: false
37
+ name: virtus
38
38
  type: :runtime
39
39
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
40
+ requirement: !ruby/object:Gem::Requirement
42
41
  requirements:
43
42
  - - ! '>='
44
43
  - !ruby/object:Gem::Version
45
44
  version: 0.5.3
46
- - !ruby/object:Gem::Dependency
47
- name: typhoeus
48
- requirement: !ruby/object:Gem::Requirement
49
45
  none: false
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
50
48
  requirements:
51
49
  - - ! '>='
52
50
  - !ruby/object:Gem::Version
53
51
  version: 0.5.0
52
+ none: false
53
+ name: typhoeus
54
54
  type: :runtime
55
55
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
56
+ requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ! '>='
60
59
  - !ruby/object:Gem::Version
61
60
  version: 0.5.0
62
- - !ruby/object:Gem::Dependency
63
- name: rspec
64
- requirement: !ruby/object:Gem::Requirement
65
61
  none: false
62
+ - !ruby/object:Gem::Dependency
63
+ version_requirements: !ruby/object:Gem::Requirement
66
64
  requirements:
67
65
  - - ~>
68
66
  - !ruby/object:Gem::Version
69
67
  version: '2.6'
68
+ none: false
69
+ name: rspec
70
70
  type: :development
71
71
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
72
+ requirement: !ruby/object:Gem::Requirement
74
73
  requirements:
75
74
  - - ~>
76
75
  - !ruby/object:Gem::Version
77
76
  version: '2.6'
78
- - !ruby/object:Gem::Dependency
79
- name: webmock
80
- requirement: !ruby/object:Gem::Requirement
81
77
  none: false
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: !ruby/object:Gem::Requirement
82
80
  requirements:
83
81
  - - ~>
84
82
  - !ruby/object:Gem::Version
85
83
  version: '1.8'
84
+ none: false
85
+ name: webmock
86
86
  type: :development
87
87
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
88
+ requirement: !ruby/object:Gem::Requirement
90
89
  requirements:
91
90
  - - ~>
92
91
  - !ruby/object:Gem::Version
93
92
  version: '1.8'
94
- - !ruby/object:Gem::Dependency
95
- name: rake
96
- requirement: !ruby/object:Gem::Requirement
97
93
  none: false
94
+ - !ruby/object:Gem::Dependency
95
+ version_requirements: !ruby/object:Gem::Requirement
98
96
  requirements:
99
97
  - - ! '>='
100
98
  - !ruby/object:Gem::Version
101
99
  version: '0'
100
+ none: false
101
+ name: rake
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
104
+ requirement: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - ! '>='
108
107
  - !ruby/object:Gem::Version
109
108
  version: '0'
109
+ none: false
110
110
  description: Rightnow API Ruby wrapper
111
111
  email:
112
112
  - adrien.jarthon@dimelo.com
@@ -151,17 +151,17 @@ rdoc_options: []
151
151
  require_paths:
152
152
  - lib
153
153
  required_ruby_version: !ruby/object:Gem::Requirement
154
- none: false
155
154
  requirements:
156
155
  - - ! '>='
157
156
  - !ruby/object:Gem::Version
158
157
  version: '0'
159
- required_rubygems_version: !ruby/object:Gem::Requirement
160
158
  none: false
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
160
  requirements:
162
161
  - - ! '>='
163
162
  - !ruby/object:Gem::Version
164
163
  version: '0'
164
+ none: false
165
165
  requirements: []
166
166
  rubyforge_project:
167
167
  rubygems_version: 1.8.23