shutl_resource 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,10 +9,9 @@ class Shutl::Resource::Error < ::IOError
9
9
  end
10
10
 
11
11
  # This NoQuotesGenerated is shutl specific corresponding to HTTP status 299.
12
- # We had a good think about what the correct HTTP code is for the case that
13
- # the request is fine, but we couldn't generate any quotes. It doesn't feel
14
- # like a 4xx or a 5xx, but not quite like a 2xx either. Comments/thoughts
15
- # more than welcome.
12
+ # The correct solution to this would be to remove this exception from the gem
13
+ # and handle specifically in a QuoteCollection resource in for example the
14
+ # 'shutl' gem.
16
15
  Shutl::NoQuotesGenerated = Class.new Shutl::Resource::Error
17
16
 
18
17
  Shutl::BadRequest = Class.new Shutl::Resource::Error
@@ -62,6 +62,10 @@ module Shutl::Resource
62
62
  super
63
63
  end
64
64
 
65
+ def respond_to? method
66
+ self.instance_variables.include?(:"@#{method}")
67
+ end
68
+
65
69
  def parsed
66
70
  response.parsed_response
67
71
  end
@@ -1,5 +1,5 @@
1
1
  module Shutl
2
2
  module Resource
3
- VERSION = '0.8.1'
3
+ VERSION = '0.8.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutl_resource
3
3
  version: !ruby/object:Gem::Version
4
+ version: 0.8.2
4
5
  prerelease:
5
- version: 0.8.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Rouchy
@@ -11,136 +11,136 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-14 00:00:00.000000000 Z
14
+ date: 2013-04-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- version_requirements: !ruby/object:Gem::Requirement
17
+ name: httparty
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
21
  - - ~>
20
22
  - !ruby/object:Gem::Version
21
23
  version: 0.10.0
22
- none: false
23
- name: httparty
24
24
  type: :runtime
25
25
  prerelease: false
26
- requirement: !ruby/object:Gem::Requirement
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
27
28
  requirements:
28
29
  - - ~>
29
30
  - !ruby/object:Gem::Version
30
31
  version: 0.10.0
31
- none: false
32
32
  - !ruby/object:Gem::Dependency
33
- version_requirements: !ruby/object:Gem::Requirement
33
+ name: shutl_auth
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
34
36
  requirements:
35
37
  - - '='
36
38
  - !ruby/object:Gem::Version
37
39
  version: 0.8.0
38
- none: false
39
- name: shutl_auth
40
40
  type: :runtime
41
41
  prerelease: false
42
- requirement: !ruby/object:Gem::Requirement
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
43
44
  requirements:
44
45
  - - '='
45
46
  - !ruby/object:Gem::Version
46
47
  version: 0.8.0
47
- none: false
48
48
  - !ruby/object:Gem::Dependency
49
- version_requirements: !ruby/object:Gem::Requirement
49
+ name: activemodel
50
+ requirement: !ruby/object:Gem::Requirement
51
+ none: false
50
52
  requirements:
51
53
  - - ! '>='
52
54
  - !ruby/object:Gem::Version
53
55
  version: '0'
54
- none: false
55
- name: activemodel
56
56
  type: :runtime
57
57
  prerelease: false
58
- requirement: !ruby/object:Gem::Requirement
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
59
60
  requirements:
60
61
  - - ! '>='
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
- none: false
64
64
  - !ruby/object:Gem::Dependency
65
- version_requirements: !ruby/object:Gem::Requirement
65
+ name: rake
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
66
68
  requirements:
67
69
  - - ! '>='
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
- none: false
71
- name: rake
72
72
  type: :development
73
73
  prerelease: false
74
- requirement: !ruby/object:Gem::Requirement
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
75
76
  requirements:
76
77
  - - ! '>='
77
78
  - !ruby/object:Gem::Version
78
79
  version: '0'
79
- none: false
80
80
  - !ruby/object:Gem::Dependency
81
- version_requirements: !ruby/object:Gem::Requirement
81
+ name: rspec
82
+ requirement: !ruby/object:Gem::Requirement
83
+ none: false
82
84
  requirements:
83
85
  - - ~>
84
86
  - !ruby/object:Gem::Version
85
87
  version: 2.11.0
86
- none: false
87
- name: rspec
88
88
  type: :development
89
89
  prerelease: false
90
- requirement: !ruby/object:Gem::Requirement
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
91
92
  requirements:
92
93
  - - ~>
93
94
  - !ruby/object:Gem::Version
94
95
  version: 2.11.0
95
- none: false
96
96
  - !ruby/object:Gem::Dependency
97
- version_requirements: !ruby/object:Gem::Requirement
97
+ name: debugger
98
+ requirement: !ruby/object:Gem::Requirement
99
+ none: false
98
100
  requirements:
99
101
  - - ! '>='
100
102
  - !ruby/object:Gem::Version
101
103
  version: '0'
102
- none: false
103
- name: debugger
104
104
  type: :development
105
105
  prerelease: false
106
- requirement: !ruby/object:Gem::Requirement
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
107
108
  requirements:
108
109
  - - ! '>='
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
- none: false
112
112
  - !ruby/object:Gem::Dependency
113
- version_requirements: !ruby/object:Gem::Requirement
113
+ name: vcr
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
114
116
  requirements:
115
117
  - - ! '>='
116
118
  - !ruby/object:Gem::Version
117
119
  version: '0'
118
- none: false
119
- name: vcr
120
120
  type: :development
121
121
  prerelease: false
122
- requirement: !ruby/object:Gem::Requirement
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
123
124
  requirements:
124
125
  - - ! '>='
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
- none: false
128
128
  - !ruby/object:Gem::Dependency
129
- version_requirements: !ruby/object:Gem::Requirement
129
+ name: webmock
130
+ requirement: !ruby/object:Gem::Requirement
131
+ none: false
130
132
  requirements:
131
133
  - - ~>
132
134
  - !ruby/object:Gem::Version
133
135
  version: 1.8.7
134
- none: false
135
- name: webmock
136
136
  type: :development
137
137
  prerelease: false
138
- requirement: !ruby/object:Gem::Requirement
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
139
140
  requirements:
140
141
  - - ~>
141
142
  - !ruby/object:Gem::Version
142
143
  version: 1.8.7
143
- none: false
144
144
  description: Shutl Rest resource
145
145
  email:
146
146
  - davidr@shutl.co.uk
@@ -215,20 +215,26 @@ rdoc_options: []
215
215
  require_paths:
216
216
  - lib
217
217
  required_ruby_version: !ruby/object:Gem::Requirement
218
+ none: false
218
219
  requirements:
219
220
  - - ! '>='
220
221
  - !ruby/object:Gem::Version
221
222
  version: '0'
222
- none: false
223
+ segments:
224
+ - 0
225
+ hash: -2642824011993525669
223
226
  required_rubygems_version: !ruby/object:Gem::Requirement
227
+ none: false
224
228
  requirements:
225
229
  - - ! '>='
226
230
  - !ruby/object:Gem::Version
227
231
  version: '0'
228
- none: false
232
+ segments:
233
+ - 0
234
+ hash: -2642824011993525669
229
235
  requirements: []
230
236
  rubyforge_project:
231
- rubygems_version: 1.8.23
237
+ rubygems_version: 1.8.24
232
238
  signing_key:
233
239
  specification_version: 3
234
240
  summary: Manage Shutl Rest resource. Parse/Serialize JSON