ai_tagger 0.4.2 → 0.4.3

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: c2079c6639018c154de35ebc798fcc96669aad180896febe24d03055bdff70fa
4
- data.tar.gz: 9b6322bbd064ce21436b869d3483b47c127abd25aa4fa387be80b74714c8738e
3
+ metadata.gz: a22c935869a12e25feca2797345f237e0dcc1c9ef8b1fbf859b21dec2ecdae50
4
+ data.tar.gz: 02b37b69677182507e67714e9cdda5222425c21769d9fa725768edc48ab21d2b
5
5
  SHA512:
6
- metadata.gz: ddcea16eb4ee5c22727ba6b4d1d9db6c31ccd348a5ef4c4e02d9d25f7249c04dfbf448479b2cd4d92108f5eb3a8a1d2a7e401bf4d6cdfa5a04e4505ccf5ce3a9
7
- data.tar.gz: f5717238859fb8be7a63f5d9e69a18c255e40ce21cb2764a608a5b35ca3abffe2a21fb031c0181588305707510e54042ec8e2227b5ac68009774f41a13175e61
6
+ metadata.gz: ad83b0b8ee4281106b9b7d4cadd63ba1edb1db2b104d7d27d6e17ffe7b35b308eb0399b043b549364e5f4c3af3911b66fd3501b8f1de08a691235b19fa88fc5b
7
+ data.tar.gz: bc504570082fc9ca1648424cf5d7acae01af62c0f737de49b68552333556f51a38437703976447ad73f60f757152a72aab1eb31bbf69f624cbc95b270ab7b23a
data/Gemfile.lock CHANGED
@@ -19,8 +19,8 @@ GEM
19
19
  tzinfo (~> 1.1)
20
20
  addressable (2.6.0)
21
21
  public_suffix (>= 2.0.2, < 4.0)
22
- builder (3.2.4)
23
- concurrent-ruby (1.1.6)
22
+ builder (3.2.3)
23
+ concurrent-ruby (1.1.5)
24
24
  crack (0.4.3)
25
25
  safe_yaml (~> 1.0.0)
26
26
  diff-lcs (1.3)
@@ -29,7 +29,7 @@ GEM
29
29
  i18n (0.9.5)
30
30
  concurrent-ruby (~> 1.0)
31
31
  json (2.2.0)
32
- minitest (5.14.0)
32
+ minitest (5.12.2)
33
33
  public_suffix (3.0.3)
34
34
  rake (10.5.0)
35
35
  rspec (3.8.0)
@@ -55,7 +55,7 @@ GEM
55
55
  simplecov-html (0.10.2)
56
56
  thor (0.20.3)
57
57
  thread_safe (0.3.6)
58
- tzinfo (1.2.7)
58
+ tzinfo (1.2.5)
59
59
  thread_safe (~> 0.1)
60
60
  webmock (3.5.1)
61
61
  addressable (>= 2.3.6)
@@ -75,4 +75,4 @@ DEPENDENCIES
75
75
  webmock (~> 3.5.1)
76
76
 
77
77
  BUNDLED WITH
78
- 2.1.4
78
+ 2.0.2
data/README.md CHANGED
@@ -33,3 +33,26 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
33
33
  ## Contributing
34
34
 
35
35
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tagger.
36
+
37
+ ## Test locally
38
+ tagger generate ./test/csv/test.csv --platform android --out ./test/output/kotlin
39
+ tagger generate ./test/csv/test.csv --platform swift --out ./test/output/kotlin
40
+
41
+
42
+ jenkins script
43
+ node("grip-android") {
44
+ stage("Checkout") {
45
+ checkout scm
46
+ }
47
+
48
+ stage("Prepare") {
49
+ sh "bundle install --path ~/.gems"
50
+ }
51
+ stage("Test") {
52
+ sh "bundle exec rspec --format progress --format RspecJunitFormatter --out rspec.xml"
53
+ }
54
+ stage("Archive") {
55
+ publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'coverage', reportFiles: 'index.html', reportName: 'HTML Report', reportTitles: ''])
56
+ junit 'rspec.xml'
57
+ }
58
+ }
data/lib/tagger/cli.rb CHANGED
@@ -13,7 +13,7 @@ module Tagger
13
13
  # Parse CSV
14
14
  raw_file = CSV.parse(csv, headers: true)
15
15
  events = raw_file.map { |row|
16
- Tagger::Event.new(name: row[1])
16
+ Tagger::Event.new(name: row[1], firebase: row[2].downcase, appsflyer: row[3].downcase)
17
17
  }.select { |event|
18
18
  event.valid?
19
19
  }
data/lib/tagger/event.rb CHANGED
@@ -2,7 +2,13 @@ module Tagger
2
2
  class Event
3
3
  include ActiveModel::Model
4
4
  attr_accessor :name
5
+ attr_accessor :firebase
6
+ attr_accessor :appsflyer
5
7
  validates :name, presence: true
6
8
  validates :name, length: { maximum: 40 }
9
+ validates :firebase, presence: true
10
+ validates :firebase, length: { maximum: 5 }
11
+ validates :appsflyer, presence: true
12
+ validates :appsflyer, length: { maximum: 5 }
7
13
  end
8
14
  end
@@ -1,3 +1,3 @@
1
1
  module Tagger
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  package se.tink.android.analytics
2
2
 
3
- sealed class AnalyticsEvent(val name: String, var map: Map<String, Any> = emptyMap()) {
3
+ sealed class AnalyticsEvent(val name: String, var map: Map<String, Any> = emptyMap(), val firebase: Boolean, val appsflyer: Boolean) {
4
4
  <%- for @event in @events -%>
5
- class <%= @event.name %> : AnalyticsEvent("<%= @event.name %>")
5
+ class <%= @event.name %>() : AnalyticsEvent(name="<%= @event.name %>", firebase=<%= @event.firebase %>, appsflyer=<%= @event.appsflyer %>)
6
6
  <%- end -%>
7
7
  }
@@ -6,10 +6,24 @@ public enum AnalyticsEvent {
6
6
  <%- end -%>
7
7
 
8
8
  public var name: String {
9
- switch self {
10
- <%- for @event in @events -%>
11
- case .<%= @event.name %>: return "<%= @event.name %>"
12
- <%- end -%>
13
- }
9
+ switch self {
10
+ <%- for @event in @events -%>
11
+ case .<%= @event.name %>: return "<%= @event.name %>"
12
+ <%- end -%>
13
+ }
14
+ }
15
+ public var firebase: Bool {
16
+ switch self {
17
+ <%- for @event in @events -%>
18
+ case .<%= @event.name %>: return <%= @event.firebase %>
19
+ <%- end -%>
20
+ }
21
+ }
22
+ public var appsflyer: Bool {
23
+ switch self {
24
+ <%- for @event in @events -%>
25
+ case .<%= @event.name %>: return <%= @event.appsflyer %>
26
+ <%- end -%>
27
+ }
14
28
  }
15
29
  }
data/rspec.xml ADDED
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="rspec" tests="9" skipped="0" failures="0" errors="0" time="0.052104" timestamp="2020-05-08T13:26:34+02:00" hostname="NLMB1CD4-C52655">
3
+ <properties>
4
+ <property name="seed" value="60354"/>
5
+ </properties>
6
+ <testcase classname="spec.tagger.cli_spec" name="Tagger::CLI should work for ios" file="./spec/tagger/cli_spec.rb" time="0.035861"></testcase>
7
+ <testcase classname="spec.tagger.cli_spec" name="Tagger::CLI should work for android" file="./spec/tagger/cli_spec.rb" time="0.005569"></testcase>
8
+ <testcase classname="spec.tagger.downloader_spec" name="Tagger::Downloader should download a csv file" file="./spec/tagger/downloader_spec.rb" time="0.001138"></testcase>
9
+ <testcase classname="spec.tagger.event_spec" name="Tagger::Event should have a name" file="./spec/tagger/event_spec.rb" time="0.000943"></testcase>
10
+ <testcase classname="spec.tagger.event_spec" name="Tagger::Event should validate presence of a name" file="./spec/tagger/event_spec.rb" time="0.001345"></testcase>
11
+ <testcase classname="spec.tagger.event_spec" name="Tagger::Event should validate name length" file="./spec/tagger/event_spec.rb" time="0.001089"></testcase>
12
+ <testcase classname="spec.tagger.generator_spec" name="Tagger::Generator should generate a kt file" file="./spec/tagger/generator_spec.rb" time="0.001807"></testcase>
13
+ <testcase classname="spec.tagger.generator_spec" name="Tagger::Generator should generate a swift file" file="./spec/tagger/generator_spec.rb" time="0.000954"></testcase>
14
+ <testcase classname="spec.tagger_spec" name="Tagger has a version number" file="./spec/tagger_spec.rb" time="0.000265"></testcase>
15
+ </testsuite>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai_tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dunya Kirkali
@@ -169,6 +169,7 @@ files:
169
169
  - overflow/overview.overflow
170
170
  - overflow/search.overflow
171
171
  - overflow/transactionDetailPage.overflow
172
+ - rspec.xml
172
173
  - tagger.gemspec
173
174
  - tmp/.keep
174
175
  homepage: https://github.com/abnamrocoesd/tagger