rails_spotlight 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 797f782446bb2946abfc23b500dd6bed6032df02be0795e0d44083ca78344d19
|
4
|
+
data.tar.gz: a95afda90830aaa9520b1f88012091a3481ca6ac71fd031fda5f4e8dddd8b126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5a44dc240578e5a9a639a666d6adcb5bee447e46d26af4d6f2fd3e8e1c1c39bb9129f1df13ca209a525a16413584e2a06405c1392e652c882d671389533524a
|
7
|
+
data.tar.gz: 047e4a531ef327f471a494d0865be7b2d2327572bfda8c5575638b62ebf768ab66d34c497177c3cf9b04586df6f95cace25ac234525acba17cea8d56c7a2ef0f
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../../support/project'
|
4
|
+
|
3
5
|
module RailsSpotlight
|
4
6
|
module Middlewares
|
5
7
|
module Handlers
|
@@ -19,7 +21,10 @@ module RailsSpotlight
|
|
19
21
|
end
|
20
22
|
|
21
23
|
def json_response_body
|
22
|
-
{
|
24
|
+
{
|
25
|
+
source: text_response_body,
|
26
|
+
project: ::RailsSpotlight::Support::Project.instance.name
|
27
|
+
}
|
23
28
|
end
|
24
29
|
|
25
30
|
def write_mode?
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../../support/project'
|
4
|
+
|
3
5
|
module RailsSpotlight
|
4
6
|
module Middlewares
|
5
7
|
module Handlers
|
@@ -36,7 +38,13 @@ module RailsSpotlight
|
|
36
38
|
attr_accessor :error
|
37
39
|
|
38
40
|
def json_response_body
|
39
|
-
{
|
41
|
+
{
|
42
|
+
result: result,
|
43
|
+
logs: logs,
|
44
|
+
error: error.inspect,
|
45
|
+
query_mode: force_execution? ? 'force' : 'default',
|
46
|
+
project: ::RailsSpotlight::Support::Project.instance.name
|
47
|
+
}
|
40
48
|
end
|
41
49
|
|
42
50
|
def logger(_, started, finished, unique_id, payload)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module RailsSpotlight
|
2
|
+
module Support
|
3
|
+
class Project
|
4
|
+
include Singleton
|
5
|
+
|
6
|
+
def name
|
7
|
+
@name ||= ENV['RAILS_SPOTLIGHT_PROJECT'] || if app_class.respond_to?(:module_parent_name)
|
8
|
+
app_class.module_parent_name
|
9
|
+
else
|
10
|
+
app_class.parent_name
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def app_class
|
15
|
+
@app_class ||= Rails.application.class
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pawel Niemczyk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack-contrib
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
|
188
188
|
- lib/rails_spotlight/middlewares/request_handler.rb
|
189
189
|
- lib/rails_spotlight/railtie.rb
|
190
|
+
- lib/rails_spotlight/support/project.rb
|
190
191
|
- lib/rails_spotlight/version.rb
|
191
192
|
- sig/rails_spotlight.rbs
|
192
193
|
homepage: https://github.com/pniemczyk/rails_spotlight
|