workosv2 2.15.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 +7 -0
- data/.github/CODEOWNERS +5 -0
- data/.github/pull_request_template.md +11 -0
- data/.github/renovate.json +5 -0
- data/.gitignore +49 -0
- data/.rspec +1 -0
- data/.rubocop.yml +24 -0
- data/.ruby-version +1 -0
- data/.semaphore/rubygems.yml +24 -0
- data/.semaphore/semaphore.yml +51 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +126 -0
- data/Gemfile.lock.old +127 -0
- data/LICENSE +21 -0
- data/README.md +53 -0
- data/bin/build +3 -0
- data/bin/console +3 -0
- data/bin/docs +5 -0
- data/bin/publish +3 -0
- data/bin/tapioca +29 -0
- data/codecov.yml +12 -0
- data/docs/WorkOS/APIError.html +160 -0
- data/docs/WorkOS/AuditLog.html +235 -0
- data/docs/WorkOS/AuditTrail.html +235 -0
- data/docs/WorkOS/AuthenticationError.html +160 -0
- data/docs/WorkOS/Base.html +287 -0
- data/docs/WorkOS/Client.html +504 -0
- data/docs/WorkOS/InvalidRequestError.html +160 -0
- data/docs/WorkOS/Profile.html +788 -0
- data/docs/WorkOS/RequestError.html +135 -0
- data/docs/WorkOS/SSO.html +691 -0
- data/docs/WorkOS/Types/ProfileStruct.html +135 -0
- data/docs/WorkOS/Types/Provider.html +135 -0
- data/docs/WorkOS/Types.html +128 -0
- data/docs/WorkOS/WorkOSError.html +447 -0
- data/docs/WorkOS.html +324 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +252 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +250 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +267 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/workosv2/audit_log_export.rb +55 -0
- data/lib/workosv2/audit_logs.rb +114 -0
- data/lib/workosv2/audit_trail.rb +111 -0
- data/lib/workosv2/challenge.rb +55 -0
- data/lib/workosv2/client.rb +186 -0
- data/lib/workosv2/configuration.rb +17 -0
- data/lib/workosv2/connection.rb +66 -0
- data/lib/workosv2/deprecated_hash_wrapper.rb +76 -0
- data/lib/workosv2/directory.rb +65 -0
- data/lib/workosv2/directory_group.rb +68 -0
- data/lib/workosv2/directory_sync.rb +218 -0
- data/lib/workosv2/directory_user.rb +97 -0
- data/lib/workosv2/errors.rb +81 -0
- data/lib/workosv2/event.rb +51 -0
- data/lib/workosv2/events.rb +52 -0
- data/lib/workosv2/factor.rb +54 -0
- data/lib/workosv2/hash_provider.rb +19 -0
- data/lib/workosv2/mfa.rb +178 -0
- data/lib/workosv2/organization.rb +57 -0
- data/lib/workosv2/organizations.rb +188 -0
- data/lib/workosv2/passwordless.rb +85 -0
- data/lib/workosv2/portal.rb +66 -0
- data/lib/workosv2/profile.rb +76 -0
- data/lib/workosv2/profile_and_token.rb +29 -0
- data/lib/workosv2/sso.rb +297 -0
- data/lib/workosv2/types/audit_log_export_struct.rb +17 -0
- data/lib/workosv2/types/challenge_struct.rb +18 -0
- data/lib/workosv2/types/connection_struct.rb +20 -0
- data/lib/workosv2/types/directory_group_struct.rb +19 -0
- data/lib/workosv2/types/directory_struct.rb +19 -0
- data/lib/workosv2/types/directory_user_struct.rb +26 -0
- data/lib/workosv2/types/event_struct.rb +15 -0
- data/lib/workosv2/types/factor_struct.rb +18 -0
- data/lib/workosv2/types/intent_enum.rb +17 -0
- data/lib/workosv2/types/list_struct.rb +13 -0
- data/lib/workosv2/types/organization_struct.rb +17 -0
- data/lib/workosv2/types/passwordless_session_struct.rb +17 -0
- data/lib/workosv2/types/profile_struct.rb +21 -0
- data/lib/workosv2/types/provider_enum.rb +15 -0
- data/lib/workosv2/types/verify_challenge_struct.rb +13 -0
- data/lib/workosv2/types/webhook_struct.rb +15 -0
- data/lib/workosv2/types.rb +25 -0
- data/lib/workosv2/verify_challenge.rb +39 -0
- data/lib/workosv2/version.rb +6 -0
- data/lib/workosv2/webhook.rb +51 -0
- data/lib/workosv2/webhooks.rb +217 -0
- data/lib/workosv2.rb +79 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/addressable@2.8.0.rbi +290 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
- data/sorbet/rbi/gems/codecov@0.2.12.rbi +55 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +57 -0
- data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +185 -0
- data/sorbet/rbi/gems/docile@1.3.5.rbi +54 -0
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +82 -0
- data/sorbet/rbi/gems/json@2.5.1.rbi +109 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +113 -0
- data/sorbet/rbi/gems/parser@3.0.1.0.rbi +1187 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +8 -0
- data/sorbet/rbi/gems/public_suffix@4.0.6.rbi +146 -0
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +153 -0
- data/sorbet/rbi/gems/rake@13.0.3.rbi +807 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +2118 -0
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +1117 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +709 -0
- data/sorbet/rbi/gems/rspec-core@3.9.3.rbi +2467 -0
- data/sorbet/rbi/gems/rspec-expectations@3.9.4.rbi +1569 -0
- data/sorbet/rbi/gems/rspec-mocks@3.9.1.rbi +1493 -0
- data/sorbet/rbi/gems/rspec-support@3.9.4.rbi +511 -0
- data/sorbet/rbi/gems/rspec@3.9.0.rbi +38 -0
- data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +1881 -0
- data/sorbet/rbi/gems/rubocop@0.93.1.rbi +11497 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +405 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.2.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +1549 -0
- data/sorbet/rbi/gems/tapioca@0.7.3.rbi +1718 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
- data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +22 -0
- data/sorbet/rbi/gems/unparser@0.6.2.rbi +8 -0
- data/sorbet/rbi/gems/vcr@5.0.0.rbi +699 -0
- data/sorbet/rbi/gems/webmock@3.12.2.rbi +662 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +268 -0
- data/sorbet/rbi/gems/yard@0.9.26.rbi +4048 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/spec/lib/workos/audit_logs_spec.rb +151 -0
- data/spec/lib/workos/audit_trail_spec.rb +146 -0
- data/spec/lib/workos/configuration_spec.rb +61 -0
- data/spec/lib/workos/directory_sync_spec.rb +492 -0
- data/spec/lib/workos/directory_user_spec.rb +36 -0
- data/spec/lib/workos/event_spec.rb +88 -0
- data/spec/lib/workos/mfa_spec.rb +281 -0
- data/spec/lib/workos/organizations_spec.rb +257 -0
- data/spec/lib/workos/passwordless_spec.rb +77 -0
- data/spec/lib/workos/portal_spec.rb +87 -0
- data/spec/lib/workos/sso_spec.rb +650 -0
- data/spec/lib/workos/webhooks_spec.rb +236 -0
- data/spec/spec_helper.rb +56 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event.yml +59 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event_custom_idempotency_key.yml +60 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event_invalid.yml +59 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_export.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_export_with_filters.yml +77 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/get_export.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event.yml +65 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event_custom_idempotency_key.yml +67 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event_invalid.yml +68 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_and_payload.yml +131 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_different_payload.yml +134 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/get_events.yml +61 -0
- data/spec/support/fixtures/vcr_cassettes/base/execute_request_unauthenticated.yml +66 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/delete_directory.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_directory_with_invalid_id.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_directory_with_valid_id.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group_with_invalid_id.yml +62 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user_with_invalid_id.yml +62 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_after.yml +87 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_before.yml +89 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_domain.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_limit.yml +85 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_no_options.yml +93 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_search.yml +85 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +186 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +88 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +194 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +186 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +189 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_after.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_event.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_no_options.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_range.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_expired.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_invalid.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_valid_is_false.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_duplicate_idempotency_key_and_different_payload.yml +155 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_duplicate_idempotency_key_and_payload.yml +154 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_idempotency_key.yml +79 -0
- data/spec/support/fixtures/vcr_cassettes/organization/delete.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/delete_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/get.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/organization/get_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/list.yml +87 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/create_session.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml +70 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_after.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_before.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_connection_type.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_domain.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml +89 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/profile.yml +74 -0
- data/spec/support/profile.txt +1 -0
- data/spec/support/shared_examples/client_spec.rb +30 -0
- data/spec/support/webhook_payload.txt +1 -0
- data/workosv2.gemspec +38 -0
- metadata +531 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c7816e3bb7dda18502d25155ef2c5be507b7bf10f131f40c1d9cc451caddaf1a
|
4
|
+
data.tar.gz: 9ec905ed31150ac4790245231f7df687690242419db2e4b1178888f657acb8af
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fc7bb0ea68adcc2a09b19a6e11c7f3c4bf629675a79d9e1c6afae176817bf564317eb428936b0436fe0214fe5e0bd2bec89d96da51790823d4f38afa055acd05
|
7
|
+
data.tar.gz: '0380af19749f48d1fabfe5d560aac45fc879698acdf14e6172b39a1ac237be8dac7ebc66aa5318ffd576a6c22595fea0f87940b7acb8993dcb95d7de01093c8a'
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
## Description
|
2
|
+
|
3
|
+
## Documentation
|
4
|
+
|
5
|
+
Does this require changes to the WorkOS Docs? E.g. the [API Reference](https://workos.com/docs/reference) or code snippets need updates.
|
6
|
+
|
7
|
+
```
|
8
|
+
[ ] Yes
|
9
|
+
```
|
10
|
+
|
11
|
+
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
|
data/.gitignore
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
*.DS_Store
|
4
|
+
/.config
|
5
|
+
/coverage/
|
6
|
+
/InstalledFiles
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/spec/examples.txt
|
10
|
+
/test/tmp/
|
11
|
+
/test/version_tmp/
|
12
|
+
/tmp/
|
13
|
+
|
14
|
+
# Used by dotenv library to load environment variables.
|
15
|
+
# .env
|
16
|
+
|
17
|
+
# Ignore Byebug command history file.
|
18
|
+
.byebug_history
|
19
|
+
|
20
|
+
## Specific to RubyMotion (use of CocoaPods):
|
21
|
+
#
|
22
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
23
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
24
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
25
|
+
#
|
26
|
+
# vendor/Pods/
|
27
|
+
|
28
|
+
## Documentation cache and generated files:
|
29
|
+
/.yardoc/
|
30
|
+
/_yardoc/
|
31
|
+
/doc/
|
32
|
+
/rdoc/
|
33
|
+
|
34
|
+
## Environment normalization:
|
35
|
+
/.bundle/
|
36
|
+
/vendor/bundle
|
37
|
+
/lib/bundler/man/
|
38
|
+
|
39
|
+
# for a library or gem, you might want to ignore these files since the code is
|
40
|
+
# intended to run in multiple environments; otherwise, check them in:
|
41
|
+
# Gemfile.lock
|
42
|
+
# .ruby-version
|
43
|
+
# .ruby-gemset
|
44
|
+
|
45
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
46
|
+
.rvmrc
|
47
|
+
|
48
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
49
|
+
# .rubocop-https?--*
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Layout/DotPosition:
|
2
|
+
EnforcedStyle: trailing
|
3
|
+
Layout/EmptyLineAfterMagicComment:
|
4
|
+
Enabled: false
|
5
|
+
Layout/EmptyLines:
|
6
|
+
Enabled: false
|
7
|
+
Layout/LineLength:
|
8
|
+
IgnoredPatterns:
|
9
|
+
- 'VCR\.use_cassette'
|
10
|
+
- '(\A|\s)/.*?/'
|
11
|
+
Metrics/BlockLength:
|
12
|
+
ExcludedMethods: ['describe', 'context', 'before']
|
13
|
+
Metrics/MethodLength:
|
14
|
+
Max: 30
|
15
|
+
Metrics/ModuleLength:
|
16
|
+
Max: 200
|
17
|
+
Metrics/ParameterLists:
|
18
|
+
Max: 6
|
19
|
+
Style/TrailingCommaInArguments:
|
20
|
+
EnforcedStyleForMultiline: 'consistent_comma'
|
21
|
+
Style/TrailingCommaInHashLiteral:
|
22
|
+
EnforcedStyleForMultiline: 'consistent_comma'
|
23
|
+
AllCops:
|
24
|
+
TargetRubyVersion: 2.5
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.2
|
@@ -0,0 +1,24 @@
|
|
1
|
+
version: v1.0
|
2
|
+
|
3
|
+
name: Rubygems deployment
|
4
|
+
agent:
|
5
|
+
machine:
|
6
|
+
type: e1-standard-2
|
7
|
+
os_image: ubuntu1804
|
8
|
+
|
9
|
+
blocks:
|
10
|
+
- name: Build & Publish 🛠 💎
|
11
|
+
task:
|
12
|
+
secrets:
|
13
|
+
- name: workos-rubygems
|
14
|
+
jobs:
|
15
|
+
- name: Publish to Rubygems
|
16
|
+
commands:
|
17
|
+
- checkout
|
18
|
+
- sem-version ruby 2.6.5
|
19
|
+
- gem update --system
|
20
|
+
- gem install bundler
|
21
|
+
- bundle install
|
22
|
+
- chmod 0600 /home/semaphore/.gem/credentials
|
23
|
+
- bundle exec gem build workos --output=release.gem
|
24
|
+
- bundle exec gem push release.gem
|
@@ -0,0 +1,51 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: Ruby
|
3
|
+
|
4
|
+
agent:
|
5
|
+
machine:
|
6
|
+
type: e1-standard-2
|
7
|
+
os_image: ubuntu1804
|
8
|
+
|
9
|
+
blocks:
|
10
|
+
- name: Run Sorbet 🍦
|
11
|
+
task:
|
12
|
+
jobs:
|
13
|
+
- name: srb tc
|
14
|
+
commands:
|
15
|
+
- checkout
|
16
|
+
- bundle install
|
17
|
+
- bundle exec srb tc
|
18
|
+
|
19
|
+
- name: Run Rubocop 🚔
|
20
|
+
task:
|
21
|
+
jobs:
|
22
|
+
- name: rubocop
|
23
|
+
commands:
|
24
|
+
- checkout
|
25
|
+
- bundle install
|
26
|
+
- bundle exec rubocop
|
27
|
+
|
28
|
+
- name: Run Tests 👩🏽🔬
|
29
|
+
task:
|
30
|
+
secrets:
|
31
|
+
- name: codecov-workos-ruby
|
32
|
+
jobs:
|
33
|
+
- name: Ruby 1.9.3
|
34
|
+
matrix:
|
35
|
+
- env_var: RUBY_VERSION
|
36
|
+
values:
|
37
|
+
- 1.9.3-p551
|
38
|
+
- 2.0.0-p648
|
39
|
+
- 2.3.4
|
40
|
+
- 2.5.7
|
41
|
+
- 2.6.5
|
42
|
+
- 2.7.3
|
43
|
+
- 3.0.2
|
44
|
+
commands:
|
45
|
+
- checkout
|
46
|
+
- sem-version ruby $RUBY_VERSION
|
47
|
+
- bundle install
|
48
|
+
- bundle exec rspec
|
49
|
+
promotions:
|
50
|
+
- name: Deploy workos-rb to rubygems
|
51
|
+
pipeline_file: rubygems.yml
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
workosv2 (2.15.0)
|
5
|
+
sorbet-runtime (~> 0.5)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.8.7)
|
11
|
+
public_suffix (>= 2.0.2, < 7.0)
|
12
|
+
ast (2.4.2)
|
13
|
+
benchmark (0.4.0)
|
14
|
+
bigdecimal (3.1.9)
|
15
|
+
codecov (0.2.12)
|
16
|
+
json
|
17
|
+
simplecov
|
18
|
+
crack (1.0.0)
|
19
|
+
bigdecimal
|
20
|
+
rexml
|
21
|
+
diff-lcs (1.6.0)
|
22
|
+
docile (1.4.1)
|
23
|
+
erubi (1.13.1)
|
24
|
+
hashdiff (1.1.2)
|
25
|
+
json (2.10.1)
|
26
|
+
netrc (0.11.0)
|
27
|
+
parallel (1.26.3)
|
28
|
+
parser (3.3.7.1)
|
29
|
+
ast (~> 2.4.1)
|
30
|
+
racc
|
31
|
+
prism (1.3.0)
|
32
|
+
public_suffix (6.0.1)
|
33
|
+
racc (1.8.1)
|
34
|
+
rainbow (3.1.1)
|
35
|
+
rbi (0.2.4)
|
36
|
+
prism (~> 1.0)
|
37
|
+
sorbet-runtime (>= 0.5.9204)
|
38
|
+
regexp_parser (2.10.0)
|
39
|
+
rexml (3.4.1)
|
40
|
+
rspec (3.9.0)
|
41
|
+
rspec-core (~> 3.9.0)
|
42
|
+
rspec-expectations (~> 3.9.0)
|
43
|
+
rspec-mocks (~> 3.9.0)
|
44
|
+
rspec-core (3.9.3)
|
45
|
+
rspec-support (~> 3.9.3)
|
46
|
+
rspec-expectations (3.9.4)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.9.0)
|
49
|
+
rspec-mocks (3.9.1)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.9.0)
|
52
|
+
rspec-support (3.9.4)
|
53
|
+
rubocop (0.93.1)
|
54
|
+
parallel (~> 1.10)
|
55
|
+
parser (>= 2.7.1.5)
|
56
|
+
rainbow (>= 2.2.2, < 4.0)
|
57
|
+
regexp_parser (>= 1.8)
|
58
|
+
rexml
|
59
|
+
rubocop-ast (>= 0.6.0)
|
60
|
+
ruby-progressbar (~> 1.7)
|
61
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
62
|
+
rubocop-ast (1.38.0)
|
63
|
+
parser (>= 3.3.1.0)
|
64
|
+
ruby-progressbar (1.13.0)
|
65
|
+
simplecov (0.22.0)
|
66
|
+
docile (~> 1.1)
|
67
|
+
simplecov-html (~> 0.11)
|
68
|
+
simplecov_json_formatter (~> 0.1)
|
69
|
+
simplecov-html (0.13.1)
|
70
|
+
simplecov_json_formatter (0.1.4)
|
71
|
+
sorbet (0.5.11851)
|
72
|
+
sorbet-static (= 0.5.11851)
|
73
|
+
sorbet-runtime (0.5.11851)
|
74
|
+
sorbet-static (0.5.11851-aarch64-linux)
|
75
|
+
sorbet-static (0.5.11851-universal-darwin)
|
76
|
+
sorbet-static (0.5.11851-x86_64-linux)
|
77
|
+
sorbet-static-and-runtime (0.5.11851)
|
78
|
+
sorbet (= 0.5.11851)
|
79
|
+
sorbet-runtime (= 0.5.11851)
|
80
|
+
spoom (1.5.4)
|
81
|
+
erubi (>= 1.10.0)
|
82
|
+
prism (>= 0.28.0)
|
83
|
+
rbi (>= 0.2.3)
|
84
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
85
|
+
thor (>= 0.19.2)
|
86
|
+
tapioca (0.16.11)
|
87
|
+
benchmark
|
88
|
+
bundler (>= 2.2.25)
|
89
|
+
netrc (>= 0.11.0)
|
90
|
+
parallel (>= 1.21.0)
|
91
|
+
rbi (~> 0.2)
|
92
|
+
sorbet-static-and-runtime (>= 0.5.11087)
|
93
|
+
spoom (>= 1.2.0)
|
94
|
+
thor (>= 1.2.0)
|
95
|
+
yard-sorbet
|
96
|
+
thor (1.3.2)
|
97
|
+
unicode-display_width (1.8.0)
|
98
|
+
vcr (5.0.0)
|
99
|
+
webmock (3.25.0)
|
100
|
+
addressable (>= 2.8.0)
|
101
|
+
crack (>= 0.3.2)
|
102
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
103
|
+
yard (0.9.37)
|
104
|
+
yard-sorbet (0.9.0)
|
105
|
+
sorbet-runtime
|
106
|
+
yard
|
107
|
+
|
108
|
+
PLATFORMS
|
109
|
+
aarch64-linux
|
110
|
+
universal-darwin
|
111
|
+
x86_64-linux
|
112
|
+
|
113
|
+
DEPENDENCIES
|
114
|
+
bundler (>= 2.0.1)
|
115
|
+
codecov (~> 0.2.8)
|
116
|
+
rspec (~> 3.9.0)
|
117
|
+
rubocop (~> 0.77)
|
118
|
+
sorbet (~> 0.5)
|
119
|
+
tapioca
|
120
|
+
vcr (~> 5.0.0)
|
121
|
+
webmock
|
122
|
+
workosv2!
|
123
|
+
yard
|
124
|
+
|
125
|
+
BUNDLED WITH
|
126
|
+
2.5.20
|
data/Gemfile.lock.old
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
workosv2 (2.15.0)
|
5
|
+
sorbet-runtime (~> 0.5)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.8.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
ast (2.4.2)
|
13
|
+
codecov (0.2.12)
|
14
|
+
json
|
15
|
+
simplecov
|
16
|
+
coderay (1.1.3)
|
17
|
+
crack (0.4.5)
|
18
|
+
rexml
|
19
|
+
diff-lcs (1.4.4)
|
20
|
+
docile (1.3.5)
|
21
|
+
hashdiff (1.0.1)
|
22
|
+
json (2.5.1)
|
23
|
+
method_source (1.0.0)
|
24
|
+
parallel (1.20.1)
|
25
|
+
parser (3.0.1.0)
|
26
|
+
ast (~> 2.4.1)
|
27
|
+
pry (0.14.2)
|
28
|
+
coderay (~> 1.1)
|
29
|
+
method_source (~> 1.0)
|
30
|
+
public_suffix (4.0.6)
|
31
|
+
rainbow (3.0.0)
|
32
|
+
rbi (0.0.16)
|
33
|
+
ast
|
34
|
+
parser (>= 2.6.4.0)
|
35
|
+
sorbet-runtime (>= 0.5.9204)
|
36
|
+
unparser
|
37
|
+
regexp_parser (2.1.1)
|
38
|
+
rexml (3.2.5)
|
39
|
+
rspec (3.9.0)
|
40
|
+
rspec-core (~> 3.9.0)
|
41
|
+
rspec-expectations (~> 3.9.0)
|
42
|
+
rspec-mocks (~> 3.9.0)
|
43
|
+
rspec-core (3.9.3)
|
44
|
+
rspec-support (~> 3.9.3)
|
45
|
+
rspec-expectations (3.9.4)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-mocks (3.9.1)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-support (3.9.4)
|
52
|
+
rubocop (0.93.1)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 2.7.1.5)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8)
|
57
|
+
rexml
|
58
|
+
rubocop-ast (>= 0.6.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
61
|
+
rubocop-ast (1.4.1)
|
62
|
+
parser (>= 2.7.1.5)
|
63
|
+
ruby-progressbar (1.11.0)
|
64
|
+
simplecov (0.21.2)
|
65
|
+
docile (~> 1.1)
|
66
|
+
simplecov-html (~> 0.11)
|
67
|
+
simplecov_json_formatter (~> 0.1)
|
68
|
+
simplecov-html (0.12.3)
|
69
|
+
simplecov_json_formatter (0.1.2)
|
70
|
+
sorbet (0.5.10346)
|
71
|
+
sorbet-static (= 0.5.10346)
|
72
|
+
sorbet-runtime (0.5.10484)
|
73
|
+
sorbet-static (0.5.10346-universal-darwin-14)
|
74
|
+
sorbet-static (0.5.10346-universal-darwin-15)
|
75
|
+
sorbet-static (0.5.10346-universal-darwin-16)
|
76
|
+
sorbet-static (0.5.10346-universal-darwin-17)
|
77
|
+
sorbet-static (0.5.10346-universal-darwin-18)
|
78
|
+
sorbet-static (0.5.10346-universal-darwin-19)
|
79
|
+
sorbet-static (0.5.10346-universal-darwin-20)
|
80
|
+
sorbet-static (0.5.10346-universal-darwin-21)
|
81
|
+
sorbet-static (0.5.10346-universal-darwin-22)
|
82
|
+
sorbet-static (0.5.10346-x86_64-linux)
|
83
|
+
spoom (1.1.15)
|
84
|
+
sorbet (>= 0.5.10187)
|
85
|
+
sorbet-runtime (>= 0.5.9204)
|
86
|
+
thor (>= 0.19.2)
|
87
|
+
tapioca (0.7.3)
|
88
|
+
bundler (>= 1.17.3)
|
89
|
+
pry (>= 0.12.2)
|
90
|
+
rbi (~> 0.0.0, >= 0.0.14)
|
91
|
+
sorbet-runtime (>= 0.5.9204)
|
92
|
+
sorbet-static (>= 0.5.9204)
|
93
|
+
spoom (~> 1.1.0, >= 1.1.11)
|
94
|
+
thor (>= 1.2.0)
|
95
|
+
yard-sorbet
|
96
|
+
thor (1.2.1)
|
97
|
+
unicode-display_width (1.7.0)
|
98
|
+
unparser (0.6.2)
|
99
|
+
diff-lcs (~> 1.3)
|
100
|
+
parser (>= 3.0.0)
|
101
|
+
vcr (5.0.0)
|
102
|
+
webmock (3.12.2)
|
103
|
+
addressable (>= 2.3.6)
|
104
|
+
crack (>= 0.3.2)
|
105
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
106
|
+
yard (0.9.26)
|
107
|
+
yard-sorbet (0.8.0)
|
108
|
+
sorbet-runtime (>= 0.5)
|
109
|
+
yard (>= 0.9)
|
110
|
+
|
111
|
+
PLATFORMS
|
112
|
+
ruby
|
113
|
+
|
114
|
+
DEPENDENCIES
|
115
|
+
bundler (>= 2.0.1)
|
116
|
+
codecov (~> 0.2.8)
|
117
|
+
rspec (~> 3.9.0)
|
118
|
+
rubocop (~> 0.77)
|
119
|
+
sorbet (~> 0.5)
|
120
|
+
tapioca
|
121
|
+
vcr (~> 5.0.0)
|
122
|
+
webmock
|
123
|
+
workosv2!
|
124
|
+
yard
|
125
|
+
|
126
|
+
BUNDLED WITH
|
127
|
+
2.2.33
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 WorkOS
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# WorkOS Ruby Library
|
2
|
+
|
3
|
+
The WorkOS library for Ruby provides convenient access to the WorkOS API from applications written in Ruby.
|
4
|
+
|
5
|
+
## Documentation
|
6
|
+
|
7
|
+
See the [API Reference](https://workos.com/docs/reference/client-libraries) for Ruby usage examples.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install the package with:
|
12
|
+
|
13
|
+
```
|
14
|
+
gem install workos
|
15
|
+
```
|
16
|
+
|
17
|
+
If you're using Bundler to manage your application's gems, add the WorkOS gem to your Gemfile:
|
18
|
+
|
19
|
+
```
|
20
|
+
source 'https://rubygems.org'
|
21
|
+
|
22
|
+
gem 'workos'
|
23
|
+
```
|
24
|
+
|
25
|
+
## Configuration
|
26
|
+
|
27
|
+
To use the library you must provide an API key, located in the WorkOS dashboard, as an environment variable `WORKOS_API_KEY`:
|
28
|
+
|
29
|
+
```sh
|
30
|
+
$ WORKOS_API_KEY=[your api key] ruby app.rb
|
31
|
+
```
|
32
|
+
|
33
|
+
Or, you may set the key yourself, such as in an initializer in your application load path:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
# /config/initializers/workos.rb
|
37
|
+
|
38
|
+
WorkOS.configure do |config|
|
39
|
+
config.key = '[your api key]'
|
40
|
+
config.timeout = 120
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
## SDK Versioning
|
45
|
+
|
46
|
+
For our SDKs WorkOS follows a Semantic Versioning ([SemVer](https://semver.org/)) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.
|
47
|
+
|
48
|
+
## More Information
|
49
|
+
|
50
|
+
* [Single Sign-On Guide](https://workos.com/docs/sso/guide)
|
51
|
+
* [Directory Sync Guide](https://workos.com/docs/directory-sync/guide)
|
52
|
+
* [Admin Portal Guide](https://workos.com/docs/admin-portal/guide)
|
53
|
+
* [Magic Link Guide](https://workos.com/docs/magic-link/guide)
|
data/bin/build
ADDED
data/bin/console
ADDED
data/bin/docs
ADDED
data/bin/publish
ADDED
data/bin/tapioca
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'tapioca' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath,)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path('bundle', __dir__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require 'rubygems'
|
27
|
+
require 'bundler/setup'
|
28
|
+
|
29
|
+
load Gem.bin_path('tapioca', 'tapioca')
|