fastapi 0.1.9 → 0.1.10
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/lib/fastapi.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12367d026f5f83cf55f9262cddcaa7d5794ddef5
|
4
|
+
data.tar.gz: cec18a9230a8316ad48afc554863074a40177064
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 862a5c01a476e2f9f54d0126d56fe6bb67c657663a63252bd91ac9daaad4c0d38bdf1b3294cbeb8929cafc8b3faf026be8efcc36c39a0c039aa9422af2240913
|
7
|
+
data.tar.gz: 8533e2cb8d464bf8cff64f4e5dd6c589238f902e246c7fa993fbfe46e2e4ce211f238749c7b885817c2e80f537d7f4973740c4e106a6eee3ea024ea712f1bcfa
|
data/lib/fastapi.rb
CHANGED
@@ -156,7 +156,7 @@ class FastAPI
|
|
156
156
|
#
|
157
157
|
# @return [String] available metadata in JSON format
|
158
158
|
def meta_json
|
159
|
-
Oj.dump(
|
159
|
+
Oj.dump(@metadata, mode: :compat)
|
160
160
|
end
|
161
161
|
|
162
162
|
# Returns both the data and metadata from the most recently executed `filter` or `fetch` call.
|
@@ -176,6 +176,13 @@ class FastAPI
|
|
176
176
|
Oj.dump(self.to_hash, mode: :compat)
|
177
177
|
end
|
178
178
|
|
179
|
+
# Spoofs data from Model
|
180
|
+
#
|
181
|
+
# @return [String] JSON data and metadata
|
182
|
+
def spoof(data, meta)
|
183
|
+
|
184
|
+
end
|
185
|
+
|
179
186
|
# Returns a JSONified string representing a standardized empty API response, with a provided error message
|
180
187
|
#
|
181
188
|
# @param message [String] Error message to be used in response
|
@@ -451,7 +458,7 @@ class FastAPI
|
|
451
458
|
if comparator == 'in'
|
452
459
|
' IN(' + (value.map { |val| ActiveRecord::Base.connection.quote(val.to_s) }).join(',') + ')'
|
453
460
|
else
|
454
|
-
' NOT IN(' + (value.map { |
|
461
|
+
' NOT IN(' + (value.map { |val| ActiveRecord::Base.connection.quote(val.to_s) }).join(',') + ')'
|
455
462
|
end
|
456
463
|
|
457
464
|
elsif comparator == 'contains'
|