braze_ruby 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04567c2148da9db982023a103156347777831203d442829a8b7b24f25df2f3b6
4
- data.tar.gz: f6e48e092c5edb9d11d5e4a962c5cd181eeb108eb297f4321086943d890a96ee
3
+ metadata.gz: d764aef365cc62df6c6b78c7df64e302e5e662b23d602acaec830f98159e3605
4
+ data.tar.gz: b5b2affefe873659ef00624c004309b095454479e2324f9923f613e06366212b
5
5
  SHA512:
6
- metadata.gz: 24284d239f84699ac674e0becb5c7e1b5207c7e7f4954f06a1d4aa8f40cf54842e074aae97f595a3a5918f6aa06c4bade387e67efc08951e0e8a9221bdedaea4
7
- data.tar.gz: 0fd11acad7ed6ad7e4940336bbb82556d0cf2a91c2532a73f7e41e07e01fb89591d10670a82c757c0f5f55b93fdadd22271d3bf8dc433b1135eb6f9a9b69911b
6
+ metadata.gz: 818b213e16dcd5665c9b0029e0d683a9b0631ff49732362fc904ea176e4ff4aa639ebec8b1467e5cf40b313d57b9377fca1074a2f2d47dedc894a93377ae6630
7
+ data.tar.gz: 149b620b3a6e27b39e4ab34a6f7826e866015a04ba170bdc38e0d66407a0c6518503108edfb60100e4f9a0642591cc1d170fdb609ff678e53f328e1c7a0cbd56
@@ -1,9 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- braze_ruby (0.1.0)
4
+ braze_ruby (0.2.0)
5
5
  faraday
6
- faraday_middleware
7
6
 
8
7
  GEM
9
8
  remote: https://rubygems.org/
@@ -25,8 +24,6 @@ GEM
25
24
  activesupport (>= 4.2.0)
26
25
  faraday (0.15.4)
27
26
  multipart-post (>= 1.2, < 3)
28
- faraday_middleware (0.13.1)
29
- faraday (>= 0.7.4, < 1.0)
30
27
  hashdiff (0.3.8)
31
28
  i18n (1.6.0)
32
29
  concurrent-ruby (~> 1.0)
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'braze_ruby/version'
@@ -13,13 +12,21 @@ Gem::Specification.new do |spec|
13
12
  spec.homepage = 'https://www.braze.com/'
14
13
  spec.license = 'MIT'
15
14
 
15
+ if spec.respond_to?(:metadata)
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/jboltz88/braze_ruby"
18
+ else
19
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
20
+ end
21
+
16
22
  spec.files = `git ls-files`.split($/)
17
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
24
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
25
  spec.require_paths = ['lib']
26
+ spec.required_ruby_version = '>= 2.0'
20
27
 
21
28
  spec.add_dependency 'faraday'
22
- spec.add_dependency 'faraday_middleware'
29
+
23
30
  spec.add_development_dependency 'bundler', '>= 1.3'
24
31
  spec.add_development_dependency 'rake'
25
32
  spec.add_development_dependency 'rspec'
@@ -1,5 +1,5 @@
1
+ require 'json'
1
2
  require 'faraday'
2
- require 'faraday_middleware'
3
3
 
4
4
  module BrazeRuby
5
5
  class HTTP
@@ -9,7 +9,7 @@ module BrazeRuby
9
9
 
10
10
  def post(path, payload)
11
11
  connection.post path do |request|
12
- request.body = payload
12
+ request.body = JSON.dump(payload)
13
13
  end
14
14
  end
15
15
 
@@ -19,7 +19,9 @@ module BrazeRuby
19
19
 
20
20
  def connection
21
21
  @connection ||= Faraday.new(url: @braze_url) do |connection|
22
- connection.request :json
22
+ connection.headers['Content-Type'] = 'application/json'
23
+ connection.headers['Accept'] = 'application/json'
24
+ connection.headers['User-Agent'] = "Braze Ruby gem v#{BrazeRuby::VERSION}"
23
25
 
24
26
  connection.response :logger if ENV['BRAZE_RUBY_DEBUG']
25
27
 
@@ -1,3 +1,3 @@
1
1
  module BrazeRuby
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'.freeze
3
3
  end
@@ -7,12 +7,14 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
10
14
  User-Agent:
11
- - Faraday v0.15.4
15
+ - Braze Ruby gem v0.1.0
12
16
  Accept-Encoding:
13
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -32,40 +34,40 @@ http_interactions:
32
34
  X-Ratelimit-Limit:
33
35
  - '250000'
34
36
  X-Ratelimit-Remaining:
35
- - '249995'
37
+ - '249997'
36
38
  X-Ratelimit-Reset:
37
- - '1553594400'
39
+ - '1554469200'
38
40
  X-Request-Id:
39
- - 5dc096d8-4a70-4bf7-9ec6-b824f8fb67cc
41
+ - c558e8fa-6297-4781-ae01-e3578c6cf5cc
40
42
  X-Runtime:
41
- - '0.094331'
43
+ - '0.036732'
42
44
  Accept-Ranges:
43
45
  - bytes
44
46
  - bytes
45
47
  Age:
46
48
  - '0'
47
49
  - '0'
48
- Content-Length:
49
- - '58'
50
+ Transfer-Encoding:
51
+ - chunked
50
52
  Date:
51
- - Tue, 26 Mar 2019 09:53:46 GMT
53
+ - Fri, 05 Apr 2019 12:42:30 GMT
52
54
  Via:
53
55
  - 1.1 varnish
54
56
  Connection:
55
57
  - keep-alive
56
58
  X-Served-By:
57
- - cache-ams21041-AMS
59
+ - cache-ams21022-AMS
58
60
  X-Cache:
59
61
  - MISS
60
62
  X-Cache-Hits:
61
63
  - '0'
62
64
  X-Timer:
63
- - S1553594027.657238,VS0,VE105
65
+ - S1554468150.427045,VS0,VE47
64
66
  Vary:
65
67
  - Accept-Encoding
66
68
  body:
67
69
  encoding: ASCII-8BIT
68
70
  string: '{"emails":[],"message":"success"}'
69
71
  http_version:
70
- recorded_at: Tue, 26 Mar 2019 09:53:46 GMT
72
+ recorded_at: Fri, 05 Apr 2019 12:42:30 GMT
71
73
  recorded_with: VCR 4.0.0
@@ -7,12 +7,14 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
10
14
  User-Agent:
11
- - Faraday v0.15.4
15
+ - Braze Ruby gem v0.1.0
12
16
  Accept-Encoding:
13
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -32,40 +34,40 @@ http_interactions:
32
34
  X-Ratelimit-Limit:
33
35
  - '250000'
34
36
  X-Ratelimit-Remaining:
35
- - '249996'
37
+ - '249995'
36
38
  X-Ratelimit-Reset:
37
- - '1553594400'
39
+ - '1554469200'
38
40
  X-Request-Id:
39
- - c3dec26e-ab23-4812-ad5d-0f817df5804d
41
+ - 789be9aa-f170-4720-8e99-69225027766a
40
42
  X-Runtime:
41
- - '0.112126'
43
+ - '0.090793'
42
44
  Accept-Ranges:
43
45
  - bytes
44
46
  - bytes
45
47
  Age:
46
48
  - '0'
47
49
  - '0'
48
- Content-Length:
49
- - '58'
50
+ Transfer-Encoding:
51
+ - chunked
50
52
  Date:
51
- - Tue, 26 Mar 2019 09:49:52 GMT
53
+ - Fri, 05 Apr 2019 12:44:12 GMT
52
54
  Via:
53
55
  - 1.1 varnish
54
56
  Connection:
55
57
  - keep-alive
56
58
  X-Served-By:
57
- - cache-ams21023-AMS
59
+ - cache-ams21050-AMS
58
60
  X-Cache:
59
61
  - MISS
60
62
  X-Cache-Hits:
61
63
  - '0'
62
64
  X-Timer:
63
- - S1553593792.986450,VS0,VE124
65
+ - S1554468252.044685,VS0,VE101
64
66
  Vary:
65
67
  - Accept-Encoding
66
68
  body:
67
69
  encoding: ASCII-8BIT
68
70
  string: '{"emails":[],"message":"success"}'
69
71
  http_version:
70
- recorded_at: Tue, 26 Mar 2019 09:49:52 GMT
72
+ recorded_at: Fri, 05 Apr 2019 12:44:12 GMT
71
73
  recorded_with: VCR 4.0.0
@@ -7,12 +7,14 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
10
14
  User-Agent:
11
- - Faraday v0.15.4
15
+ - Braze Ruby gem v0.1.0
12
16
  Accept-Encoding:
13
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -32,35 +34,35 @@ http_interactions:
32
34
  X-Ratelimit-Limit:
33
35
  - '250000'
34
36
  X-Ratelimit-Remaining:
35
- - '249997'
37
+ - '249996'
36
38
  X-Ratelimit-Reset:
37
- - '1553594400'
39
+ - '1554469200'
38
40
  X-Request-Id:
39
- - 40b96604-9ef6-4a50-a322-e0ddb27b9d57
41
+ - fa9392d1-098a-406c-9957-9f8f504b3263
40
42
  X-Runtime:
41
- - '0.221463'
43
+ - '0.118162'
42
44
  Accept-Ranges:
43
45
  - bytes
44
46
  - bytes
45
47
  Age:
46
48
  - '0'
47
49
  - '0'
48
- Content-Length:
49
- - '128'
50
+ Transfer-Encoding:
51
+ - chunked
50
52
  Date:
51
- - Tue, 26 Mar 2019 09:48:45 GMT
53
+ - Fri, 05 Apr 2019 12:44:11 GMT
52
54
  Via:
53
55
  - 1.1 varnish
54
56
  Connection:
55
57
  - keep-alive
56
58
  X-Served-By:
57
- - cache-ams21030-AMS
59
+ - cache-ams21026-AMS
58
60
  X-Cache:
59
61
  - MISS
60
62
  X-Cache-Hits:
61
63
  - '0'
62
64
  X-Timer:
63
- - S1553593725.060211,VS0,VE233
65
+ - S1554468252.696233,VS0,VE128
64
66
  Vary:
65
67
  - Accept-Encoding
66
68
  body:
@@ -68,5 +70,5 @@ http_interactions:
68
70
  string: '{"emails":[{"email":"wojtek@test.com","unsubscribed_at":"2019-03-21
69
71
  16:31:31 +0000"}],"message":"success"}'
70
72
  http_version:
71
- recorded_at: Tue, 26 Mar 2019 09:48:45 GMT
73
+ recorded_at: Fri, 05 Apr 2019 12:44:11 GMT
72
74
  recorded_with: VCR 4.0.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braze_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Nussbaum
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-04-04 00:00:00.000000000 Z
13
+ date: 2019-04-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -26,20 +26,6 @@ dependencies:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
- - !ruby/object:Gem::Dependency
30
- name: faraday_middleware
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
29
  - !ruby/object:Gem::Dependency
44
30
  name: bundler
45
31
  requirement: !ruby/object:Gem::Requirement
@@ -240,7 +226,9 @@ files:
240
226
  homepage: https://www.braze.com/
241
227
  licenses:
242
228
  - MIT
243
- metadata: {}
229
+ metadata:
230
+ homepage_uri: https://www.braze.com/
231
+ source_code_uri: https://github.com/jboltz88/braze_ruby
244
232
  post_install_message:
245
233
  rdoc_options: []
246
234
  require_paths:
@@ -249,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
237
  requirements:
250
238
  - - ">="
251
239
  - !ruby/object:Gem::Version
252
- version: '0'
240
+ version: '2.0'
253
241
  required_rubygems_version: !ruby/object:Gem::Requirement
254
242
  requirements:
255
243
  - - ">="