From b8a2379058e9f6990aaa0555a7ed1fd1153ba305 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 20:56:05 +0000 Subject: [PATCH 1/2] Initial plan From 869d37bef6a353a8d2a56215aa25b4ea5b41f17c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 21:00:49 +0000 Subject: [PATCH 2/2] Fix inconsistent timestamp format in groups_spec.rb tests Changed 9 occurrences from `@time_now.to_i * 1000` to `(@time_now.to_f * 1000).to_i` to ensure consistent millisecond precision across all test expectations. Co-authored-by: hans-lizihan <7879022+hans-lizihan@users.noreply.github.com> --- spec/mixpanel-ruby/groups_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/mixpanel-ruby/groups_spec.rb b/spec/mixpanel-ruby/groups_spec.rb index 45f0170..07b6528 100644 --- a/spec/mixpanel-ruby/groups_spec.rb +++ b/spec/mixpanel-ruby/groups_spec.rb @@ -39,7 +39,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$set' => { 'created_at' => '2013-01-02T03:04:05' } @@ -54,7 +54,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$set' => { 'created_at' => '2013-01-02T02:04:05' } @@ -70,7 +70,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$set' => { 'created_at' => '2013-01-02T02:04:05' } @@ -86,7 +86,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$set_once' => { '$groupname' => 'Mixpanel', '$grouprevenue' => 200 @@ -102,7 +102,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$remove' => { 'Albums' => 'Diamond Dogs' } @@ -117,7 +117,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$union' => { 'Albums' => ['Diamond Dogs'] } @@ -130,7 +130,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$unset' => ['Albums'] }]]) end @@ -141,7 +141,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$unset' => ['Albums', 'Vinyls'] }]]) end @@ -152,7 +152,7 @@ '$token' => 'TEST TOKEN', '$group_key' => 'TEST GROUP KEY', '$group_id' => 'TEST GROUP ID', - '$time' => @time_now.to_i * 1000, + '$time' => (@time_now.to_f * 1000).to_i, '$delete' => '' }]]) end