braze_ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +157 -0
- data/Rakefile +1 -0
- data/braze_ruby.gemspec +33 -0
- data/lib/braze_ruby.rb +9 -0
- data/lib/braze_ruby/api.rb +31 -0
- data/lib/braze_ruby/deprecated.rb +19 -0
- data/lib/braze_ruby/endpoints.rb +4 -0
- data/lib/braze_ruby/endpoints/email_status.rb +13 -0
- data/lib/braze_ruby/endpoints/schedule_messages.rb +15 -0
- data/lib/braze_ruby/endpoints/send_messages.rb +15 -0
- data/lib/braze_ruby/endpoints/track_users.rb +29 -0
- data/lib/braze_ruby/http.rb +30 -0
- data/lib/braze_ruby/rest.rb +7 -0
- data/lib/braze_ruby/rest/base.rb +19 -0
- data/lib/braze_ruby/rest/email_status.rb +22 -0
- data/lib/braze_ruby/rest/export_users.rb +27 -0
- data/lib/braze_ruby/rest/list_segments.rb +11 -0
- data/lib/braze_ruby/rest/schedule_messages.rb +28 -0
- data/lib/braze_ruby/rest/send_messages.rb +22 -0
- data/lib/braze_ruby/rest/track_users.rb +14 -0
- data/lib/braze_ruby/version.rb +3 -0
- data/spec/braze_ruby/api_spec.rb +4 -0
- data/spec/braze_ruby/endpoints/track_users_spec.rb +72 -0
- data/spec/braze_ruby/rest/email_status_spec.rb +19 -0
- data/spec/braze_ruby/rest/export_users_spec.rb +19 -0
- data/spec/braze_ruby/rest/schedule_messages_spec.rb +36 -0
- data/spec/braze_ruby/rest/send_messages_spec.rb +33 -0
- data/spec/braze_ruby/rest/track_users_spec.rb +24 -0
- data/spec/factories.rb +36 -0
- data/spec/fixtures/responses/email_status/existing_email/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml +69 -0
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml +69 -0
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml +69 -0
- data/spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml +81 -0
- data/spec/fixtures/responses/list_segments/with_success/responds_with_success.yml +81 -0
- data/spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml +67 -0
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml +70 -0
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml +70 -0
- data/spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml +66 -0
- data/spec/fixtures/responses/send_messages/with_success/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml +69 -0
- data/spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml +68 -0
- data/spec/fixtures/responses/track_users/with_success/responds_with_created.yml +71 -0
- data/spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml +71 -0
- data/spec/integrations/email_status_spec.rb +36 -0
- data/spec/integrations/export_users_spec.rb +27 -0
- data/spec/integrations/list_segments_spec.rb +19 -0
- data/spec/integrations/schedule_messages_spec.rb +31 -0
- data/spec/integrations/send_messages_spec.rb +30 -0
- data/spec/integrations/track_users_spec.rb +35 -0
- data/spec/spec_helper.rb +29 -0
- data/spec/support/factory_bot.rb +10 -0
- data/spec/support/integrations.rb +20 -0
- data/spec/support/vcr.rb +16 -0
- metadata +312 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: "<BRAZE_REST_URL>/users/track"
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"api_key":"<BRAZE_REST_API_KEY>","attributes":[{"external_id":1,"foo":"bar"}],"events":[{"external_id":1,"name":"baz","time":"2019-02-15
|
9
|
+
00:00:00 -0500"}],"purchases":[{"external_id":1,"product_id":1,"time":"2019-02-15
|
10
|
+
00:00:00 -0500","currency":"CAD","price":1.0}]}'
|
11
|
+
headers:
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v0.14.0
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Etag:
|
30
|
+
- W/"68b326343749fed4d6cc5dda395b5367"
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=0; includeSubDomains
|
35
|
+
- max-age=31536000; includeSubDomains
|
36
|
+
X-Ratelimit-Limit:
|
37
|
+
- '50000'
|
38
|
+
X-Ratelimit-Remaining:
|
39
|
+
- '50000'
|
40
|
+
X-Ratelimit-Reset:
|
41
|
+
- '1524002400'
|
42
|
+
X-Request-Id:
|
43
|
+
- af452a7f-9be9-417d-b9d5-2c4db3de274d
|
44
|
+
X-Runtime:
|
45
|
+
- '0.020310'
|
46
|
+
Content-Length:
|
47
|
+
- '85'
|
48
|
+
Accept-Ranges:
|
49
|
+
- bytes
|
50
|
+
Date:
|
51
|
+
- Tue, 17 Apr 2018 21:08:07 GMT
|
52
|
+
Via:
|
53
|
+
- 1.1 varnish
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
X-Served-By:
|
57
|
+
- cache-pdk17837-PDK
|
58
|
+
X-Cache:
|
59
|
+
- MISS
|
60
|
+
X-Cache-Hits:
|
61
|
+
- '0'
|
62
|
+
X-Timer:
|
63
|
+
- S1523999287.293178,VS0,VE220
|
64
|
+
Vary:
|
65
|
+
- Accept-Encoding
|
66
|
+
body:
|
67
|
+
encoding: ASCII-8BIT
|
68
|
+
string: '{"attributes_processed":1,"events_processed":1,"purchases_processed":1,"message":"success"}'
|
69
|
+
http_version:
|
70
|
+
recorded_at: Tue, 17 Apr 2018 21:08:07 GMT
|
71
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: "<BRAZE_REST_URL>/users/track"
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"api_key":"<BRAZE_REST_API_KEY>","attributes":[{"external_id":1,"foo":"bar"}],"events":[{"external_id":1,"name":"baz","time":"2019-02-15
|
9
|
+
00:00:00 -0500"}],"purchases":[{"external_id":1,"product_id":1,"time":"2019-02-15
|
10
|
+
00:00:00 -0500","currency":"CAD","price":1.0}]}'
|
11
|
+
headers:
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v0.14.0
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Etag:
|
30
|
+
- W/"68b326343749fed4d6cc5dda395b5367"
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=0; includeSubDomains
|
35
|
+
- max-age=31536000; includeSubDomains
|
36
|
+
X-Ratelimit-Limit:
|
37
|
+
- '50000'
|
38
|
+
X-Ratelimit-Remaining:
|
39
|
+
- '50000'
|
40
|
+
X-Ratelimit-Reset:
|
41
|
+
- '1524002400'
|
42
|
+
X-Request-Id:
|
43
|
+
- e810e390-4c31-49ac-abd4-5b1151cc3c33
|
44
|
+
X-Runtime:
|
45
|
+
- '0.012176'
|
46
|
+
Content-Length:
|
47
|
+
- '85'
|
48
|
+
Accept-Ranges:
|
49
|
+
- bytes
|
50
|
+
Date:
|
51
|
+
- Tue, 17 Apr 2018 21:08:07 GMT
|
52
|
+
Via:
|
53
|
+
- 1.1 varnish
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
X-Served-By:
|
57
|
+
- cache-pdk17824-PDK
|
58
|
+
X-Cache:
|
59
|
+
- MISS
|
60
|
+
X-Cache-Hits:
|
61
|
+
- '0'
|
62
|
+
X-Timer:
|
63
|
+
- S1523999288.612820,VS0,VE214
|
64
|
+
Vary:
|
65
|
+
- Accept-Encoding
|
66
|
+
body:
|
67
|
+
encoding: ASCII-8BIT
|
68
|
+
string: '{"attributes_processed":1,"events_processed":1,"purchases_processed":1,"message":"success"}'
|
69
|
+
http_version:
|
70
|
+
recorded_at: Tue, 17 Apr 2018 21:08:07 GMT
|
71
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'email status' do
|
4
|
+
let(:email) { 'john@example.com' }
|
5
|
+
let(:status) { :unsubscribed }
|
6
|
+
|
7
|
+
subject do
|
8
|
+
api.email_status(email: email, status: status)
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'existing email', vcr: true do
|
12
|
+
it 'responds with created' do
|
13
|
+
expect(subject.status).to be 201
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'responds with success message' do
|
17
|
+
expect(JSON.parse(subject.body)).to eq(
|
18
|
+
'message' => 'success'
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'unknown email', vcr: true do
|
24
|
+
let(:email) { 'notthere@example.com' }
|
25
|
+
|
26
|
+
it 'responds with bad request' do
|
27
|
+
expect(subject.status).to be 201
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'responds with success message' do
|
31
|
+
expect(JSON.parse(subject.body)).to eq(
|
32
|
+
'message' => 'success'
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'export users' do
|
4
|
+
context 'by ids' do
|
5
|
+
subject(:export_users) { api.export_users(external_ids: [1]) }
|
6
|
+
|
7
|
+
context 'with success', :vcr do
|
8
|
+
it 'responds with created' do
|
9
|
+
expect(export_users).to be_success
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'by segment' do
|
15
|
+
context 'with success', :vcr do
|
16
|
+
let(:segment_id) { braze_test_segment }
|
17
|
+
|
18
|
+
subject(:export_users) do
|
19
|
+
api.export_users(segment_id: segment_id, callback_endpoint: 'https://example.com')
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'responds with created' do
|
23
|
+
expect(export_users).to be_success
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'list segments' do
|
4
|
+
subject(:list_segments) { api.list_segments }
|
5
|
+
|
6
|
+
context 'with success', :vcr do
|
7
|
+
it 'responds with success' do
|
8
|
+
expect(list_segments).to be_success
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'responds with a list of segments' do
|
12
|
+
expect(segments.count).to be 13
|
13
|
+
end
|
14
|
+
|
15
|
+
def segments
|
16
|
+
JSON.parse(list_segments.body)['segments']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'schedule messages' do
|
4
|
+
let(:user_ids) { [1] }
|
5
|
+
let(:messages) { build(:messages) }
|
6
|
+
|
7
|
+
subject(:schedule_messages) do
|
8
|
+
api.schedule_messages(time: test_time,
|
9
|
+
messages: messages, external_user_ids: user_ids)
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'with success', vcr: true do
|
13
|
+
it 'responds with created' do
|
14
|
+
expect(schedule_messages.status).to be 201
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'responds with success message' do
|
18
|
+
expect(JSON.parse(schedule_messages.body)).to include(
|
19
|
+
'message' => 'success'
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'unauthorized', vcr: true do
|
25
|
+
let(:api_key) { 'non-existent' }
|
26
|
+
|
27
|
+
it 'responds with unauthorize' do
|
28
|
+
expect(schedule_messages.status).to be 401
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'send messages' do
|
4
|
+
let(:user_ids) { [1] }
|
5
|
+
let(:messages) { build(:messages) }
|
6
|
+
|
7
|
+
subject(:send_messages) do
|
8
|
+
api.send_messages(messages: messages, external_user_ids: user_ids)
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'with success', vcr: true do
|
12
|
+
it 'responds with created' do
|
13
|
+
expect(send_messages.status).to be 201
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'responds with success message' do
|
17
|
+
expect(JSON.parse(send_messages.body)).to eq(
|
18
|
+
'message' => 'success'
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'unauthorized', vcr: true do
|
24
|
+
let(:api_key) { 'non-existent' }
|
25
|
+
|
26
|
+
it 'responds with unauthorized' do
|
27
|
+
expect(send_messages.status).to be 401
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'track users' do
|
4
|
+
let(:attributes) { [build(:attribute)] }
|
5
|
+
let(:events) { [build(:event, time: test_time)] }
|
6
|
+
let(:purchases) { [build(:purchase, time: test_time)] }
|
7
|
+
|
8
|
+
subject(:track_users) do
|
9
|
+
api.track_users(attributes: attributes,
|
10
|
+
events: events, purchases: purchases)
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'with success', vcr: true do
|
14
|
+
it 'responds with created' do
|
15
|
+
expect(track_users.status).to be 201
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'responds with success message' do
|
19
|
+
expect(JSON.parse(track_users.body)).to eq(
|
20
|
+
'attributes_processed' => 1,
|
21
|
+
'events_processed' => 1,
|
22
|
+
'purchases_processed' => 1,
|
23
|
+
'message' => 'success'
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'unauthorized', vcr: true do
|
29
|
+
let(:api_key) { 'non-existent' }
|
30
|
+
|
31
|
+
it 'responds with unauthorized' do
|
32
|
+
expect(track_users.status).to be 401
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'pry'
|
2
|
+
require 'dotenv'
|
3
|
+
require 'bundler/setup'
|
4
|
+
|
5
|
+
Bundler.setup
|
6
|
+
Dotenv.load
|
7
|
+
|
8
|
+
require 'braze_ruby'
|
9
|
+
require 'support/vcr'
|
10
|
+
require 'support/factory_bot'
|
11
|
+
require 'support/integrations'
|
12
|
+
|
13
|
+
RSpec.configure do |config|
|
14
|
+
def test_time
|
15
|
+
Time.parse('2019-02-15 00:00:00 -0500')
|
16
|
+
end
|
17
|
+
|
18
|
+
def braze_rest_api_key
|
19
|
+
'test'
|
20
|
+
end
|
21
|
+
|
22
|
+
def braze_rest_url
|
23
|
+
'https://rest.iad-03.braze.com'
|
24
|
+
end
|
25
|
+
|
26
|
+
def braze_test_segment
|
27
|
+
'a8fde797-4c44-4406-8e6c-5850d323f169'
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module Integrations
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
let(:api_key) { braze_rest_api_key }
|
8
|
+
let(:rest_url) { braze_rest_url }
|
9
|
+
let(:segment_id) { braze_test_segment }
|
10
|
+
|
11
|
+
let(:api) { BrazeRuby::API.new(api_key, rest_url) }
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.include self, type: :integrations, file_path: %r(spec/integrations)
|
19
|
+
end
|
20
|
+
end
|
data/spec/support/vcr.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |config|
|
4
|
+
config.filter_sensitive_data('<BRAZE_REST_API_KEY>') { ENV.fetch('BRAZE_REST_API_KEY') }
|
5
|
+
config.filter_sensitive_data('<BRAZE_REST_URL>') { ENV.fetch('BRAZE_REST_URL')}
|
6
|
+
|
7
|
+
config.cassette_library_dir = 'spec/fixtures/responses'
|
8
|
+
|
9
|
+
config.default_cassette_options = {
|
10
|
+
match_requests_on: [:method, :uri, :body]
|
11
|
+
}
|
12
|
+
|
13
|
+
config.configure_rspec_metadata!
|
14
|
+
|
15
|
+
config.hook_into :webmock
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,312 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: braze_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Nussbaum
|
8
|
+
- Hugo Bastien
|
9
|
+
- Justin Boltz
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: virtus
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: faraday
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: faraday_middleware
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: bundler
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1.3'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '1.3'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rake
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: rspec
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: dotenv
|
101
|
+
requirement: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
type: :development
|
107
|
+
prerelease: false
|
108
|
+
version_requirements: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: vcr
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
type: :development
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: webmock
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: pry
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
type: :development
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: activesupport
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ">="
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
type: :development
|
163
|
+
prerelease: false
|
164
|
+
version_requirements: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
- !ruby/object:Gem::Dependency
|
170
|
+
name: factory_bot
|
171
|
+
requirement: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
176
|
+
type: :development
|
177
|
+
prerelease: false
|
178
|
+
version_requirements: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
description: Braze wrapper
|
184
|
+
email:
|
185
|
+
- josh@godynamo.com
|
186
|
+
- hugo@godynamo.com
|
187
|
+
- justin.boltz@takl.com
|
188
|
+
executables: []
|
189
|
+
extensions: []
|
190
|
+
extra_rdoc_files: []
|
191
|
+
files:
|
192
|
+
- ".gitignore"
|
193
|
+
- ".rspec"
|
194
|
+
- Gemfile
|
195
|
+
- LICENSE.txt
|
196
|
+
- README.md
|
197
|
+
- Rakefile
|
198
|
+
- braze_ruby.gemspec
|
199
|
+
- lib/braze_ruby.rb
|
200
|
+
- lib/braze_ruby/api.rb
|
201
|
+
- lib/braze_ruby/deprecated.rb
|
202
|
+
- lib/braze_ruby/endpoints.rb
|
203
|
+
- lib/braze_ruby/endpoints/email_status.rb
|
204
|
+
- lib/braze_ruby/endpoints/schedule_messages.rb
|
205
|
+
- lib/braze_ruby/endpoints/send_messages.rb
|
206
|
+
- lib/braze_ruby/endpoints/track_users.rb
|
207
|
+
- lib/braze_ruby/http.rb
|
208
|
+
- lib/braze_ruby/rest.rb
|
209
|
+
- lib/braze_ruby/rest/base.rb
|
210
|
+
- lib/braze_ruby/rest/email_status.rb
|
211
|
+
- lib/braze_ruby/rest/export_users.rb
|
212
|
+
- lib/braze_ruby/rest/list_segments.rb
|
213
|
+
- lib/braze_ruby/rest/schedule_messages.rb
|
214
|
+
- lib/braze_ruby/rest/send_messages.rb
|
215
|
+
- lib/braze_ruby/rest/track_users.rb
|
216
|
+
- lib/braze_ruby/version.rb
|
217
|
+
- spec/braze_ruby/api_spec.rb
|
218
|
+
- spec/braze_ruby/endpoints/track_users_spec.rb
|
219
|
+
- spec/braze_ruby/rest/email_status_spec.rb
|
220
|
+
- spec/braze_ruby/rest/export_users_spec.rb
|
221
|
+
- spec/braze_ruby/rest/schedule_messages_spec.rb
|
222
|
+
- spec/braze_ruby/rest/send_messages_spec.rb
|
223
|
+
- spec/braze_ruby/rest/track_users_spec.rb
|
224
|
+
- spec/factories.rb
|
225
|
+
- spec/fixtures/responses/email_status/existing_email/responds_with_created.yml
|
226
|
+
- spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml
|
227
|
+
- spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml
|
228
|
+
- spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml
|
229
|
+
- spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml
|
230
|
+
- spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml
|
231
|
+
- spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml
|
232
|
+
- spec/fixtures/responses/list_segments/with_success/responds_with_success.yml
|
233
|
+
- spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml
|
234
|
+
- spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml
|
235
|
+
- spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml
|
236
|
+
- spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml
|
237
|
+
- spec/fixtures/responses/send_messages/with_success/responds_with_created.yml
|
238
|
+
- spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml
|
239
|
+
- spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml
|
240
|
+
- spec/fixtures/responses/track_users/with_success/responds_with_created.yml
|
241
|
+
- spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml
|
242
|
+
- spec/integrations/email_status_spec.rb
|
243
|
+
- spec/integrations/export_users_spec.rb
|
244
|
+
- spec/integrations/list_segments_spec.rb
|
245
|
+
- spec/integrations/schedule_messages_spec.rb
|
246
|
+
- spec/integrations/send_messages_spec.rb
|
247
|
+
- spec/integrations/track_users_spec.rb
|
248
|
+
- spec/spec_helper.rb
|
249
|
+
- spec/support/factory_bot.rb
|
250
|
+
- spec/support/integrations.rb
|
251
|
+
- spec/support/vcr.rb
|
252
|
+
homepage: http://braze.com
|
253
|
+
licenses:
|
254
|
+
- MIT
|
255
|
+
metadata: {}
|
256
|
+
post_install_message:
|
257
|
+
rdoc_options: []
|
258
|
+
require_paths:
|
259
|
+
- lib
|
260
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
|
+
requirements:
|
267
|
+
- - ">="
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
version: '0'
|
270
|
+
requirements: []
|
271
|
+
rubyforge_project:
|
272
|
+
rubygems_version: 2.6.13
|
273
|
+
signing_key:
|
274
|
+
specification_version: 4
|
275
|
+
summary: A wrapper for the Braze REST API forked from the appboy gem, track users/events/purchases,
|
276
|
+
send & schedule messages
|
277
|
+
test_files:
|
278
|
+
- spec/braze_ruby/api_spec.rb
|
279
|
+
- spec/braze_ruby/endpoints/track_users_spec.rb
|
280
|
+
- spec/braze_ruby/rest/email_status_spec.rb
|
281
|
+
- spec/braze_ruby/rest/export_users_spec.rb
|
282
|
+
- spec/braze_ruby/rest/schedule_messages_spec.rb
|
283
|
+
- spec/braze_ruby/rest/send_messages_spec.rb
|
284
|
+
- spec/braze_ruby/rest/track_users_spec.rb
|
285
|
+
- spec/factories.rb
|
286
|
+
- spec/fixtures/responses/email_status/existing_email/responds_with_created.yml
|
287
|
+
- spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml
|
288
|
+
- spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml
|
289
|
+
- spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml
|
290
|
+
- spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml
|
291
|
+
- spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml
|
292
|
+
- spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml
|
293
|
+
- spec/fixtures/responses/list_segments/with_success/responds_with_success.yml
|
294
|
+
- spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml
|
295
|
+
- spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml
|
296
|
+
- spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml
|
297
|
+
- spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml
|
298
|
+
- spec/fixtures/responses/send_messages/with_success/responds_with_created.yml
|
299
|
+
- spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml
|
300
|
+
- spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml
|
301
|
+
- spec/fixtures/responses/track_users/with_success/responds_with_created.yml
|
302
|
+
- spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml
|
303
|
+
- spec/integrations/email_status_spec.rb
|
304
|
+
- spec/integrations/export_users_spec.rb
|
305
|
+
- spec/integrations/list_segments_spec.rb
|
306
|
+
- spec/integrations/schedule_messages_spec.rb
|
307
|
+
- spec/integrations/send_messages_spec.rb
|
308
|
+
- spec/integrations/track_users_spec.rb
|
309
|
+
- spec/spec_helper.rb
|
310
|
+
- spec/support/factory_bot.rb
|
311
|
+
- spec/support/integrations.rb
|
312
|
+
- spec/support/vcr.rb
|