evva 0.5.0 → 0.6.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 +4 -4
- data/.github/workflows/test.yml +30 -0
- data/.rubocop_todo.yml +0 -12
- data/Gemfile +1 -2
- data/Gemfile.lock +47 -33
- data/bin/evva +0 -0
- data/changelog.md +5 -0
- data/evva.gemspec +4 -3
- data/lib/evva/kotlin_generator.rb +3 -3
- data/lib/evva/swift_generator.rb +3 -3
- data/lib/evva/version.rb +2 -2
- metadata +19 -8
- data/.travis.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91bbc611bc1080edc062a357906590141678a014ddb4e820978b68498cb31af4
|
4
|
+
data.tar.gz: e15cc4ea36cbabc7e87c55607481755a7b12e57d1e0abdd11b6dfe8cd80ec8a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3411a35dde566fdda39433830da928830d9c38fd20f8b9a01fb107933a38fd33c638a92b1ac9b051efdb9ad2a7ec45ef0b6952285c84ceedc4c24f56af29f77c
|
7
|
+
data.tar.gz: bfb62d2fdfbde961ddcd3c3693bee06b9a6427a5b2aaaf4d0647f2f19699394cbf5c16b5b24cba056e4bb9ca2216acdfff9ce938659806bec4de989d99dc5237
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "*" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.2', '3.3', '3.4']
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v4
|
22
|
+
|
23
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
bundler-cache: true
|
28
|
+
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake
|
data/.rubocop_todo.yml
CHANGED
@@ -207,18 +207,6 @@ Naming/HeredocDelimiterCase:
|
|
207
207
|
- 'spec/lib/evva/kotlin_generator_spec.rb'
|
208
208
|
- 'spec/lib/evva/swift_generator_spec.rb'
|
209
209
|
|
210
|
-
# Offense count: 2
|
211
|
-
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
212
|
-
# NamePrefix: is_, has_, have_
|
213
|
-
# ForbiddenPrefixes: is_, has_, have_
|
214
|
-
# AllowedMethods: is_a?
|
215
|
-
# MethodDefinitionMacros: define_method, define_singleton_method
|
216
|
-
Naming/PredicateName:
|
217
|
-
Exclude:
|
218
|
-
- 'spec/**/*'
|
219
|
-
- 'lib/evva/kotlin_generator.rb'
|
220
|
-
- 'lib/evva/swift_generator.rb'
|
221
|
-
|
222
210
|
# Offense count: 22
|
223
211
|
# This cop supports safe autocorrection (--autocorrect).
|
224
212
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,69 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
evva (0.6.0)
|
5
|
+
colorize (~> 1.0)
|
6
|
+
csv (>= 3.0)
|
7
|
+
safe_yaml (~> 1.0)
|
8
|
+
|
1
9
|
GEM
|
2
10
|
remote: https://rubygems.org/
|
3
11
|
specs:
|
4
12
|
addressable (2.8.7)
|
5
13
|
public_suffix (>= 2.0.2, < 7.0)
|
6
|
-
ast (2.4.
|
7
|
-
bigdecimal (3.1
|
14
|
+
ast (2.4.3)
|
15
|
+
bigdecimal (3.3.1)
|
8
16
|
colorize (1.1.0)
|
9
17
|
crack (1.0.0)
|
10
18
|
bigdecimal
|
11
19
|
rexml
|
12
|
-
|
20
|
+
csv (3.3.5)
|
21
|
+
diff-lcs (1.6.2)
|
13
22
|
docile (1.4.1)
|
14
|
-
hashdiff (1.
|
15
|
-
json (2.
|
16
|
-
language_server-protocol (3.17.0.
|
17
|
-
|
18
|
-
|
23
|
+
hashdiff (1.2.1)
|
24
|
+
json (2.15.1)
|
25
|
+
language_server-protocol (3.17.0.5)
|
26
|
+
lint_roller (1.1.0)
|
27
|
+
parallel (1.27.0)
|
28
|
+
parser (3.3.9.0)
|
19
29
|
ast (~> 2.4.1)
|
20
30
|
racc
|
21
|
-
|
31
|
+
prism (1.5.2)
|
32
|
+
public_suffix (6.0.2)
|
22
33
|
racc (1.8.1)
|
23
34
|
rainbow (3.1.1)
|
24
|
-
rake (13.
|
25
|
-
regexp_parser (2.
|
26
|
-
rexml (3.
|
27
|
-
rspec (3.13.
|
35
|
+
rake (13.3.0)
|
36
|
+
regexp_parser (2.11.3)
|
37
|
+
rexml (3.4.4)
|
38
|
+
rspec (3.13.1)
|
28
39
|
rspec-core (~> 3.13.0)
|
29
40
|
rspec-expectations (~> 3.13.0)
|
30
41
|
rspec-mocks (~> 3.13.0)
|
31
|
-
rspec-core (3.13.
|
42
|
+
rspec-core (3.13.5)
|
32
43
|
rspec-support (~> 3.13.0)
|
33
|
-
rspec-expectations (3.13.
|
44
|
+
rspec-expectations (3.13.5)
|
34
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
46
|
rspec-support (~> 3.13.0)
|
36
|
-
rspec-its (
|
37
|
-
rspec-core (>= 3.
|
38
|
-
rspec-expectations (>= 3.
|
39
|
-
rspec-mocks (3.13.
|
47
|
+
rspec-its (2.0.0)
|
48
|
+
rspec-core (>= 3.13.0)
|
49
|
+
rspec-expectations (>= 3.13.0)
|
50
|
+
rspec-mocks (3.13.5)
|
40
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
52
|
rspec-support (~> 3.13.0)
|
42
|
-
rspec-support (3.13.
|
43
|
-
rubocop (1.
|
53
|
+
rspec-support (3.13.6)
|
54
|
+
rubocop (1.81.1)
|
44
55
|
json (~> 2.3)
|
45
|
-
language_server-protocol (
|
56
|
+
language_server-protocol (~> 3.17.0.2)
|
57
|
+
lint_roller (~> 1.1.0)
|
46
58
|
parallel (~> 1.10)
|
47
59
|
parser (>= 3.3.0.2)
|
48
60
|
rainbow (>= 2.2.2, < 4.0)
|
49
|
-
regexp_parser (>= 2.
|
50
|
-
rubocop-ast (>= 1.
|
61
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
62
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
51
63
|
ruby-progressbar (~> 1.7)
|
52
|
-
unicode-display_width (>= 2.4.0, <
|
53
|
-
rubocop-ast (1.
|
54
|
-
parser (>= 3.3.
|
64
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
65
|
+
rubocop-ast (1.47.1)
|
66
|
+
parser (>= 3.3.7.2)
|
67
|
+
prism (~> 1.4)
|
55
68
|
ruby-progressbar (1.13.0)
|
56
69
|
safe_yaml (1.0.5)
|
57
70
|
simplecov (0.22.0)
|
58
71
|
docile (~> 1.1)
|
59
72
|
simplecov-html (~> 0.11)
|
60
73
|
simplecov_json_formatter (~> 0.1)
|
61
|
-
simplecov-html (0.13.
|
74
|
+
simplecov-html (0.13.2)
|
62
75
|
simplecov-rcov (0.3.7)
|
63
76
|
simplecov (>= 0.4.1)
|
64
77
|
simplecov_json_formatter (0.1.4)
|
65
|
-
unicode-display_width (2.
|
66
|
-
|
78
|
+
unicode-display_width (3.2.0)
|
79
|
+
unicode-emoji (~> 4.1)
|
80
|
+
unicode-emoji (4.1.0)
|
81
|
+
webmock (3.25.1)
|
67
82
|
addressable (>= 2.8.0)
|
68
83
|
crack (>= 0.3.2)
|
69
84
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -72,15 +87,14 @@ PLATFORMS
|
|
72
87
|
ruby
|
73
88
|
|
74
89
|
DEPENDENCIES
|
75
|
-
|
90
|
+
evva!
|
76
91
|
rake
|
77
92
|
rspec
|
78
93
|
rspec-its
|
79
94
|
rubocop
|
80
|
-
safe_yaml
|
81
95
|
simplecov
|
82
96
|
simplecov-rcov
|
83
97
|
webmock
|
84
98
|
|
85
99
|
BUNDLED WITH
|
86
|
-
2.
|
100
|
+
2.7.2
|
data/bin/evva
CHANGED
File without changes
|
data/changelog.md
CHANGED
data/evva.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.summary = "An event generating service"
|
8
8
|
s.description = "Evva generates all the analytics event tracking functions for you"
|
9
9
|
s.authors = ["André Andrade", "João Costa", "Ricardo Trindade"]
|
10
|
-
s.email = "
|
10
|
+
s.email = "andre.andrade@hole19golf.com"
|
11
11
|
s.license = "MIT"
|
12
12
|
s.homepage = "https://github.com/hole19/"
|
13
13
|
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
|
19
19
|
s.required_ruby_version = ">= 3.2.0"
|
20
20
|
|
21
|
-
s.add_runtime_dependency "colorize",
|
22
|
-
s.add_runtime_dependency "
|
21
|
+
s.add_runtime_dependency "colorize", "~> 1.0"
|
22
|
+
s.add_runtime_dependency "csv", ">= 3.0"
|
23
|
+
s.add_runtime_dependency "safe_yaml", "~> 1.0"
|
23
24
|
end
|
@@ -31,7 +31,7 @@ module Evva
|
|
31
31
|
param_name = camelize(name.to_s, false)
|
32
32
|
value_fetcher = param_name
|
33
33
|
|
34
|
-
if
|
34
|
+
if special_property?(type)
|
35
35
|
if type.end_with?("?")
|
36
36
|
# optional value, we need ? to access a parameter
|
37
37
|
value_fetcher += "?"
|
@@ -88,7 +88,7 @@ module Evva
|
|
88
88
|
class_name: camelize(property.property_name),
|
89
89
|
property_name: constantize(property.property_name),
|
90
90
|
type: type,
|
91
|
-
is_special_property:
|
91
|
+
is_special_property: special_property?(property.type),
|
92
92
|
destinations: property.destinations.map { |p| constantize(p) },
|
93
93
|
}
|
94
94
|
end
|
@@ -180,7 +180,7 @@ module Evva
|
|
180
180
|
.gsub("Date","String")
|
181
181
|
end
|
182
182
|
|
183
|
-
def
|
183
|
+
def special_property?(type)
|
184
184
|
!NATIVE_TYPES.include?(type.chomp("?"))
|
185
185
|
end
|
186
186
|
end
|
data/lib/evva/swift_generator.rb
CHANGED
@@ -20,7 +20,7 @@ module Evva
|
|
20
20
|
|
21
21
|
value_fetcher = k.to_s
|
22
22
|
|
23
|
-
if
|
23
|
+
if special_property?(type)
|
24
24
|
if type.end_with?("?")
|
25
25
|
# optional value, we need ? to access a parameter
|
26
26
|
value_fetcher += "?"
|
@@ -59,7 +59,7 @@ module Evva
|
|
59
59
|
case_name: camelize(p.property_name),
|
60
60
|
property_name: p.property_name,
|
61
61
|
type: type,
|
62
|
-
is_special_property:
|
62
|
+
is_special_property: special_property?(type),
|
63
63
|
destinations: p.destinations.map { |p| camelize(p) },
|
64
64
|
}
|
65
65
|
end
|
@@ -123,7 +123,7 @@ module Evva
|
|
123
123
|
.gsub("Long", "Int")
|
124
124
|
end
|
125
125
|
|
126
|
-
def
|
126
|
+
def special_property?(type)
|
127
127
|
!NATIVE_TYPES.include?(type.chomp("?"))
|
128
128
|
end
|
129
129
|
|
data/lib/evva/version.rb
CHANGED
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.
|
4
|
+
version: 0.6.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:
|
12
|
+
date: 2025-10-13 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: colorize
|
@@ -26,6 +25,20 @@ dependencies:
|
|
26
25
|
- - "~>"
|
27
26
|
- !ruby/object:Gem::Version
|
28
27
|
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: csv
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '3.0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3.0'
|
29
42
|
- !ruby/object:Gem::Dependency
|
30
43
|
name: safe_yaml
|
31
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -41,17 +54,17 @@ dependencies:
|
|
41
54
|
- !ruby/object:Gem::Version
|
42
55
|
version: '1.0'
|
43
56
|
description: Evva generates all the analytics event tracking functions for you
|
44
|
-
email:
|
57
|
+
email: andre.andrade@hole19golf.com
|
45
58
|
executables:
|
46
59
|
- evva
|
47
60
|
extensions: []
|
48
61
|
extra_rdoc_files: []
|
49
62
|
files:
|
63
|
+
- ".github/workflows/test.yml"
|
50
64
|
- ".gitignore"
|
51
65
|
- ".rspec"
|
52
66
|
- ".rubocop.yml"
|
53
67
|
- ".rubocop_todo.yml"
|
54
|
-
- ".travis.yml"
|
55
68
|
- Gemfile
|
56
69
|
- Gemfile.lock
|
57
70
|
- README.md
|
@@ -99,7 +112,6 @@ homepage: https://github.com/hole19/
|
|
99
112
|
licenses:
|
100
113
|
- MIT
|
101
114
|
metadata: {}
|
102
|
-
post_install_message:
|
103
115
|
rdoc_options: []
|
104
116
|
require_paths:
|
105
117
|
- lib
|
@@ -114,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
126
|
- !ruby/object:Gem::Version
|
115
127
|
version: '0'
|
116
128
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
118
|
-
signing_key:
|
129
|
+
rubygems_version: 3.7.2
|
119
130
|
specification_version: 4
|
120
131
|
summary: An event generating service
|
121
132
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
language: ruby
|