itly-sdk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/Gemfile +12 -0
- data/Steepfile +9 -0
- data/bin/console +15 -0
- data/bin/rspec +18 -0
- data/bin/setup +8 -0
- data/itly-sdk.gemspec +29 -0
- data/lib/itly-sdk.rb +15 -0
- data/lib/itly/event.rb +58 -0
- data/lib/itly/exceptions.rb +10 -0
- data/lib/itly/itly.rb +404 -0
- data/lib/itly/loggers.rb +55 -0
- data/lib/itly/options.rb +114 -0
- data/lib/itly/options/environment.rb +24 -0
- data/lib/itly/options/validation.rb +17 -0
- data/lib/itly/plugin.rb +116 -0
- data/lib/itly/plugin_call_options.rb +18 -0
- data/lib/itly/plugin_options.rb +22 -0
- data/lib/itly/plugins.rb +25 -0
- data/lib/itly/validation_response.rb +41 -0
- data/lib/itly/version.rb +6 -0
- data/sig/aliases.rbs +3 -0
- data/sig/event.rbs +16 -0
- data/sig/exceptions.rbs +11 -0
- data/sig/itly.rbs +32 -0
- data/sig/lib/monitor_mixin.rbs +3 -0
- data/sig/loggers.rbs +8 -0
- data/sig/options.rbs +18 -0
- data/sig/options/environment.rbs +8 -0
- data/sig/options/validation.rbs +10 -0
- data/sig/plugin.rbs +21 -0
- data/sig/plugin_call_options.rbs +4 -0
- data/sig/plugin_options.rbs +10 -0
- data/sig/plugins.rbs +4 -0
- data/sig/validation_response.rbs +13 -0
- metadata +85 -0
data/sig/aliases.rbs
ADDED
data/sig/event.rbs
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
class Itly
|
2
|
+
class Event
|
3
|
+
attr_accessor name: String
|
4
|
+
attr_accessor properties: propertiesHash
|
5
|
+
attr_accessor id: String?
|
6
|
+
attr_accessor version: String?
|
7
|
+
attr_accessor plugins: Hash[String, bool]
|
8
|
+
|
9
|
+
def to_s: () -> String
|
10
|
+
def ==: (untyped other) -> untyped
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def initialize: (name: String name, ?properties: propertiesHash properties, ?id: String? id, ?version: String? version, ?plugins: Hash[String | Symbol, bool] plugins) -> void
|
15
|
+
end
|
16
|
+
end
|
data/sig/exceptions.rbs
ADDED
data/sig/itly.rbs
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
class Itly
|
2
|
+
include Itly::Plugins
|
3
|
+
|
4
|
+
VERSION: String
|
5
|
+
|
6
|
+
attr_reader options: Itly::Options
|
7
|
+
|
8
|
+
def load: (?context: propertiesHash? context) ?{ (Itly::Options) -> void } -> void
|
9
|
+
def identify: (user_id: String user_id, ?properties: propertiesHash properties, ?options: callOptions options) -> void
|
10
|
+
def group: (user_id: String user_id, group_id: String group_id, ?properties: propertiesHash properties, ?options: callOptions options) -> void
|
11
|
+
def page: (user_id: String user_id, ?category: String? category, ?name: String? name, ?properties: propertiesHash? properties, ?options: callOptions options) -> void
|
12
|
+
def track: (user_id: String user_id, event: Itly::Event event, ?options: callOptions options) -> void
|
13
|
+
def alias: (user_id: String user_id, previous_id: String previous_id, ?options: callOptions options) -> void
|
14
|
+
def flush: () -> void
|
15
|
+
def shutdown: () -> void
|
16
|
+
def reset: () -> void
|
17
|
+
def validate: (event: Itly::Event event) -> Array[Itly::ValidationResponse]?
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def initialize: () -> void
|
22
|
+
def was_initialized?: () -> bool
|
23
|
+
def validate_and_send_to_plugins: (action: ^(Itly::Plugin plugin, Itly::Event combined_event) -> void, post_action: ^(Itly::Plugin plugin, Itly::Event combined_event, Array[Itly::ValidationResponse] validation_results) -> void post_action, event: Itly::Event event, ?context: Itly::Event? context) -> void
|
24
|
+
def validate_context_and_event: (Itly::Event? context, Itly::Event event) -> [Array[Itly::ValidationResponse], Array[Itly::ValidationResponse], bool]
|
25
|
+
def log_validation_errors: (Array[Itly::ValidationResponse] validations, Itly::Event event) -> void
|
26
|
+
def raise_validation_errors: (bool is_valid, Array[Itly::ValidationResponse] validations, Itly::Event event) -> void
|
27
|
+
def enabled?: () -> bool
|
28
|
+
def validation_enabled?: () -> bool
|
29
|
+
def logger: () -> Logger?
|
30
|
+
def instantiate_plugins: () -> void
|
31
|
+
def run_on_plugins: () { (Itly::Plugin) -> untyped } -> Array[untyped]
|
32
|
+
end
|
data/sig/loggers.rbs
ADDED
data/sig/options.rbs
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
class Itly
|
2
|
+
class Options
|
3
|
+
attr_accessor disabled: bool
|
4
|
+
attr_accessor environment: Symbol
|
5
|
+
attr_accessor logger: Logger?
|
6
|
+
attr_accessor plugins: Array[Itly::Plugin]
|
7
|
+
attr_writer validation: Integer
|
8
|
+
|
9
|
+
def for_plugin: () -> Itly::PluginOptions
|
10
|
+
def validation: () -> Integer
|
11
|
+
def development?: () -> bool
|
12
|
+
def production?: () -> bool
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def initialize: () -> void
|
17
|
+
end
|
18
|
+
end
|
data/sig/plugin.rbs
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
class Itly
|
2
|
+
class Plugin
|
3
|
+
def load: (options: Itly::PluginOptions options) -> void
|
4
|
+
def identify: (user_id: String user_id, ?properties: propertiesHash? properties, ?options: Itly::PluginCallOptions? options) -> void
|
5
|
+
def post_identify: (user_id: String user_id, properties: propertiesHash? properties, validation_results: Array[Itly::ValidationResponse] validation_results) -> void
|
6
|
+
def group: (user_id: String user_id, group_id: String group_id, ?properties: propertiesHash? properties, ?options: Itly::PluginCallOptions? options) -> void
|
7
|
+
def post_group: (user_id: String user_id, group_id: String group_id, properties: propertiesHash? properties, validation_results: Array[Itly::ValidationResponse] validation_results) -> void
|
8
|
+
def page: (user_id: String user_id, ?category: String? category, ?name: String? name, ?properties: propertiesHash? properties, ?options: Itly::PluginCallOptions? options) -> void
|
9
|
+
def post_page: (user_id: String user_id, category: String? category, name: String? name, properties: propertiesHash? properties, validation_results: Array[Itly::ValidationResponse] validation_results) -> void
|
10
|
+
def track: (user_id: String user_id, event: Itly::Event event, ?options: Itly::PluginCallOptions? options) -> void
|
11
|
+
def post_track: (user_id: String user_id, event: Itly::Event event, validation_results: Array[Itly::ValidationResponse] validation_results) -> void
|
12
|
+
def alias: (user_id: String user_id, previous_id: String previous_id, ?options: Itly::PluginCallOptions? options) -> void
|
13
|
+
def post_alias: (user_id: String user_id, previous_id: String previous_id) -> void
|
14
|
+
def flush: () -> void
|
15
|
+
def shutdown: () -> void
|
16
|
+
def reset: () -> void
|
17
|
+
def validate: (event: Itly::Event event) -> Itly::ValidationResponse?
|
18
|
+
def get_plugin_options: (Itly::Options options) -> propertiesHash
|
19
|
+
def id: () -> String
|
20
|
+
end
|
21
|
+
end
|
data/sig/plugins.rbs
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class Itly
|
2
|
+
class ValidationResponse
|
3
|
+
attr_reader valid: bool
|
4
|
+
attr_reader plugin_id: String
|
5
|
+
attr_reader message: String
|
6
|
+
|
7
|
+
def to_s: () -> String
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def initialize: (valid: bool valid, plugin_id: String plugin_id, ?message: String message) -> void
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: itly-sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Iteratively
|
8
|
+
- Benjamin Bouchet
|
9
|
+
- Justin Fiedler
|
10
|
+
- Andrey Sokolov
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
15
|
+
dependencies: []
|
16
|
+
description: Track and validate analytics with a unified, extensible interface that
|
17
|
+
works with all your 3rd party analytics providers.
|
18
|
+
email:
|
19
|
+
- support@iterative.ly
|
20
|
+
executables: []
|
21
|
+
extensions: []
|
22
|
+
extra_rdoc_files: []
|
23
|
+
files:
|
24
|
+
- ".rspec"
|
25
|
+
- Gemfile
|
26
|
+
- Steepfile
|
27
|
+
- bin/console
|
28
|
+
- bin/rspec
|
29
|
+
- bin/setup
|
30
|
+
- itly-sdk.gemspec
|
31
|
+
- lib/itly-sdk.rb
|
32
|
+
- lib/itly/event.rb
|
33
|
+
- lib/itly/exceptions.rb
|
34
|
+
- lib/itly/itly.rb
|
35
|
+
- lib/itly/loggers.rb
|
36
|
+
- lib/itly/options.rb
|
37
|
+
- lib/itly/options/environment.rb
|
38
|
+
- lib/itly/options/validation.rb
|
39
|
+
- lib/itly/plugin.rb
|
40
|
+
- lib/itly/plugin_call_options.rb
|
41
|
+
- lib/itly/plugin_options.rb
|
42
|
+
- lib/itly/plugins.rb
|
43
|
+
- lib/itly/validation_response.rb
|
44
|
+
- lib/itly/version.rb
|
45
|
+
- sig/aliases.rbs
|
46
|
+
- sig/event.rbs
|
47
|
+
- sig/exceptions.rbs
|
48
|
+
- sig/itly.rbs
|
49
|
+
- sig/lib/monitor_mixin.rbs
|
50
|
+
- sig/loggers.rbs
|
51
|
+
- sig/options.rbs
|
52
|
+
- sig/options/environment.rbs
|
53
|
+
- sig/options/validation.rbs
|
54
|
+
- sig/plugin.rbs
|
55
|
+
- sig/plugin_call_options.rbs
|
56
|
+
- sig/plugin_options.rbs
|
57
|
+
- sig/plugins.rbs
|
58
|
+
- sig/validation_response.rbs
|
59
|
+
homepage: https://github.com/iterativelyhq/itly-sdk-ruby
|
60
|
+
licenses:
|
61
|
+
- MIT
|
62
|
+
metadata:
|
63
|
+
allowed_push_host: https://rubygems.org/
|
64
|
+
homepage_uri: https://github.com/iterativelyhq/itly-sdk-ruby
|
65
|
+
source_code_uri: https://github.com/iterativelyhq/itly-sdk-ruby/sdk
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.6.0
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubygems_version: 3.0.3.1
|
82
|
+
signing_key:
|
83
|
+
specification_version: 4
|
84
|
+
summary: Iteratively SDK for Ruby
|
85
|
+
test_files: []
|