ddy_remote_resource 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/lib/remote_resource/version.rb +1 -1
- data/remote_resource.gemspec +2 -2
- data/spec/integration/create_spec.rb +3 -3
- data/spec/integration/save_spec.rb +4 -4
- data/spec/lib/remote_resource/version_spec.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdcc65c8c1ef37e590832d19cb42875c41be7e8c02510c17e92eb0a5a3bf6122
|
4
|
+
data.tar.gz: '09d6e13818904b4ba85ec25ecb068515034cc653e559e5acd19f3e14c7074d07'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c54a32a3078e3ec62a3a24459b59441267c9d1829042d65c84e44de551f6507fdbec08a2bcb61f27c7e26abbe44f61678d02504d57f6dc8fbf772d195281a496
|
7
|
+
data.tar.gz: 205982b8664b2d0fb78dacfb215b6b456305a63b3eef8fe0ccd036439f7ed826bd5d874b43d73a5a715f97c452d6d612e0d0a230e56ea95d3c871f4a0d78ba4a
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3
|
1
|
+
2.5.3
|
data/.travis.yml
CHANGED
data/remote_resource.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
28
28
|
spec.add_development_dependency 'terminal-notifier-guard', '~> 1.6'
|
29
29
|
|
30
|
-
spec.add_runtime_dependency 'activesupport', '>= 4.1', '<
|
31
|
-
spec.add_runtime_dependency 'activemodel', '>= 4.1', '<
|
30
|
+
spec.add_runtime_dependency 'activesupport', '>= 4.1', '< 7'
|
31
|
+
spec.add_runtime_dependency 'activemodel', '>= 4.1', '< 7'
|
32
32
|
spec.add_runtime_dependency 'virtus', '~> 1.0', '>= 1.0.4'
|
33
33
|
spec.add_runtime_dependency 'mime-types', '~> 3.0'
|
34
34
|
spec.add_runtime_dependency 'ethon', '~> 0.7', '>= 0.7.1'
|
@@ -44,7 +44,7 @@ RSpec.describe '.create' do
|
|
44
44
|
|
45
45
|
let!(:expected_request) do
|
46
46
|
mock_request = stub_request(:post, 'https://www.example.com/posts.json')
|
47
|
-
mock_request.with(query: nil, body:
|
47
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers)
|
48
48
|
mock_request.to_return(status: 201, body: JSON.generate(response_body))
|
49
49
|
mock_request
|
50
50
|
end
|
@@ -81,7 +81,7 @@ RSpec.describe '.create' do
|
|
81
81
|
|
82
82
|
let!(:expected_request) do
|
83
83
|
mock_request = stub_request(:post, 'https://www.example.com/posts.json')
|
84
|
-
mock_request.with(query: nil, body:
|
84
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers.merge({ 'X-Pseudonym' => 'pseudonym' }))
|
85
85
|
mock_request.to_return(status: 201, body: JSON.generate(response_body))
|
86
86
|
mock_request
|
87
87
|
end
|
@@ -114,7 +114,7 @@ RSpec.describe '.create' do
|
|
114
114
|
|
115
115
|
let!(:expected_request) do
|
116
116
|
mock_request = stub_request(:post, 'https://www.example.com/posts.json')
|
117
|
-
mock_request.with(query: nil, body:
|
117
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers)
|
118
118
|
mock_request.to_return(status: 422, body: JSON.generate(response_body))
|
119
119
|
mock_request
|
120
120
|
end
|
@@ -48,7 +48,7 @@ RSpec.describe '#save' do
|
|
48
48
|
describe 'default behaviour' do
|
49
49
|
let!(:expected_request) do
|
50
50
|
mock_request = stub_request(:patch, 'https://www.example.com/posts/12.json')
|
51
|
-
mock_request.with(query: nil, body:
|
51
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers)
|
52
52
|
mock_request.to_return(status: 200, body: JSON.generate(response_body))
|
53
53
|
mock_request
|
54
54
|
end
|
@@ -77,7 +77,7 @@ RSpec.describe '#save' do
|
|
77
77
|
describe 'with connection_options[:headers]' do
|
78
78
|
let!(:expected_request) do
|
79
79
|
mock_request = stub_request(:patch, 'https://www.example.com/posts/12.json')
|
80
|
-
mock_request.with(query: nil, body:
|
80
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers.merge({ 'X-Pseudonym' => 'pseudonym' }))
|
81
81
|
mock_request.to_return(status: 200, body: JSON.generate(response_body))
|
82
82
|
mock_request
|
83
83
|
end
|
@@ -111,7 +111,7 @@ RSpec.describe '#save' do
|
|
111
111
|
|
112
112
|
let!(:expected_request) do
|
113
113
|
mock_request = stub_request(:patch, 'https://www.example.com/posts/12.json')
|
114
|
-
mock_request.with(query: nil, body:
|
114
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers)
|
115
115
|
mock_request.to_return(status: 422, body: JSON.generate(response_body))
|
116
116
|
mock_request
|
117
117
|
end
|
@@ -148,7 +148,7 @@ RSpec.describe '#save' do
|
|
148
148
|
describe 'with a 500 response' do
|
149
149
|
let!(:expected_request) do
|
150
150
|
mock_request = stub_request(:patch, 'https://www.example.com/posts/12.json')
|
151
|
-
mock_request.with(query: nil, body:
|
151
|
+
mock_request.with(query: nil, body: expected_request_body.to_json, headers: expected_default_headers.merge({ 'X-Pseudonym' => 'pseudonym' }))
|
152
152
|
mock_request.to_return(status: 500)
|
153
153
|
mock_request
|
154
154
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddy_remote_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan van der Pas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '4.1'
|
118
118
|
- - "<"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
120
|
+
version: '7'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
123
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -127,7 +127,7 @@ dependencies:
|
|
127
127
|
version: '4.1'
|
128
128
|
- - "<"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '7'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: activemodel
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
version: '4.1'
|
138
138
|
- - "<"
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
140
|
+
version: '7'
|
141
141
|
type: :runtime
|
142
142
|
prerelease: false
|
143
143
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -147,7 +147,7 @@ dependencies:
|
|
147
147
|
version: '4.1'
|
148
148
|
- - "<"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
150
|
+
version: '7'
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: virtus
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -319,8 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: '0'
|
321
321
|
requirements: []
|
322
|
-
|
323
|
-
rubygems_version: 2.7.10
|
322
|
+
rubygems_version: 3.0.4
|
324
323
|
signing_key:
|
325
324
|
specification_version: 4
|
326
325
|
summary: RemoteResource, a gem to use resources with REST services.
|