tokyo_api 1.0.4 → 1.1.0

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: ed8e0aec8844fbae2e781a705150e5765f07d77e1188b38dd26126d23ab0bc4b
4
- data.tar.gz: 2abdf3a1994f21b8211798957db80c4d646c749574ab4a72b7b702c91e25c8df
3
+ metadata.gz: bdd1545cc1b4afe1f6eafc3340d94c7ddb37c0cd90e7fe503141379bb9376e53
4
+ data.tar.gz: a9fdad05531bea8f72116ae4acfecf1e63ce175bb746ee174f14dae41f4c8053
5
5
  SHA512:
6
- metadata.gz: a7bd870c694d74083990ee7f2342e4a9f79c8928c966dff1c4529e01c71dd339629a7563f7856d57312dc29c83607b40e514dbff6d82b7291004c49602db10cf
7
- data.tar.gz: '08be5c5193cf90e41487950837763a77bcdb5e1e186f0eddeb74f8a87caf065c478052a4c774d67a46e22caac30993b8426e765b594c6e94f2556ddeb57891bf'
6
+ metadata.gz: af6a4d89de242ddea6be9ea408d8294467cd6188421a777f489032b3b35fdb872e220ba4b319695895fc8a93b3519cf910d2891d17f8e3310e9674d61f5642c1
7
+ data.tar.gz: ae88b3862d4cd5e703f7dcb87c6e2f9a2b9fb96cb7697441a1596fd307054d1ee9439110ffb8792abaab9ad2bf726a182547306a506ad144807cc66c2e34c7c6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.4
1
+ 1.1.0
@@ -17,16 +17,10 @@ module TokyoApi
17
17
  path
18
18
  end
19
19
 
20
- def subscription_status_path(id, opt_in_external_id: nil, opt_in_public_ids: nil, minimum_consent_level: nil)
21
- if opt_in_public_ids.nil? && opt_in_external_id.nil?
22
- raise 'must provide either opt_in_public_ids or opt_in_external_id'
23
- end
20
+ def subscription_status_path(id, opt_in_public_ids: nil, minimum_consent_level: nil)
21
+ raise 'must provide opt_in_public_ids' if opt_in_public_ids.nil?
24
22
 
25
- if opt_in_external_id.present?
26
- path = "/#{normalized_base_path}subscription_status/#{url_escape(id)}?opt_in_external_id=#{url_escape(opt_in_external_id)}"
27
- else
28
- path = "/#{normalized_base_path}subscription_status/#{url_escape(id)}?opt_in_public_ids=#{url_escape(opt_in_public_ids.join(','))}"
29
- end
23
+ path = "/#{normalized_base_path}subscription_status/#{url_escape(id)}?opt_in_public_ids=#{url_escape(opt_in_public_ids.join(','))}"
30
24
 
31
25
  if minimum_consent_level
32
26
  path = "#{path}&minimum_consent_level=#{url_escape(minimum_consent_level)}"
@@ -65,15 +65,9 @@ describe TokyoApi::Identity do
65
65
  expect(subject.identity.subscription_status_path('abc123', opt_in_public_ids: ['policy-1.5', 'policy-1.6'])).to eq expected_path
66
66
  end
67
67
 
68
-
69
- it 'should return correct path for a specific external id' do
70
- expected_path = '/identity/subscription_status/abc123?opt_in_external_id=policy-1.5'
71
- expect(subject.identity.subscription_status_path('abc123', opt_in_external_id: 'policy-1.5')).to eq expected_path
72
- end
73
-
74
68
  it 'should support minimum_consent_level' do
75
- expected_path = '/identity/subscription_status/abc123?opt_in_external_id=policy-1.5&minimum_consent_level=explicit'
76
- expect(subject.identity.subscription_status_path('abc123', opt_in_external_id: 'policy-1.5', minimum_consent_level: 'explicit')).to eq expected_path
69
+ expected_path = '/identity/subscription_status/abc123?opt_in_public_ids=policy-1.5&minimum_consent_level=explicit'
70
+ expect(subject.identity.subscription_status_path('abc123', opt_in_public_ids: ['policy-1.5'], minimum_consent_level: 'explicit')).to eq expected_path
77
71
  end
78
72
  end
79
73
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: tokyo_api 1.0.4 ruby lib
5
+ # stub: tokyo_api 1.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "tokyo_api".freeze
9
- s.version = "1.0.4"
9
+ s.version = "1.1.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Nathan Woodhull".freeze]
14
- s.date = "2018-05-08"
14
+ s.date = "2018-05-14"
15
15
  s.description = "Tokyo is a CRM middleware, this gem helps apps talk to it.".freeze
16
16
  s.email = "nathan@controlshiftlabs.com".freeze
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tokyo_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vertebrae