ddy_remote_resource 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/remote_resource/base.rb +0 -4
- data/lib/remote_resource/version.rb +1 -1
- data/spec/lib/remote_resource/base_spec.rb +0 -44
- data/spec/lib/remote_resource/version_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccdea576090cd3a3332da5e68b203a6e2aeb3a6a
|
4
|
+
data.tar.gz: 26504a0d4c77d806db2a956285db344cbe0773c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3453c43a446bdd4eb61e19524814a60fa3c0c4cd48ae69acc5a06b7968aa9303146ab7dfd7ac65be925708ef6cefa77e332aa7ed94067263d57dc3287df00cf
|
7
|
+
data.tar.gz: 26d4188cc4f6aab90740074fe8e48c6dfc7c3b23785efb395878456077ca366d11e40f39bec4c4091aac16bc6158bc4d5bef23c20a2d9effb1ca919e94c084d6
|
data/README.md
CHANGED
@@ -11,7 +11,11 @@ To replace `ActiveResource` by providing a dynamic and customizable API interfac
|
|
11
11
|
Add this line to your application's Gemfile:
|
12
12
|
|
13
13
|
```ruby
|
14
|
+
# Use this to fetch the gem from Gitlab
|
14
15
|
gem 'remote_resource', git: 'git@lab.digidentity.eu:jvanderpas/remote_resource.git'
|
16
|
+
|
17
|
+
# Use this to fetch the gem from RubyGems.org
|
18
|
+
gem 'ddy_remote_resource', require: 'remote_resource'
|
15
19
|
```
|
16
20
|
|
17
21
|
|
data/lib/remote_resource/base.rb
CHANGED
@@ -168,50 +168,6 @@ describe RemoteResource::Base do
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
171
|
-
describe '#empty?' do
|
172
|
-
before { allow(dummy).to receive(:_response) { response } }
|
173
|
-
|
174
|
-
context 'when the response is present' do
|
175
|
-
let(:response) { instance_double(RemoteResource::Response, sanitized_response_body: sanitized_response_body) }
|
176
|
-
|
177
|
-
context 'and the #sanitized_response_body is present' do
|
178
|
-
let(:sanitized_response_body) do
|
179
|
-
{ name: 'Mies' }
|
180
|
-
end
|
181
|
-
|
182
|
-
it 'returns false' do
|
183
|
-
expect(dummy.empty?).to eql false
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
context 'and the #sanitized_response_body is blank' do
|
188
|
-
let(:sanitized_response_body) do
|
189
|
-
{}
|
190
|
-
end
|
191
|
-
|
192
|
-
it 'returns true' do
|
193
|
-
expect(dummy.empty?).to eql true
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
context 'and the #sanitized_response_body is NOT present' do
|
198
|
-
let(:sanitized_response_body) { nil }
|
199
|
-
|
200
|
-
it 'returns true' do
|
201
|
-
expect(dummy.empty?).to eql true
|
202
|
-
end
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
|
-
context 'when the response is NOT present' do
|
207
|
-
let(:response) { nil }
|
208
|
-
|
209
|
-
it 'returns true' do
|
210
|
-
expect(dummy.empty?).to eql true
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
171
|
describe '#persisted?' do
|
216
172
|
context 'when id is present' do
|
217
173
|
it 'returns true' do
|
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: 0.4.
|
4
|
+
version: 0.4.4
|
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: 2015-
|
11
|
+
date: 2015-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|