fluent-plugin-snowplow 0.1.3 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffafeda9841cf47af54a794e24abfb8463250885
4
- data.tar.gz: 978a8da22192dbad6185dfcdbc9800de0acfb76c
3
+ metadata.gz: 37790813e6e0f4a06d336c42942a45480729ea46
4
+ data.tar.gz: a7b633007f5031383f6ba1e43c7ccbd3cbccceb1
5
5
  SHA512:
6
- metadata.gz: c2dbe951d332df308a5718c6bf8d06d189ed4ca9209c423919feaf82749c9ca995edcf579591e5f19abfa2a9ab0ebd49394204628b268495fe6d20a466d7e710
7
- data.tar.gz: 6cfca5ce9fc0c92b4e94960e29d03c3e47308cc0835fb4d2fdcc8a3faf51a95eaca7bef2b1d10fc9f2ee956d088c37af9db6bcead9afe3fbefe7e4b2bd21393b
6
+ metadata.gz: 90803ad9e269ec5fd54fe97d3703411447a8031224da752ef5380b97e0d861f76b7894154692c34d0d0771a034d5df2f20e73a14d237b204269ae03a2f2a3af2
7
+ data.tar.gz: b33c85878e7d7e5ff62b0604762ab799778eaac2048b794a51e2a30160c89b1509210c855c556153cf0d5ff6cadde64cf14c110642090c7c4dfe5684a2873033
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-snowplow (0.1.0)
4
+ fluent-plugin-snowplow (0.1.3)
5
5
  snowplow-tracker
6
6
 
7
7
  GEM
@@ -19,3 +19,6 @@ DEPENDENCIES
19
19
  bundler (~> 1.9)
20
20
  fluent-plugin-snowplow!
21
21
  rake (~> 10.0)
22
+
23
+ BUNDLED WITH
24
+ 1.16.1
@@ -47,10 +47,18 @@ class Fluent::SomeOutput < Fluent::TimeSlicedOutput
47
47
  message = JSON.parse record['message']
48
48
  true_timestamp = record['true_timestamp']
49
49
  application = record['application']
50
+ contexts = JSON.parse record.fetch('contexts', "[]")
50
51
  tracker = tracker_for(application)
51
52
 
53
+ contexts = contexts.map do |context|
54
+ context_schema = context['schema']
55
+ context_message = context['message']
56
+
57
+ SnowplowTracker::SelfDescribingJson.new(context_schema, context_message)
58
+ end
59
+
52
60
  self_describing_json = SnowplowTracker::SelfDescribingJson.new(schema, message)
53
- tracker.track_self_describing_event(self_describing_json, nil, SnowplowTracker::TrueTimestamp.new(true_timestamp.to_i))
61
+ tracker.track_self_describing_event(self_describing_json, contexts, SnowplowTracker::TrueTimestamp.new(true_timestamp.to_i))
54
62
  end
55
63
 
56
64
  tracker.flush
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module Snowplow
4
- VERSION = "0.1.3"
4
+ VERSION = "0.2.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-snowplow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Souza
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2018-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,9 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.2.2
96
+ rubygems_version: 2.5.2
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Fluentd snowplow gem
100
100
  test_files: []
101
- has_rdoc: