strapi_ruby 0.1.1 → 0.1.2
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/README.md +6 -3
- data/lib/strapi_ruby/version.rb +1 -1
- metadata +1 -2
- data/strapi_ruby-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b287ea9daf48f9208a65d0b604a453ef528ec576ab8312265608fbc032f616a9
|
4
|
+
data.tar.gz: 2d91df1a2215a1167fd8cc4ee0c0d99c6c4a5a6edd61c61f1c80f941c1636e6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 703efd7aa92556623aca9f27b53f229dddab82becb2408d4e2c2673c6feddfe39140df14d19f3f726706d36ea859bee201dc39a26d2f436931b4008443f25146
|
7
|
+
data.tar.gz: 1b31b0080faa5e81d91ba171386c654eb0f19bcca6d2692eb5533335558d500691bfc4127bf180982da7df415d5531b8e4d15f7cc9167b1eb5a76ffa98b23995
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -34,6 +34,9 @@ I think it's one of the actual coolest solution for integrating a CMS into Rails
|
|
34
34
|
- [DateTime conversion](#datetime-conversion)
|
35
35
|
- [Markdown conversion](#markdown-conversion)
|
36
36
|
- [Faraday block](#faraday-block)
|
37
|
+
- [Handling Errors](#handling-errors)
|
38
|
+
- [Errors Classes](#errors-classes)
|
39
|
+
- [Graceful degradation](#graceful-degradation)
|
37
40
|
- [Contributing](#contributing)
|
38
41
|
- [Tests](#tests)
|
39
42
|
|
@@ -151,7 +154,7 @@ StrapiRuby.delete(resource: :articles, id: 12)
|
|
151
154
|
|
152
155
|
#### .escape_empty_answer
|
153
156
|
|
154
|
-
See [`.escape_empty_answer`](#
|
157
|
+
See [`.escape_empty_answer`](#graceful-degradation)
|
155
158
|
|
156
159
|
### Basic Example: Rails
|
157
160
|
|
@@ -507,7 +510,7 @@ default_headers = { "Content-Type" => "application/json",
|
|
507
510
|
|
508
511
|
Depending on your utilisation, there are multiple ways to handle errors.
|
509
512
|
|
510
|
-
####
|
513
|
+
#### Errors Classes
|
511
514
|
|
512
515
|
```ruby
|
513
516
|
# Config Error
|
@@ -527,7 +530,7 @@ class BadRequestError < ClientError
|
|
527
530
|
class JSONParsingError < ClientError
|
528
531
|
```
|
529
532
|
|
530
|
-
####
|
533
|
+
#### Graceful degradation
|
531
534
|
|
532
535
|
One way to handle errors and gracefuly degrade is using `.escape_empty_answer` and use a block to nest your data accessing code.
|
533
536
|
|
data/lib/strapi_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strapi_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxence Robinet
|
@@ -120,7 +120,6 @@ files:
|
|
120
120
|
- lib/strapi_ruby/version.rb
|
121
121
|
- rubocop.txt
|
122
122
|
- sig/strapi_ruby.rbs
|
123
|
-
- strapi_ruby-0.1.0.gem
|
124
123
|
- strapi_ruby.gemspec
|
125
124
|
homepage: https://github.com/saint-james-fr/strapi_ruby
|
126
125
|
licenses:
|
data/strapi_ruby-0.1.0.gem
DELETED
Binary file
|