tokyo_api 1.6.0 → 1.7.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: 608376ec5c22df615936ab9c5603877f983e3f1c36c93071f3e4e4195bc6012e
4
- data.tar.gz: 48218037c0aa31d24ca5f708311677387172422adc63a1ee5a0f190b3f92bfd2
3
+ metadata.gz: 1632d0b0d73603bbf7eba85d8343f91cb8ee95926cf4b1e9e82dcd7e8e2674f7
4
+ data.tar.gz: 96e8a638a06c798c45e54b40e2018a1a0c5652614363c9f094e95c08cbdddc18
5
5
  SHA512:
6
- metadata.gz: 5baf06d1f979d9efa535600046b02f384cc53ce3dc794be57e1e799a4cb1a9744b7202725656905940438b0a8081951f5545b9e46f463fa90f0c9ecf870d8a0b
7
- data.tar.gz: 585fb0e20ce10d6aec74c764a8b43716dabed99e6c32605f8789837840e3ba80a0ae828dd5ed104fb604f2314e1c405242389bfcffe83b1467cba761b15256c3
6
+ metadata.gz: e161f064e5dc728c24bafd7e4062eaef534ce63f2b278ba3cde492e8e5688156d5667f24fe858ded83fff39f21487085bbd15acc2ae73c52831bcafa6cdd1c38
7
+ data.tar.gz: 13c6dc24f97b53163e12e8f8e134a7e7c1e709d3847a6edfec9df131cbbd35e6053784482d1e5757b88bf5fdd98cc29f4ce1177e4f3c001dc097b3573fee113e
@@ -0,0 +1,14 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
10
+ with:
11
+ ruby-version: 2.7
12
+ bundler-cache: true
13
+ - run: bundle install
14
+ - run: bundle exec rspec
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 3.0.3
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # tokyo_api
1
+ # tokyo\_api
2
2
 
3
3
  A ruby gem for communicating with ControlShift's Tokyo API.
4
4
 
5
- [![Build Status](https://travis-ci.org/controlshift/tokyo_api.svg)](https://travis-ci.org/controlshift/tokyo_api)
5
+ [![CI Status](https://github.com/controlshift/tokyo_api/actions/workflows/ci.yml/badge.svg)](https://github.com/controlshift/tokyo_api/actions/workflows/ci.yml)
6
6
 
7
7
  ## Usage
8
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.0
1
+ 1.7.0
@@ -10,18 +10,15 @@ module TokyoApi
10
10
  client.get_request("#{normalized_base_path}full_user/#{url_escape(id)}").body
11
11
  end
12
12
 
13
- def tokyo_identity_user_path(id, with_subscription_status: false, required_fields: nil, opt_in_public_ids: nil, minimum_consent_level: nil, encrypted: nil)
13
+ def tokyo_identity_user_path(id, required_fields: nil, opt_in_public_ids: nil, minimum_consent_level: nil, encrypted: nil)
14
14
  path = String.new("/#{normalized_base_path}user/#{url_escape(id)}")
15
15
 
16
16
  params = []
17
17
  params << required_fields_param(required_fields) unless required_fields.nil?
18
18
 
19
- if with_subscription_status
20
- params << 'with_subscription_status=true'
21
- additional_subscription_parameters = path_for_subscription_status_params(opt_in_public_ids,
22
- minimum_consent_level, encrypted)
23
- params << additional_subscription_parameters if additional_subscription_parameters.present?
24
- end
19
+ additional_subscription_parameters = path_for_subscription_status_params(opt_in_public_ids,
20
+ minimum_consent_level, encrypted)
21
+ params << additional_subscription_parameters if additional_subscription_parameters.present?
25
22
 
26
23
  path << "?#{params.join('&')}" if params.any?
27
24
 
@@ -60,49 +60,20 @@ describe TokyoApi::Identity do
60
60
  end
61
61
  end
62
62
 
63
- context 'with_subscription_status and associated arguments' do
64
- it 'should not include query string parameter if argument is missing' do
65
- expect(subject.identity.tokyo_identity_user_path('123abc456')).not_to match(/.+with_subscription_status=.+/)
66
- end
67
-
68
- it 'should not include query string parameter if argument is false' do
69
- expect(subject.identity.tokyo_identity_user_path('123abc456',
70
- with_subscription_status: false)).not_to match(/.+with_subscription_status=.+/)
71
- end
72
-
73
- it 'should not include opt_in_public_ids and minimum_consent_level if with_subscription_status is false' do
74
- tokyo_path = subject.identity.tokyo_identity_user_path('123abc456',
75
- with_subscription_status: false,
76
- opt_in_public_ids: ['policy-1.5'],
77
- minimum_consent_level: 'explicit')
78
-
79
- expect(tokyo_path).not_to match(/.+opt_in_public_ids=.+/)
80
- expect(tokyo_path).not_to match(/.+minimum_consent_level=.+/)
81
- end
63
+ it 'should include encrypted parameter if argument is true' do
64
+ expect(subject.identity.tokyo_identity_user_path('123abc456', encrypted: true)).to match(/.+encrypted=.+/)
65
+ end
82
66
 
83
- it 'should include query string parameter if argument is true' do
84
- expect(subject.identity.tokyo_identity_user_path('123abc456',
85
- with_subscription_status: true)).to match(/.+with_subscription_status=.+/)
86
- end
67
+ it 'should include opt_in_public_ids and minimum_consent_level' do
68
+ tokyo_path = subject.identity.tokyo_identity_user_path('123abc456',
69
+ required_fields: %i[first_name last_name email
70
+ postal phone],
71
+ opt_in_public_ids: ['policy-1.5'],
72
+ minimum_consent_level: 'explicit')
87
73
 
88
- it 'should include encrypted parameter if argument is true' do
89
- expect(subject.identity.tokyo_identity_user_path('123abc456', with_subscription_status: true,
90
- encrypted: true)).to match(/.+encrypted=.+/)
91
- end
92
-
93
- it 'should include opt_in_public_ids and minimum_consent_level if with_subscription_status is true' do
94
- tokyo_path = subject.identity.tokyo_identity_user_path('123abc456',
95
- required_fields: %i[first_name last_name email
96
- postal phone],
97
- with_subscription_status: true,
98
- opt_in_public_ids: ['policy-1.5'],
99
- minimum_consent_level: 'explicit')
100
-
101
- expect(tokyo_path).to match(/.+with_subscription_status=true.*/)
102
- expect(tokyo_path).to match(/.+opt_in_public_ids=.+/)
103
- expect(tokyo_path).to match(/.+minimum_consent_level=.+/)
104
- expect { URI.parse(tokyo_path) }.not_to raise_error
105
- end
74
+ expect(tokyo_path).to match(/.+opt_in_public_ids=.+/)
75
+ expect(tokyo_path).to match(/.+minimum_consent_level=.+/)
76
+ expect { URI.parse(tokyo_path) }.not_to raise_error
106
77
  end
107
78
  end
108
79
 
data/tokyo_api.gemspec CHANGED
@@ -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.6.0 ruby lib
5
+ # stub: tokyo_api 1.7.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "tokyo_api".freeze
9
- s.version = "1.6.0"
9
+ s.version = "1.7.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 = "2021-03-24"
14
+ s.date = "2022-02-22"
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 = [
@@ -20,10 +20,10 @@ Gem::Specification.new do |s|
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
+ ".github/workflows/ci.yml",
23
24
  ".rspec",
24
25
  ".ruby-gemset",
25
26
  ".ruby-version",
26
- ".travis.yml",
27
27
  "Gemfile",
28
28
  "LICENSE.txt",
29
29
  "README.md",
@@ -55,29 +55,21 @@ Gem::Specification.new do |s|
55
55
  ]
56
56
  s.homepage = "http://github.com/controlshift/tokyo_api".freeze
57
57
  s.licenses = ["MIT".freeze]
58
- s.rubygems_version = "3.0.8".freeze
58
+ s.rubygems_version = "3.2.32".freeze
59
59
  s.summary = "Ruby API Wrapper for Tokyo CRM service".freeze
60
60
 
61
61
  if s.respond_to? :specification_version then
62
62
  s.specification_version = 4
63
+ end
63
64
 
64
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
65
- s.add_runtime_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
66
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
67
- s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
68
- s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
69
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
70
- s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
71
- s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
72
- else
73
- s.add_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
74
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
75
- s.add_dependency(%q<byebug>.freeze, [">= 0"])
76
- s.add_dependency(%q<juwelier>.freeze, [">= 0"])
77
- s.add_dependency(%q<rspec>.freeze, [">= 0"])
78
- s.add_dependency(%q<rubocop>.freeze, [">= 0"])
79
- s.add_dependency(%q<webmock>.freeze, [">= 0"])
80
- end
65
+ if s.respond_to? :add_runtime_dependency then
66
+ s.add_runtime_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
67
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
68
+ s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
69
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
70
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
71
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
72
+ s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
81
73
  else
82
74
  s.add_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
83
75
  s.add_dependency(%q<bundler>.freeze, [">= 0"])
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.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-24 00:00:00.000000000 Z
11
+ date: 2022-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vertebrae
@@ -117,10 +117,10 @@ extra_rdoc_files:
117
117
  - README.md
118
118
  files:
119
119
  - ".document"
120
+ - ".github/workflows/ci.yml"
120
121
  - ".rspec"
121
122
  - ".ruby-gemset"
122
123
  - ".ruby-version"
123
- - ".travis.yml"
124
124
  - Gemfile
125
125
  - LICENSE.txt
126
126
  - README.md
@@ -153,7 +153,7 @@ homepage: http://github.com/controlshift/tokyo_api
153
153
  licenses:
154
154
  - MIT
155
155
  metadata: {}
156
- post_install_message:
156
+ post_install_message:
157
157
  rdoc_options: []
158
158
  require_paths:
159
159
  - lib
@@ -168,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  requirements: []
171
- rubygems_version: 3.0.8
172
- signing_key:
171
+ rubygems_version: 3.2.32
172
+ signing_key:
173
173
  specification_version: 4
174
174
  summary: Ruby API Wrapper for Tokyo CRM service
175
175
  test_files: []
data/.travis.yml DELETED
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.3.3"