replay-rails 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 88989a599f2231c77ac396f2df4e5ae43203095e
4
- data.tar.gz: f36782327730295e785f4837881a2eba0a14d2bf
3
+ metadata.gz: 4208f48d1af70560a5be275549baa9ad2d69a945
4
+ data.tar.gz: 9ac5db2bf8527020fa44e7b2bf1ba4330723217c
5
5
  SHA512:
6
- metadata.gz: 6a604cc6d6b4f0714c2836588c268c062c498cc6305620ce2ee7182e9408229b71189cf8c69079ec5e9c211387fc516fa6d74af163e96026a74e56ddd7c0f3b3
7
- data.tar.gz: 46113f206ff22b85355efff13e8d929fd930fed3f59341c8833c27b28475378d53b4b1d77043ef9df0723ef23fac40a8274b1eade2c14fdf06e1f177539be1ad
6
+ metadata.gz: 64e89dbfee4a6fdd2844113108d3ab05bd42e3a0c2ec1b44edb11c15afe82180cf1d384573350d1c1fb25b6abf79071d08ff1bf84dbeb5c67860c4b64b4845e3
7
+ data.tar.gz: 225e3bf5bc7165a212f4c8d2ea3480177172b070f5bbf2639ed2b9218da70368f9dec90da84b480fa785032be4c11e6429710fea543d468c1661385d8a64cbf2
data/lib/replay/rails.rb CHANGED
@@ -30,12 +30,24 @@ module Replay
30
30
  event_type.constantize.new(JSON.parse(data))
31
31
  end
32
32
 
33
+ def metadata
34
+ Hash.new(envelope_data)
35
+ end
36
+
37
+ def envelope
38
+ @envelope ||= Replay::EventEnvelope.new(
39
+ stream_id,
40
+ event,
41
+ metadata
42
+ )
43
+ end
44
+
33
45
  def self.events_for(stream_id)
34
46
  where(:stream_id => stream_id).order('created_at asc')
35
47
  end
36
48
 
37
49
  def self.event_stream(stream_id)
38
- events_for(stream_id).to_a.map(&:event)
50
+ events_for(stream_id).to_a.map(&:envelope)
39
51
  end
40
52
 
41
53
  end
@@ -1,5 +1,5 @@
1
1
  module Replay
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replay-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - karmajunkie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler