cybrid_api_organization_ruby 0.123.472 → 0.123.473

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_organization_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +1 -1
  6. data/lib/cybrid_api_organization_ruby/api/subscription_deliveries_organization_api.rb +1 -1
  7. data/lib/cybrid_api_organization_ruby/api/subscription_events_organization_api.rb +1 -1
  8. data/lib/cybrid_api_organization_ruby/api/subscriptions_organization_api.rb +1 -1
  9. data/lib/cybrid_api_organization_ruby/api_client.rb +1 -1
  10. data/lib/cybrid_api_organization_ruby/api_error.rb +1 -1
  11. data/lib/cybrid_api_organization_ruby/configuration.rb +1 -1
  12. data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +1 -1
  13. data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +1 -1
  14. data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +1 -1
  15. data/lib/cybrid_api_organization_ruby/models/post_subscription_delivery_organization_model.rb +1 -1
  16. data/lib/cybrid_api_organization_ruby/models/post_subscription_organization_model.rb +1 -1
  17. data/lib/cybrid_api_organization_ruby/models/subscription_delivery_list_organization_model.rb +1 -1
  18. data/lib/cybrid_api_organization_ruby/models/subscription_delivery_organization_model.rb +1 -1
  19. data/lib/cybrid_api_organization_ruby/models/subscription_environment_organization_model.rb +1 -1
  20. data/lib/cybrid_api_organization_ruby/models/subscription_event_list_organization_model.rb +1 -1
  21. data/lib/cybrid_api_organization_ruby/models/subscription_event_organization_model.rb +1 -1
  22. data/lib/cybrid_api_organization_ruby/models/subscription_list_organization_model.rb +1 -1
  23. data/lib/cybrid_api_organization_ruby/models/subscription_organization_model.rb +1 -1
  24. data/lib/cybrid_api_organization_ruby/models/subscription_state_organization_model.rb +1 -1
  25. data/lib/cybrid_api_organization_ruby/models/subscription_type_organization_model.rb +1 -1
  26. data/lib/cybrid_api_organization_ruby/version.rb +2 -2
  27. data/lib/cybrid_api_organization_ruby.rb +1 -1
  28. data/spec/api/organizations_organization_api_spec.rb +1 -1
  29. data/spec/api/subscription_deliveries_organization_api_spec.rb +1 -1
  30. data/spec/api/subscription_events_organization_api_spec.rb +1 -1
  31. data/spec/api/subscriptions_organization_api_spec.rb +1 -1
  32. data/spec/api_client_spec.rb +1 -1
  33. data/spec/configuration_spec.rb +1 -1
  34. data/spec/models/error_response_organization_model_spec.rb +1 -1
  35. data/spec/models/organization_organization_model_spec.rb +1 -1
  36. data/spec/models/patch_organization_organization_model_spec.rb +1 -1
  37. data/spec/models/post_subscription_delivery_organization_model_spec.rb +1 -1
  38. data/spec/models/post_subscription_organization_model_spec.rb +1 -1
  39. data/spec/models/subscription_delivery_list_organization_model_spec.rb +1 -1
  40. data/spec/models/subscription_delivery_organization_model_spec.rb +1 -1
  41. data/spec/models/subscription_environment_organization_model_spec.rb +1 -1
  42. data/spec/models/subscription_event_list_organization_model_spec.rb +1 -1
  43. data/spec/models/subscription_event_organization_model_spec.rb +1 -1
  44. data/spec/models/subscription_list_organization_model_spec.rb +1 -1
  45. data/spec/models/subscription_organization_model_spec.rb +1 -1
  46. data/spec/models/subscription_state_organization_model_spec.rb +1 -1
  47. data/spec/models/subscription_type_organization_model_spec.rb +1 -1
  48. data/spec/spec_helper.rb +1 -1
  49. data/vendor/bundle/ruby/3.3.0/cache/psych-5.2.5.gem +0 -0
  50. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-12.0.0/gem_make.out +5 -5
  51. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  52. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  53. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.2.4 → psych-5.2.5}/gem_make.out +18 -18
  54. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.5/psych.so +0 -0
  55. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  56. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  57. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_to_ruby.c +10 -0
  58. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/class_loader.rb +1 -0
  59. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/core_ext.rb +11 -4
  60. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/versions.rb +1 -1
  61. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/to_ruby.rb +43 -3
  62. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/yaml_tree.rb +39 -1
  63. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych.rb +31 -1
  64. data/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/lib/psych.so +0 -0
  65. data/vendor/bundle/ruby/3.3.0/specifications/{psych-5.2.4.gemspec → psych-5.2.5.gemspec} +4 -4
  66. metadata +61 -61
  67. data/vendor/bundle/ruby/3.3.0/cache/psych-5.2.4.gem +0 -0
  68. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.4/psych.so +0 -0
  69. data/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/lib/psych.so +0 -0
  70. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.2.4 → psych-5.2.5}/gem.build_complete +0 -0
  71. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.2.4 → psych-5.2.5}/mkmf.log +0 -0
  72. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/CONTRIBUTING.md +0 -0
  73. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/LICENSE +0 -0
  74. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/README.md +0 -0
  75. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/Makefile +0 -0
  76. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/depend +0 -0
  77. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/extconf.rb +0 -0
  78. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych.c +0 -0
  79. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych.h +0 -0
  80. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_emitter.c +0 -0
  81. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_emitter.h +0 -0
  82. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_parser.c +0 -0
  83. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_parser.h +0 -0
  84. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_to_ruby.h +0 -0
  85. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_yaml_tree.c +0 -0
  86. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/ext/psych/psych_yaml_tree.h +0 -0
  87. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/coder.rb +0 -0
  88. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/exception.rb +0 -0
  89. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/handler.rb +0 -0
  90. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/handlers/document_stream.rb +0 -0
  91. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/handlers/recorder.rb +0 -0
  92. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/json/ruby_events.rb +0 -0
  93. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/json/stream.rb +0 -0
  94. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/json/tree_builder.rb +0 -0
  95. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/json/yaml_events.rb +0 -0
  96. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/alias.rb +0 -0
  97. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/document.rb +0 -0
  98. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/mapping.rb +0 -0
  99. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/node.rb +0 -0
  100. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/scalar.rb +0 -0
  101. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/sequence.rb +0 -0
  102. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes/stream.rb +0 -0
  103. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/nodes.rb +0 -0
  104. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/omap.rb +0 -0
  105. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/parser.rb +0 -0
  106. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/scalar_scanner.rb +0 -0
  107. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/set.rb +0 -0
  108. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/stream.rb +0 -0
  109. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/streaming.rb +0 -0
  110. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/syntax_error.rb +0 -0
  111. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/tree_builder.rb +0 -0
  112. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/depth_first.rb +0 -0
  113. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/emitter.rb +0 -0
  114. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/json_tree.rb +0 -0
  115. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors/visitor.rb +0 -0
  116. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/visitors.rb +0 -0
  117. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.2.4 → psych-5.2.5}/lib/psych/y.rb +0 -0
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:pii:read counterparties:write counterparties:execute customers:read customers:pii:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read transfers:write external_bank_accounts:read external_bank_accounts:pii:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:pii:read identity_verifications:write identity_verifications:execute files:read files:pii:read files:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read counterparties:pii:read customers:read customers:pii:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:write transfers:execute external_bank_accounts:read external_bank_accounts:pii:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read identity_verifications:pii:read identity_verifications:execute files:read files:pii:read files:execute' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
5
5
 
6
- The version of the OpenAPI document: v0.123.472
6
+ The version of the OpenAPI document: v0.123.473
7
7
  Contact: support@cybrid.app
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:pii:read counterparties:write counterparties:execute customers:read customers:pii:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read transfers:write external_bank_accounts:read external_bank_accounts:pii:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:pii:read identity_verifications:write identity_verifications:execute files:read files:pii:read files:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read counterparties:pii:read customers:read customers:pii:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:write transfers:execute external_bank_accounts:read external_bank_accounts:pii:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read identity_verifications:pii:read identity_verifications:execute files:read files:pii:read files:execute' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
5
5
 
6
- The version of the OpenAPI document: v0.123.472
6
+ The version of the OpenAPI document: v0.123.473
7
7
  Contact: support@cybrid.app
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0
@@ -3,12 +3,12 @@ current directory: /home/circleci/project/build/public-clients/api-platform-orga
3
3
  creating Makefile
4
4
 
5
5
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug
6
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-1g1j0y sitelibdir\=./.gem.20250509-3398-1g1j0y clean
6
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-lm1rzh sitelibdir\=./.gem.20250509-3312-lm1rzh clean
7
7
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
8
8
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
9
9
 
10
10
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug
11
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-1g1j0y sitelibdir\=./.gem.20250509-3398-1g1j0y
11
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-lm1rzh sitelibdir\=./.gem.20250509-3312-lm1rzh
12
12
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
13
13
  compiling breakpoint.c
14
14
  compiling byebug.c
@@ -39,12 +39,12 @@ linking shared-object byebug/byebug.so
39
39
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
40
40
 
41
41
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug
42
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-1g1j0y sitelibdir\=./.gem.20250509-3398-1g1j0y install
42
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-lm1rzh sitelibdir\=./.gem.20250509-3312-lm1rzh install
43
43
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
44
- /usr/bin/install -c -m 0755 byebug.so ./.gem.20250509-3398-1g1j0y/byebug
44
+ /usr/bin/install -c -m 0755 byebug.so ./.gem.20250509-3312-lm1rzh/byebug
45
45
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
46
46
 
47
47
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug
48
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-1g1j0y sitelibdir\=./.gem.20250509-3398-1g1j0y clean
48
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-lm1rzh sitelibdir\=./.gem.20250509-3312-lm1rzh clean
49
49
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
50
50
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/ext/byebug'
@@ -6,12 +6,12 @@ checking for altzone in time.h with -Werror... no
6
6
  creating Makefile
7
7
 
8
8
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date
9
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-z9ugl3 sitelibdir\=./.gem.20250509-3398-z9ugl3 clean
9
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-favdkr sitelibdir\=./.gem.20250509-3312-favdkr clean
10
10
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
11
11
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
12
12
 
13
13
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date
14
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-z9ugl3 sitelibdir\=./.gem.20250509-3398-z9ugl3
14
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-favdkr sitelibdir\=./.gem.20250509-3312-favdkr
15
15
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
16
16
  compiling date_core.c
17
17
  compiling date_parse.c
@@ -21,12 +21,12 @@ linking shared-object date_core.so
21
21
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
22
22
 
23
23
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date
24
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-z9ugl3 sitelibdir\=./.gem.20250509-3398-z9ugl3 install
24
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-favdkr sitelibdir\=./.gem.20250509-3312-favdkr install
25
25
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
26
- /usr/bin/install -c -m 0755 date_core.so ./.gem.20250509-3398-z9ugl3
26
+ /usr/bin/install -c -m 0755 date_core.so ./.gem.20250509-3312-favdkr
27
27
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
28
28
 
29
29
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date
30
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-z9ugl3 sitelibdir\=./.gem.20250509-3398-z9ugl3 clean
30
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-favdkr sitelibdir\=./.gem.20250509-3312-favdkr clean
31
31
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
32
32
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/ext/date'
@@ -3,12 +3,12 @@ current directory: /home/circleci/project/build/public-clients/api-platform-orga
3
3
  creating Makefile
4
4
 
5
5
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
6
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-fa4bht sitelibdir\=./.gem.20250509-3398-fa4bht clean
6
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-nb1frj sitelibdir\=./.gem.20250509-3312-nb1frj clean
7
7
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
8
8
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
9
9
 
10
10
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
11
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-fa4bht sitelibdir\=./.gem.20250509-3398-fa4bht
11
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-nb1frj sitelibdir\=./.gem.20250509-3312-nb1frj
12
12
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
13
13
  compiling adj_matrix.c
14
14
  adj_matrix.c: In function ‘adj_matrix_default’:
@@ -26,12 +26,12 @@ linking shared-object jaro_winkler/jaro_winkler_ext.so
26
26
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
27
27
 
28
28
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
29
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-fa4bht sitelibdir\=./.gem.20250509-3398-fa4bht install
29
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-nb1frj sitelibdir\=./.gem.20250509-3312-nb1frj install
30
30
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
31
- /usr/bin/install -c -m 0755 jaro_winkler_ext.so ./.gem.20250509-3398-fa4bht/jaro_winkler
31
+ /usr/bin/install -c -m 0755 jaro_winkler_ext.so ./.gem.20250509-3312-nb1frj/jaro_winkler
32
32
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
33
33
 
34
34
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
35
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-fa4bht sitelibdir\=./.gem.20250509-3398-fa4bht clean
35
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-nb1frj sitelibdir\=./.gem.20250509-3312-nb1frj clean
36
36
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
37
37
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler'
@@ -1,39 +1,39 @@
1
- current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych
1
+ current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych
2
2
  /usr/local/bin/ruby extconf.rb
3
3
  checking for pkg-config for yaml-0.1... [" ", "", "-lyaml"]
4
4
  checking for yaml.h... yes
5
5
  checking for yaml_get_version() in -lyaml... yes
6
6
  creating Makefile
7
7
 
8
- current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych
9
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-ibnyes sitelibdir\=./.gem.20250509-3398-ibnyes clean
10
- make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
8
+ current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych
9
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-e5bt36 sitelibdir\=./.gem.20250509-3312-e5bt36 clean
10
+ make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
11
11
  cd libyaml && make clean
12
12
  /bin/sh: 1: cd: can't cd to libyaml
13
13
  make[1]: [Makefile:283: clean-so] Error 2 (ignored)
14
- make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
14
+ make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
15
15
 
16
- current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych
17
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-ibnyes sitelibdir\=./.gem.20250509-3398-ibnyes
18
- make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
16
+ current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych
17
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-e5bt36 sitelibdir\=./.gem.20250509-3312-e5bt36
18
+ make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
19
19
  compiling psych.c
20
20
  compiling psych_emitter.c
21
21
  compiling psych_parser.c
22
22
  compiling psych_to_ruby.c
23
23
  compiling psych_yaml_tree.c
24
24
  linking shared-object psych.so
25
- make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
25
+ make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
26
26
 
27
- current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych
28
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-ibnyes sitelibdir\=./.gem.20250509-3398-ibnyes install
29
- make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
30
- /usr/bin/install -c -m 0755 psych.so ./.gem.20250509-3398-ibnyes
31
- make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
27
+ current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych
28
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-e5bt36 sitelibdir\=./.gem.20250509-3312-e5bt36 install
29
+ make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
30
+ /usr/bin/install -c -m 0755 psych.so ./.gem.20250509-3312-e5bt36
31
+ make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
32
32
 
33
- current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych
34
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-ibnyes sitelibdir\=./.gem.20250509-3398-ibnyes clean
35
- make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
33
+ current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych
34
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-e5bt36 sitelibdir\=./.gem.20250509-3312-e5bt36 clean
35
+ make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
36
36
  cd libyaml && make clean
37
37
  /bin/sh: 1: cd: can't cd to libyaml
38
38
  make[1]: [Makefile:283: clean-so] Error 2 (ignored)
39
- make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.4/ext/psych'
39
+ make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/psych-5.2.5/ext/psych'
@@ -3,24 +3,24 @@ current directory: /home/circleci/project/build/public-clients/api-platform-orga
3
3
  creating Makefile
4
4
 
5
5
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
6
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-9b16te sitelibdir\=./.gem.20250509-3398-9b16te clean
6
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-2c7m2z sitelibdir\=./.gem.20250509-3312-2c7m2z clean
7
7
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
8
8
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
9
9
 
10
10
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
11
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-9b16te sitelibdir\=./.gem.20250509-3398-9b16te
11
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-2c7m2z sitelibdir\=./.gem.20250509-3312-2c7m2z
12
12
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
13
13
  compiling cparse.c
14
14
  linking shared-object racc/cparse.so
15
15
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
16
16
 
17
17
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
18
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-9b16te sitelibdir\=./.gem.20250509-3398-9b16te install
18
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-2c7m2z sitelibdir\=./.gem.20250509-3312-2c7m2z install
19
19
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
20
- /usr/bin/install -c -m 0755 cparse.so ./.gem.20250509-3398-9b16te/racc
20
+ /usr/bin/install -c -m 0755 cparse.so ./.gem.20250509-3312-2c7m2z/racc
21
21
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
22
22
 
23
23
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
24
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-9b16te sitelibdir\=./.gem.20250509-3398-9b16te clean
24
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-2c7m2z sitelibdir\=./.gem.20250509-3312-2c7m2z clean
25
25
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
26
26
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse'
@@ -4,24 +4,24 @@ checking for rb_io_mode_t in ruby/io.h... no
4
4
  creating Makefile
5
5
 
6
6
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio
7
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-b9f0fa sitelibdir\=./.gem.20250509-3398-b9f0fa clean
7
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-7p4eio sitelibdir\=./.gem.20250509-3312-7p4eio clean
8
8
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
9
9
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
10
10
 
11
11
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio
12
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-b9f0fa sitelibdir\=./.gem.20250509-3398-b9f0fa
12
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-7p4eio sitelibdir\=./.gem.20250509-3312-7p4eio
13
13
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
14
14
  compiling stringio.c
15
15
  linking shared-object stringio.so
16
16
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
17
17
 
18
18
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio
19
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-b9f0fa sitelibdir\=./.gem.20250509-3398-b9f0fa install
19
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-7p4eio sitelibdir\=./.gem.20250509-3312-7p4eio install
20
20
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
21
- /usr/bin/install -c -m 0755 stringio.so ./.gem.20250509-3398-b9f0fa
21
+ /usr/bin/install -c -m 0755 stringio.so ./.gem.20250509-3312-7p4eio
22
22
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
23
23
 
24
24
  current directory: /home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio
25
- make DESTDIR\= sitearchdir\=./.gem.20250509-3398-b9f0fa sitelibdir\=./.gem.20250509-3398-b9f0fa clean
25
+ make DESTDIR\= sitearchdir\=./.gem.20250509-3312-7p4eio sitelibdir\=./.gem.20250509-3312-7p4eio clean
26
26
  make[1]: Entering directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
27
27
  make[1]: Leaving directory '/home/circleci/project/build/public-clients/api-platform-organization/ruby/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/ext/stringio'
@@ -24,6 +24,15 @@ static VALUE path2class(VALUE self, VALUE path)
24
24
  return rb_path_to_class(path);
25
25
  }
26
26
 
27
+ static VALUE init_struct(VALUE self, VALUE data, VALUE attrs)
28
+ {
29
+ VALUE args = rb_ary_new2(1);
30
+ rb_ary_push(args, attrs);
31
+ rb_struct_initialize(data, args);
32
+
33
+ return data;
34
+ }
35
+
27
36
  void Init_psych_to_ruby(void)
28
37
  {
29
38
  VALUE psych = rb_define_module("Psych");
@@ -33,6 +42,7 @@ void Init_psych_to_ruby(void)
33
42
  VALUE visitor = rb_define_class_under(visitors, "Visitor", rb_cObject);
34
43
  cPsychVisitorsToRuby = rb_define_class_under(visitors, "ToRuby", visitor);
35
44
 
45
+ rb_define_private_method(cPsychVisitorsToRuby, "init_struct", init_struct, 2);
36
46
  rb_define_private_method(cPsychVisitorsToRuby, "build_exception", build_exception, 2);
37
47
  rb_define_private_method(class_loader, "path2class", path2class, 1);
38
48
  }
@@ -6,6 +6,7 @@ module Psych
6
6
  class ClassLoader # :nodoc:
7
7
  BIG_DECIMAL = 'BigDecimal'
8
8
  COMPLEX = 'Complex'
9
+ DATA = 'Data' unless RUBY_VERSION < "3.2"
9
10
  DATE = 'Date'
10
11
  DATE_TIME = 'DateTime'
11
12
  EXCEPTION = 'Exception'
@@ -18,12 +18,19 @@ if defined?(::IRB)
18
18
  require_relative 'y'
19
19
  end
20
20
 
21
-
22
- # TODO: how best to check for builtin Set?
23
- if defined?(::Set) && Object.const_source_location(:Set) == ["ruby", 0]
21
+ # Up to Ruby 3.4, Set was a regular object and was dumped as such
22
+ # by Pysch.
23
+ # Starting from Ruby 3.5 it's a core class written in C, so we have to implement
24
+ # #encode_with / #init_with to preserve backward compatibility.
25
+ if defined?(::Set) && Set.new.instance_variables.empty?
24
26
  class Set
25
27
  def encode_with(coder)
26
- coder["hash"] = to_h
28
+ hash = {}
29
+ each do |m|
30
+ hash[m] = true
31
+ end
32
+ coder["hash"] = hash
33
+ coder
27
34
  end
28
35
 
29
36
  def init_with(coder)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Psych
4
4
  # The version of Psych you are using
5
- VERSION = '5.2.4'
5
+ VERSION = '5.2.5'
6
6
 
7
7
  if RUBY_ENGINE == 'jruby'
8
8
  DEFAULT_SNAKEYAML_VERSION = '2.9'.freeze
@@ -96,11 +96,11 @@ module Psych
96
96
  Float(@ss.tokenize(o.value))
97
97
  when "!ruby/regexp"
98
98
  klass = class_loader.regexp
99
- o.value =~ /^\/(.*)\/([mixn]*)$/m
100
- source = $1
99
+ matches = /^\/(?<string>.*)\/(?<options>[mixn]*)$/m.match(o.value)
100
+ source = matches[:string].gsub('\/', '/')
101
101
  options = 0
102
102
  lang = nil
103
- $2&.each_char do |option|
103
+ matches[:options].each_char do |option|
104
104
  case option
105
105
  when 'x' then options |= Regexp::EXTENDED
106
106
  when 'i' then options |= Regexp::IGNORECASE
@@ -197,6 +197,32 @@ module Psych
197
197
  s
198
198
  end
199
199
 
200
+ when /^!ruby\/data(-with-ivars)?(?::(.*))?$/
201
+ data = register(o, resolve_class($2).allocate) if $2
202
+ members = {}
203
+
204
+ if $1 # data-with-ivars
205
+ ivars = {}
206
+ o.children.each_slice(2) do |type, vars|
207
+ case accept(type)
208
+ when 'members'
209
+ revive_data_members(members, vars)
210
+ data ||= allocate_anon_data(o, members)
211
+ when 'ivars'
212
+ revive_hash(ivars, vars)
213
+ end
214
+ end
215
+ ivars.each do |ivar, v|
216
+ data.instance_variable_set ivar, v
217
+ end
218
+ else
219
+ revive_data_members(members, o)
220
+ end
221
+ data ||= allocate_anon_data(o, members)
222
+ init_struct(data, **members)
223
+ data.freeze
224
+ data
225
+
200
226
  when /^!ruby\/object:?(.*)?$/
201
227
  name = $1 || 'Object'
202
228
 
@@ -340,6 +366,20 @@ module Psych
340
366
  list
341
367
  end
342
368
 
369
+ def allocate_anon_data node, members
370
+ klass = class_loader.data.define(*members.keys)
371
+ register(node, klass.allocate)
372
+ end
373
+
374
+ def revive_data_members hash, o
375
+ o.children.each_slice(2) do |k,v|
376
+ name = accept(k)
377
+ value = accept(v)
378
+ hash[class_loader.symbolize(name)] = value
379
+ end
380
+ hash
381
+ end
382
+
343
383
  def revive_hash hash, o, tagged= false
344
384
  o.children.each_slice(2) { |k,v|
345
385
  key = accept(k)
@@ -73,7 +73,7 @@ module Psych
73
73
 
74
74
  method = respond_to?(method) ? method : h[klass.superclass]
75
75
 
76
- raise(TypeError, "Can't dump #{target.class}") unless method
76
+ raise(TypeError, "can't dump #{klass.name}") unless method
77
77
 
78
78
  h[klass] = method
79
79
  end.compare_by_identity
@@ -162,6 +162,44 @@ module Psych
162
162
 
163
163
  alias :visit_Delegator :visit_Object
164
164
 
165
+ def visit_Data o
166
+ ivars = o.instance_variables
167
+ if ivars.empty?
168
+ tag = ['!ruby/data', o.class.name].compact.join(':')
169
+ register o, @emitter.start_mapping(nil, tag, false, Nodes::Mapping::BLOCK)
170
+ o.members.each do |member|
171
+ @emitter.scalar member.to_s, nil, nil, true, false, Nodes::Scalar::ANY
172
+ accept o.send member
173
+ end
174
+ @emitter.end_mapping
175
+
176
+ else
177
+ tag = ['!ruby/data-with-ivars', o.class.name].compact.join(':')
178
+ node = @emitter.start_mapping(nil, tag, false, Psych::Nodes::Mapping::BLOCK)
179
+ register(o, node)
180
+
181
+ # Dump the members
182
+ accept 'members'
183
+ @emitter.start_mapping nil, nil, true, Nodes::Mapping::BLOCK
184
+ o.members.each do |member|
185
+ @emitter.scalar member.to_s, nil, nil, true, false, Nodes::Scalar::ANY
186
+ accept o.send member
187
+ end
188
+ @emitter.end_mapping
189
+
190
+ # Dump the ivars
191
+ accept 'ivars'
192
+ @emitter.start_mapping nil, nil, true, Nodes::Mapping::BLOCK
193
+ ivars.each do |ivar|
194
+ accept ivar.to_s
195
+ accept o.instance_variable_get ivar
196
+ end
197
+ @emitter.end_mapping
198
+
199
+ @emitter.end_mapping
200
+ end
201
+ end
202
+
165
203
  def visit_Struct o
166
204
  tag = ['!ruby/struct', o.class.name].compact.join(':')
167
205
 
@@ -23,7 +23,6 @@ require_relative 'psych/parser'
23
23
  require_relative 'psych/omap'
24
24
  require_relative 'psych/set'
25
25
  require_relative 'psych/coder'
26
- require_relative 'psych/core_ext'
27
26
  require_relative 'psych/stream'
28
27
  require_relative 'psych/json/tree_builder'
29
28
  require_relative 'psych/json/stream'
@@ -654,6 +653,35 @@ module Psych
654
653
  result
655
654
  end
656
655
 
656
+ ###
657
+ # Load multiple documents given in +yaml+. Returns the parsed documents
658
+ # as a list.
659
+ #
660
+ # Example:
661
+ #
662
+ # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar']
663
+ #
664
+ # list = []
665
+ # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") do |ruby|
666
+ # list << ruby
667
+ # end
668
+ # list # => ['foo', 'bar']
669
+ #
670
+ def self.safe_load_stream yaml, filename: nil, permitted_classes: [], aliases: false
671
+ documents = parse_stream(yaml, filename: filename).children.map do |child|
672
+ stream = Psych::Nodes::Stream.new
673
+ stream.children << child
674
+ safe_load(stream.to_yaml, permitted_classes: permitted_classes, aliases: aliases)
675
+ end
676
+
677
+ if block_given?
678
+ documents.each { |doc| yield doc }
679
+ nil
680
+ else
681
+ documents
682
+ end
683
+ end
684
+
657
685
  ###
658
686
  # Load the document contained in +filename+. Returns the yaml contained in
659
687
  # +filename+ as a Ruby object, or if the file is empty, it returns
@@ -761,3 +789,5 @@ module Psych
761
789
  self.domain_types = {}
762
790
  # :startdoc:
763
791
  end
792
+
793
+ require_relative 'psych/core_ext'
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: psych 5.2.4 ruby lib
2
+ # stub: psych 5.2.5 ruby lib
3
3
  # stub: ext/psych/extconf.rb
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "psych".freeze
7
- s.version = "5.2.4".freeze
7
+ s.version = "5.2.5".freeze
8
8
 
9
9
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
10
  s.metadata = { "changelog_uri" => "https://github.com/ruby/psych/releases", "msys2_mingw_dependencies" => "libyaml" } if s.respond_to? :metadata=
11
11
  s.require_paths = ["lib".freeze]
12
12
  s.authors = ["Aaron Patterson".freeze, "SHIBATA Hiroshi".freeze, "Charles Oliver Nutter".freeze]
13
- s.date = "2025-05-01"
13
+ s.date = "2025-05-09"
14
14
  s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping libyaml,\nPsych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format.\n".freeze
15
15
  s.email = ["aaron@tenderlovemaking.com".freeze, "hsbt@ruby-lang.org".freeze, "headius@headius.com".freeze]
16
16
  s.extensions = ["ext/psych/extconf.rb".freeze]
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.licenses = ["MIT".freeze]
21
21
  s.rdoc_options = ["--main".freeze, "README.md".freeze]
22
22
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
23
- s.rubygems_version = "3.5.11".freeze
23
+ s.rubygems_version = "3.5.22".freeze
24
24
  s.summary = "Psych is a YAML parser and emitter".freeze
25
25
 
26
26
  s.installed_by_version = "3.6.5".freeze