signalman 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/signalman/version.rb +1 -1
- data/lib/signalman.rb +13 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b28d7fca8056eae8e21a3ef173b4935090754a02f7dc6fed613171e62799974
|
4
|
+
data.tar.gz: a443c1aba2246d0072dcb30360ab9f58176d5eb316122be70ef082bbab58ec2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573fded60e4a16fbd33ae806b93ecc10bce784a04c1eca15a2340982efcd9b03bf98b1d113bc04c23d4a12584be54665345296e663006c4d3b29d8b4c7f84560
|
7
|
+
data.tar.gz: e67dc0da5783f91cf31f4be8e1fc31e7bec08849ae2564de8f48cae35cd5855cead06715eafad89b88e0179cff9f2746b3fac98a30743dd7dcc8d8513f0bd97a
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Signalman
|
2
|
-
|
2
|
+
A debug tool for Ruby on Rails application.
|
3
3
|
|
4
4
|
## Usage
|
5
5
|
How to use my plugin.
|
@@ -8,17 +8,17 @@ How to use my plugin.
|
|
8
8
|
Add this line to your application's Gemfile:
|
9
9
|
|
10
10
|
```ruby
|
11
|
-
|
11
|
+
bundle add "signalman", group: :development
|
12
12
|
```
|
13
13
|
|
14
|
-
|
15
|
-
```
|
16
|
-
|
14
|
+
Add migrations
|
15
|
+
```ruby
|
16
|
+
bin/rails signalman:install:migrations
|
17
17
|
```
|
18
18
|
|
19
|
-
|
20
|
-
```
|
21
|
-
|
19
|
+
Mount to the Rails routes
|
20
|
+
```ruby
|
21
|
+
mount Signalman::Engine => "/signalman" if Rails.env.development?
|
22
22
|
```
|
23
23
|
|
24
24
|
## Contributing
|
data/lib/signalman/version.rb
CHANGED
data/lib/signalman.rb
CHANGED
@@ -36,6 +36,8 @@ module Signalman
|
|
36
36
|
duration: event.duration,
|
37
37
|
payload: payload
|
38
38
|
)
|
39
|
+
rescue ActiveRecord::StatementInvalid => e
|
40
|
+
Rails.logger.error "[Signalman] #{e.message}"
|
39
41
|
end
|
40
42
|
|
41
43
|
# Time measure since system boot with
|
@@ -88,9 +90,18 @@ module Signalman
|
|
88
90
|
end
|
89
91
|
|
90
92
|
class QueryHandler < BaseHandler
|
93
|
+
IGNORED_QUERIES = [
|
94
|
+
"SCHEMA",
|
95
|
+
"TRANSACTION",
|
96
|
+
"ActiveRecord::SchemaMigration",
|
97
|
+
"ActiveRecord::InternalMetadata",
|
98
|
+
/^Signalman/
|
99
|
+
]
|
100
|
+
|
101
|
+
# CREATE_TABLE queries have nil for `name`
|
91
102
|
def skip?
|
92
|
-
|
93
|
-
|
103
|
+
return if event.payload[:name].blank?
|
104
|
+
IGNORED_QUERIES.any?{ |q| q.match? event.payload[:name] }
|
94
105
|
end
|
95
106
|
|
96
107
|
def process
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signalman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.4.
|
94
|
+
rubygems_version: 3.4.13
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Development tools for Ruby on Rails
|