evva 0.9.0 → 0.10.0

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
  SHA256:
3
- metadata.gz: a759833afbdc6f48b186bce87555b4fae3da30812de523ddae04468244a7aee9
4
- data.tar.gz: 421625130a0be7491b0e49ea5b6cdb434b7cb3a6f7c52d20adf02ff6f11ca205
3
+ metadata.gz: dec4f42e824897d939df66cc400f64c7d0f8ed0afa61d7c47f90e35a3730593f
4
+ data.tar.gz: 46151f2d8987db8501e73c84dd1d7cddf96fa8364d71495b9e838817bf73b24e
5
5
  SHA512:
6
- metadata.gz: a9bd2cc069ab15eed7a02c6ed444f22579236446a7a3b7b9c1772df26deefaf442dd568334ab0903059f056a65fc1a7ceadb3e6fd6df1975a6d097ab7bffeca8
7
- data.tar.gz: d8f1f9574a97f4060924514d99102abcdad78d71d75cd0a378bb94423f1cd359de171908fe11c8579370035ddab2a31eb0e429e8a27b27aef1b56cd12ba9de92
6
+ metadata.gz: 0e48b6d338ad0cbea9604afe19ca59b1bcf4842cb28d10681c918a1a3e4532afc9346939c4748bc85cb753f5520e5552c3bc5fa7c45f08050da301249d9f1de9
7
+ data.tar.gz: 0bea87253e07e92fbd7546ee66dd798b6418a7534c1f5655f42990f4d8ec83617bc081c763422ddb1a6c13eec40a1c2d33dc0e4e008c4ce638c17bb732328837
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- evva (0.9.0)
4
+ evva (0.10.0)
5
5
  colorize (~> 1.0)
6
- csv (>= 3.0)
6
+ csv (~> 3.0)
7
7
  safe_yaml (~> 1.0)
8
8
 
9
9
  GEM
data/changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.10.0] - 2026-10-13
6
+
7
+ - Support optional people properties in Kotlin: `innerValue` is now `Any?` and optional special properties use `value?.key`
8
+
5
9
  ## [0.9.0] - 2026-09-04
6
10
 
7
11
  - Add `Platform` column support in the events sheet and `filter_by_platforms` configuration to filter generated events by platform
@@ -84,11 +84,21 @@ module Evva
84
84
 
85
85
  properties = people_bundle.map do |property|
86
86
  type = native_type(property.type)
87
+ value_fetcher = "value"
88
+
89
+ if special_property?(type)
90
+ if type.end_with?("?")
91
+ # optional value, we need ? to access a parameter
92
+ value_fetcher += "?"
93
+ end
94
+ value_fetcher += ".key"
95
+ end
96
+
87
97
  {
88
98
  class_name: camelize(property.property_name),
89
99
  property_name: constantize(property.property_name),
90
100
  type: type,
91
- is_special_property: special_property?(property.type),
101
+ value_fetcher: value_fetcher,
92
102
  destinations: property.destinations.map { |p| constantize(p) },
93
103
  }
94
104
  end
@@ -1,6 +1,6 @@
1
1
  sealed class <%= class_name %>(
2
2
  property: <%= enums_class_name %>,
3
- val innerValue: Any,
3
+ val innerValue: Any?,
4
4
  val destinations: Array<<%= destinations_class_name %>> = emptyArray(),
5
5
  ) {
6
6
  val name = property.key
@@ -10,7 +10,7 @@ sealed class <%= class_name %>(
10
10
  val value: <%= property[:type] %>,
11
11
  ) : <%= class_name %>(
12
12
  property = <%= enums_class_name %>.<%= property[:property_name] %>,
13
- innerValue = value<% if property[:is_special_property] %>.key<% end %>,
13
+ innerValue = <%= property[:value_fetcher] %>,
14
14
  <%- if property[:destinations].count > 0 -%>
15
15
  destinations = arrayOf(
16
16
  <%- property[:destinations].each_with_index do |d, index| -%>
data/lib/evva/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Evva
2
- VERSION = "0.9.0".freeze
3
- VERSION_UPDATED_AT = "2026-09-04".freeze
2
+ VERSION = "0.10.0".freeze
3
+ VERSION_UPDATED_AT = "2026-10-13".freeze
4
4
  end
@@ -156,9 +156,10 @@ Kotlin
156
156
  describe "#people_properties" do
157
157
  subject { generator.people_properties(people_bundle, "AnalyticsProperty", "AnalyticsProperties", "AnalyticsDestinations") }
158
158
  let(:people_bundle) { [
159
- Evva::AnalyticsProperty.new("rounds_with_wear", "String", []),
159
+ Evva::AnalyticsProperty.new("rounds_with_wear", "String?", []),
160
160
  Evva::AnalyticsProperty.new("last_active_at", "Date", []),
161
- Evva::AnalyticsProperty.new("wear_platform", "WearableAppPlatform", ["firebase", "custom destination"]),
161
+ Evva::AnalyticsProperty.new("upgrade_source", "PremiumFrom", []),
162
+ Evva::AnalyticsProperty.new("wear_platform", "WearableAppPlatform?", ["firebase", "custom destination"]),
162
163
  ] }
163
164
  let(:expected) {
164
165
  <<-Kotlin
@@ -170,13 +171,13 @@ package com.hole19golf.hole19.analytics
170
171
 
171
172
  sealed class AnalyticsProperty(
172
173
  property: AnalyticsProperties,
173
- val innerValue: Any,
174
+ val innerValue: Any?,
174
175
  val destinations: Array<AnalyticsDestinations> = emptyArray(),
175
176
  ) {
176
177
  val name = property.key
177
178
 
178
179
  data class RoundsWithWear(
179
- val value: String,
180
+ val value: String?,
180
181
  ) : AnalyticsProperty(
181
182
  property = AnalyticsProperties.ROUNDS_WITH_WEAR,
182
183
  innerValue = value,
@@ -189,11 +190,18 @@ sealed class AnalyticsProperty(
189
190
  innerValue = value,
190
191
  )
191
192
 
193
+ data class UpgradeSource(
194
+ val value: PremiumFrom,
195
+ ) : AnalyticsProperty(
196
+ property = AnalyticsProperties.UPGRADE_SOURCE,
197
+ innerValue = value.key,
198
+ )
199
+
192
200
  data class WearPlatform(
193
- val value: WearableAppPlatform,
201
+ val value: WearableAppPlatform?,
194
202
  ) : AnalyticsProperty(
195
203
  property = AnalyticsProperties.WEAR_PLATFORM,
196
- innerValue = value.key,
204
+ innerValue = value?.key,
197
205
  destinations = arrayOf(
198
206
  AnalyticsDestinations.FIREBASE,
199
207
  AnalyticsDestinations.CUSTOM_DESTINATION,
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Andrade
8
8
  - João Costa
9
9
  - Ricardo Trindade
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2026-09-04 00:00:00.000000000 Z
12
+ date: 2026-10-13 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: colorize
@@ -116,7 +115,6 @@ homepage: https://github.com/hole19/
116
115
  licenses:
117
116
  - MIT
118
117
  metadata: {}
119
- post_install_message:
120
118
  rdoc_options: []
121
119
  require_paths:
122
120
  - lib
@@ -131,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
129
  - !ruby/object:Gem::Version
132
130
  version: '0'
133
131
  requirements: []
134
- rubygems_version: 3.5.3
135
- signing_key:
132
+ rubygems_version: 4.0.10
136
133
  specification_version: 4
137
134
  summary: An event generating service
138
135
  test_files: []