activeinsights 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: ba9b12cbc1e8d149b38d87f9f1ed83504454cd460917dbd9a4b376be1b076ac4
4
- data.tar.gz: 2a9d263f315e786b8ea12d7017e629f1003f0af825007b928591101d44d63178
3
+ metadata.gz: b7cd811a762ab51064d53274437f64f93f74779801c01ca7862994d5680fc236
4
+ data.tar.gz: 289bdbf78cfaa3497dd2943752ca074fce616171020828a1ac519cac4cb647b8
5
5
  SHA512:
6
- metadata.gz: 974a8bc81700d50ebb6b4348b6f4edbb45e9d16d0aff0af30aa6f6b977e7b945081108b10171b4dfd467b87d66097a086f742294b60b974862cd55ef66553b35
7
- data.tar.gz: 4d816b024d1c674ec8f7cb59b8c5a6d63a50a386496fd8126e3c57216ecae0c67df877578fbedce7a5e1c4aee46a11830a1048adfcb575d74a3296da35fd1fb6
6
+ metadata.gz: '052695741cc87fd2615062dd310808f7c518cbbe5019ffc20086a6c0d0776ab00d149716743dd8f642c0625c439c20bfa35e2ceb0191bf920cbb38eb25172cfb'
7
+ data.tar.gz: e0635d4cef4b87156b71c3e7fe30ef1520b11df3787ba2e04acb8150d955492edb5eddb2cdaca90da7c637f3c0f14f10aa41809792e336ab64d16bcbd77d59f9
@@ -19,7 +19,7 @@ module ActiveInsights
19
19
  @minutes ||=
20
20
  ActiveInsights::Request.where(started_at: @date).
21
21
  where(formatted_controller: params[:formatted_controller]).
22
- group_by_minute.with_durations.select_started_at
22
+ minute_by_minute.with_durations.select_started_at
23
23
  end
24
24
  end
25
25
  end
@@ -17,7 +17,7 @@ module ActiveInsights
17
17
  def minutes
18
18
  @minutes ||=
19
19
  ActiveInsights::Request.where(started_at: @date).
20
- group_by_minute.with_durations.select_started_at
20
+ minute_by_minute.with_durations.select_started_at
21
21
  end
22
22
  end
23
23
  end
@@ -5,7 +5,7 @@ module ActiveInsights
5
5
  def index
6
6
  @minutes =
7
7
  ActiveInsights::Request.where(started_at: @date).
8
- group_by_minute.select("COUNT(id) AS rpm").select_started_at.
8
+ minute_by_minute.select("COUNT(id) AS rpm").select_started_at.
9
9
  map { |minute| [minute.started_at.strftime("%-l:%M%P"), minute.rpm] }
10
10
  end
11
11
 
@@ -10,7 +10,7 @@ module ActiveInsights
10
10
  select("STRING_AGG(CAST(duration AS varchar), ',') AS durations")
11
11
  end
12
12
  }
13
- scope :group_by_minute, lambda {
13
+ scope :minute_by_minute, lambda {
14
14
  case connection.adapter_name
15
15
  when "SQLite"
16
16
  group("strftime('%Y-%m-%d %H:%M:00 UTC', " \
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ActiveInsightsRequest < ActiveRecord::Migration[7.1]
4
- def change # rubocop:disable Metrics/AbcSize
4
+ def change
5
5
  create_table :active_insights_requests, if_not_exists: true do |t|
6
6
  t.string :controller
7
7
  t.string :action
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveInsights
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeinsights
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza