compensated 0.1.0.pre5 → 0.1.0.pre6

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: fd4ea31bad4284f0d06de15e35b591e22d67b7cc50a1571ef7625d5ef21861b2
4
- data.tar.gz: 17fc45a9d3a5f69148b4ace3f93ad9617bdafb5b77be9ac19465f102b071eee0
3
+ metadata.gz: afddd0b43b5b41b3bde8326b00521228076301d3757bfe249fec121e66a9b2a1
4
+ data.tar.gz: 89a8d978d3fc779ef30db11f860e9e77297f79cff12befb32c4aa4eacec876c0
5
5
  SHA512:
6
- metadata.gz: a72e5586b802db61e8ba14af7f26e04381bbc1ab40fcc597ec496efc5420173f37e2a34af549732a4b081a451fe3f3527d0d5488fcf918c9f3d91198f69bc3b9
7
- data.tar.gz: 31cfcdb556cbb130c131b6981231f650a4214d5bbceb7bed3f9dc0160a7838c6dc8257b512d07bcf1f0c8c9541919ae0b8eb75bbc7f28e177a7a8c00f3332f73
6
+ metadata.gz: c4bb960beeec13c0bd8a5fb14fba79e316e4fe1df76abf8aa8004aac44e8088ea5758bf1898950d0e2b4a73f433bad9771e4707bc4cd0606196cf6bf59164386
7
+ data.tar.gz: 5cb5af381c061c589336eedaf9b3273ae7ccc606e1f67e4726b4cd43d3a807b1fb1b5f9676a4887ac565513508588ed831e47cde16c6a4439d5c6c5d697144f5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- compensated (0.1.0.pre5)
4
+ compensated (0.1.0.pre6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,7 +11,7 @@ module Compensated
11
11
 
12
12
  def normalize(data_or_body)
13
13
  data = data_or_body.respond_to?(:key) ? data_or_body : data_from_string(data_or_body)
14
- body = data_or_body.respond_to?(:key) ? nil : data_or_body
14
+ body = data_or_body.respond_to?(:key) ? nil : read_and_rewind(data_or_body)
15
15
  {
16
16
  raw_body: body,
17
17
  raw_event_type: data["resource_name"].to_sym,
@@ -35,8 +35,9 @@ module Compensated
35
35
 
36
36
  private def read_and_rewind(body)
37
37
  if body.respond_to?(:read)
38
- body = body.read
38
+ read_value = body.read
39
39
  body.rewind
40
+ read_value
40
41
  else
41
42
  body
42
43
  end
@@ -1,3 +1,3 @@
1
1
  module Compensated
2
- VERSION = "0.1.0.pre5"
2
+ VERSION = "0.1.0.pre6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compensated
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre5
4
+ version: 0.1.0.pre6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zee