simple_segment 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_segment/operations/operation.rb +9 -1
- data/lib/simple_segment/version.rb +1 -1
- 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: 00dfcaba81c53815a6cc8f837b9fe8e8a832abb7
|
4
|
+
data.tar.gz: 7c2f9c23df74413679b4dce401d7f0f8d1cfb2a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46211a605c9107ff3b960278c3d10227e0cf1388c25a4ad10551709cc7e88a3ab04bd559c4c9a04e840cde5e943c8d1423511bbc557cdd41469b3467b0892243
|
7
|
+
data.tar.gz: 5015cffb0a7100bba692ae9023bc083c49dcd7993c4b41ee1cbdccdba7a515f32d9eb4b6ec88530535eeca71ba29f6eb29fdfef69886c5f1cd51cbf061b6c7db
|
@@ -30,7 +30,7 @@ module SimpleSegment
|
|
30
30
|
anonymousId: options[:anonymous_id],
|
31
31
|
context: DEFAULT_CONTEXT.merge(options[:context].to_h),
|
32
32
|
integrations: options[:integrations],
|
33
|
-
timestamp: options.fetch(:timestamp, current_time)
|
33
|
+
timestamp: timestamp(options.fetch(:timestamp, current_time)),
|
34
34
|
sentAt: current_time.iso8601
|
35
35
|
}
|
36
36
|
end
|
@@ -40,6 +40,14 @@ module SimpleSegment
|
|
40
40
|
raise ArgumentError, 'user_id or anonymous_id must be present'
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
def timestamp(timestamp)
|
45
|
+
if timestamp.respond_to?(:iso8601)
|
46
|
+
timestamp.iso8601
|
47
|
+
else
|
48
|
+
Time.iso8601(timestamp).iso8601
|
49
|
+
end
|
50
|
+
end
|
43
51
|
end
|
44
52
|
end
|
45
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_segment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Topolskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|