metatron 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/metatron/sync_controller.rb +2 -7
- data/lib/metatron/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e077b3763744566a11540f23c00100c813636642f9440b381aef95ddf63ab17
|
4
|
+
data.tar.gz: 8a14ede3959144a065e97a06535127179476610b37b212ceb6387e67bf5c2299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb66ff44a2eca8ff650fa31fd87722374fad25f9b6cfd5ba5361ff9a9e64f7488a9dab2322d5fdf4d03db8149858cc4b5be68a7e3b38ef4dc6ca84a303486512
|
7
|
+
data.tar.gz: 922ef0d9e17f96d73f2ad0b6e9305017112dcaf286a480589d1451df53307e6fe8fbb1c34b1662b7f601b6ea78659c66b67007b8dbc4ee9aaa45943f2804be02
|
data/Gemfile.lock
CHANGED
@@ -9,15 +9,10 @@ module Metatron
|
|
9
9
|
end
|
10
10
|
|
11
11
|
post "/" do
|
12
|
-
|
13
|
-
|
14
|
-
(match_header = request.env["HTTP_IF_NONE_MATCH"]) &&
|
15
|
-
match_header.split(/,\s?/).include?("\"#{provided_etag}\"")
|
16
|
-
halt 304
|
12
|
+
if (provided_etag = calculate_etag)
|
13
|
+
etag provided_etag
|
17
14
|
end
|
18
15
|
|
19
|
-
# If the etag is available, use it, otherwise proceed with the sync
|
20
|
-
headers "ETag" => "\"#{provided_etag}\"" if provided_etag
|
21
16
|
data = sync
|
22
17
|
data[:children] = data[:children]&.map { |c| c.respond_to?(:render) ? c.render : c }
|
23
18
|
halt(data.to_json)
|
data/lib/metatron/version.rb
CHANGED