logstash-output-charrington 0.3.21 → 0.3.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b495c8c2b48eb4a9f0a61ebd67cb215003b4971d58d63241f4ca4678da1ccb26
4
- data.tar.gz: 424fd9a3e3eac5e0c7f893cd3613e9f38a38d15ef63c19a843605c8651aef06a
3
+ metadata.gz: 11c3f9faf285c7c896341946f3fe6c11a7bab32aa4b9cd78c65d901db92c0402
4
+ data.tar.gz: 6d339e684929d5ff60d47719076cbad0e6035f1f7a6d721dfa0bd9577c973973
5
5
  SHA512:
6
- metadata.gz: 5eb47165c378727eee8e7371defca71ffbb840a2e555b91a0e802bb75722888ec770938497a2b956ed8a7ecd874d0bd632ad8e76673afb93fc6a85fa1d784370
7
- data.tar.gz: ed5876a86067c11dcbc1776ab8b11388783c58d758a815ba61bcaa991de0c606aff1c9d47c7fd4fc164fbb50f63878211385431121ce8b34e1c56cc4f56542b3
6
+ metadata.gz: d094aa65b3e2432b7c427305e641969c1b6003898f1192a42362c30fc4585f5e7c43a5eebd2a95645748384d195032ce027c66381df42f800c14efabd20065fc
7
+ data.tar.gz: 31f14f4b121a06a4e04689c430f633d5cda296d15f99fb07c5190d61646c4d41c3b2105af17bd9e575676c83cb264208e68180506a7e1e179f8ab436c779e2f3
@@ -16,7 +16,7 @@ module Charrington
16
16
  attr_reader :connection, :schema, :table_name, :columns, :driver, :opts, :transformer, :tracks
17
17
  attr_reader :event_as_json_keyword, :enable_event_as_json_keyword
18
18
  # TODO create a current_table_columns (alter_postgres_table.rb) query on the tracks table to get the current columns
19
- @@redshift_tracks_columns = %w(id app_name received_at uuid uuid_ts anonymous_id context_ip context_library_name context_library_version context_page_path context_page_referrer context_page_title context_page_url context_user_agent event event_text original_timestamp sent_at timestamp user_id user_uid context_campaign_medium context_campaign_name context_page_search context_campaign_source segment_dedupe_id context_campaign_content)
19
+ @@redshift_tracks_columns = %w(id action app_name received_at uuid uuid_ts anonymous_id context_ip context_library_name context_library_version context_page_path context_page_referrer context_page_title context_page_url context_user_agent event event_text original_timestamp sent_at timestamp user_id user_uid context_campaign_medium context_campaign_name context_page_search context_campaign_source segment_dedupe_id context_campaign_content)
20
20
  @@postgres_tracks_columns = %w(anonymous_user app_name event published_at session_ip session_library_name session_library_version session_page_path session_page_referrer session_page_search session_page_title session_page_url session_user_agent user_id user_uid)
21
21
  @@timestamp_columns = %w(published_at sent_at original_timestamp received_at timestamp)
22
22
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-charrington'
3
- s.version = '0.3.21'
3
+ s.version = '0.3.22'
4
4
 
5
5
  s.licenses = ['Apache-2.0']
6
6
  s.homepage = 'https://gitlab.podium.com/engineering/analytics/logstash-output-charrington'
@@ -93,6 +93,7 @@ RSpec.shared_context 'postgres' do
93
93
  CREATE TABLE IF NOT EXISTS #{ schema.empty? ? schema : schema + '.'}tracks
94
94
  (
95
95
  id VARCHAR(512) NOT NULL CONSTRAINT tracks_pkey PRIMARY KEY,
96
+ action VARCHAR(512),
96
97
  anonymous_id VARCHAR(512),
97
98
  app_name VARCHAR(512),
98
99
  context_campaign_content VARCHAR(512),
@@ -221,7 +221,7 @@ describe LogStash::Outputs::Charrington do
221
221
  <<-CONFIG
222
222
  input {
223
223
  generator {
224
- message => '{"app_name": "Web App", "event": "schemaless", "meta": { "type": "XML" }, "published_at": "2019-07-29T20:09:18Z", "user_id": "123", "user_uid": "456" }'
224
+ message => '{"app_name": "Web App", "action": "click", "event": "schemaless", "meta": { "type": "XML" }, "published_at": "2019-07-29T20:09:18Z", "user_id": "123", "user_uid": "456" }'
225
225
  codec => 'json'
226
226
  count => 1
227
227
  }
@@ -244,11 +244,11 @@ describe LogStash::Outputs::Charrington do
244
244
  drop_table('schemaless')
245
245
  run_pipeline
246
246
  expect(query('SELECT * FROM schemaless')).to match_array([
247
- {:anonymous_id=>"", :app_name=>"Web App", :event=>"schemaless", :event_text=>"schemaless", :id=>a_kind_of(String), :original_timestamp=>a_kind_of(String), :received_at=>a_kind_of(String), :sent_at=>"2019-07-29 20:09:18", :timestamp=>a_kind_of(String), :type=>"XML", :user_id=>"123", :user_uid=>"456", :uuid_ts=>a_kind_of(String)}
247
+ {:anonymous_id=>"", :action=>"click", :app_name=>"Web App", :event=>"schemaless", :event_text=>"schemaless", :id=>a_kind_of(String), :original_timestamp=>a_kind_of(String), :received_at=>a_kind_of(String), :sent_at=>"2019-07-29 20:09:18", :timestamp=>a_kind_of(String), :type=>"XML", :user_id=>"123", :user_uid=>"456", :uuid_ts=>a_kind_of(String)}
248
248
  ])
249
249
  expect(query('SELECT COUNT(1) FROM schemaless').first[:count]).to eq("1")
250
250
  expect(query("SELECT * FROM tracks")).to match_array([
251
- {:id=>a_kind_of(String), :anonymous_id=>"", :app_name=>"Web App", :context_campaign_content=>nil, :context_campaign_medium=>nil, :context_campaign_name=>nil, :context_campaign_source=>nil, :context_ip=>nil, :context_library_name=>nil, :context_library_version=>nil, :context_page_path=>nil, :context_page_referrer=>nil, :context_page_search=>nil, :context_page_title=>nil, :context_page_url=>nil, :context_user_agent=>nil, :event=>"schemaless", :event_text=>"schemaless", :original_timestamp=>"2019-07-29 20:09:18", :received_at=>"2019-07-29 20:09:18", :segment_dedupe_id=>nil, :sent_at=>"2019-07-29 20:09:18", :timestamp=>"2019-07-29 20:09:18", :user_id=>"123", :user_uid=>"456", :uuid=>nil, :uuid_ts=>a_kind_of(String)}
251
+ {:id=>a_kind_of(String), :action=>"click", :anonymous_id=>"", :app_name=>"Web App", :context_campaign_content=>nil, :context_campaign_medium=>nil, :context_campaign_name=>nil, :context_campaign_source=>nil, :context_ip=>nil, :context_library_name=>nil, :context_library_version=>nil, :context_page_path=>nil, :context_page_referrer=>nil, :context_page_search=>nil, :context_page_title=>nil, :context_page_url=>nil, :context_user_agent=>nil, :event=>"schemaless", :event_text=>"schemaless", :original_timestamp=>"2019-07-29 20:09:18", :received_at=>"2019-07-29 20:09:18", :segment_dedupe_id=>nil, :sent_at=>"2019-07-29 20:09:18", :timestamp=>"2019-07-29 20:09:18", :user_id=>"123", :user_uid=>"456", :uuid=>nil, :uuid_ts=>a_kind_of(String)}
252
252
  ])
253
253
  end
254
254
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-charrington
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.21
4
+ version: 0.3.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - dconger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-08-29 00:00:00.000000000 Z
13
+ date: 2020-01-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement
@@ -226,7 +226,7 @@ requirements:
226
226
  - jar 'com.zaxxer:HikariCP', '2.7.2'
227
227
  - jar 'org.apache.logging.log4j:log4j-slf4j-impl', '2.6.2'
228
228
  rubyforge_project:
229
- rubygems_version: 2.7.9
229
+ rubygems_version: 2.7.10
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: This plugin allows you to output to SQL, via JDBC