shutl_resource 0.8.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
data/shutl_resource.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_development_dependency 'rspec', '~> 2.11.0'
|
27
27
|
gem.add_development_dependency 'debugger' if $platform.to_s == 'ruby'
|
28
28
|
gem.add_development_dependency 'ruby-debug' if $platform.to_s == 'java'
|
29
|
-
gem.add_development_dependency 'vcr'
|
30
29
|
|
31
30
|
gem.add_development_dependency 'webmock', '~> 1.8.7'
|
32
31
|
end
|
data/spec/rest_resource_spec.rb
CHANGED
@@ -303,8 +303,10 @@ describe Shutl::Resource::Rest do
|
|
303
303
|
describe '#update!' do
|
304
304
|
it 'should post the new json representation' do
|
305
305
|
request = stub_request(:put, "http://host/test_rests/a").
|
306
|
-
with(:body =>
|
307
|
-
headers
|
306
|
+
with(:body => {test_rest:{a:"a",b:"b",id:"a"}},
|
307
|
+
:headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json'}).
|
308
|
+
to_return(:status => 200, :body => "", :headers => {})
|
309
|
+
|
308
310
|
test_resource = TestRest.new
|
309
311
|
|
310
312
|
test_resource.update!(a: 'a', b: 'b')
|
@@ -314,8 +316,9 @@ describe Shutl::Resource::Rest do
|
|
314
316
|
|
315
317
|
it 'should convert new_id to id in attributes' do
|
316
318
|
request = stub_request(:put, "http://host/test_rests/a").
|
317
|
-
|
318
|
-
|
319
|
+
with(:body => {test_rest:{a:"a",b:"b",id:"xxx"}},
|
320
|
+
:headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json'}).
|
321
|
+
to_return(:status => 200, :body => "", :headers => {})
|
319
322
|
|
320
323
|
test_resource = TestRest.new
|
321
324
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,18 +3,3 @@ require 'webmock/rspec'
|
|
3
3
|
|
4
4
|
require 'support/test_resource'
|
5
5
|
require 'support/double_logger'
|
6
|
-
|
7
|
-
|
8
|
-
require 'vcr'
|
9
|
-
|
10
|
-
|
11
|
-
VCR.configure do |c|
|
12
|
-
c.cassette_library_dir = 'spec/vcr'
|
13
|
-
c.hook_into :webmock
|
14
|
-
c.allow_http_connections_when_no_cassette = false
|
15
|
-
c.default_cassette_options = {
|
16
|
-
record: ENV['VCR_RERECORD'].present? ? :all : :once
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shutl_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: httparty
|
@@ -109,22 +109,6 @@ dependencies:
|
|
109
109
|
- - ! '>='
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: vcr
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
|
-
requirements:
|
117
|
-
- - ! '>='
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '0'
|
120
|
-
type: :development
|
121
|
-
prerelease: false
|
122
|
-
version_requirements: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
|
-
requirements:
|
125
|
-
- - ! '>='
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
128
112
|
- !ruby/object:Gem::Dependency
|
129
113
|
name: webmock
|
130
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
171
|
version: '0'
|
188
172
|
segments:
|
189
173
|
- 0
|
190
|
-
hash:
|
174
|
+
hash: 842352833764410114
|
191
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
176
|
none: false
|
193
177
|
requirements:
|
@@ -196,10 +180,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
180
|
version: '0'
|
197
181
|
segments:
|
198
182
|
- 0
|
199
|
-
hash:
|
183
|
+
hash: 842352833764410114
|
200
184
|
requirements: []
|
201
185
|
rubyforge_project:
|
202
|
-
rubygems_version: 1.8.
|
186
|
+
rubygems_version: 1.8.23
|
203
187
|
signing_key:
|
204
188
|
specification_version: 3
|
205
189
|
summary: Manage Shutl Rest resource. Parse/Serialize JSON
|