sensors_analytics_sdk 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sensors_analytics_sdk.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d52cdf3735cf35627055dc86a471201b48836710
|
4
|
+
data.tar.gz: ee811ff0fe863af38e5a3b0b189778f08c272e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84c5f54d6cd7f132262287eedd719985e5cac8666bef06d38a9a4ad8a56b760b237a11fad1493edad8c65e02d90f26e5d3ba7e4329df768d822f14eb573a07ca
|
7
|
+
data.tar.gz: a53d8b62bfbc2d13272833d80dc4a823216698b12c03d59759edea4511850f4e53db54656c88c7861d2794b5987df6215d03e94d2b572de9b0f27930c42f8c35
|
@@ -5,7 +5,7 @@ require 'zlib'
|
|
5
5
|
|
6
6
|
module SensorsAnalytics
|
7
7
|
|
8
|
-
VERSION = '1.
|
8
|
+
VERSION = '1.5.0'
|
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
|
|
@@ -250,16 +250,16 @@ module SensorsAnalytics
|
|
250
250
|
unless element.is_a?(String) || element.is_a?(Symbol)
|
251
251
|
raise IllegalDateError.new("The properties value of PROFILE APPEND must be an instance of Array[String].")
|
252
252
|
end
|
253
|
-
# 元素的长度不能超过
|
254
|
-
unless element.length <=
|
253
|
+
# 元素的长度不能超过8192
|
254
|
+
unless element.length <= 8192
|
255
255
|
raise IllegalDateError.new("The properties value is too long.")
|
256
256
|
end
|
257
257
|
end
|
258
258
|
end
|
259
259
|
|
260
|
-
# 属性为 String 或 Symbol 时,长度不能超过
|
260
|
+
# 属性为 String 或 Symbol 时,长度不能超过8191
|
261
261
|
if value.is_a?(String) || value.is_a?(Symbol)
|
262
|
-
unless value.length <=
|
262
|
+
unless value.length <= 8192
|
263
263
|
raise IllegalDateError.new("The properties value is too long.")
|
264
264
|
end
|
265
265
|
end
|
@@ -431,6 +431,9 @@ module SensorsAnalytics
|
|
431
431
|
puts "invalid message: #{event_list.to_json}"
|
432
432
|
puts "response code: #{response_code}"
|
433
433
|
puts "response body: #{response_body}"
|
434
|
+
end
|
435
|
+
|
436
|
+
if response_code.to_i >= 300
|
434
437
|
raise DebugModeError.new("Could not write to Sensors Analytics, server responded with #{response_code} returning: '#{response_body}'")
|
435
438
|
end
|
436
439
|
end
|
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.
|
4
|
+
version: 1.5.0
|
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-
|
11
|
+
date: 2016-07-04 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
|