Class: Rack::DevInsight
- Inherits:
-
Object
show all
- Defined in:
- lib/rack/dev_insight.rb,
lib/rack/dev_insight/config.rb,
lib/rack/dev_insight/errors.rb,
lib/rack/dev_insight/result.rb,
lib/rack/dev_insight/context.rb,
lib/rack/dev_insight/railtie.rb,
lib/rack/dev_insight/version.rb,
lib/rack/dev_insight/extractor.rb,
lib/rack/dev_insight/normalizer.rb,
lib/rack/dev_insight/result/sql.rb,
lib/rack/dev_insight/result/apis.rb,
lib/rack/dev_insight/sql_dialects.rb,
lib/rack/dev_insight/utils/camelizer.rb,
lib/rack/dev_insight/enable_sql_patch.rb,
lib/rack/dev_insight/sql_notifications.rb,
lib/rack/dev_insight/result/sql/queries.rb,
lib/rack/dev_insight/storage/file_store.rb,
lib/rack/dev_insight/storage/memory_store.rb,
lib/rack/dev_insight/recorder/api_recorder.rb,
lib/rack/dev_insight/recorder/sql_recorder.rb,
lib/rack/dev_insight/disable_net_http_patch.rb,
lib/rack/dev_insight/recorder/base_recorder.rb,
lib/rack/dev_insight/recorder/request_recorder.rb,
lib/rack/dev_insight/result/sql/errored_queries.rb,
lib/rack/dev_insight/result/sql/crud_aggregations.rb,
lib/rack/dev_insight/result/sql/normalized_aggregations.rb
Defined Under Namespace
Modules: Camelizer, Extractor, Normalizer, SqlDialects
Classes: ApiRecorder, BaseRecorder, Config, Context, Error, FileStore, MemoryStore, Railtie, RequestRecorder, Result, SqlNotifications, SqlRecorder
Constant Summary
collapse
- VERSION =
'0.3.0'
- ENABLE_SQL_PATCH =
true
- DISABLE_SQL_SUBSCRIPTION =
true
- DISABLE_NET_HTTP_PATCH =
true
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of DevInsight.
46
47
48
49
|
# File 'lib/rack/dev_insight.rb', line 46
def initialize(app)
@app = app
@storage = DevInsight.config.storage_instance
end
|
Class Method Details
.config ⇒ Object
41
42
43
|
# File 'lib/rack/dev_insight.rb', line 41
def config
@config ||= Config.new
end
|
37
38
39
|
# File 'lib/rack/dev_insight.rb', line 37
def configure
yield config
end
|
Instance Method Details
#call(env) ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/rack/dev_insight.rb', line 51
def call(env)
if (id = get_id_from_path(env))
fetch_analyzed(id)
else
analyze(env)
end
end
|