debugbar 0.1.3 → 0.1.4

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: 389fcb115afbb56d83be8f40f60985a527c81f8d0df6aa7209720dc2413fd10b
4
- data.tar.gz: f002929f37f5821f9b663c450b3ffc487cb3892f8f94ab2b1a720987b0d4514d
3
+ metadata.gz: a11b73a9ef8ff90c2be09ed570dde59b7d0e856b958ea6a5ab9c7eab18ff6feb
4
+ data.tar.gz: 15fd5168d8a6f532842f693c16a7e9c821cbe9c136a459fb58d5e5324eb193ec
5
5
  SHA512:
6
- metadata.gz: '0719ab3ca71da9bc48786a19108b3828e15d70230d2d1022d9d135586cb95043ced489c59bd264cb513cac6dabd9190bc4a7bedbac67ebd533a63668473efa55'
7
- data.tar.gz: 6940165a13db4afe19416945c90b98ec7b33686b04163cd1ce99f7c7a575c8084d135d673707ede5b8b6c62615cc66e137484d2ab6b5d7fbab7dac6172eedc1d
6
+ metadata.gz: 0d7fa957a8453eabd1fabe1aebc4a04ba803f1e94932e6bd4d483fb7af0ca63322aef91e7db43ef087d76aaeae2e5890d5b6565af4a525a2a7c8a4433a5f0e9e
7
+ data.tar.gz: 26914d0f2bd5e2b0ada5cedd00259dd225ca89e31fc6b93459a3c7bdfcd3f30e7f58d4845385d79e06a60cf3f4da632be35d5eaaa8dfe4b9399ade7676e2c343
@@ -3,5 +3,3 @@
3
3
  rm -rf client/dist
4
4
  (cd client && npm run build)
5
5
  cp client/dist/assets/debugbar-*.js public/debugbar.js
6
-
7
- gem build debugbar.gemspec
data/build_gem.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ source build_client.sh
4
+ gem build debugbar.gemspec
@@ -22,26 +22,9 @@ module Debugbar
22
22
  sql = payload[:sql]&.gsub(/\/\*.*\*\//, "") # remove comments
23
23
 
24
24
  binds = nil
25
- if payload[:binds]&.any?
26
- casted_params = type_casted_binds(payload[:type_casted_binds])
27
-
28
- binds = []
29
- payload[:binds].each_with_index do |attr, i|
30
- attribute_name = if attr.respond_to?(:name)
31
- attr.name
32
- elsif attr.respond_to?(:[]) && attr[i].respond_to?(:name)
33
- attr[i].name
34
- else
35
- nil
36
- end
37
-
38
- filtered_params = filter(attribute_name, casted_params[i])
39
-
40
- binds << render_bind(attr, filtered_params)
41
- end
42
- binds = binds.inspect
43
- binds.prepend(" ")
44
- end
25
+ # if payload[:binds]&.any?
26
+ # TODO: Restore binds when I can figure out how to get something in poayload[:binds]
27
+ # end
45
28
 
46
29
  Debugbar::Tracker.add_query({
47
30
  id: event.transaction_id,
@@ -60,27 +43,6 @@ module Debugbar
60
43
  def query_source_location
61
44
  backtrace_cleaner.clean(caller(3))[0]
62
45
  end
63
-
64
- private
65
-
66
- def type_casted_binds(casted_binds)
67
- casted_binds.respond_to?(:call) ? casted_binds.call : casted_binds
68
- end
69
-
70
- def render_bind(attr, value)
71
- case attr
72
- when ActiveModel::Attribute
73
- if attr.type.binary? && attr.value
74
- value = "<#{attr.value_for_database.to_s.bytesize} bytes of binary data>"
75
- end
76
- when Array
77
- attr = attr.first
78
- else
79
- attr = nil
80
- end
81
-
82
- [attr&.name, value]
83
- end
84
46
  end
85
47
  end
86
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Debugbar
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/public/.gitignore ADDED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Bourdeau
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-18 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -54,7 +54,8 @@ files:
54
54
  - app/controllers/debugbar/assets_controller.rb
55
55
  - app/helpers/debugbar/tag_helpers.rb
56
56
  - app/models/debugbar/application_record.rb
57
- - build.sh
57
+ - build_client.sh
58
+ - build_gem.sh
58
59
  - config/routes.rb
59
60
  - debugbar.gemspec
60
61
  - lib/debugbar.rb
@@ -72,6 +73,7 @@ files:
72
73
  - lib/debugbar/subscribers/active_record.rb
73
74
  - lib/debugbar/subscribers/active_support.rb
74
75
  - lib/debugbar/version.rb
76
+ - public/.gitignore
75
77
  - public/debugbar.js
76
78
  - sig/debugbar.rbs
77
79
  homepage: https://debugbar.dev