ration 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02c32262f7ebb5d662b14e33644d5f70c906d85fab486372a22f22a206a3f324
4
- data.tar.gz: 6c3d4a78a6c3586ba5cd691207d4f090eb7fddc15177c3c43cf496a5bf2b7059
3
+ metadata.gz: 5ccdac579175651f9ae74c5334d16cdd199e2019fe538bb717938c3749de726a
4
+ data.tar.gz: 180279e4a5276f3a7258f7e507d1ae3c4cf495eacf8ab661d1896bb658216b19
5
5
  SHA512:
6
- metadata.gz: 26d8db4af267c0d3aba606260d875df7ed16ff56eab283c767521fc8cae8f1044fa051fcb531a7dbb8b51e2071574204769a88bcc51e17e8de5898d907df7d7f
7
- data.tar.gz: b6cdc8c153237a6e13161e004be80af5f88784ba52f7f55b864c5b97e0051e7f70399844bc553d3a8fe1db9e40d2052f425df4e830437e4fa2b9ce77a287aecc
6
+ metadata.gz: 22c49c8344b06a2c8a169cdfa219d23ad1372bf4e2bdcc06f762937e08409e755829d0e883ac6ff78e523f39d0e57a25b8e5191ac62981986c20c8e6f7e55e36
7
+ data.tar.gz: 3f655214bf8f81d2c1e0097a5e8e71b101bf148c499da5fbd1c63f7d0b997a01dafdf0f2685a9f6a2f7740e444740c25c47b60437140e3eea573e2d34226caab
data/lib/ration/rails.rb CHANGED
@@ -9,7 +9,9 @@ module Ration
9
9
  response.headers['Cache-Control'] = 'no-cache'
10
10
  request.env['puma.mark_as_io_bound']&.call
11
11
 
12
- self.response_body = Enumerator.new(&block)
12
+ last_event_id = request.headers['Last-Event-ID']
13
+
14
+ self.response_body = Enumerator.new {|y| block.call(y, last_event_id) }
13
15
  end
14
16
  end
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module Ration
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keita Urashima