logical-insight 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.md +33 -29
  2. data/lib/insight/app.rb +1 -1
  3. metadata +4 -4
data/README.md CHANGED
@@ -1,17 +1,14 @@
1
- Rack::Bug (Logical Reality Design Fork)
1
+ Insight
2
2
  =========
3
3
 
4
- LRDesign fork of Rack::Bug. We maintain our own fork because the base (by brynary)
5
- seems focussed on Rails 2, and we want to improve Rails 3 compatibility and add features.
6
-
7
- * Repository: [http://github.com/lrdesign/rack-bug](http://github.com/lrdesign/rack-bug)
4
+ Insight began life as an LRDesign fork of Insight. We started a fork because the main project wasn't making progress on Rails 3 support. Having made really significant archetectural changes, we'll be keeping Insight a separate project for the forseeable future.
8
5
 
9
6
  * Forked From: [http://github.com/brynary/rack-bug](http://github.com/brynary/rack-bug)
10
7
 
11
8
  Description
12
9
  -----------
13
10
 
14
- Rack::Bug adds a diagnostics toolbar to Rack apps. When enabled, it injects a floating div
11
+ Insight adds a diagnostics toolbar to Rack apps. When enabled, it injects a floating div
15
12
  allowing exploration of logging, database queries, template rendering times, etc.
16
13
 
17
14
  Features
@@ -19,7 +16,7 @@ Features
19
16
 
20
17
  * Password-based security
21
18
  * IP-based security
22
- * Rack::Bug instrumentation/reporting is broken up into panels.
19
+ * Insight instrumentation/reporting is broken up into panels.
23
20
  * Panels in default configuration:
24
21
  * Rails Info
25
22
  * Timer
@@ -32,27 +29,33 @@ Features
32
29
  * Memory
33
30
  * Other bundled panels:
34
31
  * Redis
32
+ * Speedtracer
33
+ * Retired panels - if needed they could come back quickly:
35
34
  * Sphinx
36
- * The API for adding your own panels is simple and powerful
35
+ * Mongo
36
+ * The API for adding your own panels is simple and very powerful
37
+ * Consistent interface to instrument application code
38
+ * Consistent timing across panels
39
+ * Easy to add sub-applications for more detailed reports (c.f. SQLPanel)
40
+ * The documentation is scarce, so there's a feeling of adventure :/
37
41
 
38
42
  Rails quick start
39
43
  ---------------------------
40
44
 
41
- script/plugin install git://github.com/brynary/rack-bug.git
45
+ Add this to your Gemfile
46
+ gem "logical-insight"
42
47
 
43
48
  In config/environments/development.rb, add:
44
49
 
45
- config.middleware.use "Rack::Bug",
50
+ config.middleware.use "Insight",
46
51
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring"
47
52
 
48
- Add the bookmarklet to your browser:
49
-
50
- open http://RAILS_APP/__rack_bug__/bookmarklet.html
53
+ Any environment with Insight loaded will have a link to "Insight" in the upper left. Clicking that link will load the toolbar.
51
54
 
52
55
  Using with non-Rails Rack apps
53
56
  ------------------------------
54
57
 
55
- Just 'use Rack::Bug' as any other middleware. See the SampleApp in the spec/fixtures folder for an example Sinatra app.
58
+ Just 'use Insight' as any other middleware. See the SampleApp in the spec/fixtures folder for an example Sinatra app.
56
59
 
57
60
  If you wish to use the logger panel define the LOGGER constant that is a ruby Logger or ActiveSupport::BufferedLogger
58
61
 
@@ -63,22 +66,23 @@ Specify the set of panels you want, in the order you want them to appear:
63
66
 
64
67
  require "rack/bug"
65
68
 
66
- ActionController::Dispatcher.middleware.use Rack::Bug,
69
+ ActionController::Dispatcher.middleware.use Insight,
67
70
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
68
- :panel_classes => [
69
- Rack::Bug::TimerPanel,
70
- Rack::Bug::RequestVariablesPanel,
71
- Rack::Bug::RedisPanel,
72
- Rack::Bug::TemplatesPanel,
73
- Rack::Bug::LogPanel,
74
- Rack::Bug::MemoryPanel
71
+ :panel_files => %w[
72
+ timer_panel
73
+ request_variables_panel
74
+ redis_panel
75
+ templates_panel
76
+ log_panel
77
+ memory_panel
75
78
  ]
76
79
 
80
+ Files are looked up by prepending "insight/panels/" and requiring them. Subclasses of Insight::Panel are loaded and added to the toolbar. This makes it easier to work with the configuration and extend Insight with plugin gems.
77
81
 
78
- Running Rack::Bug in staging or production
82
+ Running Insight in staging or production
79
83
  ------------------------------------------
80
84
 
81
- We have have found that Rack::Bug is fast enough to run in production for specific troubleshooting efforts.
85
+ We have have found that Insight is fast enough to run in production for specific troubleshooting efforts.
82
86
 
83
87
  ### Configuration ####
84
88
 
@@ -90,13 +94,13 @@ Restrict access to particular IP addresses:
90
94
 
91
95
  require "ipaddr"
92
96
 
93
- ActionController::Dispatcher.middleware.use "Rack::Bug"
97
+ ActionController::Dispatcher.middleware.use "Insight"
94
98
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
95
99
  :ip_masks => [IPAddr.new("2.2.2.2/0")]
96
100
 
97
101
  Restrict access using a password:
98
102
 
99
- ActionController::Dispatcher.middleware.use "Rack::Bug",
103
+ ActionController::Dispatcher.middleware.use "Insight",
100
104
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
101
105
  :password => "yourpassword"
102
106
 
@@ -104,14 +108,14 @@ Restrict access using a password:
104
108
  Authors
105
109
  -------
106
110
 
107
- - Maintained by [Evan Dorn](mailto:bryan@brynary.com)
111
+ - Maintained by [Judson Lester](mailto:judson@lrdesign.com)
108
112
  - Contributions from Luke Melia, Joey Aghion, Tim Connor, and more
109
113
 
110
114
  Thanks
111
115
  ------
112
- Inspiration for Rack::Bug is primarily from the Django debug toolbar. Additional ideas from Rails footnotes, Rack's ShowException middleware, Oink, and Rack::Cache
116
+ Insight owes a lot to Rack::Bug, as the basis project. There's a lot of smart in there.
113
117
 
114
- Thanks to Weplay.com for supporting the development of Rack::Bug
118
+ Inspiration for Rack::Bug is primarily from the Django debug toolbar. Additional ideas from Rails footnotes, Rack's ShowException middleware, Oink, and Rack::Cache
115
119
 
116
120
  Development
117
121
  -----------
data/lib/insight/app.rb CHANGED
@@ -23,7 +23,7 @@ module Insight
23
23
  INSIGHT_ROOT = "/__insight__"
24
24
  INSIGHT_REGEX = %r{^#{INSIGHT_ROOT}}
25
25
 
26
- VERSION = "0.3.1"
26
+ VERSION = "0.4.1"
27
27
 
28
28
  class SecurityError < StandardError
29
29
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: logical-insight
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
5
+ version: 0.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bryan Helmkamp
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-05-02 00:00:00 Z
15
+ date: 2011-12-13 00:00:00 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: uuid
@@ -153,7 +153,7 @@ files:
153
153
  - README.md
154
154
  - Rakefile
155
155
  - Thorfile
156
- homepage: http://github.com/lrdesign/lrd_rack_bug
156
+ homepage: https://github.com/LRDesign/logical-insight
157
157
  licenses: []
158
158
 
159
159
  post_install_message:
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
166
  requirements:
167
167
  - - ">="
168
168
  - !ruby/object:Gem::Version
169
- hash: -1022035059
169
+ hash: -780855533
170
170
  segments:
171
171
  - 0
172
172
  version: "0"