sensors_analytics_sdk 1.3.7 → 1.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sensors_analytics_sdk.rb +9 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cc00591c185fa60303f056d00c69971732c8e43
4
- data.tar.gz: 5ff4913eca93005274d34d1dd818ef4b5fb24368
3
+ metadata.gz: 36883d7bed5419258598e7371b3f3b6e600631fb
4
+ data.tar.gz: 552d2b5824bc41f69e013707e08f54759c968594
5
5
  SHA512:
6
- metadata.gz: aada5871df574b0f3660c1bf4c59239dee6a364dac6f8aad2f19b2ddffdb62ab15681977a0fc76f95938dc7bf9108d48e08704c368d942997ea25c413323a3b3
7
- data.tar.gz: 81b3612450c61ec1e634c76e1d7cf488cb4708e4d67a633ce021af6da7736605386f7f6687ff72dd88fb076af7600f991459a9f05000ed411410a4284a8a55eb
6
+ metadata.gz: c5dcd8a9a9e8082c7ce0aa5db2420f4319ef1779afeaba5199388985d84c80321733a9499a1d893fe2567e1abcc3267c18f0c50bf30a7d95893fd37d3265aaa9
7
+ data.tar.gz: 447ba3d14f48902eec466f29fdecb180e89c3457151997b5db8dbf7f6d789adb0ac15d83881e77de159470e6d2b1f72da27b3447d5a44b4a28ac0a6180d260f3
@@ -5,7 +5,7 @@ require 'zlib'
5
5
 
6
6
  module SensorsAnalytics
7
7
 
8
- VERSION = '1.3.7'
8
+ VERSION = '1.3.8'
9
9
 
10
10
  KEY_PATTERN = /^((?!^distinct_id$|^original_id$|^time$|^properties$|^id$|^first_id$|^second_id$|^users$|^events$|^event$|^user_id$|^date$|^datetime$)[a-zA-Z_$][a-zA-Z\\d_$]{0,99})$/
11
11
 
@@ -146,13 +146,18 @@ module SensorsAnalytics
146
146
  event_time = _extract_time_from_properties(properties)
147
147
  properties.delete("$time")
148
148
 
149
+ event_properties = {}
149
150
  if event_type == :track || event_type == :track_signup
150
151
  event_properties = @super_properties.dup
151
- properties.each do |key, value|
152
+ end
153
+
154
+ properties.each do |key, value|
155
+ if value.is_a?(Time)
156
+ ms_part = (value.nsec / 100000).to_s
157
+ event_properties[key] = value.strftime('%Y-%m-%d %H:%M:%S.') + ms_part
158
+ else
152
159
  event_properties[key] = value
153
160
  end
154
- else
155
- event_properties = properties.dup
156
161
  end
157
162
 
158
163
  # Track / TrackSignup / ProfileSet / ProfileSetOne / ProfileIncrement / ProfileAppend / ProfileUnset
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensors_analytics_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuhan ZOU
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is the official Ruby SDK for Sensors Analytics.
14
14
  email: zouyuhan@sensorsdata.cn