fluent-plugin-mixpanel-enchanced 0.0.10 → 0.0.11

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: 27467730f8f9dcfa247c004aa9ce3e0ca374f993
4
- data.tar.gz: 71c01ebc5f14ee468f6685c420db82bbd2cb3d64
3
+ metadata.gz: 49c6d91faa207ba34712b80cc02a699dbccb1b96
4
+ data.tar.gz: e4b94470d3e2120645593500e351f6c8b992c72a
5
5
  SHA512:
6
- metadata.gz: 12c4377d98a3a4b57d75583fa8689fd7c0a79706a2d6c035bf01f887b9b392d655f4da36fcc445eec2aa1c66eeea86eed52011d26d928cdec55e091399935e9f
7
- data.tar.gz: 9be23b64240e8e057885519a656a4cb2bd09f095f09ce8210705282702b23cbcbfa8dc355ebc2b2097d061c0ccb00864bd4516c4de91467c40c1d3fa218dc492
6
+ metadata.gz: 83222bdcfe2d677d8904951e166b59701314d3983c55bb3c5e4b6847339ddeeeaaa8941968dba765259e85e229295762a6f5455d28479e2c2a3c2f82890e8b76
7
+ data.tar.gz: 0bda053d8b3b4d9c71cef0073802a39ed76df4254bc0456100b05f9b32864a06792d70135fab1c9dd4a83a4a39b1e40a0c03d34bcaefa75afc56bd6691ab82dc
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-mixpanel-enchanced"
7
- spec.version = "0.0.10"
7
+ spec.version = "0.0.11"
8
8
  spec.authors = ["zhron4x"]
9
9
  spec.email = ["zhr0n4x@gmail.com"]
10
10
  spec.summary = %q{Fluentd plugin to input/output event track data to mixpanel}
@@ -1,6 +1,5 @@
1
1
  require 'fluent/plugin/in_http'
2
2
  require 'base64'
3
- require 'pry'
4
3
 
5
4
  class Fluent::HttpMixpanelInput < Fluent::HttpInput
6
5
  Fluent::Plugin.register_input('http_mixpanel', self)
@@ -10,9 +9,9 @@ class Fluent::HttpMixpanelInput < Fluent::HttpInput
10
9
  def on_request(path_info, params)
11
10
  data = Base64.decode64(params['data']).force_encoding('utf-8')
12
11
  json = JSON.parse(data)
13
- binding.pry
12
+ domain = params['HTTP_ORIGIN'].sub('://', '_')
14
13
  props = json['properties']
15
- path = "/#{tag_prefix}.#{json['event']}"
14
+ path = "/#{tag_prefix}.#{domain}.#{json['event']}"
16
15
  params['json'] = props.to_json
17
16
  params['time'] = props['time'].to_s if props['time']
18
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-mixpanel-enchanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhron4x