full_request_logger 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +147 -0
- data/README.md +1 -1
- data/app/controllers/rails/conductor/full_request_logger/request_logs_controller.rb +15 -3
- data/app/views/rails/conductor/full_request_logger/request_logs/index.html.erb +7 -0
- data/app/views/rails/conductor/full_request_logger/request_logs/show.html.erb +5 -2
- data/config/routes.rb +1 -1
- data/full_request_logger.gemspec +3 -2
- data/lib/full_request_logger/middleware.rb +1 -1
- data/lib/full_request_logger/recorder.rb +24 -7
- data/test/dummy/.babelrc +18 -0
- data/test/dummy/.gitignore +3 -0
- data/test/dummy/.postcssrc.yml +3 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +80 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/javascript/packs/application.js +0 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailboxes/application_mailbox.rb +2 -0
- data/test/dummy/app/mailboxes/messages_mailbox.rb +4 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +36 -0
- data/test/dummy/bin/update +31 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +19 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +34 -0
- data/test/dummy/config/environments/production.rb +96 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +22 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/webpack/development.js +3 -0
- data/test/dummy/config/webpack/environment.js +3 -0
- data/test/dummy/config/webpack/production.js +3 -0
- data/test/dummy/config/webpack/test.js +3 -0
- data/test/dummy/config/webpacker.yml +65 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/recorder_test.rb +28 -3
- metadata +145 -3
File without changes
|
File without changes
|
File without changes
|
data/test/recorder_test.rb
CHANGED
@@ -1,7 +1,32 @@
|
|
1
|
-
|
2
|
-
require
|
1
|
+
require_relative "../test/dummy/config/environment"
|
2
|
+
require "rails/test_help"
|
3
3
|
|
4
|
-
require
|
4
|
+
require "full_request_logger"
|
5
5
|
|
6
6
|
class RecorderTest < ActiveSupport::TestCase
|
7
|
+
setup do
|
8
|
+
@logger = Logger.new(StringIO.new)
|
9
|
+
@full_request_logger = FullRequestLogger::Recorder.new.tap { |frl| frl.attach_to(@logger) }
|
10
|
+
end
|
11
|
+
|
12
|
+
teardown { @full_request_logger.reset }
|
13
|
+
|
14
|
+
test "attached frl will store writes made to logger" do
|
15
|
+
@logger.info "This is a line"
|
16
|
+
assert @full_request_logger.combined_log.include?("This is a line")
|
17
|
+
end
|
18
|
+
|
19
|
+
test "store combined log in single request log" do
|
20
|
+
@logger.info "This is an extra line"
|
21
|
+
@logger.info "This is another line"
|
22
|
+
@logger.info "This is yet another line"
|
23
|
+
|
24
|
+
@full_request_logger.store("123")
|
25
|
+
|
26
|
+
assert_equal "This is an extra line\nThis is another line\nThis is yet another line", @full_request_logger.retrieve("123")
|
27
|
+
end
|
28
|
+
|
29
|
+
test "retrieve missing request" do
|
30
|
+
assert_nil @full_request_logger.retrieve("not-there")
|
31
|
+
end
|
7
32
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: full_request_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 6.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: redis
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,11 +59,13 @@ extensions: []
|
|
45
59
|
extra_rdoc_files: []
|
46
60
|
files:
|
47
61
|
- Gemfile
|
62
|
+
- Gemfile.lock
|
48
63
|
- MIT-LICENSE
|
49
64
|
- README.md
|
50
65
|
- Rakefile
|
51
66
|
- app/controllers/rails/conductor/full_request_logger/request_logs_controller.rb
|
52
67
|
- app/views/layouts/rails/conductor.html.erb
|
68
|
+
- app/views/rails/conductor/full_request_logger/request_logs/index.html.erb
|
53
69
|
- app/views/rails/conductor/full_request_logger/request_logs/show.html.erb
|
54
70
|
- config/routes.rb
|
55
71
|
- full_request_logger.gemspec
|
@@ -57,6 +73,69 @@ files:
|
|
57
73
|
- lib/full_request_logger/engine.rb
|
58
74
|
- lib/full_request_logger/middleware.rb
|
59
75
|
- lib/full_request_logger/recorder.rb
|
76
|
+
- test/dummy/.babelrc
|
77
|
+
- test/dummy/.gitignore
|
78
|
+
- test/dummy/.postcssrc.yml
|
79
|
+
- test/dummy/Rakefile
|
80
|
+
- test/dummy/app/assets/config/manifest.js
|
81
|
+
- test/dummy/app/assets/images/.keep
|
82
|
+
- test/dummy/app/assets/stylesheets/application.css
|
83
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
84
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
85
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
86
|
+
- test/dummy/app/controllers/application_controller.rb
|
87
|
+
- test/dummy/app/controllers/concerns/.keep
|
88
|
+
- test/dummy/app/helpers/application_helper.rb
|
89
|
+
- test/dummy/app/javascript/packs/application.js
|
90
|
+
- test/dummy/app/jobs/application_job.rb
|
91
|
+
- test/dummy/app/mailboxes/application_mailbox.rb
|
92
|
+
- test/dummy/app/mailboxes/messages_mailbox.rb
|
93
|
+
- test/dummy/app/mailers/application_mailer.rb
|
94
|
+
- test/dummy/app/models/application_record.rb
|
95
|
+
- test/dummy/app/models/concerns/.keep
|
96
|
+
- test/dummy/app/views/layouts/application.html.erb
|
97
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
98
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
99
|
+
- test/dummy/bin/bundle
|
100
|
+
- test/dummy/bin/rails
|
101
|
+
- test/dummy/bin/rake
|
102
|
+
- test/dummy/bin/setup
|
103
|
+
- test/dummy/bin/update
|
104
|
+
- test/dummy/bin/yarn
|
105
|
+
- test/dummy/config.ru
|
106
|
+
- test/dummy/config/application.rb
|
107
|
+
- test/dummy/config/boot.rb
|
108
|
+
- test/dummy/config/cable.yml
|
109
|
+
- test/dummy/config/environment.rb
|
110
|
+
- test/dummy/config/environments/development.rb
|
111
|
+
- test/dummy/config/environments/production.rb
|
112
|
+
- test/dummy/config/environments/test.rb
|
113
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
114
|
+
- test/dummy/config/initializers/assets.rb
|
115
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
116
|
+
- test/dummy/config/initializers/content_security_policy.rb
|
117
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
118
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
119
|
+
- test/dummy/config/initializers/inflections.rb
|
120
|
+
- test/dummy/config/initializers/mime_types.rb
|
121
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
122
|
+
- test/dummy/config/locales/en.yml
|
123
|
+
- test/dummy/config/puma.rb
|
124
|
+
- test/dummy/config/routes.rb
|
125
|
+
- test/dummy/config/spring.rb
|
126
|
+
- test/dummy/config/webpack/development.js
|
127
|
+
- test/dummy/config/webpack/environment.js
|
128
|
+
- test/dummy/config/webpack/production.js
|
129
|
+
- test/dummy/config/webpack/test.js
|
130
|
+
- test/dummy/config/webpacker.yml
|
131
|
+
- test/dummy/lib/assets/.keep
|
132
|
+
- test/dummy/log/.keep
|
133
|
+
- test/dummy/public/404.html
|
134
|
+
- test/dummy/public/422.html
|
135
|
+
- test/dummy/public/500.html
|
136
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
137
|
+
- test/dummy/public/apple-touch-icon.png
|
138
|
+
- test/dummy/public/favicon.ico
|
60
139
|
- test/recorder_test.rb
|
61
140
|
homepage: https://github.com/basecamp/full_request_logger
|
62
141
|
licenses:
|
@@ -82,4 +161,67 @@ signing_key:
|
|
82
161
|
specification_version: 4
|
83
162
|
summary: Make full request logs accessible via web UI
|
84
163
|
test_files:
|
164
|
+
- test/dummy/.babelrc
|
165
|
+
- test/dummy/.gitignore
|
166
|
+
- test/dummy/.postcssrc.yml
|
167
|
+
- test/dummy/Rakefile
|
168
|
+
- test/dummy/app/assets/config/manifest.js
|
169
|
+
- test/dummy/app/assets/images/.keep
|
170
|
+
- test/dummy/app/assets/stylesheets/application.css
|
171
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
172
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
173
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
174
|
+
- test/dummy/app/controllers/application_controller.rb
|
175
|
+
- test/dummy/app/controllers/concerns/.keep
|
176
|
+
- test/dummy/app/helpers/application_helper.rb
|
177
|
+
- test/dummy/app/javascript/packs/application.js
|
178
|
+
- test/dummy/app/jobs/application_job.rb
|
179
|
+
- test/dummy/app/mailboxes/application_mailbox.rb
|
180
|
+
- test/dummy/app/mailboxes/messages_mailbox.rb
|
181
|
+
- test/dummy/app/mailers/application_mailer.rb
|
182
|
+
- test/dummy/app/models/application_record.rb
|
183
|
+
- test/dummy/app/models/concerns/.keep
|
184
|
+
- test/dummy/app/views/layouts/application.html.erb
|
185
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
186
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
187
|
+
- test/dummy/bin/bundle
|
188
|
+
- test/dummy/bin/rails
|
189
|
+
- test/dummy/bin/rake
|
190
|
+
- test/dummy/bin/setup
|
191
|
+
- test/dummy/bin/update
|
192
|
+
- test/dummy/bin/yarn
|
193
|
+
- test/dummy/config.ru
|
194
|
+
- test/dummy/config/application.rb
|
195
|
+
- test/dummy/config/boot.rb
|
196
|
+
- test/dummy/config/cable.yml
|
197
|
+
- test/dummy/config/environment.rb
|
198
|
+
- test/dummy/config/environments/development.rb
|
199
|
+
- test/dummy/config/environments/production.rb
|
200
|
+
- test/dummy/config/environments/test.rb
|
201
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
202
|
+
- test/dummy/config/initializers/assets.rb
|
203
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
204
|
+
- test/dummy/config/initializers/content_security_policy.rb
|
205
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
206
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
207
|
+
- test/dummy/config/initializers/inflections.rb
|
208
|
+
- test/dummy/config/initializers/mime_types.rb
|
209
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
210
|
+
- test/dummy/config/locales/en.yml
|
211
|
+
- test/dummy/config/puma.rb
|
212
|
+
- test/dummy/config/routes.rb
|
213
|
+
- test/dummy/config/spring.rb
|
214
|
+
- test/dummy/config/webpack/development.js
|
215
|
+
- test/dummy/config/webpack/environment.js
|
216
|
+
- test/dummy/config/webpack/production.js
|
217
|
+
- test/dummy/config/webpack/test.js
|
218
|
+
- test/dummy/config/webpacker.yml
|
219
|
+
- test/dummy/lib/assets/.keep
|
220
|
+
- test/dummy/log/.keep
|
221
|
+
- test/dummy/public/404.html
|
222
|
+
- test/dummy/public/422.html
|
223
|
+
- test/dummy/public/500.html
|
224
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
225
|
+
- test/dummy/public/apple-touch-icon.png
|
226
|
+
- test/dummy/public/favicon.ico
|
85
227
|
- test/recorder_test.rb
|