workos 0.2.2 → 0.3.3

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/.ruby-version +1 -1
  4. data/.semaphore/semaphore.yml +13 -6
  5. data/Gemfile.lock +6 -6
  6. data/README.md +1 -1
  7. data/lib/workos.rb +2 -0
  8. data/lib/workos/audit_trail.rb +0 -16
  9. data/lib/workos/client.rb +43 -4
  10. data/lib/workos/connection.rb +48 -0
  11. data/lib/workos/directory_sync.rb +128 -0
  12. data/lib/workos/profile.rb +6 -7
  13. data/lib/workos/sso.rb +48 -35
  14. data/lib/workos/types.rb +2 -2
  15. data/lib/workos/types/connection_struct.rb +15 -0
  16. data/lib/workos/types/profile_struct.rb +2 -3
  17. data/lib/workos/types/provider_enum.rb +0 -1
  18. data/lib/workos/version.rb +1 -1
  19. data/sorbet/rbi/hidden-definitions/errors.txt +1416 -321
  20. data/sorbet/rbi/hidden-definitions/hidden.rbi +2490 -597
  21. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +36 -14
  22. data/sorbet/rbi/todo.rbi +1 -6
  23. data/spec/lib/workos/directory_sync_spec.rb +139 -0
  24. data/spec/lib/workos/sso_spec.rb +50 -4
  25. data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +62 -0
  26. data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group_with_invalid_id.yml +62 -0
  27. data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +62 -0
  28. data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user_with_invalid_id.yml +62 -0
  29. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories.yml +62 -0
  30. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml +63 -0
  31. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups.yml +64 -0
  32. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups_with_directory_param.yml +62 -0
  33. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users.yml +64 -0
  34. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users_with_directory_param.yml +62 -0
  35. data/spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml +58 -0
  36. data/spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml +63 -0
  37. data/workos.gemspec +14 -11
  38. metadata +35 -5
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/connections
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"source":"invalid"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/2.7.1; x86_64-darwin19; v0.2.2
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Vary:
26
+ - Origin, Accept-Encoding
27
+ Access-Control-Allow-Credentials:
28
+ - 'true'
29
+ X-Dns-Prefetch-Control:
30
+ - 'off'
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ Strict-Transport-Security:
34
+ - max-age=15552000; includeSubDomains
35
+ X-Download-Options:
36
+ - noopen
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ X-Request-Id:
42
+ - ''
43
+ Content-Type:
44
+ - application/json; charset=utf-8
45
+ Content-Length:
46
+ - '23'
47
+ Etag:
48
+ - W/"17-SuRA/yvUWUo8rK6x7dKURLeBo+0"
49
+ Date:
50
+ - Fri, 24 Apr 2020 02:16:27 GMT
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"message":"Not Found"}'
56
+ http_version:
57
+ recorded_at: Fri, 24 Apr 2020 02:16:27 GMT
58
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/connections
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"source":"draft_conn_01E6PK87QP6NQ29RRX0G100YGV"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/2.7.1; x86_64-darwin19; v0.2.2
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - Cowboy
27
+ Connection:
28
+ - keep-alive
29
+ Vary:
30
+ - Origin, Accept-Encoding
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ X-Dns-Prefetch-Control:
34
+ - 'off'
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Strict-Transport-Security:
38
+ - max-age=15552000; includeSubDomains
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Request-Id:
46
+ - 8cd03fab-ca1a-4c0b-9953-1f918849a9de
47
+ Content-Type:
48
+ - application/json; charset=utf-8
49
+ Etag:
50
+ - W/"55a-z00MNCfGmS/7RWJwhsBrAXo09Ls"
51
+ Date:
52
+ - Fri, 24 Apr 2020 17:20:52 GMT
53
+ Transfer-Encoding:
54
+ - chunked
55
+ Via:
56
+ - 1.1 vegur
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"object":"connection","id":"conn_01E4F9T2YWZFD218DN04KVFDSY","status":"unlinked","name":"Foo Corp","connection_type":"GoogleOAuth","oauth_uid":"demo
60
+ client id","oauth_secret":"demo client secret","oauth_redirect_uri":"https://auth.workos.com/sso/oauth/google/gcrSPYSytyQeZKkwKs6Ye4ogM/callback","saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_trust_cert":null,"saml_x509_certs":null,"domains":[{"object":"connection_domain","id":"domain_01E6PK9N3XMD8RHWF7S66380AR","domain":"example.com"}]}'
61
+ http_version:
62
+ recorded_at: Fri, 24 Apr 2020 17:20:52 GMT
63
+ recorded_with: VCR 5.0.0
@@ -5,18 +5,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'workos/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'workos'
9
- spec.version = WorkOS::VERSION
10
- spec.authors = ['WorkOS']
11
- spec.email = ['support@workos.com']
12
- spec.description = 'API client for WorkOS'
13
- spec.summary = 'API client for WorkOS'
14
- spec.homepage = 'https://github.com/workos/workos-ruby'
15
- spec.license = 'MIT'
8
+ spec.name = 'workos'
9
+ spec.version = WorkOS::VERSION
10
+ spec.authors = ['WorkOS']
11
+ spec.email = ['support@workos.com']
12
+ spec.description = 'API client for WorkOS'
13
+ spec.summary = 'API client for WorkOS'
14
+ spec.homepage = 'https://github.com/workos-inc/workos-ruby'
15
+ spec.license = 'MIT'
16
+ spec.metadata = {
17
+ 'documentation_uri' => 'https://docs.workos.com/sdk/ruby',
18
+ }
16
19
 
17
- spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
21
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
23
  spec.require_paths = ['lib']
21
24
 
22
25
  spec.add_dependency 'sorbet-runtime', '~> 0.5'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -210,10 +210,13 @@ files:
210
210
  - lib/workos/audit_trail.rb
211
211
  - lib/workos/base.rb
212
212
  - lib/workos/client.rb
213
+ - lib/workos/connection.rb
214
+ - lib/workos/directory_sync.rb
213
215
  - lib/workos/errors.rb
214
216
  - lib/workos/profile.rb
215
217
  - lib/workos/sso.rb
216
218
  - lib/workos/types.rb
219
+ - lib/workos/types/connection_struct.rb
217
220
  - lib/workos/types/profile_struct.rb
218
221
  - lib/workos/types/provider_enum.rb
219
222
  - lib/workos/version.rb
@@ -228,6 +231,7 @@ files:
228
231
  - sorbet/rbi/todo.rbi
229
232
  - spec/lib/workos/audit_trail_spec.rb
230
233
  - spec/lib/workos/base_spec.rb
234
+ - spec/lib/workos/directory_sync_spec.rb
231
235
  - spec/lib/workos/sso_spec.rb
232
236
  - spec/spec_helper.rb
233
237
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_event.yml
@@ -236,12 +240,25 @@ files:
236
240
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_and_payload.yml
237
241
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_different_payload.yml
238
242
  - spec/support/fixtures/vcr_cassettes/base/execute_request_unauthenticated.yml
243
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml
244
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_group_with_invalid_id.yml
245
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml
246
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_user_with_invalid_id.yml
247
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_directories.yml
248
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml
249
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_groups.yml
250
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_groups_with_directory_param.yml
251
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_users.yml
252
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_users_with_directory_param.yml
253
+ - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
254
+ - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
239
255
  - spec/support/profile.txt
240
256
  - workos.gemspec
241
- homepage: https://github.com/workos/workos-ruby
257
+ homepage: https://github.com/workos-inc/workos-ruby
242
258
  licenses:
243
259
  - MIT
244
- metadata: {}
260
+ metadata:
261
+ documentation_uri: https://docs.workos.com/sdk/ruby
245
262
  post_install_message:
246
263
  rdoc_options: []
247
264
  require_paths:
@@ -257,13 +274,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
274
  - !ruby/object:Gem::Version
258
275
  version: '0'
259
276
  requirements: []
260
- rubygems_version: 3.1.2
277
+ rubygems_version: 3.1.4
261
278
  signing_key:
262
279
  specification_version: 4
263
280
  summary: API client for WorkOS
264
281
  test_files:
265
282
  - spec/lib/workos/audit_trail_spec.rb
266
283
  - spec/lib/workos/base_spec.rb
284
+ - spec/lib/workos/directory_sync_spec.rb
267
285
  - spec/lib/workos/sso_spec.rb
268
286
  - spec/spec_helper.rb
269
287
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_event.yml
@@ -272,4 +290,16 @@ test_files:
272
290
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_and_payload.yml
273
291
  - spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_different_payload.yml
274
292
  - spec/support/fixtures/vcr_cassettes/base/execute_request_unauthenticated.yml
293
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml
294
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_group_with_invalid_id.yml
295
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml
296
+ - spec/support/fixtures/vcr_cassettes/directory_sync/get_user_with_invalid_id.yml
297
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_directories.yml
298
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml
299
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_groups.yml
300
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_groups_with_directory_param.yml
301
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_users.yml
302
+ - spec/support/fixtures/vcr_cassettes/directory_sync/list_users_with_directory_param.yml
303
+ - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
304
+ - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
275
305
  - spec/support/profile.txt