bullet 7.1.5 → 7.1.6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -2
- data/README.md +1 -0
- data/lib/bullet/notification/base.rb +13 -2
- data/lib/bullet/version.rb +1 -1
- data/lib/bullet.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 752fed6e96f9ea5c1baefca2e9a80ea3aefa13c279d24688f3341d18c8334afc
|
4
|
+
data.tar.gz: 78edabbca2c71e9c6d2c793bd3786d5b826f4530664aa18e7cd42cb059a85373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cad943f3641de44f17da3fe2062ed83525d0bbb1d4321208f55b4d05d6a43840f25fe0728fa4e10f42701dd8ef4eaa2322ca9ab8c8d6a2e7d7067c70d0d3186
|
7
|
+
data.tar.gz: a58309dcbfaadbb9f67352c0a1730be8397c2522ef403093fcf58a8fdcc596b45e961d39b239e40412d46d98a50033ed02398efc70df4314631bd16e220a7c88
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## Next Release
|
2
2
|
|
3
|
+
## 7.1.6 (01/16/2024)
|
4
|
+
|
5
|
+
* Allow apps to not include the user in a notification
|
6
|
+
|
3
7
|
## 7.1.5 (01/05/2024)
|
4
8
|
|
5
9
|
* Fix mongoid8
|
@@ -10,7 +14,7 @@
|
|
10
14
|
|
11
15
|
## 7.1.3 (11/05/2023)
|
12
16
|
|
13
|
-
* Call NPlusOneQuery's call_association when calling count on collection
|
17
|
+
* Call NPlusOneQuery's call_association when calling count on collection association
|
14
18
|
|
15
19
|
## 7.1.2 (10/13/2023)
|
16
20
|
|
@@ -268,7 +272,7 @@
|
|
268
272
|
|
269
273
|
## 4.5.0 (03/24/2013)
|
270
274
|
|
271
|
-
* Add api way to access captured
|
275
|
+
* Add api way to access captured association
|
272
276
|
* Allow disable n_plus_one_query, unused_eager_loading and counter_cache respectively
|
273
277
|
* Add whitelist
|
274
278
|
|
data/README.md
CHANGED
@@ -102,6 +102,7 @@ The code above will enable all of the Bullet notification systems:
|
|
102
102
|
* `Bullet.slack`: add notifications to slack
|
103
103
|
* `Bullet.raise`: raise errors, useful for making your specs fail unless they have optimized queries
|
104
104
|
* `Bullet.always_append_html_body`: always append the html body even if no notifications are present. Note: `console` or `add_footer` must also be true. Useful for Single Page Applications where the initial page load might not have any notifications present.
|
105
|
+
* `Bullet.skip_user_in_notification`: exclude the OS user (`whoami`) from notifications.
|
105
106
|
|
106
107
|
|
107
108
|
Bullet also allows you to disable any of its detectors.
|
@@ -51,11 +51,22 @@ module Bullet
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def short_notice
|
54
|
-
|
54
|
+
parts = []
|
55
|
+
parts << whoami.presence unless Bullet.skip_user_in_notification
|
56
|
+
parts << url
|
57
|
+
parts << title
|
58
|
+
parts << body
|
59
|
+
|
60
|
+
parts.compact.join(' ')
|
55
61
|
end
|
56
62
|
|
57
63
|
def notification_data
|
58
|
-
|
64
|
+
hash = {}
|
65
|
+
hash[:user] = whoami unless Bullet.skip_user_in_notification
|
66
|
+
hash[:url] = url
|
67
|
+
hash[:title] = title
|
68
|
+
hash[:body] = body_with_caller
|
69
|
+
hash
|
59
70
|
end
|
60
71
|
|
61
72
|
def eql?(other)
|
data/lib/bullet/version.rb
CHANGED
data/lib/bullet.rb
CHANGED
@@ -40,7 +40,11 @@ module Bullet
|
|
40
40
|
:stacktrace_excludes,
|
41
41
|
:skip_html_injection
|
42
42
|
attr_reader :safelist
|
43
|
-
attr_accessor :add_footer,
|
43
|
+
attr_accessor :add_footer,
|
44
|
+
:orm_patches_applied,
|
45
|
+
:skip_http_headers,
|
46
|
+
:always_append_html_body,
|
47
|
+
:skip_user_in_notification
|
44
48
|
|
45
49
|
available_notifiers =
|
46
50
|
UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }
|
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: 7.1.
|
4
|
+
version: 7.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|