http_log 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/Rakefile +38 -0
  3. data/app/assets/javascripts/http_log.js +14 -0
  4. data/app/assets/stylesheets/http_log.css +12 -0
  5. data/app/controllers/http_log/requests_controller.rb +10 -0
  6. data/app/models/http_log/request.rb +35 -0
  7. data/app/views/http_log/requests/show.html.erb +59 -0
  8. data/app/views/layouts/http_log/requests.html.erb +30 -0
  9. data/config/routes.rb +3 -0
  10. data/lib/http_log/http_request.rb +30 -0
  11. data/lib/http_log/middleware.rb +40 -0
  12. data/lib/http_log/railtie.rb +37 -0
  13. data/lib/http_log/version.rb +3 -0
  14. data/lib/http_log.rb +23 -0
  15. data/lib/tasks/http_logger_tasks.rake +4 -0
  16. data/readme.md +106 -0
  17. data/test/dummy/README.rdoc +261 -0
  18. data/test/dummy/Rakefile +7 -0
  19. data/test/dummy/app/assets/images/image.jpg +0 -0
  20. data/test/dummy/app/assets/javascripts/application.js +14 -0
  21. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  22. data/test/dummy/app/controllers/application_controller.rb +2 -0
  23. data/test/dummy/app/controllers/echo_controller.rb +5 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/test/dummy/config/application.rb +62 -0
  27. data/test/dummy/config/boot.rb +10 -0
  28. data/test/dummy/config/environment.rb +5 -0
  29. data/test/dummy/config/environments/development.rb +31 -0
  30. data/test/dummy/config/environments/production.rb +64 -0
  31. data/test/dummy/config/environments/test.rb +35 -0
  32. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  33. data/test/dummy/config/initializers/inflections.rb +15 -0
  34. data/test/dummy/config/initializers/mime_types.rb +5 -0
  35. data/test/dummy/config/initializers/secret_token.rb +7 -0
  36. data/test/dummy/config/initializers/session_store.rb +8 -0
  37. data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
  38. data/test/dummy/config/locales/en.yml +5 -0
  39. data/test/dummy/config/mongoid.yml +7 -0
  40. data/test/dummy/config/routes.rb +4 -0
  41. data/test/dummy/config.ru +4 -0
  42. data/test/dummy/log/test.log +8567 -0
  43. data/test/dummy/public/404.html +26 -0
  44. data/test/dummy/public/422.html +26 -0
  45. data/test/dummy/public/500.html +25 -0
  46. data/test/dummy/public/favicon.ico +0 -0
  47. data/test/dummy/script/rails +6 -0
  48. data/test/dummy/tmp/cache/assets/C56/AF0/sprockets%2F8bd6bc711946e979052328c24a265273 +2491 -0
  49. data/test/dummy/tmp/cache/assets/C88/730/sprockets%2F5b9d71c4883306a9e7425d3149785b0a +0 -0
  50. data/test/dummy/tmp/cache/assets/CAC/FC0/sprockets%2F143f0911dfc3cc1692f4d429654d7422 +0 -0
  51. data/test/dummy/tmp/cache/assets/CBD/000/sprockets%2F9d2bd18b820d1d20830ad0411e05a317 +0 -0
  52. data/test/dummy/tmp/cache/assets/CD7/500/sprockets%2Fae345f99053c3b580c5421a1a8a9b509 +0 -0
  53. data/test/dummy/tmp/cache/assets/CD7/9B0/sprockets%2Fef051dd1922500356c22d85b54b94ef4 +0 -0
  54. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  55. data/test/dummy/tmp/cache/assets/CD8/EB0/sprockets%2Ff6249465d0ba565203e326e971ba33dc +0 -0
  56. data/test/dummy/tmp/cache/assets/D00/890/sprockets%2F641813db3a41029a3f60b1ef90e95eb2 +0 -0
  57. data/test/dummy/tmp/cache/assets/D05/B40/sprockets%2F6ec40b73403c5c791c98c130a66f03eb +0 -0
  58. data/test/dummy/tmp/cache/assets/D14/B90/sprockets%2F22c02508890f4a42d489f5cb9995bcaa +0 -0
  59. data/test/dummy/tmp/cache/assets/D18/BC0/sprockets%2Fcc96a74afecc950f9b1923750a624666 +0 -0
  60. data/test/dummy/tmp/cache/assets/D1C/3F0/sprockets%2Ff3cb97c67a28f035a79bf35393a493b6 +0 -0
  61. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  62. data/test/dummy/tmp/cache/assets/D39/6B0/sprockets%2F8d0238243bc83309bfffe73733edb00d +0 -0
  63. data/test/dummy/tmp/cache/assets/D3E/820/sprockets%2F6260e7992ddc6fc2380ba3b8c032dd94 +0 -0
  64. data/test/dummy/tmp/cache/assets/D47/EC0/sprockets%2Fdc5e701826b1ce3f37c1c89bf75f2538 +0 -0
  65. data/test/dummy/tmp/cache/assets/D4A/E60/sprockets%2Fbfb99140fe3d1ff718034c6a8e18847d +0 -0
  66. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  67. data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +2496 -0
  68. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  69. data/test/dummy/tmp/cache/assets/D5B/D40/sprockets%2F04e9e640af4cc213ef17ba39d31f2a40 +0 -0
  70. data/test/dummy/tmp/cache/assets/D60/660/sprockets%2F180c4ea684d2eadbbd5e85d302601b74 +0 -0
  71. data/test/dummy/tmp/cache/assets/D80/D90/sprockets%2Fe73320ffabc376681cd17ed79d9b93e7 +0 -0
  72. data/test/dummy/tmp/cache/assets/D84/4B0/sprockets%2F6a24f73a9cc3c9f978a16a79afe6818b +0 -0
  73. data/test/dummy/tmp/cache/assets/D8D/D50/sprockets%2Fd4f3b2c5183658aa13fa2d8511e6bcba +0 -0
  74. data/test/dummy/tmp/cache/assets/DB9/CD0/sprockets%2F58dda55967442f12eac66cfe9ef69bf6 +0 -0
  75. data/test/dummy/tmp/cache/assets/DC1/380/sprockets%2Fc4cf1e25b6a6e86e6cb37dd2413fbb00 +0 -0
  76. data/test/dummy/tmp/cache/assets/DC4/7C0/sprockets%2Fcba25fb6f81b385a80ef50f3405b2ded +0 -0
  77. data/test/dummy/tmp/cache/assets/DC7/430/sprockets%2F3a58abcdb48a00fb9f180e8ddf3e9203 +0 -0
  78. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  79. data/test/dummy/tmp/cache/assets/DF5/D50/sprockets%2F5ad27ea47264a1fb2bafb977f50d2fca +0 -0
  80. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  81. data/test/dummy/tmp/cache/assets/E07/410/sprockets%2F490f1cfa897fcbe947b0ff03ec38dfb1 +0 -0
  82. data/test/dummy/tmp/cache/assets/E0C/3A0/sprockets%2Fef495ecd04bb6d988d0865ebbebf3c63 +0 -0
  83. data/test/dummy/tmp/cache/assets/E0D/320/sprockets%2Fbf429fbc894ba0b9e4e65fd9825c1fbe +0 -0
  84. data/test/dummy/tmp/cache/assets/E23/000/sprockets%2Fa2e82546ad8185cbdbbcc6b7fa33db3c +0 -0
  85. data/test/dummy/tmp/cache/assets/E54/5F0/sprockets%2Fffb07dbaf19b3044d2fb165c1eefaf9a +0 -0
  86. data/test/integration/filters_test.rb +37 -0
  87. data/test/integration/logging_test.rb +144 -0
  88. data/test/integration/response_test.rb +11 -0
  89. data/test/integration/retrieve_request_test.rb +13 -0
  90. data/test/support/database_cleaner.rb +17 -0
  91. data/test/support/http_logger.rb +7 -0
  92. data/test/test_helper.rb +10 -0
  93. metadata +274 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'