spyke 6.1.0 → 6.1.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/README.md +1 -3
- data/lib/spyke/associations/builder.rb +1 -1
- data/lib/spyke/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8a623ec5e619581883a58962e9961e7bc04f889e7c4dfdfd5712d2e7e82953b
|
4
|
+
data.tar.gz: e9730e060fbcd6cfb3bf4a718a779d9de490878da0728d1643fbb18f2004968f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec2cacb0215d0d780484fb184e5e06aab71cc06e5b7312c41cbf337830e3ad5e1167a00fd255c0354d4293409763e03d076a53362654512f4da19fa925980485
|
7
|
+
data.tar.gz: 80607d11d9501f9b6f69cfbf311a099130c0904e37879b58a30df4794f758f131360b6c19eadd9d3086e5b8c284c4eed7399219f2edf82f8a260625c992a7997
|
data/README.md
CHANGED
@@ -131,8 +131,6 @@ Post.find(4) # => GET http://api.com/posts/4
|
|
131
131
|
Custom request methods and the `with` scope methods allow you to
|
132
132
|
perform requests for non-REST actions:
|
133
133
|
|
134
|
-
The `.with` scope:
|
135
|
-
|
136
134
|
```ruby
|
137
135
|
Post.with('posts/recent') # => GET http://api.com/posts/recent
|
138
136
|
Post.with(:recent) # => GET http://api.com/posts/recent
|
@@ -172,7 +170,7 @@ Spyke expects errors to be formatted in the same way as the
|
|
172
170
|
[ActiveModel::Errors details hash](https://cowbell-labs.com/2015-01-22-active-model-errors-details.html), ie:
|
173
171
|
|
174
172
|
```ruby
|
175
|
-
{ title: [{ error: 'blank'}, { error: 'too_short', count: 10 }]}
|
173
|
+
{ title: [{ error: 'blank'}, { error: 'too_short', count: 10 }] }
|
176
174
|
```
|
177
175
|
|
178
176
|
If the API you're using returns errors in a different format you can
|
@@ -29,7 +29,7 @@ module Spyke
|
|
29
29
|
candidates << type_name
|
30
30
|
|
31
31
|
candidates.each do |candidate|
|
32
|
-
constant =
|
32
|
+
constant = candidate.safe_constantize
|
33
33
|
return constant if candidate == constant.to_s
|
34
34
|
end
|
35
35
|
raise NameError.new("uninitialized constant #{candidates.first}", candidates.first)
|
data/lib/spyke/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spyke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -318,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
318
318
|
- !ruby/object:Gem::Version
|
319
319
|
version: '0'
|
320
320
|
requirements: []
|
321
|
-
rubygems_version: 3.
|
321
|
+
rubygems_version: 3.2.3
|
322
322
|
signing_key:
|
323
323
|
specification_version: 4
|
324
324
|
summary: Interact with REST services in an ActiveRecord-like manner
|