absmartly-sdk 1.1.2 → 1.2.2
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/.ruby-version +1 -1
- data/Gemfile.lock +5 -5
- data/absmartly.gemspec +3 -0
- data/example/example.rb +1 -1
- data/lib/a_b_smartly.rb +1 -5
- data/lib/a_b_smartly_config.rb +0 -4
- data/lib/absmartly/version.rb +1 -1
- data/lib/absmartly.rb +0 -2
- data/lib/client.rb +2 -2
- data/lib/context_config.rb +2 -1
- data/lib/default_context_event_handler.rb +2 -2
- data/lib/json_expr/expr_evaluator.rb +0 -1
- metadata +17 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a2b6f96e452fc60de76e49bc1166b6df3030b1ab424e99cdaf72554493ac0b3
|
|
4
|
+
data.tar.gz: aae37038713a693935209e387dee6ac5a33f84d4c74a27edec5d2ed69152e1e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c5feb92c44db0ea6b24d33f40812626d4fdeaa6339c258c5da5926e522382f0981a0550b2508ae7a79ca6b0b1d6c18d54ed2a0f1b24c4241b45cad3d3a39edb
|
|
7
|
+
data.tar.gz: 113ba3c0c2594537dd8ea6c02021bc447f7918783b7175106317d60893013a843f0f93f4eb4411deab9b502f97b539120593d66a0d9c4b50e2fc201cf1d2e531
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.0.6
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
absmartly-sdk (1.
|
|
4
|
+
absmartly-sdk (1.2.2)
|
|
5
|
+
base64 (~> 0.2)
|
|
5
6
|
faraday (~> 2.0)
|
|
6
7
|
faraday-retry (~> 2.0)
|
|
7
8
|
murmurhash3 (~> 0.1.7)
|
|
@@ -10,13 +11,14 @@ GEM
|
|
|
10
11
|
remote: https://rubygems.org/
|
|
11
12
|
specs:
|
|
12
13
|
ast (2.4.2)
|
|
14
|
+
base64 (0.3.0)
|
|
13
15
|
byebug (11.1.3)
|
|
14
16
|
diff-lcs (1.5.0)
|
|
15
17
|
faraday (2.7.4)
|
|
16
18
|
faraday-net_http (>= 2.0, < 3.1)
|
|
17
19
|
ruby2_keywords (>= 0.0.4)
|
|
18
20
|
faraday-net_http (3.0.2)
|
|
19
|
-
faraday-retry (2.
|
|
21
|
+
faraday-retry (2.4.0)
|
|
20
22
|
faraday (~> 2.0)
|
|
21
23
|
io-console (0.5.6)
|
|
22
24
|
irb (1.2.6)
|
|
@@ -31,8 +33,7 @@ GEM
|
|
|
31
33
|
regexp_parser (2.5.0)
|
|
32
34
|
reline (0.1.5)
|
|
33
35
|
io-console (~> 0.5)
|
|
34
|
-
rexml (3.
|
|
35
|
-
strscan (>= 3.0.9)
|
|
36
|
+
rexml (3.4.4)
|
|
36
37
|
rspec (3.11.0)
|
|
37
38
|
rspec-core (~> 3.11.0)
|
|
38
39
|
rspec-expectations (~> 3.11.0)
|
|
@@ -60,7 +61,6 @@ GEM
|
|
|
60
61
|
parser (>= 3.1.1.0)
|
|
61
62
|
ruby-progressbar (1.11.0)
|
|
62
63
|
ruby2_keywords (0.0.5)
|
|
63
|
-
strscan (3.1.0)
|
|
64
64
|
unicode-display_width (2.2.0)
|
|
65
65
|
|
|
66
66
|
PLATFORMS
|
data/absmartly.gemspec
CHANGED
|
@@ -32,6 +32,9 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
33
33
|
spec.require_paths = ["lib"]
|
|
34
34
|
|
|
35
|
+
# Required for Ruby 3.4+ where base64 is no longer a default gem.
|
|
36
|
+
# Faraday 2.7.x uses base64 but doesn't declare it as a dependency.
|
|
37
|
+
spec.add_dependency "base64", "~> 0.2"
|
|
35
38
|
spec.add_dependency "faraday", "~> 2.0"
|
|
36
39
|
spec.add_dependency "faraday-retry", "~> 2.0"
|
|
37
40
|
spec.add_dependency "murmurhash3", "~> 0.1.7"
|
data/example/example.rb
CHANGED
data/lib/a_b_smartly.rb
CHANGED
|
@@ -14,16 +14,11 @@ class ABSmartly
|
|
|
14
14
|
:variable_parser, :scheduler, :context_event_logger,
|
|
15
15
|
:audience_deserializer, :client
|
|
16
16
|
|
|
17
|
-
def self.configure_client(&block)
|
|
18
|
-
@@init_http = block
|
|
19
|
-
end
|
|
20
|
-
|
|
21
17
|
def self.create(config)
|
|
22
18
|
ABSmartly.new(config)
|
|
23
19
|
end
|
|
24
20
|
|
|
25
21
|
def initialize(config)
|
|
26
|
-
@@init_http = nil
|
|
27
22
|
@context_data_provider = config.context_data_provider
|
|
28
23
|
@context_event_handler = config.context_event_handler
|
|
29
24
|
@context_event_logger = config.context_event_logger
|
|
@@ -64,6 +59,7 @@ class ABSmartly
|
|
|
64
59
|
end
|
|
65
60
|
|
|
66
61
|
def create_context_with(config, data)
|
|
62
|
+
validate_params(config)
|
|
67
63
|
Context.create(get_utc_format, config, data,
|
|
68
64
|
@context_data_provider, @context_event_handler, @context_event_logger, @variable_parser,
|
|
69
65
|
AudienceMatcher.new(@audience_deserializer))
|
data/lib/a_b_smartly_config.rb
CHANGED
data/lib/absmartly/version.rb
CHANGED
data/lib/absmartly.rb
CHANGED
data/lib/client.rb
CHANGED
|
@@ -13,7 +13,7 @@ class Client
|
|
|
13
13
|
Client.new(config, http_client || DefaultHttpClient.create(DefaultHttpClientConfig.create))
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def initialize(config
|
|
16
|
+
def initialize(config, http_client = nil)
|
|
17
17
|
endpoint = config.endpoint
|
|
18
18
|
raise ArgumentError.new("Missing Endpoint configuration") if endpoint.nil? || endpoint.empty?
|
|
19
19
|
|
|
@@ -75,6 +75,6 @@ class Client
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def success?
|
|
78
|
-
@promise
|
|
78
|
+
@promise&.success? || false
|
|
79
79
|
end
|
|
80
80
|
end
|
data/lib/context_config.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "
|
|
3
|
+
require_relative "context_event_handler"
|
|
4
4
|
|
|
5
|
-
class DefaultContextEventHandler <
|
|
5
|
+
class DefaultContextEventHandler < ContextEventHandler
|
|
6
6
|
attr_accessor :client
|
|
7
7
|
|
|
8
8
|
def initialize(client)
|
metadata
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: absmartly-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- absmartly
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: base64
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0.2'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0.2'
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: faraday
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -141,7 +154,6 @@ metadata:
|
|
|
141
154
|
homepage_uri: https://github.com/absmartly/ruby-sdk
|
|
142
155
|
source_code_uri: https://github.com/absmartly/ruby-sdk
|
|
143
156
|
changelog_uri: https://github.com/absmartly/ruby-sdk
|
|
144
|
-
post_install_message:
|
|
145
157
|
rdoc_options: []
|
|
146
158
|
require_paths:
|
|
147
159
|
- lib
|
|
@@ -156,8 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
156
168
|
- !ruby/object:Gem::Version
|
|
157
169
|
version: '0'
|
|
158
170
|
requirements: []
|
|
159
|
-
rubygems_version: 3.
|
|
160
|
-
signing_key:
|
|
171
|
+
rubygems_version: 3.7.1
|
|
161
172
|
specification_version: 4
|
|
162
173
|
summary: Absmartly gem
|
|
163
174
|
test_files: []
|