voucher 0.1.1 → 0.2.1

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: 12df98b92d5b55cf8aeb901ffde11eb3e43a7857
4
- data.tar.gz: 1a93ebfe9d86868204256e92ab4a98b5739d22b6
3
+ metadata.gz: 7e0e46425cb8ed9d96119d8340c8e796bef7564a
4
+ data.tar.gz: 9c2df3b2661c1f37b6825c136b43a9d38c0e1e43
5
5
  SHA512:
6
- metadata.gz: da967e6fe982d8de07adce2d4c324cd8e21c25c02950adb7f2a9c6822da75f0ba192acab9f1f6892c9f422f3b19937e3a57c6ea181eda1a626519b454e1f7377
7
- data.tar.gz: 999ed4f11fc9ec6835ef80f84e55f8818d2de871c8cda5a285bfbc3eb162db9f6441171da023ae4d168fa39951f77b21edf99df6297ca4af5fbf16004e327a04
6
+ metadata.gz: 34dfe41945b699d042be48f9e030d7e67a9c0d5918a77697266916bd7dd37cae7447d19a4d9518756270bf098d44ee984ce82a6f5ce3819799e6debcb88d120d
7
+ data.tar.gz: 1f9c198371a1ce8819b5e7367c8c9d997376e1d2cf10f2a74c55ed42b91e390bbc378ec89a514e48f23de0dc85ea70290cf565f58a26d541678bbb54e532e859
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.2.1] - 2018-10-05
8
+ ### Fixed:
9
+ - Gem version
10
+
11
+ ## [0.2.0] - 2018-10-05
12
+ ### Added:
13
+ - Supply id to Segment model
14
+ - Third party id attribute on Segment
15
+ - Compound metrics on Segment
16
+
7
17
  ## [0.1.1] - 2018-08-14
8
18
  ### Fixed:
9
19
  - Election ABI file name
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- voucher (0.1.1)
4
+ voucher (0.2.1)
5
5
  activesupport (~> 5.2)
6
6
  ethereum.rb (~> 2.2)
7
7
  hashtastic
@@ -4,6 +4,59 @@ module Voucher
4
4
  class Segment
5
5
  include Virtus.model
6
6
 
7
+ COMPOUND_METRICS = %w(
8
+ bot_clicks
9
+ bot_decision_win_clicks
10
+ bot_decision_win_impressions
11
+ bot_impressions
12
+ bot_loaded_clicks
13
+ bot_loaded_impressions
14
+ decision_win_clicks
15
+ decision_win_impressions
16
+ loaded_clicks
17
+ loaded_impressions
18
+ non_bot_clicks
19
+ non_bot_decision_win_clicks
20
+ non_bot_decision_win_impressions
21
+ non_bot_impressions
22
+ non_bot_loaded_clicks
23
+ non_bot_loaded_impressions
24
+ non_viewable_bot_decision_win_clicks
25
+ non_viewable_bot_decision_win_impressions
26
+ non_viewable_bot_loaded_clicks
27
+ non_viewable_bot_loaded_impressions
28
+ non_viewable_clicks
29
+ non_viewable_decision_win_clicks
30
+ non_viewable_decision_win_impressions
31
+ non_viewable_impressions
32
+ non_viewable_loaded_clicks
33
+ non_viewable_loaded_impressions
34
+ non_viewable_non_bot_clicks
35
+ non_viewable_non_bot_decision_win_clicks
36
+ non_viewable_non_bot_decision_win_impressions
37
+ non_viewable_non_bot_impressions
38
+ non_viewable_non_bot_loaded_clicks
39
+ non_viewable_non_bot_loaded_impressions
40
+ viewable_bot_clicks
41
+ viewable_bot_decision_win_clicks
42
+ viewable_bot_decision_win_impressions
43
+ viewable_bot_impressions
44
+ viewable_bot_loaded_clicks
45
+ viewable_bot_loaded_impressions
46
+ viewable_clicks
47
+ viewable_decision_win_clicks
48
+ viewable_decision_win_impressions
49
+ viewable_impressions
50
+ viewable_loaded_clicks
51
+ viewable_loaded_impressions
52
+ viewable_non_bot_clicks
53
+ viewable_non_bot_decision_win_clicks
54
+ viewable_non_bot_decision_win_impressions
55
+ viewable_non_bot_impressions
56
+ viewable_non_bot_loaded_clicks
57
+ viewable_non_bot_loaded_impressions
58
+ ).freeze
59
+
7
60
  FIELDS = %w(
8
61
  advertiser_id
9
62
  agency_id
@@ -13,14 +66,14 @@ module Voucher
13
66
  clicks
14
67
  conversions
15
68
  decision_cost
16
- decision_win_impressions
17
69
  exchange_id
18
70
  impressions
19
- loaded_impressions
20
71
  publisher_id
21
72
  site_id
73
+ supply_id
74
+ third_party_id
22
75
  win_cost
23
- ).sort.freeze
76
+ ).sort.freeze + COMPOUND_METRICS
24
77
 
25
78
  attribute :advertiser_id, String
26
79
  attribute :agency_id, String
@@ -30,16 +83,20 @@ module Voucher
30
83
  attribute :clicks, Integer
31
84
  attribute :conversions, Integer
32
85
  attribute :decision_cost, Integer
33
- attribute :decision_win_impressions, Integer
34
86
  attribute :exchange_id, String
35
87
  attribute :impressions, Integer
36
- attribute :loaded_impressions, Integer
37
88
  attribute :publisher_id, String
38
89
  attribute :site_id, String
90
+ attribute :supply_id, String
91
+ attribute :third_party_id, String
39
92
  attribute :win_cost, Integer
40
93
  attribute :shard, Integer
41
94
  attribute :siblings, Array[String]
42
95
 
96
+ COMPOUND_METRICS.each do |metric|
97
+ attribute metric.to_sym, Integer
98
+ end
99
+
43
100
  def hash
44
101
  Hashtastic::DictionaryValuesHasher.call(attributes, FIELDS)
45
102
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Voucher
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voucher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - lucidity
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-14 00:00:00.000000000 Z
11
+ date: 2018-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport