mparticle 1.0.5 → 1.0.10
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/README.md +5 -0
- data/docs/Batch.md +3 -0
- data/docs/CCPAConsentState.md +10 -0
- data/docs/ConsentState.md +4 -3
- data/docs/UserIdentities.md +12 -0
- data/example/main.rb +13 -3
- data/lib/mparticle.rb +3 -0
- data/lib/mparticle/api_client.rb +1 -1
- data/lib/mparticle/models/batch.rb +35 -4
- data/lib/mparticle/models/batch_context.rb +177 -0
- data/lib/mparticle/models/ccpa_consent_state.rb +233 -0
- data/lib/mparticle/models/consent_state.rb +9 -0
- data/lib/mparticle/models/data_plan_context.rb +186 -0
- data/lib/mparticle/models/user_identities.rb +112 -4
- data/lib/mparticle/version.rb +1 -1
- data/mparticle.gemspec +2 -2
- data/spec/models/batch_spec.rb +20 -0
- data/spec/models/ccpa_consent_state_spec.rb +34 -0
- data/spec/models/consent_state_spec.rb +5 -0
- data/spec/models/data_plan_context_spec.rb +19 -0
- data/spec/models/user_identities_spec.rb +59 -0
- metadata +14 -9
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -34
- data/mparticle-1.0.4.gem +0 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'mparticle'
|
2
|
+
|
3
|
+
describe 'DataPlanContext' do
|
4
|
+
it 'should create an instance of DataPlanContext' do
|
5
|
+
model = MParticle::DataPlanContext.new
|
6
|
+
expect(model).to be_an_instance_of MParticle::DataPlanContext
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should set context on batch' do
|
10
|
+
batch_model = MParticle::Batch.new
|
11
|
+
batch_model.context = MParticle::BatchContext.new
|
12
|
+
batch_model.context.data_plan = MParticle::DataPlanContext.new
|
13
|
+
batch_model.context.data_plan.plan_id = 'foo_dp_id'
|
14
|
+
batch_model.context.data_plan.plan_version = 5
|
15
|
+
expect(batch_model.context.data_plan.plan_id).to eq('foo_dp_id')
|
16
|
+
expect(batch_model.context.data_plan.plan_version).to eq(5)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'mparticle'
|
2
|
+
|
3
|
+
describe 'UserIdentities' do
|
4
|
+
it 'should create an instance of UserIdentities' do
|
5
|
+
model = MParticle::UserIdentities.new
|
6
|
+
expect(model).to be_an_instance_of MParticle::UserIdentities
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should set all identities' do
|
10
|
+
model = MParticle::UserIdentities.new
|
11
|
+
model.other = 'foo_other'
|
12
|
+
expect(model.other).to eq('foo_other')
|
13
|
+
model.customerid = 'foo_customerid'
|
14
|
+
expect(model.customerid).to eq('foo_customerid')
|
15
|
+
model.facebook = 'foo_facebook'
|
16
|
+
expect(model.facebook).to eq('foo_facebook')
|
17
|
+
model.twitter = 'foo_twitter'
|
18
|
+
expect(model.twitter).to eq('foo_twitter')
|
19
|
+
model.google = 'foo_google'
|
20
|
+
expect(model.google).to eq('foo_google')
|
21
|
+
model.microsoft = 'foo_microsoft'
|
22
|
+
expect(model.microsoft).to eq('foo_microsoft')
|
23
|
+
model.yahoo = 'foo_yahoo'
|
24
|
+
expect(model.yahoo).to eq('foo_yahoo')
|
25
|
+
model.email = 'foo_email'
|
26
|
+
expect(model.email).to eq('foo_email')
|
27
|
+
model._alias = 'foo_alias'
|
28
|
+
expect(model._alias).to eq('foo_alias')
|
29
|
+
model.facebook_custom_audience_id = 'foo_fbid'
|
30
|
+
expect(model.facebook_custom_audience_id).to eq('foo_fbid')
|
31
|
+
model.other_id_2 = 'foo_other_id_2'
|
32
|
+
expect(model.other_id_2).to eq('foo_other_id_2')
|
33
|
+
model.other_id_3 = 'foo_other_id_3'
|
34
|
+
expect(model.other_id_3).to eq('foo_other_id_3')
|
35
|
+
model.other_id_4 = 'foo_other_id_4'
|
36
|
+
expect(model.other_id_4).to eq('foo_other_id_4')
|
37
|
+
model.other_id_5 = 'foo_other_id_5'
|
38
|
+
expect(model.other_id_5).to eq('foo_other_id_5')
|
39
|
+
model.other_id_6 = 'foo_other_id_6'
|
40
|
+
expect(model.other_id_6).to eq('foo_other_id_6')
|
41
|
+
model.other_id_7 = 'foo_other_id_7'
|
42
|
+
expect(model.other_id_7).to eq('foo_other_id_7')
|
43
|
+
model.other_id_8 = 'foo_other_id_8'
|
44
|
+
expect(model.other_id_8).to eq('foo_other_id_8')
|
45
|
+
model.other_id_9 = 'foo_other_id_9'
|
46
|
+
expect(model.other_id_9).to eq('foo_other_id_9')
|
47
|
+
model.other_id_10 = 'foo_other_id_10'
|
48
|
+
expect(model.other_id_10).to eq('foo_other_id_10')
|
49
|
+
model.mobile_number = 'foo_mobile_number'
|
50
|
+
expect(model.mobile_number).to eq('foo_mobile_number')
|
51
|
+
model.phone_number_2 = 'foo_phone_number_2'
|
52
|
+
expect(model.phone_number_2).to eq('foo_phone_number_2')
|
53
|
+
model.phone_number_3 = 'foo_phone_number_3'
|
54
|
+
expect(model.phone_number_3).to eq('foo_phone_number_3')
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mparticle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mParticle Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '2.0'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 2.3.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '2.0'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
52
|
+
version: 2.3.0
|
53
53
|
description: Use this client to send your data into the mParticle platform.
|
54
54
|
email:
|
55
55
|
- support@mparticle.com
|
@@ -57,8 +57,6 @@ executables: []
|
|
57
57
|
extensions: []
|
58
58
|
extra_rdoc_files: []
|
59
59
|
files:
|
60
|
-
- Gemfile
|
61
|
-
- Gemfile.lock
|
62
60
|
- README.md
|
63
61
|
- docs/ApiResponse.md
|
64
62
|
- docs/ApiResponseErrors.md
|
@@ -68,6 +66,7 @@ files:
|
|
68
66
|
- docs/AttributionInfo.md
|
69
67
|
- docs/Batch.md
|
70
68
|
- docs/BreadcrumbEvent.md
|
69
|
+
- docs/CCPAConsentState.md
|
71
70
|
- docs/CommerceEvent.md
|
72
71
|
- docs/ConsentState.md
|
73
72
|
- docs/CrashReportEvent.md
|
@@ -109,10 +108,13 @@ files:
|
|
109
108
|
- lib/mparticle/models/application_state_transition_event.rb
|
110
109
|
- lib/mparticle/models/attribution_info.rb
|
111
110
|
- lib/mparticle/models/batch.rb
|
111
|
+
- lib/mparticle/models/batch_context.rb
|
112
112
|
- lib/mparticle/models/breadcrumb_event.rb
|
113
|
+
- lib/mparticle/models/ccpa_consent_state.rb
|
113
114
|
- lib/mparticle/models/commerce_event.rb
|
114
115
|
- lib/mparticle/models/consent_state.rb
|
115
116
|
- lib/mparticle/models/crash_report_event.rb
|
117
|
+
- lib/mparticle/models/data_plan_context.rb
|
116
118
|
- lib/mparticle/models/device_current_state.rb
|
117
119
|
- lib/mparticle/models/device_information.rb
|
118
120
|
- lib/mparticle/models/event_base.rb
|
@@ -138,14 +140,17 @@ files:
|
|
138
140
|
- lib/mparticle/models/source_information.rb
|
139
141
|
- lib/mparticle/models/user_identities.rb
|
140
142
|
- lib/mparticle/version.rb
|
141
|
-
- mparticle-1.0.4.gem
|
142
143
|
- mparticle.gemspec
|
143
144
|
- spec/models/app_event_spec.rb
|
145
|
+
- spec/models/batch_spec.rb
|
146
|
+
- spec/models/ccpa_consent_state_spec.rb
|
144
147
|
- spec/models/commerce_event_spec.rb
|
145
148
|
- spec/models/consent_state_spec.rb
|
149
|
+
- spec/models/data_plan_context_spec.rb
|
146
150
|
- spec/models/gdpr_consent_state_spec.rb
|
147
151
|
- spec/models/product_spec.rb
|
148
152
|
- spec/models/screen_view_event_spec.rb
|
153
|
+
- spec/models/user_identities_spec.rb
|
149
154
|
homepage: https://www.mparticle.com
|
150
155
|
licenses:
|
151
156
|
- Apache-2.0
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
diff-lcs (1.3)
|
5
|
-
ethon (0.12.0)
|
6
|
-
ffi (>= 1.3.0)
|
7
|
-
ffi (1.11.3)
|
8
|
-
json (1.8.6)
|
9
|
-
rspec (3.9.0)
|
10
|
-
rspec-core (~> 3.9.0)
|
11
|
-
rspec-expectations (~> 3.9.0)
|
12
|
-
rspec-mocks (~> 3.9.0)
|
13
|
-
rspec-core (3.9.1)
|
14
|
-
rspec-support (~> 3.9.1)
|
15
|
-
rspec-expectations (3.9.0)
|
16
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
17
|
-
rspec-support (~> 3.9.0)
|
18
|
-
rspec-mocks (3.9.1)
|
19
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
-
rspec-support (~> 3.9.0)
|
21
|
-
rspec-support (3.9.2)
|
22
|
-
typhoeus (1.3.1)
|
23
|
-
ethon (>= 0.9.0)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
ruby
|
27
|
-
|
28
|
-
DEPENDENCIES
|
29
|
-
json (~> 1.8, >= 1.8.3)
|
30
|
-
rspec (= 3.9.0)
|
31
|
-
typhoeus (~> 1.0, >= 1.0.1)
|
32
|
-
|
33
|
-
BUNDLED WITH
|
34
|
-
1.17.2
|
data/mparticle-1.0.4.gem
DELETED
Binary file
|