amplitude-experiment 1.0.0.beta.4 → 1.0.0.beta.5

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: 653e4953eeea7497bb43f1e76c144c8fe7360dcc53c7aa3f9c63e3b28e1052ee
4
- data.tar.gz: 9b8ea31ccb93aebd815019f6dab4f739ea49b96177800dc6a39b9f1907f64ad0
3
+ metadata.gz: 4eaaabdc2596c108c080f7e30686fa14064c3f2ff050a18274cba34ad547b0b1
4
+ data.tar.gz: 7e370913bfc802a4a1c3168b99523ceff72965e36667cc8f13844e2f6abc1507
5
5
  SHA512:
6
- metadata.gz: 4a1b221d66a28d1cc53c20c5eba088baa3a180ec628603d8801ed759ef893b6a74162abb8396ed3bac2f97f51aa45e7536adedc4509f1d719c2495ff2e129df1
7
- data.tar.gz: 1757f94f26bf55016c8604ee065ae4d24d95b431ac7a27687190fe8e138d6ac402d94248eba90f9c23d94fd918179d28da8ffc02c9c03004e5bdeaafa8e24db1
6
+ metadata.gz: 42fa7bb1dbdca51111bd7370bd3e3d1b1f108aa29db8ba79de54b0027bfdc4f7f38b3d7cb149be491a10b01d2fbe2d1b923337aec2e0838e7d5cba6731993657
7
+ data.tar.gz: 16ee04fe4452383bf9a5b671b97222343cd224256a9be6527e0fa6df3299b72251e732efc55f0a494542096da30503332fae64b69e581f5a1b521a5286401805
data/README.md CHANGED
@@ -33,10 +33,10 @@ require 'amplitude-experiment'
33
33
  apiKey = 'YOUR-API-KEY'
34
34
 
35
35
  # (2) Initialize the experiment client
36
- experiment = Experiment.init(api_key)
36
+ experiment = AmplitudeExperiment.init(api_key)
37
37
 
38
38
  # (3) Fetch variants for a user
39
- user = Experiment::User.new(user_id: 'user@company.com', device_id: 'abcezas123', user_properties: {'premium' => true})
39
+ user = AmplitudeExperiment::User.new(user_id: 'user@company.com', device_id: 'abcezas123', user_properties: {'premium' => true})
40
40
 
41
41
  # (4) Lookup a flag's variant
42
42
  #
@@ -1 +1,12 @@
1
- require 'experiment'
1
+ require 'experiment/version'
2
+ require 'experiment/config'
3
+ require 'experiment/cookie'
4
+ require 'experiment/user'
5
+ require 'experiment/variant'
6
+ require 'experiment/factory'
7
+ require 'experiment/persistent_http_client'
8
+ require 'experiment/client'
9
+
10
+ # Amplitude Experiment Module
11
+ module AmplitudeExperiment
12
+ end
@@ -3,7 +3,7 @@ require 'json'
3
3
  require 'uri'
4
4
  require 'logger'
5
5
 
6
- module Experiment
6
+ module AmplitudeExperiment
7
7
  # Main client for fetching variant data.
8
8
  class Client
9
9
  # Creates a new Experiment Client instance.
@@ -1,4 +1,4 @@
1
- module Experiment
1
+ module AmplitudeExperiment
2
2
  # Configuration
3
3
  class Config
4
4
  # Default server url
@@ -1,6 +1,6 @@
1
1
  require 'base64'
2
2
 
3
- module Experiment
3
+ module AmplitudeExperiment
4
4
  # This class provides utility functions for parsing and handling identity from Amplitude cookies.
5
5
  class AmplitudeCookie
6
6
  # Get the cookie name that Amplitude sets for the provided
@@ -1,5 +1,5 @@
1
1
  # Provides factory methods for storing singleton instance of Client
2
- module Experiment
2
+ module AmplitudeExperiment
3
3
  @instances = {}
4
4
  @default_instance = '$default_instance'
5
5
 
@@ -1,4 +1,4 @@
1
- module Experiment
1
+ module AmplitudeExperiment
2
2
  # Persist Http Client to reuse connection and reduce IO
3
3
  class PersistentHttpClient
4
4
  DEFAULT_OPTIONS = { read_timeout: 80 }.freeze
@@ -1,4 +1,4 @@
1
- module Experiment
1
+ module AmplitudeExperiment
2
2
  # Defines a user context for evaluation.
3
3
  # `device_id` and `user_id` are used for identity resolution.
4
4
  # All other predefined fields and user properties are used for
@@ -1,4 +1,4 @@
1
- module Experiment
1
+ module AmplitudeExperiment
2
2
  # Variant
3
3
  class Variant
4
4
  # The value of the variant determined by the flag configuration.
@@ -1,3 +1,3 @@
1
- module Experiment
2
- VERSION = '1.0.0.beta.4'.freeze
1
+ module AmplitudeExperiment
2
+ VERSION = '1.0.0.beta.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amplitude-experiment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.4
4
+ version: 1.0.0.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amplitude
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-30 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -119,7 +119,6 @@ files:
119
119
  - Gemfile
120
120
  - README.md
121
121
  - lib/amplitude-experiment.rb
122
- - lib/experiment.rb
123
122
  - lib/experiment/client.rb
124
123
  - lib/experiment/config.rb
125
124
  - lib/experiment/cookie.rb
data/lib/experiment.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'experiment/version'
2
- require 'experiment/config'
3
- require 'experiment/cookie'
4
- require 'experiment/user'
5
- require 'experiment/variant'
6
- require 'experiment/factory'
7
- require 'experiment/persistent_http_client'
8
- require 'experiment/client'
9
-
10
- # Amplitude Experiment Module
11
- module Experiment
12
- end