bullet 5.7.1 → 5.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bullet.rb +3 -4
- data/lib/bullet/notification/base.rb +5 -1
- data/lib/bullet/notification/unused_eager_loading.rb +1 -1
- data/lib/bullet/rack.rb +1 -1
- data/lib/bullet/stack_trace_filter.rb +8 -7
- data/lib/bullet/version.rb +1 -1
- data/spec/support/mongo_seed.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ed0e2ed3898670a46673b101bd879b8d108ac2c
|
4
|
+
data.tar.gz: 6c919b7f0793fbbb653ae7b493adcc0d57342af4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f921b2f8de2e9a222d17461f28547693e6442129f8bcd19ba19846054b057062f7ce699aae655a9fb032f68f6f347302f1112bdbe09986c11c17194bb81ee597
|
7
|
+
data.tar.gz: 30a453003a415d5b932b8fe2a1dd86e012baf25dabecea8d473276b4bbe1de2276a4da6edc5b7c866a80da76fe008bac30d2b3c1e3c114ee2613973a09a1b0a9
|
data/CHANGELOG.md
CHANGED
data/lib/bullet.rb
CHANGED
@@ -42,8 +42,8 @@ module Bullet
|
|
42
42
|
end
|
43
43
|
|
44
44
|
DETECTORS = [Bullet::Detector::NPlusOneQuery,
|
45
|
-
|
46
|
-
|
45
|
+
Bullet::Detector::UnusedEagerLoading,
|
46
|
+
Bullet::Detector::CounterCache].freeze
|
47
47
|
|
48
48
|
def enable=(enable)
|
49
49
|
@enable = @n_plus_one_query_enable = @unused_eager_loading_enable = @counter_cache_enable = enable
|
@@ -190,11 +190,10 @@ module Bullet
|
|
190
190
|
end
|
191
191
|
|
192
192
|
def warnings
|
193
|
-
notification_collector.collection.
|
193
|
+
notification_collector.collection.each_with_object({}) do |notification, warnings|
|
194
194
|
warning_type = notification.class.to_s.split(':').last.tableize
|
195
195
|
warnings[warning_type] ||= []
|
196
196
|
warnings[warning_type] << notification
|
197
|
-
warnings
|
198
197
|
end
|
199
198
|
end
|
200
199
|
|
data/lib/bullet/rack.rb
CHANGED
@@ -77,7 +77,7 @@ module Bullet
|
|
77
77
|
private
|
78
78
|
|
79
79
|
def footer_div_attributes
|
80
|
-
<<EOF
|
80
|
+
<<EOF
|
81
81
|
data-is-bullet-footer ondblclick="this.parentNode.removeChild(this);" style="position: fixed; bottom: 0pt; left: 0pt; cursor: pointer; border-style: solid; border-color: rgb(153, 153, 153);
|
82
82
|
-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none;
|
83
83
|
-moz-border-left-colors: none; -moz-border-image: none; border-width: 2pt 2pt 0px 0px;
|
@@ -9,19 +9,20 @@ module Bullet
|
|
9
9
|
caller_path = location.absolute_path.to_s
|
10
10
|
caller_path.include?(app_root) && !caller_path.include?(vendor_root) ||
|
11
11
|
Bullet.stacktrace_includes.any? do |include_pattern|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
case include_pattern
|
13
|
+
when String
|
14
|
+
caller_path.include?(include_pattern)
|
15
|
+
when Regexp
|
16
|
+
caller_path =~ include_pattern
|
17
|
+
end
|
17
18
|
end
|
18
|
-
end
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
def excluded_stacktrace_path?
|
23
23
|
Bullet.stacktrace_excludes.any? do |exclude_pattern|
|
24
|
-
caller_in_project.any? do |
|
24
|
+
caller_in_project.any? do |location|
|
25
|
+
caller_path = location.absolute_path.to_s
|
25
26
|
case exclude_pattern
|
26
27
|
when String
|
27
28
|
caller_path.include?(exclude_pattern)
|
data/lib/bullet/version.rb
CHANGED
data/spec/support/mongo_seed.rb
CHANGED
@@ -47,12 +47,12 @@ module Support
|
|
47
47
|
else
|
48
48
|
Mongoid.configure do |config|
|
49
49
|
config.load_configuration(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
50
|
+
clients: {
|
51
|
+
default: {
|
52
|
+
database: 'bullet',
|
53
|
+
hosts: ['localhost:27017']
|
55
54
|
}
|
55
|
+
}
|
56
56
|
)
|
57
57
|
end
|
58
58
|
# Increase the level from DEBUG in order to avoid excessive logging to the screen
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.7.
|
4
|
+
version: 5.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|