shrew 0.0.10 → 0.0.11

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: 97dab10d011f3dfd61c85dbcf9b1a0cce93b1c38
4
- data.tar.gz: d1ecd71e9ed217de1193b3219b3e8e579d5a2423
3
+ metadata.gz: 0970dba5d5a7f0e35f1e0275723e2284c14af6e6
4
+ data.tar.gz: 212dbf2020fa5f66b68f1ad55d93d8120a0828fa
5
5
  SHA512:
6
- metadata.gz: ec18a28c690cdc4aac1f565bbea183d665147ff19e986fc5d23062fd5789d0aba70e04ffc33538cdb42f6dbfca0698a5a141a5e832579e307b98c97e3b2fad5c
7
- data.tar.gz: 4a5438b2697f237ef0860a0e27eb78c3687473fb6f3b9a91c215d32db641638e26764b358439573f93f7de4410338f5f0b22ac51b9a214360eef620db7966b2d
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
@@ -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.string :js_tracking_id, limit: 16
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
@@ -1,3 +1,3 @@
1
1
  module Shrew
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -18,6 +18,7 @@ ActiveRecord::Schema.define(version: 1) do
18
18
  t.string "controller"
19
19
  t.string "action"
20
20
  t.string "path"
21
+ t.string "format"
21
22
  t.integer "status"
22
23
  t.integer "start_time"
23
24
  t.integer "duration"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Gross