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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45f885605935c340cac5cf587663a77526f4b9d5
4
- data.tar.gz: 4982228f2d3e7722bb920e515a16aa65906c21d2
3
+ metadata.gz: 0ed0e2ed3898670a46673b101bd879b8d108ac2c
4
+ data.tar.gz: 6c919b7f0793fbbb653ae7b493adcc0d57342af4
5
5
  SHA512:
6
- metadata.gz: 2cca58f89a5fc6bf1154d82d301f54748b3822aebb8fbcbada75cb71daeffce1d9e5b6d8bb163c0844947933e2ecf12eb48b9af2ad37223b1f3c113209ab8b09
7
- data.tar.gz: 7f1c4692b84a07a285af404764eee88849f01cfed587e732d30d2f9056ce99a34b319a6093c591bb148715603a39725ac3ed6e8dccc8f61f6d425f39d5d841a5
6
+ metadata.gz: f921b2f8de2e9a222d17461f28547693e6442129f8bcd19ba19846054b057062f7ce699aae655a9fb032f68f6f347302f1112bdbe09986c11c17194bb81ee597
7
+ data.tar.gz: 30a453003a415d5b932b8fe2a1dd86e012baf25dabecea8d473276b4bbe1de2276a4da6edc5b7c866a80da76fe008bac30d2b3c1e3c114ee2613973a09a1b0a9
@@ -1,5 +1,9 @@
1
1
  ## Next Release
2
2
 
3
+ ## 5.7.2 (18/01/2018)
4
+
5
+ * Fix `caller_path` in `excluded_stacktrace_path`
6
+
3
7
  ## 5.7.1 (07/01/2017)
4
8
 
5
9
  * Update `uniform_notifier` dependency to add Sentry support
@@ -42,8 +42,8 @@ module Bullet
42
42
  end
43
43
 
44
44
  DETECTORS = [Bullet::Detector::NPlusOneQuery,
45
- Bullet::Detector::UnusedEagerLoading,
46
- Bullet::Detector::CounterCache].freeze
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.inject({}) do |warnings, notification|
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
 
@@ -23,7 +23,11 @@ module Bullet
23
23
  end
24
24
 
25
25
  def whoami
26
- @user ||= ENV['USER'].presence || (`whoami`.chomp rescue '')
26
+ @user ||= ENV['USER'].presence || (begin
27
+ `whoami`.chomp
28
+ rescue StandardError
29
+ ''
30
+ end)
27
31
  if @user.present?
28
32
  "user: #{@user}"
29
33
  else
@@ -17,7 +17,7 @@ module Bullet
17
17
 
18
18
  def notification_data
19
19
  super.merge(
20
- backtrace: []
20
+ backtrace: []
21
21
  )
22
22
  end
23
23
 
@@ -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
- case include_pattern
13
- when String
14
- caller_path.include?(include_pattern)
15
- when Regexp
16
- caller_path =~ include_pattern
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 |caller_path|
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)
@@ -1,3 +1,3 @@
1
1
  module Bullet
2
- VERSION = '5.7.1'.freeze
2
+ VERSION = '5.7.2'.freeze
3
3
  end
@@ -47,12 +47,12 @@ module Support
47
47
  else
48
48
  Mongoid.configure do |config|
49
49
  config.load_configuration(
50
- clients: {
51
- default: {
52
- database: 'bullet',
53
- hosts: ['localhost:27017']
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.1
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-07 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport