active-record-query-count 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +126 -0
  3. data/bin/setup +8 -0
  4. data/images/bar_chart.png +0 -0
  5. data/images/html.png +0 -0
  6. data/images/terminal.png +0 -0
  7. data/lib/active_record_query_count/compare/comparator.rb +33 -0
  8. data/lib/active_record_query_count/configuration.rb +12 -0
  9. data/lib/active_record_query_count/middleware.rb +37 -0
  10. data/lib/active_record_query_count/printer/base.rb +42 -0
  11. data/lib/active_record_query_count/printer/console.rb +30 -0
  12. data/lib/active_record_query_count/printer/html.rb +68 -0
  13. data/lib/active_record_query_count/printer/html_compare.rb +64 -0
  14. data/lib/active_record_query_count/printer/templates/bar_chart.js +153 -0
  15. data/lib/active_record_query_count/printer/templates/comparing.html.erb +66 -0
  16. data/lib/active_record_query_count/printer/templates/style.css +41 -0
  17. data/lib/active_record_query_count/printer/templates/template.html.erb +9 -0
  18. data/lib/active_record_query_count/printer/templates/template_base_query_counter.html.erb +51 -0
  19. data/lib/active_record_query_count/printer/templates/template_for_inject.html.erb +64 -0
  20. data/lib/active_record_query_count/recording/base.rb +28 -0
  21. data/lib/active_record_query_count/recording/tracker.rb +40 -0
  22. data/lib/active_record_query_count/version.rb +5 -0
  23. data/lib/active_record_query_count.rb +37 -0
  24. data/scripts_for_testing/example_script_optimize.yaml +217 -0
  25. data/scripts_for_testing/example_script_unoptimize.yaml +142 -0
  26. data/scripts_for_testing/script_compare_html.rb +16 -0
  27. data/scripts_for_testing/script_printer_html.rb +8 -0
  28. data/scripts_for_testing/scripts_console.rb.rb +8 -0
  29. metadata +266 -0
metadata ADDED
@@ -0,0 +1,266 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active-record-query-count
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Jose Lara
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '6.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: colorize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: launchy
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: nokogiri
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.16.5
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.16.5
69
+ - !ruby/object:Gem::Dependency
70
+ name: activerecord
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '6.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '6.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mocha
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-byebug
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: ruby-lsp
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: shoulda-context
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: shoulda-matchers
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '6.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '6.0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: sqlite3
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '1.4'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '1.4'
209
+ description:
210
+ email:
211
+ - jvlara@uc.cl
212
+ executables: []
213
+ extensions: []
214
+ extra_rdoc_files: []
215
+ files:
216
+ - README.md
217
+ - bin/setup
218
+ - images/bar_chart.png
219
+ - images/html.png
220
+ - images/terminal.png
221
+ - lib/active_record_query_count.rb
222
+ - lib/active_record_query_count/compare/comparator.rb
223
+ - lib/active_record_query_count/configuration.rb
224
+ - lib/active_record_query_count/middleware.rb
225
+ - lib/active_record_query_count/printer/base.rb
226
+ - lib/active_record_query_count/printer/console.rb
227
+ - lib/active_record_query_count/printer/html.rb
228
+ - lib/active_record_query_count/printer/html_compare.rb
229
+ - lib/active_record_query_count/printer/templates/bar_chart.js
230
+ - lib/active_record_query_count/printer/templates/comparing.html.erb
231
+ - lib/active_record_query_count/printer/templates/style.css
232
+ - lib/active_record_query_count/printer/templates/template.html.erb
233
+ - lib/active_record_query_count/printer/templates/template_base_query_counter.html.erb
234
+ - lib/active_record_query_count/printer/templates/template_for_inject.html.erb
235
+ - lib/active_record_query_count/recording/base.rb
236
+ - lib/active_record_query_count/recording/tracker.rb
237
+ - lib/active_record_query_count/version.rb
238
+ - scripts_for_testing/example_script_optimize.yaml
239
+ - scripts_for_testing/example_script_unoptimize.yaml
240
+ - scripts_for_testing/script_compare_html.rb
241
+ - scripts_for_testing/script_printer_html.rb
242
+ - scripts_for_testing/scripts_console.rb.rb
243
+ homepage: https://github.com/jvlara/active-record-query-count
244
+ licenses:
245
+ - MIT
246
+ metadata: {}
247
+ post_install_message:
248
+ rdoc_options: []
249
+ require_paths:
250
+ - lib
251
+ required_ruby_version: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - ">="
254
+ - !ruby/object:Gem::Version
255
+ version: 3.2.2
256
+ required_rubygems_version: !ruby/object:Gem::Requirement
257
+ requirements:
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: '0'
261
+ requirements: []
262
+ rubygems_version: 3.4.10
263
+ signing_key:
264
+ specification_version: 4
265
+ summary: Display an overview of quantity of queries and their origin in Rails applications.
266
+ test_files: []