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.
@@ -164,7 +164,7 @@ module Shutl::Resource
164
164
  end
165
165
 
166
166
  def new_object(args={}, response=nil)
167
- instance = new add_resource_id_to(args), response
167
+ instance = new add_resource_id_to(args)
168
168
 
169
169
  instance.tap do |i|
170
170
  parsed_response = response.parsed_response
@@ -1,5 +1,5 @@
1
1
  module Shutl
2
2
  module Resource
3
- VERSION = '0.8.3'
3
+ VERSION = '0.9.0'
4
4
  end
5
5
  end
@@ -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
@@ -58,8 +58,5 @@ describe Shutl::Resource::Rest do
58
58
  resource.instance_variable_get(:@a).should == 'c'
59
59
 
60
60
  end
61
-
62
- it 'should use a white list permission'
63
-
64
61
  end
65
62
  end
@@ -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 => '{"test_rest":{"a":"a","id":"a","b":"b"}}',
307
- headers: 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
- with(:body => "{\"test_rest\":{\"a\":\"a\",\"id\":\"xxx\",\"b\":\"b\"}}",
318
- :headers => headers)
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.8.3
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-05-15 00:00:00.000000000 Z
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: -1347200737366496941
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: -1347200737366496941
183
+ hash: 842352833764410114
200
184
  requirements: []
201
185
  rubyforge_project:
202
- rubygems_version: 1.8.24
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