contentful 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/contentful/error.rb +2 -0
- data/lib/contentful/version.rb +1 -1
- data/spec/error_class_spec.rb +11 -0
- data/spec/fixtures/json_responses/404_details_string.json +8 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf53c3d3eb32e5999d0fc830ffcc1daa8da44fb4
|
4
|
+
data.tar.gz: 3f00e06364877e4766d0bb301d18b0d3ffc54ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474232cb4a42d12d9bff8d1a8673abf810b9856734e20d370e0599acdc5b448a44e8f4bfbdaff86d5fd5183ab0580f3137811ec2a5e4cd13c5a911ad2377d917
|
7
|
+
data.tar.gz: 11997a27a1fdcb606fadb94875136a7d88d32157cc3656cfa9a3ee10212d2be30fdbefb16f1aa64e95ee7a01d0c4ce5f44d8fbab95a79abe68b3b9e12fa51c94
|
data/CHANGELOG.md
CHANGED
data/lib/contentful/error.rb
CHANGED
data/lib/contentful/version.rb
CHANGED
data/spec/error_class_spec.rb
CHANGED
@@ -154,6 +154,17 @@ describe Contentful::Error do
|
|
154
154
|
end
|
155
155
|
|
156
156
|
describe '404' do
|
157
|
+
it 'details is a string' do
|
158
|
+
response = Contentful::Response.new raw_fixture('404_details_string', 404)
|
159
|
+
error = Contentful::Error[response.raw.status].new(response)
|
160
|
+
|
161
|
+
message = "HTTP status code: 404\n"\
|
162
|
+
"Message: The requested resource or endpoint could not be found.\n"\
|
163
|
+
"Details: The resource could not be found\n"\
|
164
|
+
"Request ID: 85f-351076632"
|
165
|
+
expect(error.message).to eq message
|
166
|
+
end
|
167
|
+
|
157
168
|
it 'has a type' do
|
158
169
|
response = Contentful::Response.new raw_fixture('404_type', 404)
|
159
170
|
error = Contentful::Error[response.raw.status].new(response)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (Jan Lelis)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-10-
|
13
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|
@@ -408,6 +408,7 @@ files:
|
|
408
408
|
- spec/fixtures/json_responses/400_details_errors_string.json
|
409
409
|
- spec/fixtures/json_responses/400_details_string.json
|
410
410
|
- spec/fixtures/json_responses/403_reasons.json
|
411
|
+
- spec/fixtures/json_responses/404_details_string.json
|
411
412
|
- spec/fixtures/json_responses/404_id.json
|
412
413
|
- spec/fixtures/json_responses/404_type.json
|
413
414
|
- spec/fixtures/json_responses/content_type.json
|
@@ -539,6 +540,7 @@ test_files:
|
|
539
540
|
- spec/fixtures/json_responses/400_details_errors_string.json
|
540
541
|
- spec/fixtures/json_responses/400_details_string.json
|
541
542
|
- spec/fixtures/json_responses/403_reasons.json
|
543
|
+
- spec/fixtures/json_responses/404_details_string.json
|
542
544
|
- spec/fixtures/json_responses/404_id.json
|
543
545
|
- spec/fixtures/json_responses/404_type.json
|
544
546
|
- spec/fixtures/json_responses/content_type.json
|