deja-vu 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/Change.log +4 -0
  2. data/LICENSE +19 -0
  3. data/Makefile +0 -0
  4. data/README +22 -0
  5. data/Rakefile +31 -0
  6. data/example-playback/README +6 -0
  7. data/example-playback/analysis.rb +7 -0
  8. data/example-playback/playback.rb +7 -0
  9. data/example-playback/repo/recordings/DejaVuNS/DejaVu/recordings +1 -0
  10. data/example-playback/repo/recordings/DejaVuNS/Recording/bah7aa==/n--ab7689c618445bb17b626741588b50c0500c8f79 +1 -0
  11. data/example/Makefile +6 -0
  12. data/example/config.ru +9 -0
  13. data/example/deja-vu-recordings/6b44093baa40d257106bae6dbcda53af9a57e61f.session +53 -0
  14. data/example/deja-vu-recordings/BAh7AA==/n--ab7689c618445bb17b626741588b50c0500c8f79.session +598 -0
  15. data/example/deja-vu-recordings/README +1 -0
  16. data/example/myapp.rb +15 -0
  17. data/example/repo/recordings/DejaVuNS/DejaVu/recordings +1 -0
  18. data/example/repo/recordings/DejaVuNS/Recording/bah7aa==/n--ab7689c618445bb17b626741588b50c0500c8f79 +1 -0
  19. data/example/views/index.haml +0 -0
  20. data/example/views/layout.haml +0 -0
  21. data/lib/deja-vu.rb +72 -0
  22. data/lib/deja-vu/analyzer.rb +133 -0
  23. data/lib/deja-vu/init.rb +3 -0
  24. data/lib/deja-vu/model/dejavu.rb +42 -0
  25. data/lib/deja-vu/model/generated_model/DejaVuNS.rb +1536 -0
  26. data/lib/deja-vu/model/init.rb +3 -0
  27. data/lib/deja-vu/model/record.rb +58 -0
  28. data/lib/deja-vu/model/recording.rb +55 -0
  29. data/lib/deja-vu/model/xampl-gen.rb +39 -0
  30. data/lib/deja-vu/model/xml/dejavu.xml +28 -0
  31. data/lib/deja-vu/player.rb +241 -0
  32. data/lib/deja-vu/recorder.rb +93 -0
  33. data/lib/rack-session-listener.rb +29 -0
  34. metadata +94 -0
@@ -0,0 +1,29 @@
1
+
2
+ require 'rack/session/abstract/id'
3
+ require 'thread'
4
+
5
+ module Rack
6
+ module Session
7
+ module Abstract
8
+ class ID
9
+
10
+ def context(env, app=@app)
11
+ load_session(env)
12
+ status, headers, body = app.call(env)
13
+
14
+ begin
15
+ # call Deja Vu to record
16
+ dejavu = env['soldierofcode.dejavu.recorder']
17
+ dejavu.record(env,status,headers,body,self) if dejavu
18
+ rescue => e
19
+ # obviously and error
20
+ puts "#{__FILE__}:#{__LINE__} #{__method__} #{e.backtrace}"
21
+ end
22
+
23
+ commit_session(env, status, headers, body)
24
+ end
25
+
26
+ end
27
+ end
28
+ end
29
+ end
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: deja-vu
3
+ version: !ruby/object:Gem::Version
4
+ version: "0.3"
5
+ platform: ruby
6
+ authors:
7
+ - Kristan "Krispy" Uccello
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-08 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: A rack based session record / playback middleware for problemsolving web applications
17
+ email: kuccello@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ - README
25
+ files:
26
+ - Change.log
27
+ - LICENSE
28
+ - Makefile
29
+ - README
30
+ - Rakefile
31
+ - example-playback/README
32
+ - example-playback/analysis.rb
33
+ - example-playback/playback.rb
34
+ - example-playback/repo/recordings/DejaVuNS/DejaVu/recordings
35
+ - |-
36
+ example-playback/repo/recordings/DejaVuNS/Recording/bah7aa==
37
+ --ab7689c618445bb17b626741588b50c0500c8f79
38
+ - example/Makefile
39
+ - example/config.ru
40
+ - example/deja-vu-recordings/6b44093baa40d257106bae6dbcda53af9a57e61f.session
41
+ - |-
42
+ example/deja-vu-recordings/BAh7AA==
43
+ --ab7689c618445bb17b626741588b50c0500c8f79.session
44
+ - example/deja-vu-recordings/README
45
+ - example/myapp.rb
46
+ - example/repo/recordings/DejaVuNS/DejaVu/recordings
47
+ - |-
48
+ example/repo/recordings/DejaVuNS/Recording/bah7aa==
49
+ --ab7689c618445bb17b626741588b50c0500c8f79
50
+ - example/views/index.haml
51
+ - example/views/layout.haml
52
+ - lib/deja-vu.rb
53
+ - lib/deja-vu/analyzer.rb
54
+ - lib/deja-vu/init.rb
55
+ - lib/deja-vu/model/dejavu.rb
56
+ - lib/deja-vu/model/generated_model/DejaVuNS.rb
57
+ - lib/deja-vu/model/init.rb
58
+ - lib/deja-vu/model/record.rb
59
+ - lib/deja-vu/model/recording.rb
60
+ - lib/deja-vu/model/xampl-gen.rb
61
+ - lib/deja-vu/model/xml/dejavu.xml
62
+ - lib/deja-vu/player.rb
63
+ - lib/deja-vu/recorder.rb
64
+ - lib/rack-session-listener.rb
65
+ has_rdoc: true
66
+ homepage: http://github.com/kuccello/deja-vu
67
+ licenses: []
68
+
69
+ post_install_message:
70
+ rdoc_options:
71
+ - --charset=UTF-8
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "0"
79
+ version:
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: "0"
85
+ version:
86
+ requirements: []
87
+
88
+ rubyforge_project:
89
+ rubygems_version: 1.3.5
90
+ signing_key:
91
+ specification_version: 3
92
+ summary: A rack based session record / playback middleware for problemsolving web applications
93
+ test_files: []
94
+