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 +4 -4
- data/lib/replay/rails.rb +13 -1
- data/lib/replay/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4208f48d1af70560a5be275549baa9ad2d69a945
|
4
|
+
data.tar.gz: 9ac5db2bf8527020fa44e7b2bf1ba4330723217c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(&:
|
50
|
+
events_for(stream_id).to_a.map(&:envelope)
|
39
51
|
end
|
40
52
|
|
41
53
|
end
|
data/lib/replay/rails/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|