shrew 0.0.10 → 0.0.11
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/app/controllers/shrew/page_views_controller.rb +1 -1
- data/app/models/shrew/page_view.rb +1 -1
- data/db/migrate/1_add_shrew_page_view_table.rb +1 -0
- data/lib/generators/templates/page_view_migration.rb +2 -1
- data/lib/shrew/version.rb +1 -1
- data/test/dummy/db/schema.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0970dba5d5a7f0e35f1e0275723e2284c14af6e6
|
|
4
|
+
data.tar.gz: 212dbf2020fa5f66b68f1ad55d93d8120a0828fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4ef89461355594dfacd358c1d99c55609310d933d26344854d926d9e885b7fafda1bbff1cc1a24944fc4a99dbe64e96e15aad56e9e3655fe1e3fb1e45127c63
|
|
7
|
+
data.tar.gz: 5b5537412629085c2fe65fe23eae571127d1cfaf1c40f6679fbb80602e30566e419b24b7cf5b12539c1300208becdbcbcf83f735ab0c131c2289e72b8e517bf5
|
|
@@ -3,7 +3,7 @@ module Shrew
|
|
|
3
3
|
def create
|
|
4
4
|
empty_response && return unless params[:jTI].present? && params[:jRT].present?
|
|
5
5
|
|
|
6
|
-
page_view = Shrew::PageView.find_by js_tracking_id: params[:jTI]
|
|
6
|
+
page_view = Shrew::PageView.select(:id).find_by js_tracking_id: params[:jTI]
|
|
7
7
|
empty_response && return unless page_view
|
|
8
8
|
|
|
9
9
|
page_view.js_return_time = params[:jRT]
|
|
@@ -7,7 +7,7 @@ module Shrew
|
|
|
7
7
|
attributes = payload.slice(:user_id, :controller, :status, :view_runtime,
|
|
8
8
|
:db_runtime, :sent_time, :js_return_time,
|
|
9
9
|
:js_tracking_id, :action, :path, :start_time,
|
|
10
|
-
:duration)
|
|
10
|
+
:duration, :format)
|
|
11
11
|
.merge(sent_time: milliseconds_since_epoch)
|
|
12
12
|
begin
|
|
13
13
|
create(attributes)
|
|
@@ -5,6 +5,7 @@ class AddShrewPageViewTable < ActiveRecord::Migration
|
|
|
5
5
|
t.string :controller
|
|
6
6
|
t.string :action
|
|
7
7
|
t.string :path
|
|
8
|
+
t.string :format
|
|
8
9
|
t.integer :status
|
|
9
10
|
t.integer :start_time
|
|
10
11
|
t.integer :duration
|
|
@@ -12,7 +13,7 @@ class AddShrewPageViewTable < ActiveRecord::Migration
|
|
|
12
13
|
t.float :db_runtime
|
|
13
14
|
t.integer :sent_time, limit: 8
|
|
14
15
|
t.integer :js_return_time, limit: 8
|
|
15
|
-
t.
|
|
16
|
+
t.column :js_tracking_id, 'char(16)'
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
add_index :shrew_page_views, :user_id
|
data/lib/shrew/version.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED