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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f35d76b66b19a7de1ec270afaaae2f76563016b5d7bee59c94dad86e1f4953ac
4
- data.tar.gz: 21bc67ecabd1165246962d9d1af8b909ec678ca3045a3e89b484b512c9dfa6a4
3
+ metadata.gz: 2e077b3763744566a11540f23c00100c813636642f9440b381aef95ddf63ab17
4
+ data.tar.gz: 8a14ede3959144a065e97a06535127179476610b37b212ceb6387e67bf5c2299
5
5
  SHA512:
6
- metadata.gz: 38c3f0d3358541f4c6349b1729c43cedce6cf65ad087b7306ec37f8da3a9dfb57ee20e57c3568c08376eeede52ae59dc0d3a182a555cc84d000f3c3eb7e7f9de
7
- data.tar.gz: 721166c1a9da7c2c16c7d84b27f10a18e8ea489eabe406c7063c2277cba6b5799f43dd8afdc7630593f9b1daacdfe8342fc4d86afd89af297c68e30bc8920f97
6
+ metadata.gz: cb66ff44a2eca8ff650fa31fd87722374fad25f9b6cfd5ba5361ff9a9e64f7488a9dab2322d5fdf4d03db8149858cc4b5be68a7e3b38ef4dc6ca84a303486512
7
+ data.tar.gz: 922ef0d9e17f96d73f2ad0b6e9305017112dcaf286a480589d1451df53307e6fe8fbb1c34b1662b7f601b6ea78659c66b67007b8dbc4ee9aaa45943f2804be02
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metatron (0.4.0)
4
+ metatron (0.4.1)
5
5
  json (~> 2.6)
6
6
  puma (~> 6.3)
7
7
  sinatra (~> 3.1)
@@ -9,15 +9,10 @@ module Metatron
9
9
  end
10
10
 
11
11
  post "/" do
12
- # TODO: move this to Sinatra's `etag` helper when Metacontroller is RFC compliant
13
- if (provided_etag = calculate_etag) &&
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)
@@ -4,6 +4,6 @@ module Metatron
4
4
  VERSION = [
5
5
  0, # major
6
6
  4, # minor
7
- 0 # patch
7
+ 1 # patch
8
8
  ].join(".")
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy