ory-client 0.2.0.alpha60 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1277) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +14 -14
  3. data/README.md +216 -205
  4. data/docs/ActiveProjectInConsole.md +18 -0
  5. data/docs/CheckOplSyntaxResult.md +18 -0
  6. data/docs/CheckPermissionResult.md +18 -0
  7. data/docs/CourierApi.md +85 -0
  8. data/docs/CreateCustomDomainBody.md +24 -0
  9. data/docs/CreateIdentityBody.md +32 -0
  10. data/docs/CreateJsonWebKeySet.md +22 -0
  11. data/docs/CreateProjectInvite.md +18 -0
  12. data/docs/CreateRecoveryCodeForIdentityBody.md +20 -0
  13. data/docs/CreateRecoveryLinkForIdentityBody.md +20 -0
  14. data/docs/CreateRelationshipBody.md +26 -0
  15. data/docs/CreateSubscriptionBody.md +22 -0
  16. data/docs/CustomDomain.md +34 -0
  17. data/docs/CustomDomainQuota.md +22 -0
  18. data/docs/DeleteMySessionsCount.md +18 -0
  19. data/docs/ErrorBrowserLocationChangeRequired.md +34 -0
  20. data/docs/ErrorFlowReplaced.md +34 -0
  21. data/docs/ErrorGeneric.md +18 -0
  22. data/docs/ErrorOAuth2.md +26 -0
  23. data/docs/ExpandedPermissionTree.md +22 -0
  24. data/docs/FlowError.md +24 -0
  25. data/docs/FrontendApi.md +1995 -0
  26. data/docs/IdentityApi.md +1160 -0
  27. data/docs/IdentityWithCredentials.md +20 -0
  28. data/docs/IdentityWithCredentialsOidc.md +18 -0
  29. data/docs/IdentityWithCredentialsOidcConfig.md +20 -0
  30. data/docs/IdentityWithCredentialsOidcConfigProvider.md +20 -0
  31. data/docs/IdentityWithCredentialsPassword.md +18 -0
  32. data/docs/IdentityWithCredentialsPasswordConfig.md +20 -0
  33. data/docs/InternalIsOwnerForProjectBySlugBody.md +22 -0
  34. data/docs/InternalProvisionMockSubscription.md +20 -0
  35. data/docs/InviteQuota.md +22 -0
  36. data/docs/JsonWebKeySet.md +1 -1
  37. data/docs/JwkApi.md +511 -0
  38. data/docs/LoginFlow.md +44 -0
  39. data/docs/LogoutFlow.md +20 -0
  40. data/docs/ManagedIdentitySchema.md +1 -1
  41. data/docs/NormalizedProject.md +2 -4
  42. data/docs/NormalizedProjectRevision.md +54 -36
  43. data/docs/NormalizedProjectRevisionHook.md +2 -2
  44. data/docs/NormalizedProjectRevisionIdentitySchema.md +2 -2
  45. data/docs/NormalizedProjectRevisionThirdPartyProvider.md +1 -1
  46. data/docs/OAuth2Api.md +2026 -0
  47. data/docs/OAuth2Client.md +26 -30
  48. data/docs/OAuth2ClientTokenLifespans.md +36 -0
  49. data/docs/OAuth2ConsentSession.md +14 -20
  50. data/docs/OAuth2RedirectTo.md +18 -0
  51. data/docs/OAuth2TokenExchange.md +28 -0
  52. data/docs/OidcApi.md +473 -0
  53. data/docs/OidcConfiguration.md +30 -30
  54. data/docs/PerformNativeLogoutBody.md +18 -0
  55. data/docs/PermissionApi.md +405 -0
  56. data/docs/PostCheckPermissionBody.md +26 -0
  57. data/docs/PostCheckPermissionOrErrorBody.md +26 -0
  58. data/docs/Project.md +3 -3
  59. data/docs/ProjectApi.md +927 -0
  60. data/docs/ProjectApiKey.md +3 -3
  61. data/docs/ProjectHost.md +2 -2
  62. data/docs/ProjectInvite.md +3 -3
  63. data/docs/ProjectMetadata.md +2 -2
  64. data/docs/RecoveryCodeForIdentity.md +22 -0
  65. data/docs/RecoveryFlow.md +34 -0
  66. data/docs/RecoveryFlowState.md +15 -0
  67. data/docs/RecoveryLinkForIdentity.md +20 -0
  68. data/docs/RegistrationFlow.md +36 -0
  69. data/docs/Relationship.md +26 -0
  70. data/docs/RelationshipApi.md +460 -0
  71. data/docs/RelationshipNamespaces.md +18 -0
  72. data/docs/RelationshipPatch.md +20 -0
  73. data/docs/Relationships.md +20 -0
  74. data/docs/SelfServiceFlowExpiredError.md +2 -0
  75. data/docs/SetActiveProjectInConsoleBody.md +18 -0
  76. data/docs/SetCustomDomainBody.md +24 -0
  77. data/docs/SetProject.md +20 -0
  78. data/docs/SettingsFlow.md +36 -0
  79. data/docs/SettingsFlowState.md +15 -0
  80. data/docs/StripeCustomer.md +18 -0
  81. data/docs/Subscription.md +2 -2
  82. data/docs/SuccessfulNativeLogin.md +20 -0
  83. data/docs/SuccessfulNativeRegistration.md +22 -0
  84. data/docs/SuccessfulProjectUpdate.md +1 -1
  85. data/docs/TokenPaginationRequestParameters.md +20 -0
  86. data/docs/TokenPaginationResponseHeaders.md +20 -0
  87. data/docs/TrustOAuth2JwtGrantIssuer.md +28 -0
  88. data/docs/UiText.md +1 -1
  89. data/docs/UpdateIdentityBody.md +28 -0
  90. data/docs/UpdateLoginFlowBody.md +87 -0
  91. data/docs/UpdateLoginFlowWithLookupSecretMethod.md +22 -0
  92. data/docs/UpdateLoginFlowWithOidcMethod.md +24 -0
  93. data/docs/UpdateLoginFlowWithPasswordMethod.md +26 -0
  94. data/docs/UpdateLoginFlowWithTotpMethod.md +22 -0
  95. data/docs/UpdateLoginFlowWithWebAuthnMethod.md +24 -0
  96. data/docs/UpdateRecoveryFlowBody.md +78 -0
  97. data/docs/UpdateRecoveryFlowWithCodeMethod.md +24 -0
  98. data/docs/UpdateRecoveryFlowWithLinkMethod.md +22 -0
  99. data/docs/UpdateRegistrationFlowBody.md +81 -0
  100. data/docs/UpdateRegistrationFlowWithOidcMethod.md +24 -0
  101. data/docs/UpdateRegistrationFlowWithPasswordMethod.md +24 -0
  102. data/docs/UpdateRegistrationFlowWithWebAuthnMethod.md +26 -0
  103. data/docs/UpdateSettingsFlowBody.md +90 -0
  104. data/docs/UpdateSettingsFlowWithLookupMethod.md +28 -0
  105. data/docs/UpdateSettingsFlowWithOidcMethod.md +26 -0
  106. data/docs/UpdateSettingsFlowWithPasswordMethod.md +22 -0
  107. data/docs/UpdateSettingsFlowWithProfileMethod.md +22 -0
  108. data/docs/UpdateSettingsFlowWithTotpMethod.md +24 -0
  109. data/docs/UpdateSettingsFlowWithWebAuthnMethod.md +26 -0
  110. data/docs/UpdateSubscriptionBody.md +20 -0
  111. data/docs/UpdateVerificationFlowBody.md +75 -0
  112. data/docs/UpdateVerificationFlowWithCodeMethodBody.md +26 -0
  113. data/docs/UpdateVerificationFlowWithLinkMethod.md +22 -0
  114. data/docs/VerificationFlow.md +34 -0
  115. data/docs/VerificationFlowState.md +15 -0
  116. data/docs/WellknownApi.md +69 -0
  117. data/lib/ory-client/api/courier_api.rb +103 -0
  118. data/lib/ory-client/api/frontend_api.rb +1965 -0
  119. data/lib/ory-client/api/identity_api.rb +1120 -0
  120. data/lib/ory-client/api/jwk_api.rb +506 -0
  121. data/lib/ory-client/api/metadata_api.rb +1 -1
  122. data/lib/ory-client/api/o_auth2_api.rb +1926 -0
  123. data/lib/ory-client/api/oidc_api.rb +459 -0
  124. data/lib/ory-client/api/permission_api.rb +399 -0
  125. data/lib/ory-client/api/project_api.rb +864 -0
  126. data/lib/ory-client/api/relationship_api.rb +433 -0
  127. data/lib/ory-client/api/wellknown_api.rb +79 -0
  128. data/lib/ory-client/api_client.rb +1 -1
  129. data/lib/ory-client/api_error.rb +1 -1
  130. data/lib/ory-client/configuration.rb +1 -1
  131. data/lib/ory-client/models/accept_o_auth2_consent_request.rb +1 -1
  132. data/lib/ory-client/models/accept_o_auth2_consent_request_session.rb +1 -1
  133. data/lib/ory-client/models/accept_o_auth2_login_request.rb +1 -1
  134. data/lib/ory-client/models/active_project_in_console.rb +221 -0
  135. data/lib/ory-client/models/authenticator_assurance_level.rb +1 -1
  136. data/lib/ory-client/models/check_opl_syntax_result.rb +222 -0
  137. data/lib/ory-client/models/check_permission_result.rb +226 -0
  138. data/lib/ory-client/models/cloud_account.rb +1 -1
  139. data/lib/ory-client/models/courier_message_status.rb +1 -1
  140. data/lib/ory-client/models/courier_message_type.rb +1 -1
  141. data/lib/ory-client/models/create_custom_domain_body.rb +253 -0
  142. data/lib/ory-client/models/create_identity_body.rb +305 -0
  143. data/lib/ory-client/models/create_json_web_key_set.rb +256 -0
  144. data/lib/ory-client/models/create_project_api_key_request.rb +1 -1
  145. data/lib/ory-client/models/create_project_body.rb +2 -1
  146. data/lib/ory-client/models/create_project_invite.rb +220 -0
  147. data/lib/ory-client/models/create_recovery_code_for_identity_body.rb +253 -0
  148. data/lib/ory-client/models/create_recovery_link_for_identity_body.rb +253 -0
  149. data/lib/ory-client/models/create_relationship_body.rb +260 -0
  150. data/lib/ory-client/models/create_subscription_body.rb +248 -0
  151. data/lib/ory-client/models/custom_domain.rb +297 -0
  152. data/lib/ory-client/models/custom_domain_quota.rb +238 -0
  153. data/lib/ory-client/models/delete_my_sessions_count.rb +221 -0
  154. data/lib/ory-client/models/error_authenticator_assurance_level_not_satisfied.rb +1 -1
  155. data/lib/ory-client/models/error_browser_location_change_required.rb +307 -0
  156. data/lib/ory-client/models/error_flow_replaced.rb +308 -0
  157. data/lib/ory-client/models/error_generic.rb +225 -0
  158. data/lib/ory-client/models/error_o_auth2.rb +261 -0
  159. data/lib/ory-client/models/expanded_permission_tree.rb +280 -0
  160. data/lib/ory-client/models/flow_error.rb +254 -0
  161. data/lib/ory-client/models/generic_error.rb +1 -1
  162. data/lib/ory-client/models/generic_error_content.rb +1 -1
  163. data/lib/ory-client/models/get_managed_identity_schema_location.rb +2 -1
  164. data/lib/ory-client/models/get_version200_response.rb +1 -1
  165. data/lib/ory-client/models/health_not_ready_status.rb +1 -1
  166. data/lib/ory-client/models/health_status.rb +1 -1
  167. data/lib/ory-client/models/identity.rb +4 -2
  168. data/lib/ory-client/models/identity_credentials.rb +1 -1
  169. data/lib/ory-client/models/identity_credentials_oidc.rb +1 -1
  170. data/lib/ory-client/models/identity_credentials_oidc_provider.rb +1 -1
  171. data/lib/ory-client/models/identity_credentials_password.rb +1 -1
  172. data/lib/ory-client/models/identity_credentials_type.rb +1 -1
  173. data/lib/ory-client/models/identity_schema_container.rb +2 -1
  174. data/lib/ory-client/models/identity_schema_preset.rb +1 -1
  175. data/lib/ory-client/models/identity_state.rb +1 -1
  176. data/lib/ory-client/models/identity_with_credentials.rb +229 -0
  177. data/lib/ory-client/models/identity_with_credentials_oidc.rb +220 -0
  178. data/lib/ory-client/models/identity_with_credentials_oidc_config.rb +231 -0
  179. data/lib/ory-client/models/identity_with_credentials_oidc_config_provider.rb +241 -0
  180. data/lib/ory-client/models/identity_with_credentials_password.rb +220 -0
  181. data/lib/ory-client/models/identity_with_credentials_password_config.rb +231 -0
  182. data/lib/ory-client/models/internal_is_owner_for_project_by_slug_body.rb +251 -0
  183. data/lib/ory-client/models/internal_provision_mock_subscription.rb +240 -0
  184. data/lib/ory-client/models/introspected_o_auth2_token.rb +1 -1
  185. data/lib/ory-client/models/invite_quota.rb +238 -0
  186. data/lib/ory-client/models/is_owner_for_project_by_slug.rb +1 -1
  187. data/lib/ory-client/models/is_ready200_response.rb +1 -1
  188. data/lib/ory-client/models/is_ready503_response.rb +1 -1
  189. data/lib/ory-client/models/json_patch.rb +1 -2
  190. data/lib/ory-client/models/json_web_key.rb +1 -1
  191. data/lib/ory-client/models/json_web_key_set.rb +3 -3
  192. data/lib/ory-client/models/keto_namespace.rb +1 -1
  193. data/lib/ory-client/models/login_flow.rb +377 -0
  194. data/lib/ory-client/models/logout_flow.rb +241 -0
  195. data/lib/ory-client/models/managed_identity_schema.rb +1 -2
  196. data/lib/ory-client/models/managed_identity_schema_validation_result.rb +2 -1
  197. data/lib/ory-client/models/message.rb +35 -1
  198. data/lib/ory-client/models/namespace.rb +1 -1
  199. data/lib/ory-client/models/needs_privileged_session_error.rb +1 -1
  200. data/lib/ory-client/models/normalized_project.rb +3 -20
  201. data/lib/ory-client/models/normalized_project_revision.rb +175 -49
  202. data/lib/ory-client/models/normalized_project_revision_hook.rb +1 -3
  203. data/lib/ory-client/models/normalized_project_revision_identity_schema.rb +1 -3
  204. data/lib/ory-client/models/normalized_project_revision_third_party_provider.rb +1 -2
  205. data/lib/ory-client/models/null_plan.rb +1 -1
  206. data/lib/ory-client/models/o_auth2_client.rb +30 -81
  207. data/lib/ory-client/models/o_auth2_client_token_lifespans.rb +481 -0
  208. data/lib/ory-client/models/o_auth2_consent_request.rb +1 -1
  209. data/lib/ory-client/models/o_auth2_consent_request_open_id_connect_context.rb +1 -1
  210. data/lib/ory-client/models/o_auth2_consent_session.rb +50 -74
  211. data/lib/ory-client/models/o_auth2_consent_session_expires_at.rb +1 -1
  212. data/lib/ory-client/models/o_auth2_login_request.rb +1 -1
  213. data/lib/ory-client/models/o_auth2_logout_request.rb +1 -1
  214. data/lib/ory-client/models/o_auth2_redirect_to.rb +226 -0
  215. data/lib/ory-client/models/o_auth2_token_exchange.rb +271 -0
  216. data/lib/ory-client/models/oidc_configuration.rb +31 -31
  217. data/lib/ory-client/models/oidc_user_info.rb +2 -2
  218. data/lib/ory-client/models/pagination.rb +1 -1
  219. data/lib/ory-client/models/pagination_headers.rb +1 -1
  220. data/lib/ory-client/models/parse_error.rb +1 -1
  221. data/lib/ory-client/models/perform_native_logout_body.rb +226 -0
  222. data/lib/ory-client/models/post_check_permission_body.rb +260 -0
  223. data/lib/ory-client/models/post_check_permission_or_error_body.rb +260 -0
  224. data/lib/ory-client/models/project.rb +2 -4
  225. data/lib/ory-client/models/project_api_key.rb +1 -4
  226. data/lib/ory-client/models/project_host.rb +1 -3
  227. data/lib/ory-client/models/project_invite.rb +35 -4
  228. data/lib/ory-client/models/project_metadata.rb +2 -3
  229. data/lib/ory-client/models/project_service_identity.rb +1 -1
  230. data/lib/ory-client/models/project_service_o_auth2.rb +1 -1
  231. data/lib/ory-client/models/project_service_permission.rb +1 -1
  232. data/lib/ory-client/models/project_services.rb +1 -1
  233. data/lib/ory-client/models/recovery_code_for_identity.rb +251 -0
  234. data/lib/ory-client/models/recovery_flow.rb +334 -0
  235. data/lib/ory-client/models/recovery_flow_state.rb +38 -0
  236. data/lib/ory-client/models/recovery_identity_address.rb +1 -1
  237. data/lib/ory-client/models/recovery_link_for_identity.rb +236 -0
  238. data/lib/ory-client/models/registration_flow.rb +337 -0
  239. data/lib/ory-client/models/reject_o_auth2_request.rb +1 -1
  240. data/lib/ory-client/models/relation_query.rb +2 -1
  241. data/lib/ory-client/models/relationship.rb +275 -0
  242. data/lib/ory-client/models/relationship_namespaces.rb +222 -0
  243. data/lib/ory-client/models/relationship_patch.rb +263 -0
  244. data/lib/ory-client/models/relationships.rb +232 -0
  245. data/lib/ory-client/models/schema_patch.rb +1 -1
  246. data/lib/ory-client/models/self_service_flow_expired_error.rb +12 -2
  247. data/lib/ory-client/models/session.rb +1 -1
  248. data/lib/ory-client/models/session_authentication_method.rb +1 -1
  249. data/lib/ory-client/models/session_device.rb +1 -1
  250. data/lib/ory-client/models/set_active_project_in_console_body.rb +226 -0
  251. data/lib/ory-client/models/set_custom_domain_body.rb +253 -0
  252. data/lib/ory-client/models/set_project.rb +239 -0
  253. data/lib/ory-client/models/settings_flow.rb +348 -0
  254. data/lib/ory-client/models/settings_flow_state.rb +37 -0
  255. data/lib/ory-client/models/source_position.rb +1 -1
  256. data/lib/ory-client/models/stripe_customer.rb +219 -0
  257. data/lib/ory-client/models/subject_set.rb +1 -1
  258. data/lib/ory-client/models/subscription.rb +2 -3
  259. data/lib/ory-client/models/successful_native_login.rb +235 -0
  260. data/lib/ory-client/models/successful_native_registration.rb +244 -0
  261. data/lib/ory-client/models/successful_project_update.rb +2 -2
  262. data/lib/ory-client/models/token_pagination.rb +1 -1
  263. data/lib/ory-client/models/token_pagination_headers.rb +1 -1
  264. data/lib/ory-client/models/token_pagination_request_parameters.rb +265 -0
  265. data/lib/ory-client/models/token_pagination_response_headers.rb +231 -0
  266. data/lib/ory-client/models/trust_o_auth2_jwt_grant_issuer.rb +292 -0
  267. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_issuer.rb +2 -1
  268. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb +2 -1
  269. data/lib/ory-client/models/ui_container.rb +1 -1
  270. data/lib/ory-client/models/ui_node.rb +1 -1
  271. data/lib/ory-client/models/ui_node_anchor_attributes.rb +1 -1
  272. data/lib/ory-client/models/ui_node_attributes.rb +1 -1
  273. data/lib/ory-client/models/ui_node_image_attributes.rb +1 -1
  274. data/lib/ory-client/models/ui_node_input_attributes.rb +1 -1
  275. data/lib/ory-client/models/ui_node_meta.rb +1 -1
  276. data/lib/ory-client/models/ui_node_script_attributes.rb +1 -1
  277. data/lib/ory-client/models/ui_node_text_attributes.rb +1 -1
  278. data/lib/ory-client/models/ui_text.rb +36 -1
  279. data/lib/ory-client/models/update_identity_body.rb +286 -0
  280. data/lib/ory-client/models/update_login_flow_body.rb +61 -0
  281. data/lib/ory-client/models/update_login_flow_with_lookup_secret_method.rb +251 -0
  282. data/lib/ory-client/models/update_login_flow_with_oidc_method.rb +261 -0
  283. data/lib/ory-client/models/update_login_flow_with_password_method.rb +276 -0
  284. data/lib/ory-client/models/update_login_flow_with_totp_method.rb +251 -0
  285. data/lib/ory-client/models/update_login_flow_with_web_authn_method.rb +261 -0
  286. data/lib/ory-client/models/update_recovery_flow_body.rb +56 -0
  287. data/lib/ory-client/models/update_recovery_flow_with_code_method.rb +256 -0
  288. data/lib/ory-client/models/update_recovery_flow_with_link_method.rb +251 -0
  289. data/lib/ory-client/models/update_registration_flow_body.rb +58 -0
  290. data/lib/ory-client/models/update_registration_flow_with_oidc_method.rb +261 -0
  291. data/lib/ory-client/models/update_registration_flow_with_password_method.rb +266 -0
  292. data/lib/ory-client/models/update_registration_flow_with_web_authn_method.rb +271 -0
  293. data/lib/ory-client/models/update_settings_flow_body.rb +64 -0
  294. data/lib/ory-client/models/update_settings_flow_with_lookup_method.rb +276 -0
  295. data/lib/ory-client/models/update_settings_flow_with_oidc_method.rb +266 -0
  296. data/lib/ory-client/models/update_settings_flow_with_password_method.rb +251 -0
  297. data/lib/ory-client/models/update_settings_flow_with_profile_method.rb +251 -0
  298. data/lib/ory-client/models/update_settings_flow_with_totp_method.rb +256 -0
  299. data/lib/ory-client/models/update_settings_flow_with_web_authn_method.rb +266 -0
  300. data/lib/ory-client/models/update_subscription_body.rb +234 -0
  301. data/lib/ory-client/models/update_verification_flow_body.rb +54 -0
  302. data/lib/ory-client/models/update_verification_flow_with_code_method_body.rb +260 -0
  303. data/lib/ory-client/models/update_verification_flow_with_link_method.rb +251 -0
  304. data/lib/ory-client/models/verifiable_identity_address.rb +1 -1
  305. data/lib/ory-client/models/verification_flow.rb +319 -0
  306. data/lib/ory-client/models/verification_flow_state.rb +38 -0
  307. data/lib/ory-client/models/version.rb +1 -1
  308. data/lib/ory-client/models/warning.rb +1 -1
  309. data/lib/ory-client/version.rb +2 -2
  310. data/lib/ory-client.rb +95 -94
  311. data/ory-client.gemspec +1 -1
  312. data/spec/api/courier_api_spec.rb +50 -0
  313. data/spec/api/frontend_api_spec.rb +415 -0
  314. data/spec/api/identity_api_spec.rb +239 -0
  315. data/spec/api/jwk_api_spec.rb +125 -0
  316. data/spec/api/metadata_api_spec.rb +1 -1
  317. data/spec/api/o_auth2_api_spec.rb +391 -0
  318. data/spec/api/oidc_api_spec.rb +117 -0
  319. data/spec/api/permission_api_spec.rb +114 -0
  320. data/spec/api/project_api_spec.rb +194 -0
  321. data/spec/api/relationship_api_spec.rb +120 -0
  322. data/spec/api/wellknown_api_spec.rb +46 -0
  323. data/spec/api_client_spec.rb +1 -1
  324. data/spec/configuration_spec.rb +1 -1
  325. data/spec/models/accept_o_auth2_consent_request_session_spec.rb +1 -1
  326. data/spec/models/accept_o_auth2_consent_request_spec.rb +1 -1
  327. data/spec/models/accept_o_auth2_login_request_spec.rb +1 -1
  328. data/spec/models/active_project_in_console_spec.rb +34 -0
  329. data/spec/models/authenticator_assurance_level_spec.rb +1 -1
  330. data/spec/models/check_opl_syntax_result_spec.rb +34 -0
  331. data/spec/models/check_permission_result_spec.rb +34 -0
  332. data/spec/models/cloud_account_spec.rb +1 -1
  333. data/spec/models/courier_message_status_spec.rb +1 -1
  334. data/spec/models/courier_message_type_spec.rb +1 -1
  335. data/spec/models/create_custom_domain_body_spec.rb +52 -0
  336. data/spec/models/create_identity_body_spec.rb +76 -0
  337. data/spec/models/create_json_web_key_set_spec.rb +46 -0
  338. data/spec/models/create_project_api_key_request_spec.rb +1 -1
  339. data/spec/models/create_project_body_spec.rb +1 -1
  340. data/spec/models/create_project_invite_spec.rb +34 -0
  341. data/spec/models/create_recovery_code_for_identity_body_spec.rb +40 -0
  342. data/spec/models/create_recovery_link_for_identity_body_spec.rb +40 -0
  343. data/spec/models/create_relationship_body_spec.rb +58 -0
  344. data/spec/models/create_subscription_body_spec.rb +46 -0
  345. data/spec/models/custom_domain_quota_spec.rb +46 -0
  346. data/spec/models/custom_domain_spec.rb +82 -0
  347. data/spec/models/delete_my_sessions_count_spec.rb +34 -0
  348. data/spec/models/error_authenticator_assurance_level_not_satisfied_spec.rb +1 -1
  349. data/spec/models/error_browser_location_change_required_spec.rb +82 -0
  350. data/spec/models/error_flow_replaced_spec.rb +82 -0
  351. data/spec/models/error_generic_spec.rb +34 -0
  352. data/spec/models/error_o_auth2_spec.rb +58 -0
  353. data/spec/models/expanded_permission_tree_spec.rb +50 -0
  354. data/spec/models/flow_error_spec.rb +52 -0
  355. data/spec/models/generic_error_content_spec.rb +1 -1
  356. data/spec/models/generic_error_spec.rb +1 -1
  357. data/spec/models/get_managed_identity_schema_location_spec.rb +1 -1
  358. data/spec/models/get_version200_response_spec.rb +1 -1
  359. data/spec/models/health_not_ready_status_spec.rb +1 -1
  360. data/spec/models/health_status_spec.rb +1 -1
  361. data/spec/models/identity_credentials_oidc_provider_spec.rb +1 -1
  362. data/spec/models/identity_credentials_oidc_spec.rb +1 -1
  363. data/spec/models/identity_credentials_password_spec.rb +1 -1
  364. data/spec/models/identity_credentials_spec.rb +1 -1
  365. data/spec/models/identity_credentials_type_spec.rb +1 -1
  366. data/spec/models/identity_schema_container_spec.rb +1 -1
  367. data/spec/models/identity_schema_preset_spec.rb +1 -1
  368. data/spec/models/identity_spec.rb +1 -1
  369. data/spec/models/identity_state_spec.rb +1 -1
  370. data/spec/models/identity_with_credentials_oidc_config_provider_spec.rb +40 -0
  371. data/spec/models/identity_with_credentials_oidc_config_spec.rb +40 -0
  372. data/spec/models/identity_with_credentials_oidc_spec.rb +34 -0
  373. data/spec/models/identity_with_credentials_password_config_spec.rb +40 -0
  374. data/spec/models/identity_with_credentials_password_spec.rb +34 -0
  375. data/spec/models/identity_with_credentials_spec.rb +40 -0
  376. data/spec/models/internal_is_owner_for_project_by_slug_body_spec.rb +46 -0
  377. data/spec/models/internal_provision_mock_subscription_spec.rb +40 -0
  378. data/spec/models/introspected_o_auth2_token_spec.rb +1 -1
  379. data/spec/models/invite_quota_spec.rb +46 -0
  380. data/spec/models/is_owner_for_project_by_slug_spec.rb +1 -1
  381. data/spec/models/is_ready200_response_spec.rb +1 -1
  382. data/spec/models/is_ready503_response_spec.rb +1 -1
  383. data/spec/models/json_patch_spec.rb +1 -1
  384. data/spec/models/json_web_key_set_spec.rb +1 -1
  385. data/spec/models/json_web_key_spec.rb +1 -1
  386. data/spec/models/keto_namespace_spec.rb +1 -1
  387. data/spec/models/login_flow_spec.rb +112 -0
  388. data/spec/models/logout_flow_spec.rb +40 -0
  389. data/spec/models/managed_identity_schema_spec.rb +1 -1
  390. data/spec/models/managed_identity_schema_validation_result_spec.rb +1 -1
  391. data/spec/models/message_spec.rb +5 -1
  392. data/spec/models/namespace_spec.rb +1 -1
  393. data/spec/models/needs_privileged_session_error_spec.rb +1 -1
  394. data/spec/models/normalized_project_revision_hook_spec.rb +1 -1
  395. data/spec/models/normalized_project_revision_identity_schema_spec.rb +1 -1
  396. data/spec/models/normalized_project_revision_spec.rb +63 -1
  397. data/spec/models/normalized_project_revision_third_party_provider_spec.rb +1 -1
  398. data/spec/models/normalized_project_spec.rb +1 -7
  399. data/spec/models/null_plan_spec.rb +1 -1
  400. data/spec/models/o_auth2_client_spec.rb +1 -13
  401. data/spec/models/o_auth2_client_token_lifespans_spec.rb +88 -0
  402. data/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb +1 -1
  403. data/spec/models/o_auth2_consent_request_spec.rb +1 -1
  404. data/spec/models/o_auth2_consent_session_expires_at_spec.rb +1 -1
  405. data/spec/models/o_auth2_consent_session_spec.rb +8 -26
  406. data/spec/models/o_auth2_login_request_spec.rb +1 -1
  407. data/spec/models/o_auth2_logout_request_spec.rb +1 -1
  408. data/spec/models/o_auth2_redirect_to_spec.rb +34 -0
  409. data/spec/models/o_auth2_token_exchange_spec.rb +64 -0
  410. data/spec/models/oidc_configuration_spec.rb +1 -1
  411. data/spec/models/oidc_user_info_spec.rb +1 -1
  412. data/spec/models/pagination_headers_spec.rb +1 -1
  413. data/spec/models/pagination_spec.rb +1 -1
  414. data/spec/models/parse_error_spec.rb +1 -1
  415. data/spec/models/perform_native_logout_body_spec.rb +34 -0
  416. data/spec/models/post_check_permission_body_spec.rb +58 -0
  417. data/spec/models/post_check_permission_or_error_body_spec.rb +58 -0
  418. data/spec/models/project_api_key_spec.rb +1 -1
  419. data/spec/models/project_host_spec.rb +1 -1
  420. data/spec/models/project_invite_spec.rb +5 -1
  421. data/spec/models/project_metadata_spec.rb +1 -1
  422. data/spec/models/project_service_identity_spec.rb +1 -1
  423. data/spec/models/project_service_o_auth2_spec.rb +1 -1
  424. data/spec/models/project_service_permission_spec.rb +1 -1
  425. data/spec/models/project_services_spec.rb +1 -1
  426. data/spec/models/project_spec.rb +1 -1
  427. data/spec/models/recovery_code_for_identity_spec.rb +46 -0
  428. data/spec/models/recovery_flow_spec.rb +82 -0
  429. data/spec/models/recovery_flow_state_spec.rb +28 -0
  430. data/spec/models/recovery_identity_address_spec.rb +1 -1
  431. data/spec/models/recovery_link_for_identity_spec.rb +40 -0
  432. data/spec/models/registration_flow_spec.rb +88 -0
  433. data/spec/models/reject_o_auth2_request_spec.rb +1 -1
  434. data/spec/models/relation_query_spec.rb +1 -1
  435. data/spec/models/relationship_namespaces_spec.rb +34 -0
  436. data/spec/models/relationship_patch_spec.rb +44 -0
  437. data/spec/models/relationship_spec.rb +58 -0
  438. data/spec/models/relationships_spec.rb +40 -0
  439. data/spec/models/schema_patch_spec.rb +1 -1
  440. data/spec/models/self_service_flow_expired_error_spec.rb +7 -1
  441. data/spec/models/session_authentication_method_spec.rb +1 -1
  442. data/spec/models/session_device_spec.rb +1 -1
  443. data/spec/models/session_spec.rb +1 -1
  444. data/spec/models/set_active_project_in_console_body_spec.rb +34 -0
  445. data/spec/models/set_custom_domain_body_spec.rb +52 -0
  446. data/spec/models/set_project_spec.rb +40 -0
  447. data/spec/models/settings_flow_spec.rb +88 -0
  448. data/spec/models/settings_flow_state_spec.rb +28 -0
  449. data/spec/models/source_position_spec.rb +1 -1
  450. data/spec/models/stripe_customer_spec.rb +34 -0
  451. data/spec/models/subject_set_spec.rb +1 -1
  452. data/spec/models/subscription_spec.rb +1 -1
  453. data/spec/models/successful_native_login_spec.rb +40 -0
  454. data/spec/models/successful_native_registration_spec.rb +46 -0
  455. data/spec/models/successful_project_update_spec.rb +1 -1
  456. data/spec/models/token_pagination_headers_spec.rb +1 -1
  457. data/spec/models/token_pagination_request_parameters_spec.rb +40 -0
  458. data/spec/models/token_pagination_response_headers_spec.rb +40 -0
  459. data/spec/models/token_pagination_spec.rb +1 -1
  460. data/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb +64 -0
  461. data/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb +1 -1
  462. data/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb +1 -1
  463. data/spec/models/ui_container_spec.rb +1 -1
  464. data/spec/models/ui_node_anchor_attributes_spec.rb +1 -1
  465. data/spec/models/ui_node_attributes_spec.rb +1 -1
  466. data/spec/models/ui_node_image_attributes_spec.rb +1 -1
  467. data/spec/models/ui_node_input_attributes_spec.rb +1 -1
  468. data/spec/models/ui_node_meta_spec.rb +1 -1
  469. data/spec/models/ui_node_script_attributes_spec.rb +1 -1
  470. data/spec/models/ui_node_spec.rb +1 -1
  471. data/spec/models/ui_node_text_attributes_spec.rb +1 -1
  472. data/spec/models/ui_text_spec.rb +5 -1
  473. data/spec/models/update_identity_body_spec.rb +64 -0
  474. data/spec/models/update_login_flow_body_spec.rb +43 -0
  475. data/spec/models/update_login_flow_with_lookup_secret_method_spec.rb +46 -0
  476. data/spec/models/update_login_flow_with_oidc_method_spec.rb +52 -0
  477. data/spec/models/update_login_flow_with_password_method_spec.rb +58 -0
  478. data/spec/models/update_login_flow_with_totp_method_spec.rb +46 -0
  479. data/spec/models/update_login_flow_with_web_authn_method_spec.rb +52 -0
  480. data/spec/models/update_recovery_flow_body_spec.rb +43 -0
  481. data/spec/models/update_recovery_flow_with_code_method_spec.rb +52 -0
  482. data/spec/models/update_recovery_flow_with_link_method_spec.rb +46 -0
  483. data/spec/models/update_registration_flow_body_spec.rb +43 -0
  484. data/spec/models/update_registration_flow_with_oidc_method_spec.rb +52 -0
  485. data/spec/models/update_registration_flow_with_password_method_spec.rb +52 -0
  486. data/spec/models/update_registration_flow_with_web_authn_method_spec.rb +58 -0
  487. data/spec/models/update_settings_flow_body_spec.rb +43 -0
  488. data/spec/models/update_settings_flow_with_lookup_method_spec.rb +64 -0
  489. data/spec/models/update_settings_flow_with_oidc_method_spec.rb +58 -0
  490. data/spec/models/update_settings_flow_with_password_method_spec.rb +46 -0
  491. data/spec/models/update_settings_flow_with_profile_method_spec.rb +46 -0
  492. data/spec/models/update_settings_flow_with_totp_method_spec.rb +52 -0
  493. data/spec/models/update_settings_flow_with_web_authn_method_spec.rb +58 -0
  494. data/spec/models/update_subscription_body_spec.rb +40 -0
  495. data/spec/models/update_verification_flow_body_spec.rb +43 -0
  496. data/spec/models/update_verification_flow_with_code_method_body_spec.rb +58 -0
  497. data/spec/models/update_verification_flow_with_link_method_spec.rb +46 -0
  498. data/spec/models/verifiable_identity_address_spec.rb +1 -1
  499. data/spec/models/verification_flow_spec.rb +82 -0
  500. data/spec/models/verification_flow_state_spec.rb +28 -0
  501. data/spec/models/version_spec.rb +1 -1
  502. data/spec/models/warning_spec.rb +1 -1
  503. data/spec/spec_helper.rb +1 -1
  504. data/vendor/bundle/ruby/2.5.0/cache/ethon-0.16.0.gem +0 -0
  505. data/vendor/bundle/ruby/2.5.0/cache/parser-3.1.3.0.gem +0 -0
  506. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.12.0.gem +0 -0
  507. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.12.0.gem +0 -0
  508. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.12.0.gem +0 -0
  509. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.12.0.gem +0 -0
  510. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.12.0.gem +0 -0
  511. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/byebug-11.1.3/gem_make.out +2 -2
  512. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.15.5/gem_make.out +2 -2
  513. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/jaro_winkler-1.5.4/gem_make.out +2 -2
  514. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/psych-4.0.6/gem_make.out +2 -2
  515. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.2/gem_make.out +2 -2
  516. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.2/mkmf.log +1 -1
  517. data/vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/ext/byebug/Makefile +2 -2
  518. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/.github/workflows/ruby.yml +41 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/.gitignore +0 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/.rspec +0 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/Gemfile +0 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/Guardfile +0 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/LICENSE +0 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/README.md +118 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/Rakefile +0 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/ethon.gemspec +0 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curl.rb +0 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb +65 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/codes.rb +0 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/constants.rb +0 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/form_options.rb +0 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/functions.rb +0 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/infos.rb +0 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/messages.rb +0 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb +503 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/curls/settings.rb +0 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb +149 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/debug_info.rb +0 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/features.rb +0 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/form.rb +0 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/header.rb +0 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/actionable.rb +0 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/custom.rb +0 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/delete.rb +0 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/get.rb +0 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/head.rb +0 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/options.rb +0 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/patch.rb +0 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/post.rb +0 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/postable.rb +0 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/put.rb +0 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http/putable.rb +0 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/http.rb +0 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb +116 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/mirror.rb +0 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/operations.rb +0 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/options.rb +0 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/params.rb +0 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/queryable.rb +0 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb +136 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy/util.rb +0 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/easy.rb +0 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/ethon_error.rb +0 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/global_init.rb +0 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/invalid_option.rb +0 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/invalid_value.rb +0 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/multi_add.rb +0 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/multi_fdset.rb +0 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/multi_remove.rb +0 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/multi_timeout.rb +0 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors/select.rb +0 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/errors.rb +0 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/libc.rb +0 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/loggable.rb +0 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/multi/operations.rb +0 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/multi/options.rb +0 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/multi/stack.rb +0 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon/multi.rb +0 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/lib/ethon/version.rb +6 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/lib/ethon.rb +0 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/benchmarks.rb +0 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/memory_leaks.rb +0 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/perf_spec_helper.rb +0 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/support/memory_test_helpers.rb +0 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/support/os_memory_leak_tracker.rb +0 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/profile/support/ruby_object_leak_tracker.rb +0 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/curl_spec.rb +0 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb +81 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/debug_info_spec.rb +0 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/features_spec.rb +0 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/form_spec.rb +0 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/header_spec.rb +0 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/custom_spec.rb +0 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/delete_spec.rb +0 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/get_spec.rb +0 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/head_spec.rb +0 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/options_spec.rb +0 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/patch_spec.rb +0 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/post_spec.rb +0 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http/put_spec.rb +0 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/http_spec.rb +0 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb +126 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb +47 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb +271 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/options_spec.rb +0 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/queryable_spec.rb +0 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/response_callbacks_spec.rb +0 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy/util_spec.rb +0 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/easy_spec.rb +0 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/libc_spec.rb +0 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/loggable_spec.rb +0 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/multi/operations_spec.rb +0 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/multi/options_spec.rb +0 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/multi/stack_spec.rb +0 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/ethon/multi_spec.rb +0 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/spec_helper.rb +0 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/support/localhost_server.rb +0 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.15.0 → ethon-0.16.0}/spec/support/server.rb +0 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +2 -2
  621. data/vendor/bundle/ruby/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +2 -2
  622. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/LICENSE.txt +0 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/bin/ruby-parse +0 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/bin/ruby-rewrite +0 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/gauntlet_parser.rb +0 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/all.rb +0 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/ast/node.rb +0 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ast/processor.rb +291 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/base.rb +0 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/builders/default.rb +2317 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/clobbering_error.rb +0 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/color.rb +0 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/context.rb +0 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/current.rb +119 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/current_arg_stack.rb +0 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/deprecation.rb +0 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/diagnostic/engine.rb +0 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/diagnostic.rb +0 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/lexer/dedenter.rb +0 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/lexer/explanation.rb +0 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/lexer/literal.rb +0 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/lexer/stack_state.rb +0 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/lexer.rb +25045 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/macruby.rb +9632 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/max_numparam_stack.rb +0 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/messages.rb +120 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/meta.rb +40 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/rewriter.rb +0 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby18.rb +9270 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby19.rb +9556 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby20.rb +10227 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby21.rb +10201 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby22.rb +10300 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby23.rb +10320 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby24.rb +10452 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby25.rb +10372 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby26.rb +10350 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby27.rb +11945 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/ruby28.rb +0 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby30.rb +12241 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby31.rb +12714 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/ruby32.rb +12691 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/rubymotion.rb +9513 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/runner/ruby_parse.rb +0 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/runner/ruby_rewrite.rb +0 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/runner.rb +0 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/buffer.rb +0 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/comment/associator.rb +0 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/comment.rb +0 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/collection.rb +0 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/condition.rb +0 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/constant.rb +0 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/definition.rb +0 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/for.rb +0 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/heredoc.rb +0 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/index.rb +0 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/keyword.rb +0 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/method_definition.rb +0 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/objc_kwarg.rb +0 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/operator.rb +0 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/rescue_body.rb +0 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/send.rb +0 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/ternary.rb +0 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map/variable.rb +0 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/map.rb +0 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/range.rb +0 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/rewriter/action.rb +0 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/rewriter.rb +0 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/tree_rewriter/action.rb +0 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/source/tree_rewriter.rb +0 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/static_environment.rb +87 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/syntax_error.rb +0 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/tree_rewriter.rb +0 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser/variables_stack.rb +0 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/lib/parser/version.rb +5 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.1 → parser-3.1.3.0}/lib/parser.rb +0 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.3.0/parser.gemspec +43 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/psych-4.0.6/ext/psych/Makefile +2 -2
  699. data/vendor/bundle/ruby/2.5.0/gems/{rspec-3.11.0 → rspec-3.12.0}/LICENSE.md +0 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/{rspec-3.11.0 → rspec-3.12.0}/README.md +0 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.12.0/lib/rspec/version.rb +5 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/{rspec-3.11.0 → rspec-3.12.0}/lib/rspec.rb +0 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/.document +0 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/.yardopts +0 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/Changelog.md +2360 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/LICENSE.md +0 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/README.md +0 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/exe/rspec +0 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/autorun.rb +0 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/backtrace_formatter.rb +0 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/coordinator.rb +0 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/example_minimizer.rb +0 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/fork_runner.rb +0 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/server.rb +0 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/shell_command.rb +0 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/shell_runner.rb +0 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/bisect/utilities.rb +0 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb +2385 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/configuration_options.rb +0 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/did_you_mean.rb +0 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/drb.rb +0 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/dsl.rb +0 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/example.rb +0 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/example_group.rb +0 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/example_status_persister.rb +0 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/filter_manager.rb +0 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/flat_map.rb +0 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/base_bisect_formatter.rb +0 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/base_formatter.rb +0 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/base_text_formatter.rb +0 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/bisect_drb_formatter.rb +0 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/bisect_progress_formatter.rb +0 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/console_codes.rb +0 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/deprecation_formatter.rb +0 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/documentation_formatter.rb +0 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/exception_presenter.rb +525 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/failure_list_formatter.rb +0 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/fallback_message_formatter.rb +0 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/helpers.rb +0 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/html_formatter.rb +0 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_printer.rb +412 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/html_snippet_extractor.rb +0 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/json_formatter.rb +0 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/profile_formatter.rb +0 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/progress_formatter.rb +0 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/protocol.rb +0 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/snippet_extractor.rb +0 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters/syntax_highlighter.rb +0 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/formatters.rb +0 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/hooks.rb +0 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/invocations.rb +0 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/memoized_helpers.rb +0 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/metadata.rb +0 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/metadata_filter.rb +0 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/minitest_assertions_adapter.rb +0 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/mocking_adapters/flexmock.rb +0 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/mocking_adapters/mocha.rb +0 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/mocking_adapters/null.rb +0 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/mocking_adapters/rr.rb +0 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/mocking_adapters/rspec.rb +0 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/notifications.rb +0 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/lib/rspec/core/option_parser.rb +323 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/ordering.rb +0 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/output_wrapper.rb +0 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/pending.rb +0 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/profiler.rb +0 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/project_initializer/.rspec +0 -0
  768. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/project_initializer/spec/spec_helper.rb +0 -0
  769. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/project_initializer.rb +0 -0
  770. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/rake_task.rb +0 -0
  771. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/reporter.rb +0 -0
  772. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/ruby_project.rb +0 -0
  773. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/runner.rb +0 -0
  774. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/sandbox.rb +0 -0
  775. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/set.rb +0 -0
  776. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/shared_context.rb +0 -0
  777. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/shared_example_group.rb +0 -0
  778. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/shell_escape.rb +0 -0
  779. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/test_unit_assertions_adapter.rb +0 -0
  780. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.12.0/lib/rspec/core/version.rb +9 -0
  781. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/warnings.rb +0 -0
  782. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core/world.rb +0 -0
  783. data/vendor/bundle/ruby/2.5.0/gems/{rspec-core-3.11.0 → rspec-core-3.12.0}/lib/rspec/core.rb +0 -0
  784. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/.document +0 -0
  785. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/.yardopts +0 -0
  786. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.12.0/Changelog.md +1285 -0
  787. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/LICENSE.md +0 -0
  788. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/README.md +0 -0
  789. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/block_snippet_extractor.rb +0 -0
  790. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/configuration.rb +0 -0
  791. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/expectation_target.rb +0 -0
  792. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/fail_with.rb +0 -0
  793. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/failure_aggregator.rb +0 -0
  794. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/handler.rb +0 -0
  795. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/minitest_integration.rb +0 -0
  796. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations/syntax.rb +0 -0
  797. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/version.rb +8 -0
  798. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/expectations.rb +0 -0
  799. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/aliased_matcher.rb +0 -0
  800. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/all.rb +0 -0
  801. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/base_matcher.rb +0 -0
  802. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/be.rb +0 -0
  803. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/be_between.rb +0 -0
  804. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/be_instance_of.rb +0 -0
  805. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/be_kind_of.rb +0 -0
  806. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/be_within.rb +0 -0
  807. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/change.rb +0 -0
  808. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/compound.rb +0 -0
  809. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/contain_exactly.rb +0 -0
  810. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/count_expectation.rb +0 -0
  811. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/cover.rb +0 -0
  812. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/eq.rb +0 -0
  813. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/eql.rb +0 -0
  814. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/equal.rb +0 -0
  815. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/exist.rb +0 -0
  816. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/has.rb +0 -0
  817. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/have_attributes.rb +0 -0
  818. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/include.rb +0 -0
  819. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/match.rb +0 -0
  820. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/operators.rb +0 -0
  821. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/output.rb +0 -0
  822. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/raise_error.rb +0 -0
  823. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/respond_to.rb +0 -0
  824. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/satisfy.rb +0 -0
  825. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/start_or_end_with.rb +0 -0
  826. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/throw_symbol.rb +0 -0
  827. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in/yield.rb +0 -0
  828. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/built_in.rb +0 -0
  829. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/composable.rb +0 -0
  830. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/dsl.rb +0 -0
  831. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/english_phrasing.rb +0 -0
  832. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +0 -0
  833. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/fail_matchers.rb +0 -0
  834. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/generated_descriptions.rb +0 -0
  835. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/matcher_delegator.rb +0 -0
  836. data/vendor/bundle/ruby/2.5.0/gems/{rspec-expectations-3.11.1 → rspec-expectations-3.12.0}/lib/rspec/matchers/matcher_protocol.rb +0 -0
  837. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers.rb +1044 -0
  838. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/.document +0 -0
  839. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/.yardopts +0 -0
  840. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/Changelog.md +1212 -0
  841. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/LICENSE.md +0 -0
  842. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/README.md +0 -0
  843. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/chain.rb +0 -0
  844. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/error_generator.rb +0 -0
  845. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/expect_chain_chain.rb +0 -0
  846. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/expectation_chain.rb +0 -0
  847. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/message_chains.rb +0 -0
  848. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/proxy.rb +0 -0
  849. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/recorder.rb +0 -0
  850. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/stub_chain.rb +0 -0
  851. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance/stub_chain_chain.rb +0 -0
  852. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/any_instance.rb +0 -0
  853. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/argument_list_matcher.rb +0 -0
  854. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/argument_matchers.rb +0 -0
  855. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/configuration.rb +0 -0
  856. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/error_generator.rb +380 -0
  857. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/example_methods.rb +0 -0
  858. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/instance_method_stasher.rb +0 -0
  859. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/marshal_extension.rb +0 -0
  860. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/matchers/expectation_customization.rb +0 -0
  861. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/matchers/have_received.rb +0 -0
  862. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/matchers/receive.rb +0 -0
  863. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/matchers/receive_message_chain.rb +0 -0
  864. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/matchers/receive_messages.rb +0 -0
  865. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/message_chain.rb +0 -0
  866. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/message_expectation.rb +820 -0
  867. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/method_double.rb +0 -0
  868. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/method_reference.rb +214 -0
  869. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/minitest_integration.rb +0 -0
  870. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/mutate_const.rb +0 -0
  871. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/object_reference.rb +0 -0
  872. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/order_group.rb +0 -0
  873. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/proxy.rb +0 -0
  874. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/space.rb +0 -0
  875. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/standalone.rb +0 -0
  876. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/syntax.rb +0 -0
  877. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/targets.rb +0 -0
  878. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/test_double.rb +0 -0
  879. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/verifying_double.rb +0 -0
  880. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/verifying_message_expectation.rb +55 -0
  881. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks/verifying_proxy.rb +0 -0
  882. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/version.rb +9 -0
  883. data/vendor/bundle/ruby/2.5.0/gems/{rspec-mocks-3.11.1 → rspec-mocks-3.12.0}/lib/rspec/mocks.rb +0 -0
  884. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.12.0/Changelog.md +364 -0
  885. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/LICENSE.md +0 -0
  886. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/README.md +0 -0
  887. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/caller_filter.rb +0 -0
  888. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/comparable_version.rb +0 -0
  889. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/differ.rb +0 -0
  890. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/directory_maker.rb +0 -0
  891. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/encoded_string.rb +0 -0
  892. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/fuzzy_matcher.rb +0 -0
  893. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/hunk_generator.rb +0 -0
  894. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/matcher_definition.rb +0 -0
  895. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/method_signature_verifier.rb +0 -0
  896. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/mutex.rb +0 -0
  897. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/object_formatter.rb +0 -0
  898. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/recursive_const_methods.rb +0 -0
  899. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/reentrant_mutex.rb +0 -0
  900. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb +198 -0
  901. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/source/location.rb +0 -0
  902. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/source/node.rb +0 -0
  903. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/source/token.rb +0 -0
  904. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/source.rb +0 -0
  905. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/deprecation_helpers.rb +0 -0
  906. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/diff_helpers.rb +0 -0
  907. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/formatting_support.rb +0 -0
  908. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/in_sub_process.rb +0 -0
  909. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/library_wide_checks.rb +0 -0
  910. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/shell_out.rb +0 -0
  911. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/stderr_splitter.rb +0 -0
  912. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/string_matcher.rb +0 -0
  913. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/with_isolated_directory.rb +0 -0
  914. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec/with_isolated_stderr.rb +0 -0
  915. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/spec.rb +0 -0
  916. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.12.0/lib/rspec/support/version.rb +7 -0
  917. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/warnings.rb +0 -0
  918. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support/with_keywords_when_needed.rb +0 -0
  919. data/vendor/bundle/ruby/2.5.0/gems/{rspec-support-3.11.1 → rspec-support-3.12.0}/lib/rspec/support.rb +0 -0
  920. data/vendor/bundle/ruby/2.5.0/gems/stringio-3.0.2/ext/stringio/Makefile +2 -2
  921. data/vendor/bundle/ruby/2.5.0/specifications/ethon-0.16.0.gemspec +32 -0
  922. data/vendor/bundle/ruby/2.5.0/specifications/parser-3.1.3.0.gemspec +63 -0
  923. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.12.0.gemspec +43 -0
  924. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.12.0.gemspec +63 -0
  925. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.12.0.gemspec +51 -0
  926. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.12.0.gemspec +51 -0
  927. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.12.0.gemspec +39 -0
  928. metadata +793 -789
  929. data/docs/ActiveProject.md +0 -18
  930. data/docs/AdminApi.md +0 -76
  931. data/docs/AdminCreateIdentityBody.md +0 -32
  932. data/docs/AdminCreateIdentityImportCredentialsOidc.md +0 -18
  933. data/docs/AdminCreateIdentityImportCredentialsOidcConfig.md +0 -20
  934. data/docs/AdminCreateIdentityImportCredentialsOidcProvider.md +0 -20
  935. data/docs/AdminCreateIdentityImportCredentialsPassword.md +0 -18
  936. data/docs/AdminCreateIdentityImportCredentialsPasswordConfig.md +0 -20
  937. data/docs/AdminCreateJsonWebKeySetBody.md +0 -22
  938. data/docs/AdminCreateSelfServiceRecoveryCodeBody.md +0 -20
  939. data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +0 -20
  940. data/docs/AdminIdentityImportCredentials.md +0 -20
  941. data/docs/AdminTrustOAuth2JwtGrantIssuerBody.md +0 -28
  942. data/docs/AdminUpdateIdentityBody.md +0 -28
  943. data/docs/CnameSettings.md +0 -34
  944. data/docs/CreateCustomHostnameBody.md +0 -24
  945. data/docs/CreateSubscriptionPayload.md +0 -22
  946. data/docs/ExpandTree.md +0 -22
  947. data/docs/GetCheckResponse.md +0 -18
  948. data/docs/GetNamespacesResponse.md +0 -18
  949. data/docs/GetRelationTuplesResponse.md +0 -20
  950. data/docs/HandledOAuth2ConsentRequest.md +0 -18
  951. data/docs/HandledOAuth2LoginRequest.md +0 -18
  952. data/docs/HandledOAuth2LogoutRequest.md +0 -18
  953. data/docs/Headers.md +0 -18
  954. data/docs/IDTokenClaims.md +0 -44
  955. data/docs/InvitePayload.md +0 -18
  956. data/docs/IsOwnerForProjectBySlugPayload.md +0 -22
  957. data/docs/JsonError.md +0 -18
  958. data/docs/NamespacesApi.md +0 -74
  959. data/docs/OAuth2AccessRequest.md +0 -24
  960. data/docs/OAuth2ApiError.md +0 -24
  961. data/docs/OAuth2TokenResponse.md +0 -28
  962. data/docs/PatchDelta.md +0 -20
  963. data/docs/PostCheckOplSyntaxResponse.md +0 -18
  964. data/docs/PreviousOAuth2ConsentSession.md +0 -30
  965. data/docs/ProvisionMockSubscriptionPayload.md +0 -20
  966. data/docs/QuotaCustomDomains.md +0 -22
  967. data/docs/QuotaProjectMemberSeats.md +0 -22
  968. data/docs/ReadApi.md +0 -467
  969. data/docs/RefreshTokenHookRequest.md +0 -28
  970. data/docs/RefreshTokenHookResponse.md +0 -18
  971. data/docs/RelationTuple.md +0 -26
  972. data/docs/RevokedSessions.md +0 -18
  973. data/docs/SelfServiceBrowserLocationChangeRequiredError.md +0 -34
  974. data/docs/SelfServiceError.md +0 -24
  975. data/docs/SelfServiceLoginFlow.md +0 -40
  976. data/docs/SelfServiceLogoutUrl.md +0 -20
  977. data/docs/SelfServiceRecoveryCode.md +0 -22
  978. data/docs/SelfServiceRecoveryFlow.md +0 -34
  979. data/docs/SelfServiceRecoveryFlowState.md +0 -15
  980. data/docs/SelfServiceRecoveryLink.md +0 -20
  981. data/docs/SelfServiceRegistrationFlow.md +0 -32
  982. data/docs/SelfServiceSettingsFlow.md +0 -36
  983. data/docs/SelfServiceSettingsFlowState.md +0 -15
  984. data/docs/SelfServiceVerificationFlow.md +0 -34
  985. data/docs/SelfServiceVerificationFlowState.md +0 -15
  986. data/docs/SettingsProfileFormConfig.md +0 -24
  987. data/docs/StripeCustomerResponse.md +0 -18
  988. data/docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md +0 -20
  989. data/docs/SubmitSelfServiceLoginFlowBody.md +0 -87
  990. data/docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md +0 -22
  991. data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +0 -24
  992. data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +0 -26
  993. data/docs/SubmitSelfServiceLoginFlowWithTotpMethodBody.md +0 -22
  994. data/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +0 -24
  995. data/docs/SubmitSelfServiceLogoutFlowWithoutBrowserBody.md +0 -18
  996. data/docs/SubmitSelfServiceRecoveryFlowBody.md +0 -78
  997. data/docs/SubmitSelfServiceRecoveryFlowWithCodeMethodBody.md +0 -24
  998. data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md +0 -22
  999. data/docs/SubmitSelfServiceRegistrationFlowBody.md +0 -81
  1000. data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +0 -24
  1001. data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +0 -24
  1002. data/docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md +0 -26
  1003. data/docs/SubmitSelfServiceSettingsFlowBody.md +0 -90
  1004. data/docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md +0 -28
  1005. data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +0 -26
  1006. data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +0 -22
  1007. data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +0 -22
  1008. data/docs/SubmitSelfServiceSettingsFlowWithTotpMethodBody.md +0 -24
  1009. data/docs/SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody.md +0 -26
  1010. data/docs/SubmitSelfServiceVerificationFlowBody.md +0 -75
  1011. data/docs/SubmitSelfServiceVerificationFlowWithLinkMethodBody.md +0 -22
  1012. data/docs/SuccessfulOAuth2RequestResponse.md +0 -18
  1013. data/docs/SuccessfulSelfServiceLoginWithoutBrowser.md +0 -20
  1014. data/docs/SuccessfulSelfServiceRegistrationWithoutBrowser.md +0 -22
  1015. data/docs/SyntaxApi.md +0 -77
  1016. data/docs/UpdateCustomHostnameBody.md +0 -24
  1017. data/docs/UpdateOAuth2ClientLifespans.md +0 -40
  1018. data/docs/UpdateProject.md +0 -20
  1019. data/docs/UpdateSubscriptionPayload.md +0 -20
  1020. data/docs/V0alpha2Api.md +0 -6762
  1021. data/docs/WriteApi.md +0 -233
  1022. data/lib/ory-client/api/admin_api.rb +0 -90
  1023. data/lib/ory-client/api/namespaces_api.rb +0 -79
  1024. data/lib/ory-client/api/read_api.rb +0 -449
  1025. data/lib/ory-client/api/syntax_api.rb +0 -90
  1026. data/lib/ory-client/api/v0alpha2_api.rb +0 -6452
  1027. data/lib/ory-client/api/write_api.rb +0 -228
  1028. data/lib/ory-client/models/active_project.rb +0 -221
  1029. data/lib/ory-client/models/admin_create_identity_body.rb +0 -304
  1030. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc.rb +0 -219
  1031. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc_config.rb +0 -231
  1032. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc_provider.rb +0 -240
  1033. data/lib/ory-client/models/admin_create_identity_import_credentials_password.rb +0 -219
  1034. data/lib/ory-client/models/admin_create_identity_import_credentials_password_config.rb +0 -230
  1035. data/lib/ory-client/models/admin_create_json_web_key_set_body.rb +0 -255
  1036. data/lib/ory-client/models/admin_create_self_service_recovery_code_body.rb +0 -252
  1037. data/lib/ory-client/models/admin_create_self_service_recovery_link_body.rb +0 -252
  1038. data/lib/ory-client/models/admin_identity_import_credentials.rb +0 -228
  1039. data/lib/ory-client/models/admin_trust_o_auth2_jwt_grant_issuer_body.rb +0 -291
  1040. data/lib/ory-client/models/admin_update_identity_body.rb +0 -285
  1041. data/lib/ory-client/models/cname_settings.rb +0 -296
  1042. data/lib/ory-client/models/create_custom_hostname_body.rb +0 -252
  1043. data/lib/ory-client/models/create_subscription_payload.rb +0 -247
  1044. data/lib/ory-client/models/expand_tree.rb +0 -280
  1045. data/lib/ory-client/models/get_check_response.rb +0 -226
  1046. data/lib/ory-client/models/get_namespaces_response.rb +0 -221
  1047. data/lib/ory-client/models/get_relation_tuples_response.rb +0 -231
  1048. data/lib/ory-client/models/handled_o_auth2_consent_request.rb +0 -225
  1049. data/lib/ory-client/models/handled_o_auth2_login_request.rb +0 -225
  1050. data/lib/ory-client/models/handled_o_auth2_logout_request.rb +0 -225
  1051. data/lib/ory-client/models/headers.rb +0 -222
  1052. data/lib/ory-client/models/id_token_claims.rb +0 -343
  1053. data/lib/ory-client/models/invite_payload.rb +0 -219
  1054. data/lib/ory-client/models/is_owner_for_project_by_slug_payload.rb +0 -250
  1055. data/lib/ory-client/models/json_error.rb +0 -225
  1056. data/lib/ory-client/models/o_auth2_access_request.rb +0 -256
  1057. data/lib/ory-client/models/o_auth2_api_error.rb +0 -251
  1058. data/lib/ory-client/models/o_auth2_token_response.rb +0 -271
  1059. data/lib/ory-client/models/patch_delta.rb +0 -262
  1060. data/lib/ory-client/models/post_check_opl_syntax_response.rb +0 -222
  1061. data/lib/ory-client/models/previous_o_auth2_consent_session.rb +0 -280
  1062. data/lib/ory-client/models/provision_mock_subscription_payload.rb +0 -238
  1063. data/lib/ory-client/models/quota_custom_domains.rb +0 -237
  1064. data/lib/ory-client/models/quota_project_member_seats.rb +0 -237
  1065. data/lib/ory-client/models/refresh_token_hook_request.rb +0 -272
  1066. data/lib/ory-client/models/refresh_token_hook_response.rb +0 -219
  1067. data/lib/ory-client/models/relation_tuple.rb +0 -274
  1068. data/lib/ory-client/models/revoked_sessions.rb +0 -220
  1069. data/lib/ory-client/models/self_service_browser_location_change_required_error.rb +0 -307
  1070. data/lib/ory-client/models/self_service_error.rb +0 -254
  1071. data/lib/ory-client/models/self_service_login_flow.rb +0 -358
  1072. data/lib/ory-client/models/self_service_logout_url.rb +0 -240
  1073. data/lib/ory-client/models/self_service_recovery_code.rb +0 -250
  1074. data/lib/ory-client/models/self_service_recovery_flow.rb +0 -334
  1075. data/lib/ory-client/models/self_service_recovery_flow_state.rb +0 -38
  1076. data/lib/ory-client/models/self_service_recovery_link.rb +0 -235
  1077. data/lib/ory-client/models/self_service_registration_flow.rb +0 -318
  1078. data/lib/ory-client/models/self_service_settings_flow.rb +0 -348
  1079. data/lib/ory-client/models/self_service_settings_flow_state.rb +0 -37
  1080. data/lib/ory-client/models/self_service_verification_flow.rb +0 -319
  1081. data/lib/ory-client/models/self_service_verification_flow_state.rb +0 -38
  1082. data/lib/ory-client/models/settings_profile_form_config.rb +0 -267
  1083. data/lib/ory-client/models/stripe_customer_response.rb +0 -219
  1084. data/lib/ory-client/models/submit_self_service_flow_with_web_authn_registration_method.rb +0 -230
  1085. data/lib/ory-client/models/submit_self_service_login_flow_body.rb +0 -61
  1086. data/lib/ory-client/models/submit_self_service_login_flow_with_lookup_secret_method_body.rb +0 -250
  1087. data/lib/ory-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +0 -261
  1088. data/lib/ory-client/models/submit_self_service_login_flow_with_password_method_body.rb +0 -275
  1089. data/lib/ory-client/models/submit_self_service_login_flow_with_totp_method_body.rb +0 -250
  1090. data/lib/ory-client/models/submit_self_service_login_flow_with_web_authn_method_body.rb +0 -260
  1091. data/lib/ory-client/models/submit_self_service_logout_flow_without_browser_body.rb +0 -226
  1092. data/lib/ory-client/models/submit_self_service_recovery_flow_body.rb +0 -55
  1093. data/lib/ory-client/models/submit_self_service_recovery_flow_with_code_method_body.rb +0 -255
  1094. data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +0 -250
  1095. data/lib/ory-client/models/submit_self_service_registration_flow_body.rb +0 -57
  1096. data/lib/ory-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +0 -261
  1097. data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method_body.rb +0 -266
  1098. data/lib/ory-client/models/submit_self_service_registration_flow_with_web_authn_method_body.rb +0 -270
  1099. data/lib/ory-client/models/submit_self_service_settings_flow_body.rb +0 -63
  1100. data/lib/ory-client/models/submit_self_service_settings_flow_with_lookup_method_body.rb +0 -275
  1101. data/lib/ory-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +0 -266
  1102. data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method_body.rb +0 -250
  1103. data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +0 -251
  1104. data/lib/ory-client/models/submit_self_service_settings_flow_with_totp_method_body.rb +0 -255
  1105. data/lib/ory-client/models/submit_self_service_settings_flow_with_web_authn_method_body.rb +0 -265
  1106. data/lib/ory-client/models/submit_self_service_verification_flow_body.rb +0 -54
  1107. data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method_body.rb +0 -250
  1108. data/lib/ory-client/models/successful_o_auth2_request_response.rb +0 -225
  1109. data/lib/ory-client/models/successful_self_service_login_without_browser.rb +0 -235
  1110. data/lib/ory-client/models/successful_self_service_registration_without_browser.rb +0 -244
  1111. data/lib/ory-client/models/update_custom_hostname_body.rb +0 -252
  1112. data/lib/ory-client/models/update_o_auth2_client_lifespans.rb +0 -535
  1113. data/lib/ory-client/models/update_project.rb +0 -239
  1114. data/lib/ory-client/models/update_subscription_payload.rb +0 -233
  1115. data/spec/api/admin_api_spec.rb +0 -47
  1116. data/spec/api/namespaces_api_spec.rb +0 -46
  1117. data/spec/api/read_api_spec.rb +0 -124
  1118. data/spec/api/syntax_api_spec.rb +0 -47
  1119. data/spec/api/v0alpha2_api_spec.rb +0 -1253
  1120. data/spec/api/write_api_spec.rb +0 -77
  1121. data/spec/models/active_project_spec.rb +0 -34
  1122. data/spec/models/admin_create_identity_body_spec.rb +0 -76
  1123. data/spec/models/admin_create_identity_import_credentials_oidc_config_spec.rb +0 -40
  1124. data/spec/models/admin_create_identity_import_credentials_oidc_provider_spec.rb +0 -40
  1125. data/spec/models/admin_create_identity_import_credentials_oidc_spec.rb +0 -34
  1126. data/spec/models/admin_create_identity_import_credentials_password_config_spec.rb +0 -40
  1127. data/spec/models/admin_create_identity_import_credentials_password_spec.rb +0 -34
  1128. data/spec/models/admin_create_json_web_key_set_body_spec.rb +0 -46
  1129. data/spec/models/admin_create_self_service_recovery_code_body_spec.rb +0 -40
  1130. data/spec/models/admin_create_self_service_recovery_link_body_spec.rb +0 -40
  1131. data/spec/models/admin_identity_import_credentials_spec.rb +0 -40
  1132. data/spec/models/admin_trust_o_auth2_jwt_grant_issuer_body_spec.rb +0 -64
  1133. data/spec/models/admin_update_identity_body_spec.rb +0 -64
  1134. data/spec/models/cname_settings_spec.rb +0 -82
  1135. data/spec/models/create_custom_hostname_body_spec.rb +0 -52
  1136. data/spec/models/create_subscription_payload_spec.rb +0 -46
  1137. data/spec/models/expand_tree_spec.rb +0 -50
  1138. data/spec/models/get_check_response_spec.rb +0 -34
  1139. data/spec/models/get_namespaces_response_spec.rb +0 -34
  1140. data/spec/models/get_relation_tuples_response_spec.rb +0 -40
  1141. data/spec/models/handled_o_auth2_consent_request_spec.rb +0 -34
  1142. data/spec/models/handled_o_auth2_login_request_spec.rb +0 -34
  1143. data/spec/models/handled_o_auth2_logout_request_spec.rb +0 -34
  1144. data/spec/models/headers_spec.rb +0 -34
  1145. data/spec/models/id_token_claims_spec.rb +0 -112
  1146. data/spec/models/invite_payload_spec.rb +0 -34
  1147. data/spec/models/is_owner_for_project_by_slug_payload_spec.rb +0 -46
  1148. data/spec/models/json_error_spec.rb +0 -34
  1149. data/spec/models/o_auth2_access_request_spec.rb +0 -52
  1150. data/spec/models/o_auth2_api_error_spec.rb +0 -52
  1151. data/spec/models/o_auth2_token_response_spec.rb +0 -64
  1152. data/spec/models/patch_delta_spec.rb +0 -44
  1153. data/spec/models/post_check_opl_syntax_response_spec.rb +0 -34
  1154. data/spec/models/previous_o_auth2_consent_session_spec.rb +0 -70
  1155. data/spec/models/provision_mock_subscription_payload_spec.rb +0 -40
  1156. data/spec/models/quota_custom_domains_spec.rb +0 -46
  1157. data/spec/models/quota_project_member_seats_spec.rb +0 -46
  1158. data/spec/models/refresh_token_hook_request_spec.rb +0 -64
  1159. data/spec/models/refresh_token_hook_response_spec.rb +0 -34
  1160. data/spec/models/relation_tuple_spec.rb +0 -58
  1161. data/spec/models/revoked_sessions_spec.rb +0 -34
  1162. data/spec/models/self_service_browser_location_change_required_error_spec.rb +0 -82
  1163. data/spec/models/self_service_error_spec.rb +0 -52
  1164. data/spec/models/self_service_login_flow_spec.rb +0 -100
  1165. data/spec/models/self_service_logout_url_spec.rb +0 -40
  1166. data/spec/models/self_service_recovery_code_spec.rb +0 -46
  1167. data/spec/models/self_service_recovery_flow_spec.rb +0 -82
  1168. data/spec/models/self_service_recovery_flow_state_spec.rb +0 -28
  1169. data/spec/models/self_service_recovery_link_spec.rb +0 -40
  1170. data/spec/models/self_service_registration_flow_spec.rb +0 -76
  1171. data/spec/models/self_service_settings_flow_spec.rb +0 -88
  1172. data/spec/models/self_service_settings_flow_state_spec.rb +0 -28
  1173. data/spec/models/self_service_verification_flow_spec.rb +0 -82
  1174. data/spec/models/self_service_verification_flow_state_spec.rb +0 -28
  1175. data/spec/models/settings_profile_form_config_spec.rb +0 -52
  1176. data/spec/models/stripe_customer_response_spec.rb +0 -34
  1177. data/spec/models/submit_self_service_flow_with_web_authn_registration_method_spec.rb +0 -40
  1178. data/spec/models/submit_self_service_login_flow_body_spec.rb +0 -43
  1179. data/spec/models/submit_self_service_login_flow_with_lookup_secret_method_body_spec.rb +0 -46
  1180. data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +0 -52
  1181. data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +0 -58
  1182. data/spec/models/submit_self_service_login_flow_with_totp_method_body_spec.rb +0 -46
  1183. data/spec/models/submit_self_service_login_flow_with_web_authn_method_body_spec.rb +0 -52
  1184. data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +0 -34
  1185. data/spec/models/submit_self_service_recovery_flow_body_spec.rb +0 -43
  1186. data/spec/models/submit_self_service_recovery_flow_with_code_method_body_spec.rb +0 -52
  1187. data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +0 -46
  1188. data/spec/models/submit_self_service_registration_flow_body_spec.rb +0 -43
  1189. data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +0 -52
  1190. data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +0 -52
  1191. data/spec/models/submit_self_service_registration_flow_with_web_authn_method_body_spec.rb +0 -58
  1192. data/spec/models/submit_self_service_settings_flow_body_spec.rb +0 -43
  1193. data/spec/models/submit_self_service_settings_flow_with_lookup_method_body_spec.rb +0 -64
  1194. data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +0 -58
  1195. data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +0 -46
  1196. data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +0 -46
  1197. data/spec/models/submit_self_service_settings_flow_with_totp_method_body_spec.rb +0 -52
  1198. data/spec/models/submit_self_service_settings_flow_with_web_authn_method_body_spec.rb +0 -58
  1199. data/spec/models/submit_self_service_verification_flow_body_spec.rb +0 -43
  1200. data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +0 -46
  1201. data/spec/models/successful_o_auth2_request_response_spec.rb +0 -34
  1202. data/spec/models/successful_self_service_login_without_browser_spec.rb +0 -40
  1203. data/spec/models/successful_self_service_registration_without_browser_spec.rb +0 -46
  1204. data/spec/models/update_custom_hostname_body_spec.rb +0 -52
  1205. data/spec/models/update_o_auth2_client_lifespans_spec.rb +0 -100
  1206. data/spec/models/update_project_spec.rb +0 -40
  1207. data/spec/models/update_subscription_payload_spec.rb +0 -40
  1208. data/vendor/bundle/ruby/2.5.0/cache/ethon-0.15.0.gem +0 -0
  1209. data/vendor/bundle/ruby/2.5.0/cache/parser-3.1.2.1.gem +0 -0
  1210. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.11.0.gem +0 -0
  1211. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.11.0.gem +0 -0
  1212. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.11.1.gem +0 -0
  1213. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.11.1.gem +0 -0
  1214. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.11.1.gem +0 -0
  1215. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/.github/workflows/ruby.yml +0 -41
  1216. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/CHANGELOG.md +0 -372
  1217. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/README.md +0 -95
  1218. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb +0 -55
  1219. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/curls/options.rb +0 -502
  1220. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/easy/callbacks.rb +0 -148
  1221. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/easy/informations.rb +0 -113
  1222. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/easy/response_callbacks.rb +0 -131
  1223. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/lib/ethon/version.rb +0 -6
  1224. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/easy/callbacks_spec.rb +0 -59
  1225. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/easy/informations_spec.rb +0 -120
  1226. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/easy/mirror_spec.rb +0 -47
  1227. data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/easy/operations_spec.rb +0 -268
  1228. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ast/processor.rb +0 -288
  1229. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/builders/default.rb +0 -2309
  1230. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/current.rb +0 -119
  1231. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/lexer.rb +0 -25015
  1232. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/macruby.rb +0 -6177
  1233. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/messages.rb +0 -118
  1234. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/meta.rb +0 -39
  1235. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby18.rb +0 -5708
  1236. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby19.rb +0 -6126
  1237. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby20.rb +0 -6563
  1238. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby21.rb +0 -6611
  1239. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby22.rb +0 -6655
  1240. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby23.rb +0 -6669
  1241. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby24.rb +0 -6736
  1242. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby25.rb +0 -6694
  1243. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby26.rb +0 -6721
  1244. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby27.rb +0 -7914
  1245. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby30.rb +0 -8096
  1246. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby31.rb +0 -8358
  1247. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/ruby32.rb +0 -8338
  1248. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/rubymotion.rb +0 -6125
  1249. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/static_environment.rb +0 -69
  1250. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/lib/parser/version.rb +0 -5
  1251. data/vendor/bundle/ruby/2.5.0/gems/parser-3.1.2.1/parser.gemspec +0 -43
  1252. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.11.0/lib/rspec/version.rb +0 -5
  1253. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/Changelog.md +0 -2355
  1254. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/lib/rspec/core/configuration.rb +0 -2383
  1255. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/lib/rspec/core/formatters/exception_presenter.rb +0 -521
  1256. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/lib/rspec/core/formatters/html_printer.rb +0 -414
  1257. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/lib/rspec/core/option_parser.rb +0 -325
  1258. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.11.0/lib/rspec/core/version.rb +0 -9
  1259. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.11.1/Changelog.md +0 -1277
  1260. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/version.rb +0 -8
  1261. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.11.1/lib/rspec/matchers.rb +0 -1041
  1262. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/Changelog.md +0 -1193
  1263. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/error_generator.rb +0 -369
  1264. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/message_expectation.rb +0 -822
  1265. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/method_reference.rb +0 -202
  1266. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/verifying_message_expectation.rb +0 -54
  1267. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/version.rb +0 -9
  1268. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.11.1/Changelog.md +0 -357
  1269. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.11.1/lib/rspec/support/ruby_features.rb +0 -194
  1270. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.11.1/lib/rspec/support/version.rb +0 -7
  1271. data/vendor/bundle/ruby/2.5.0/specifications/ethon-0.15.0.gemspec +0 -32
  1272. data/vendor/bundle/ruby/2.5.0/specifications/parser-3.1.2.1.gemspec +0 -63
  1273. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.11.0.gemspec +0 -43
  1274. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.11.0.gemspec +0 -63
  1275. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.11.1.gemspec +0 -51
  1276. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.11.1.gemspec +0 -51
  1277. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.11.1.gemspec +0 -39
@@ -0,0 +1,2317 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Parser
4
+
5
+ ##
6
+ # Default AST builder. Uses {AST::Node}s.
7
+ #
8
+ class Builders::Default
9
+ class << self
10
+ ##
11
+ # AST compatibility attribute; since `-> {}` is not semantically
12
+ # equivalent to `lambda {}`, all new code should set this attribute
13
+ # to true.
14
+ #
15
+ # If set to false (the default), `-> {}` is emitted as
16
+ # `s(:block, s(:send, nil, :lambda), s(:args), nil)`.
17
+ #
18
+ # If set to true, `-> {}` is emitted as
19
+ # `s(:block, s(:lambda), s(:args), nil)`.
20
+ #
21
+ # @return [Boolean]
22
+ attr_accessor :emit_lambda
23
+ end
24
+
25
+ @emit_lambda = false
26
+
27
+ class << self
28
+ ##
29
+ # AST compatibility attribute; block arguments of `m { |a| }` are
30
+ # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`,
31
+ # all new code should set this attribute to true.
32
+ #
33
+ # If set to false (the default), arguments of `m { |a| }` are emitted as
34
+ # `s(:args, s(:arg, :a))`.
35
+ #
36
+ # If set to true, arguments of `m { |a| }` are emitted as
37
+ # `s(:args, s(:procarg0, :a)).
38
+ #
39
+ # @return [Boolean]
40
+ attr_accessor :emit_procarg0
41
+ end
42
+
43
+ @emit_procarg0 = false
44
+
45
+ class << self
46
+ ##
47
+ # AST compatibility attribute; locations of `__ENCODING__` are not the same
48
+ # as locations of `Encoding::UTF_8` causing problems during rewriting,
49
+ # all new code should set this attribute to true.
50
+ #
51
+ # If set to false (the default), `__ENCODING__` is emitted as
52
+ # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`.
53
+ #
54
+ # If set to true, `__ENCODING__` is emitted as
55
+ # `s(:__ENCODING__)`.
56
+ #
57
+ # @return [Boolean]
58
+ attr_accessor :emit_encoding
59
+ end
60
+
61
+ @emit_encoding = false
62
+
63
+ class << self
64
+ ##
65
+ # AST compatibility attribute; indexed assignment, `x[] = 1`, is not
66
+ # semantically equivalent to calling the method directly, `x.[]=(1)`.
67
+ # Specifically, in the former case, the expression's value is always 1,
68
+ # and in the latter case, the expression's value is the return value
69
+ # of the `[]=` method.
70
+ #
71
+ # If set to false (the default), `self[1]` is emitted as
72
+ # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is
73
+ # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`.
74
+ #
75
+ # If set to true, `self[1]` is emitted as
76
+ # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is
77
+ # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`.
78
+ #
79
+ # @return [Boolean]
80
+ attr_accessor :emit_index
81
+ end
82
+
83
+ @emit_index = false
84
+
85
+ class << self
86
+ ##
87
+ # AST compatibility attribute; causes a single non-mlhs
88
+ # block argument to be wrapped in s(:procarg0).
89
+ #
90
+ # If set to false (the default), block arguments `|a|` are emitted as
91
+ # `s(:args, s(:procarg0, :a))`
92
+ #
93
+ # If set to true, block arguments `|a|` are emitted as
94
+ # `s(:args, s(:procarg0, s(:arg, :a))`
95
+ #
96
+ # @return [Boolean]
97
+ attr_accessor :emit_arg_inside_procarg0
98
+ end
99
+
100
+ @emit_arg_inside_procarg0 = false
101
+
102
+ class << self
103
+ ##
104
+ # AST compatibility attribute; arguments forwarding initially
105
+ # didn't have support for leading arguments
106
+ # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0
107
+ # added support for any number of arguments in front of the `...`.
108
+ #
109
+ # If set to false (the default):
110
+ # 1. `def m(...) end` is emitted as
111
+ # s(:def, :m, s(:forward_args), nil)
112
+ # 2. `def m(a, b, ...) end` is emitted as
113
+ # s(:def, :m,
114
+ # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg)))
115
+ #
116
+ # If set to true it uses a single format:
117
+ # 1. `def m(...) end` is emitted as
118
+ # s(:def, :m, s(:args, s(:forward_arg)))
119
+ # 2. `def m(a, b, ...) end` is emitted as
120
+ # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg)))
121
+ #
122
+ # It does't matter that much on 2.7 (because there can't be any leading arguments),
123
+ # but on 3.0 it should be better enabled to use a single AST format.
124
+ #
125
+ # @return [Boolean]
126
+ attr_accessor :emit_forward_arg
127
+ end
128
+
129
+ @emit_forward_arg = false
130
+
131
+ class << self
132
+ ##
133
+ # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments
134
+ # of method calls that are passed explicitly as a hash (i.e. with curly braces)
135
+ # are treated as positional arguments and Ruby 2.7 emits a warning on such method
136
+ # call. Ruby 3.0 given an ArgumentError.
137
+ #
138
+ # If set to false (the default) the last hash argument is emitted as `hash`:
139
+ #
140
+ # ```
141
+ # (send nil :foo
142
+ # (hash
143
+ # (pair
144
+ # (sym :bar)
145
+ # (int 42))))
146
+ # ```
147
+ #
148
+ # If set to true it is emitted as `kwargs`:
149
+ #
150
+ # ```
151
+ # (send nil :foo
152
+ # (kwargs
153
+ # (pair
154
+ # (sym :bar)
155
+ # (int 42))))
156
+ # ```
157
+ #
158
+ # Note that `kwargs` node is just a replacement for `hash` argument,
159
+ # so if there's are multiple arguments (or a `kwsplat`) all of them
160
+ # are wrapped into `kwargs` instead of `hash`:
161
+ #
162
+ # ```
163
+ # (send nil :foo
164
+ # (kwargs
165
+ # (pair
166
+ # (sym :a)
167
+ # (int 42))
168
+ # (kwsplat
169
+ # (send nil :b))
170
+ # (pair
171
+ # (sym :c)
172
+ # (int 10))))
173
+ # ```
174
+ attr_accessor :emit_kwargs
175
+ end
176
+
177
+ @emit_kwargs = false
178
+
179
+ class << self
180
+ ##
181
+ # AST compatibility attribute; Starting from 3.0 Ruby returns
182
+ # true/false from single-line pattern matching with `in` keyword.
183
+ #
184
+ # Before 3.0 there was an exception if given value doesn't match pattern.
185
+ #
186
+ # NOTE: This attribute affects only Ruby 2.7 grammar.
187
+ # 3.0 grammar always emits `match_pattern`/`match_pattern_p`
188
+ #
189
+ # If compatibility attribute set to false `foo in bar` is emitted as `in_match`:
190
+ #
191
+ # ```
192
+ # (in-match
193
+ # (send nil :foo)
194
+ # (match-var :bar))
195
+ # ```
196
+ #
197
+ # If set to true it's emitted as `match_pattern_p`:
198
+ # ```
199
+ # (match-pattern-p
200
+ # (send nil :foo)
201
+ # (match-var :bar))
202
+ # ```
203
+ attr_accessor :emit_match_pattern
204
+ end
205
+
206
+ @emit_match_pattern = false
207
+
208
+ class << self
209
+ ##
210
+ # @api private
211
+ def modernize
212
+ @emit_lambda = true
213
+ @emit_procarg0 = true
214
+ @emit_encoding = true
215
+ @emit_index = true
216
+ @emit_arg_inside_procarg0 = true
217
+ @emit_forward_arg = true
218
+ @emit_kwargs = true
219
+ @emit_match_pattern = true
220
+ end
221
+ end
222
+
223
+ ##
224
+ # @api private
225
+ attr_accessor :parser
226
+
227
+ ##
228
+ # If set to true (the default), `__FILE__` and `__LINE__` are transformed to
229
+ # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`.
230
+ #
231
+ # If set to false, `__FILE__` and `__LINE__` are emitted as-is,
232
+ # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes.
233
+ #
234
+ # Source maps are identical in both cases.
235
+ #
236
+ # @return [Boolean]
237
+ attr_accessor :emit_file_line_as_literals
238
+
239
+ ##
240
+ # Initializes attributes:
241
+ #
242
+ # * `emit_file_line_as_literals`: `true`
243
+ def initialize
244
+ @emit_file_line_as_literals = true
245
+ end
246
+
247
+ # @!parse private
248
+
249
+ #
250
+ # Literals
251
+ #
252
+
253
+ # Singletons
254
+
255
+ def nil(nil_t)
256
+ n0(:nil,
257
+ token_map(nil_t))
258
+ end
259
+
260
+ def true(true_t)
261
+ n0(:true,
262
+ token_map(true_t))
263
+ end
264
+
265
+ def false(false_t)
266
+ n0(:false,
267
+ token_map(false_t))
268
+ end
269
+
270
+ # Numerics
271
+
272
+ def integer(integer_t)
273
+ numeric(:int, integer_t)
274
+ end
275
+
276
+ def float(float_t)
277
+ numeric(:float, float_t)
278
+ end
279
+
280
+ def rational(rational_t)
281
+ numeric(:rational, rational_t)
282
+ end
283
+
284
+ def complex(complex_t)
285
+ numeric(:complex, complex_t)
286
+ end
287
+
288
+ def numeric(kind, token)
289
+ n(kind, [ value(token) ],
290
+ Source::Map::Operator.new(nil, loc(token)))
291
+ end
292
+ private :numeric
293
+
294
+ def unary_num(unary_t, numeric)
295
+ value, = *numeric
296
+ operator_loc = loc(unary_t)
297
+
298
+ case value(unary_t)
299
+ when '+'
300
+ value = +value
301
+ when '-'
302
+ value = -value
303
+ end
304
+
305
+ numeric.updated(nil, [ value ],
306
+ :location =>
307
+ Source::Map::Operator.new(
308
+ operator_loc,
309
+ operator_loc.join(numeric.loc.expression)))
310
+ end
311
+
312
+ def __LINE__(__LINE__t)
313
+ n0(:__LINE__,
314
+ token_map(__LINE__t))
315
+ end
316
+
317
+ # Strings
318
+
319
+ def string(string_t)
320
+ n(:str, [ string_value(string_t) ],
321
+ delimited_string_map(string_t))
322
+ end
323
+
324
+ def string_internal(string_t)
325
+ n(:str, [ string_value(string_t) ],
326
+ unquoted_map(string_t))
327
+ end
328
+
329
+ def string_compose(begin_t, parts, end_t)
330
+ if collapse_string_parts?(parts)
331
+ if begin_t.nil? && end_t.nil?
332
+ parts.first
333
+ else
334
+ n(:str, parts.first.children,
335
+ string_map(begin_t, parts, end_t))
336
+ end
337
+ else
338
+ n(:dstr, [ *parts ],
339
+ string_map(begin_t, parts, end_t))
340
+ end
341
+ end
342
+
343
+ def character(char_t)
344
+ n(:str, [ string_value(char_t) ],
345
+ prefix_string_map(char_t))
346
+ end
347
+
348
+ def __FILE__(__FILE__t)
349
+ n0(:__FILE__,
350
+ token_map(__FILE__t))
351
+ end
352
+
353
+ # Symbols
354
+
355
+ def symbol(symbol_t)
356
+ n(:sym, [ string_value(symbol_t).to_sym ],
357
+ prefix_string_map(symbol_t))
358
+ end
359
+
360
+ def symbol_internal(symbol_t)
361
+ n(:sym, [ string_value(symbol_t).to_sym ],
362
+ unquoted_map(symbol_t))
363
+ end
364
+
365
+ def symbol_compose(begin_t, parts, end_t)
366
+ if collapse_string_parts?(parts)
367
+ str = parts.first
368
+
369
+ n(:sym, [ str.children.first.to_sym ],
370
+ collection_map(begin_t, str.loc.expression, end_t))
371
+ elsif @parser.version == 18 && parts.empty?
372
+ diagnostic :error, :empty_symbol, nil, loc(begin_t).join(loc(end_t))
373
+ else
374
+ n(:dsym, [ *parts ],
375
+ collection_map(begin_t, parts, end_t))
376
+ end
377
+ end
378
+
379
+ # Executable strings
380
+
381
+ def xstring_compose(begin_t, parts, end_t)
382
+ n(:xstr, [ *parts ],
383
+ string_map(begin_t, parts, end_t))
384
+ end
385
+
386
+ # Indented (interpolated, noninterpolated, executable) strings
387
+
388
+ def dedent_string(node, dedent_level)
389
+ if !dedent_level.nil?
390
+ dedenter = Lexer::Dedenter.new(dedent_level)
391
+
392
+ case node.type
393
+ when :str
394
+ str = node.children.first
395
+ dedenter.dedent(str)
396
+ when :dstr, :xstr
397
+ children = node.children.map do |str_node|
398
+ if str_node.type == :str
399
+ str = str_node.children.first
400
+ dedenter.dedent(str)
401
+ next nil if str.empty?
402
+ else
403
+ dedenter.interrupt
404
+ end
405
+ str_node
406
+ end
407
+
408
+ node = node.updated(nil, children.compact)
409
+ end
410
+ end
411
+
412
+ node
413
+ end
414
+
415
+ # Regular expressions
416
+
417
+ def regexp_options(regopt_t)
418
+ options = value(regopt_t).
419
+ each_char.sort.uniq.
420
+ map(&:to_sym)
421
+
422
+ n(:regopt, options,
423
+ token_map(regopt_t))
424
+ end
425
+
426
+ def regexp_compose(begin_t, parts, end_t, options)
427
+ begin
428
+ static_regexp(parts, options)
429
+ rescue RegexpError => e
430
+ diagnostic :error, :invalid_regexp, { :message => e.message },
431
+ loc(begin_t).join(loc(end_t))
432
+ end
433
+
434
+ n(:regexp, (parts << options),
435
+ regexp_map(begin_t, end_t, options))
436
+ end
437
+
438
+ # Arrays
439
+
440
+ def array(begin_t, elements, end_t)
441
+ n(:array, elements,
442
+ collection_map(begin_t, elements, end_t))
443
+ end
444
+
445
+ def splat(star_t, arg=nil)
446
+ if arg.nil?
447
+ n0(:splat,
448
+ unary_op_map(star_t))
449
+ else
450
+ n(:splat, [ arg ],
451
+ unary_op_map(star_t, arg))
452
+ end
453
+ end
454
+
455
+ def word(parts)
456
+ if collapse_string_parts?(parts)
457
+ parts.first
458
+ else
459
+ n(:dstr, [ *parts ],
460
+ collection_map(nil, parts, nil))
461
+ end
462
+ end
463
+
464
+ def words_compose(begin_t, parts, end_t)
465
+ n(:array, [ *parts ],
466
+ collection_map(begin_t, parts, end_t))
467
+ end
468
+
469
+ def symbols_compose(begin_t, parts, end_t)
470
+ parts = parts.map do |part|
471
+ case part.type
472
+ when :str
473
+ value, = *part
474
+ part.updated(:sym, [ value.to_sym ])
475
+ when :dstr
476
+ part.updated(:dsym)
477
+ else
478
+ part
479
+ end
480
+ end
481
+
482
+ n(:array, [ *parts ],
483
+ collection_map(begin_t, parts, end_t))
484
+ end
485
+
486
+ # Hashes
487
+
488
+ def pair(key, assoc_t, value)
489
+ n(:pair, [ key, value ],
490
+ binary_op_map(key, assoc_t, value))
491
+ end
492
+
493
+ def pair_list_18(list)
494
+ if list.size % 2 != 0
495
+ diagnostic :error, :odd_hash, nil, list.last.loc.expression
496
+ else
497
+ list.
498
+ each_slice(2).map do |key, value|
499
+ n(:pair, [ key, value ],
500
+ binary_op_map(key, nil, value))
501
+ end
502
+ end
503
+ end
504
+
505
+ def pair_keyword(key_t, value)
506
+ key_map, pair_map = pair_keyword_map(key_t, value)
507
+
508
+ key = n(:sym, [ value(key_t).to_sym ], key_map)
509
+
510
+ n(:pair, [ key, value ], pair_map)
511
+ end
512
+
513
+ def pair_quoted(begin_t, parts, end_t, value)
514
+ end_t, pair_map = pair_quoted_map(begin_t, end_t, value)
515
+
516
+ key = symbol_compose(begin_t, parts, end_t)
517
+
518
+ n(:pair, [ key, value ], pair_map)
519
+ end
520
+
521
+ def pair_label(key_t)
522
+ key_l = loc(key_t)
523
+ value_l = key_l.adjust(end_pos: -1)
524
+
525
+ label = value(key_t)
526
+ value =
527
+ if label =~ /\A[[:lower:]]/
528
+ n(:ident, [ label.to_sym ], Source::Map::Variable.new(value_l))
529
+ else
530
+ n(:const, [ nil, label.to_sym ], Source::Map::Constant.new(nil, value_l, value_l))
531
+ end
532
+ pair_keyword(key_t, accessible(value))
533
+ end
534
+
535
+ def kwsplat(dstar_t, arg)
536
+ n(:kwsplat, [ arg ],
537
+ unary_op_map(dstar_t, arg))
538
+ end
539
+
540
+ def associate(begin_t, pairs, end_t)
541
+ 0.upto(pairs.length - 1) do |i|
542
+ (i + 1).upto(pairs.length - 1) do |j|
543
+ key1, = *pairs[i]
544
+ key2, = *pairs[j]
545
+
546
+ do_warn = false
547
+
548
+ # keys have to be simple nodes, MRI ignores equal composite keys like
549
+ # `{ a(1) => 1, a(1) => 1 }`
550
+ case key1.type
551
+ when :sym, :str, :int, :float
552
+ if key1 == key2
553
+ do_warn = true
554
+ end
555
+ when :rational, :complex, :regexp
556
+ if @parser.version >= 31 && key1 == key2
557
+ do_warn = true
558
+ end
559
+ end
560
+
561
+ if do_warn
562
+ diagnostic :warning, :duplicate_hash_key, nil, key2.loc.expression
563
+ end
564
+ end
565
+ end
566
+
567
+ n(:hash, [ *pairs ],
568
+ collection_map(begin_t, pairs, end_t))
569
+ end
570
+
571
+ # Ranges
572
+
573
+ def range_inclusive(lhs, dot2_t, rhs)
574
+ n(:irange, [ lhs, rhs ],
575
+ range_map(lhs, dot2_t, rhs))
576
+ end
577
+
578
+ def range_exclusive(lhs, dot3_t, rhs)
579
+ n(:erange, [ lhs, rhs ],
580
+ range_map(lhs, dot3_t, rhs))
581
+ end
582
+
583
+ #
584
+ # Access
585
+ #
586
+
587
+ def self(token)
588
+ n0(:self,
589
+ token_map(token))
590
+ end
591
+
592
+ def ident(token)
593
+ n(:ident, [ value(token).to_sym ],
594
+ variable_map(token))
595
+ end
596
+
597
+ def ivar(token)
598
+ n(:ivar, [ value(token).to_sym ],
599
+ variable_map(token))
600
+ end
601
+
602
+ def gvar(token)
603
+ n(:gvar, [ value(token).to_sym ],
604
+ variable_map(token))
605
+ end
606
+
607
+ def cvar(token)
608
+ n(:cvar, [ value(token).to_sym ],
609
+ variable_map(token))
610
+ end
611
+
612
+ def back_ref(token)
613
+ n(:back_ref, [ value(token).to_sym ],
614
+ token_map(token))
615
+ end
616
+
617
+ def nth_ref(token)
618
+ n(:nth_ref, [ value(token) ],
619
+ token_map(token))
620
+ end
621
+
622
+ def accessible(node)
623
+ case node.type
624
+ when :__FILE__
625
+ if @emit_file_line_as_literals
626
+ n(:str, [ node.loc.expression.source_buffer.name ],
627
+ node.loc.dup)
628
+ else
629
+ node
630
+ end
631
+
632
+ when :__LINE__
633
+ if @emit_file_line_as_literals
634
+ n(:int, [ node.loc.expression.line ],
635
+ node.loc.dup)
636
+ else
637
+ node
638
+ end
639
+
640
+ when :__ENCODING__
641
+ if !self.class.emit_encoding
642
+ n(:const, [ n(:const, [ nil, :Encoding], nil), :UTF_8 ],
643
+ node.loc.dup)
644
+ else
645
+ node
646
+ end
647
+
648
+ when :ident
649
+ name, = *node
650
+
651
+ if %w[? !].any? { |c| name.to_s.end_with?(c) }
652
+ diagnostic :error, :invalid_id_to_get,
653
+ { :identifier => name.to_s }, node.loc.expression
654
+ end
655
+
656
+ # Numbered parameters are not declared anywhere,
657
+ # so they take precedence over method calls in numblock contexts
658
+ if @parser.version >= 27 && @parser.try_declare_numparam(node)
659
+ return node.updated(:lvar)
660
+ end
661
+
662
+ unless @parser.static_env.declared?(name)
663
+ return n(:send, [ nil, name ],
664
+ var_send_map(node))
665
+ end
666
+
667
+ if name.to_s == parser.current_arg_stack.top
668
+ diagnostic :error, :circular_argument_reference,
669
+ { :var_name => name.to_s }, node.loc.expression
670
+ end
671
+
672
+ node.updated(:lvar)
673
+
674
+ else
675
+ node
676
+ end
677
+ end
678
+
679
+ def const(name_t)
680
+ n(:const, [ nil, value(name_t).to_sym ],
681
+ constant_map(nil, nil, name_t))
682
+ end
683
+
684
+ def const_global(t_colon3, name_t)
685
+ cbase = n0(:cbase, token_map(t_colon3))
686
+
687
+ n(:const, [ cbase, value(name_t).to_sym ],
688
+ constant_map(cbase, t_colon3, name_t))
689
+ end
690
+
691
+ def const_fetch(scope, t_colon2, name_t)
692
+ n(:const, [ scope, value(name_t).to_sym ],
693
+ constant_map(scope, t_colon2, name_t))
694
+ end
695
+
696
+ def __ENCODING__(__ENCODING__t)
697
+ n0(:__ENCODING__,
698
+ token_map(__ENCODING__t))
699
+ end
700
+
701
+ #
702
+ # Assignment
703
+ #
704
+
705
+ def assignable(node)
706
+ case node.type
707
+ when :cvar
708
+ node.updated(:cvasgn)
709
+
710
+ when :ivar
711
+ node.updated(:ivasgn)
712
+
713
+ when :gvar
714
+ node.updated(:gvasgn)
715
+
716
+ when :const
717
+ if @parser.context.in_def
718
+ diagnostic :error, :dynamic_const, nil, node.loc.expression
719
+ end
720
+
721
+ node.updated(:casgn)
722
+
723
+ when :ident
724
+ name, = *node
725
+
726
+ var_name = node.children[0].to_s
727
+ name_loc = node.loc.expression
728
+
729
+ check_assignment_to_numparam(var_name, name_loc)
730
+ check_reserved_for_numparam(var_name, name_loc)
731
+
732
+ @parser.static_env.declare(name)
733
+
734
+ node.updated(:lvasgn)
735
+
736
+ when :match_var
737
+ name, = *node
738
+
739
+ var_name = node.children[0].to_s
740
+ name_loc = node.loc.expression
741
+
742
+ check_assignment_to_numparam(var_name, name_loc)
743
+ check_reserved_for_numparam(var_name, name_loc)
744
+
745
+ node
746
+
747
+ when :nil, :self, :true, :false,
748
+ :__FILE__, :__LINE__, :__ENCODING__
749
+ diagnostic :error, :invalid_assignment, nil, node.loc.expression
750
+
751
+ when :back_ref, :nth_ref
752
+ diagnostic :error, :backref_assignment, nil, node.loc.expression
753
+ end
754
+ end
755
+
756
+ def const_op_assignable(node)
757
+ node.updated(:casgn)
758
+ end
759
+
760
+ def assign(lhs, eql_t, rhs)
761
+ (lhs << rhs).updated(nil, nil,
762
+ :location => lhs.loc.
763
+ with_operator(loc(eql_t)).
764
+ with_expression(join_exprs(lhs, rhs)))
765
+ end
766
+
767
+ def op_assign(lhs, op_t, rhs)
768
+ case lhs.type
769
+ when :gvasgn, :ivasgn, :lvasgn, :cvasgn, :casgn, :send, :csend, :index
770
+ operator = value(op_t)[0..-1].to_sym
771
+ source_map = lhs.loc.
772
+ with_operator(loc(op_t)).
773
+ with_expression(join_exprs(lhs, rhs))
774
+
775
+ if lhs.type == :index
776
+ lhs = lhs.updated(:indexasgn)
777
+ end
778
+
779
+ case operator
780
+ when :'&&'
781
+ n(:and_asgn, [ lhs, rhs ], source_map)
782
+ when :'||'
783
+ n(:or_asgn, [ lhs, rhs ], source_map)
784
+ else
785
+ n(:op_asgn, [ lhs, operator, rhs ], source_map)
786
+ end
787
+
788
+ when :back_ref, :nth_ref
789
+ diagnostic :error, :backref_assignment, nil, lhs.loc.expression
790
+ end
791
+ end
792
+
793
+ def multi_lhs(begin_t, items, end_t)
794
+ n(:mlhs, [ *items ],
795
+ collection_map(begin_t, items, end_t))
796
+ end
797
+
798
+ def multi_assign(lhs, eql_t, rhs)
799
+ n(:masgn, [ lhs, rhs ],
800
+ binary_op_map(lhs, eql_t, rhs))
801
+ end
802
+
803
+ #
804
+ # Class and module definition
805
+ #
806
+
807
+ def def_class(class_t, name,
808
+ lt_t, superclass,
809
+ body, end_t)
810
+ n(:class, [ name, superclass, body ],
811
+ module_definition_map(class_t, name, lt_t, end_t))
812
+ end
813
+
814
+ def def_sclass(class_t, lshft_t, expr,
815
+ body, end_t)
816
+ n(:sclass, [ expr, body ],
817
+ module_definition_map(class_t, nil, lshft_t, end_t))
818
+ end
819
+
820
+ def def_module(module_t, name,
821
+ body, end_t)
822
+ n(:module, [ name, body ],
823
+ module_definition_map(module_t, name, nil, end_t))
824
+ end
825
+
826
+ #
827
+ # Method (un)definition
828
+ #
829
+
830
+ def def_method(def_t, name_t, args,
831
+ body, end_t)
832
+ check_reserved_for_numparam(value(name_t), loc(name_t))
833
+
834
+ n(:def, [ value(name_t).to_sym, args, body ],
835
+ definition_map(def_t, nil, name_t, end_t))
836
+ end
837
+
838
+ def def_endless_method(def_t, name_t, args,
839
+ assignment_t, body)
840
+ check_reserved_for_numparam(value(name_t), loc(name_t))
841
+
842
+ n(:def, [ value(name_t).to_sym, args, body ],
843
+ endless_definition_map(def_t, nil, name_t, assignment_t, body))
844
+ end
845
+
846
+ def def_singleton(def_t, definee, dot_t,
847
+ name_t, args,
848
+ body, end_t)
849
+ validate_definee(definee)
850
+ check_reserved_for_numparam(value(name_t), loc(name_t))
851
+
852
+ n(:defs, [ definee, value(name_t).to_sym, args, body ],
853
+ definition_map(def_t, dot_t, name_t, end_t))
854
+ end
855
+
856
+ def def_endless_singleton(def_t, definee, dot_t,
857
+ name_t, args,
858
+ assignment_t, body)
859
+ validate_definee(definee)
860
+ check_reserved_for_numparam(value(name_t), loc(name_t))
861
+
862
+ n(:defs, [ definee, value(name_t).to_sym, args, body ],
863
+ endless_definition_map(def_t, dot_t, name_t, assignment_t, body))
864
+ end
865
+
866
+ def undef_method(undef_t, names)
867
+ n(:undef, [ *names ],
868
+ keyword_map(undef_t, nil, names, nil))
869
+ end
870
+
871
+ def alias(alias_t, to, from)
872
+ n(:alias, [ to, from ],
873
+ keyword_map(alias_t, nil, [to, from], nil))
874
+ end
875
+
876
+ #
877
+ # Formal arguments
878
+ #
879
+
880
+ def args(begin_t, args, end_t, check_args=true)
881
+ args = check_duplicate_args(args) if check_args
882
+ validate_no_forward_arg_after_restarg(args)
883
+
884
+ map = collection_map(begin_t, args, end_t)
885
+ if !self.class.emit_forward_arg && args.length == 1 && args[0].type == :forward_arg
886
+ n(:forward_args, [], map)
887
+ else
888
+ n(:args, args, map)
889
+ end
890
+ end
891
+
892
+ def numargs(max_numparam)
893
+ n(:numargs, [ max_numparam ], nil)
894
+ end
895
+
896
+ def forward_only_args(begin_t, dots_t, end_t)
897
+ if self.class.emit_forward_arg
898
+ arg = forward_arg(dots_t)
899
+ n(:args, [ arg ],
900
+ collection_map(begin_t, [ arg ], end_t))
901
+ else
902
+ n(:forward_args, [], collection_map(begin_t, token_map(dots_t), end_t))
903
+ end
904
+ end
905
+
906
+ def forward_arg(dots_t)
907
+ n(:forward_arg, [], token_map(dots_t))
908
+ end
909
+
910
+ def arg(name_t)
911
+ check_reserved_for_numparam(value(name_t), loc(name_t))
912
+
913
+ n(:arg, [ value(name_t).to_sym ],
914
+ variable_map(name_t))
915
+ end
916
+
917
+ def optarg(name_t, eql_t, value)
918
+ check_reserved_for_numparam(value(name_t), loc(name_t))
919
+
920
+ n(:optarg, [ value(name_t).to_sym, value ],
921
+ variable_map(name_t).
922
+ with_operator(loc(eql_t)).
923
+ with_expression(loc(name_t).join(value.loc.expression)))
924
+ end
925
+
926
+ def restarg(star_t, name_t=nil)
927
+ if name_t
928
+ check_reserved_for_numparam(value(name_t), loc(name_t))
929
+ n(:restarg, [ value(name_t).to_sym ],
930
+ arg_prefix_map(star_t, name_t))
931
+ else
932
+ n0(:restarg,
933
+ arg_prefix_map(star_t))
934
+ end
935
+ end
936
+
937
+ def kwarg(name_t)
938
+ check_reserved_for_numparam(value(name_t), loc(name_t))
939
+
940
+ n(:kwarg, [ value(name_t).to_sym ],
941
+ kwarg_map(name_t))
942
+ end
943
+
944
+ def kwoptarg(name_t, value)
945
+ check_reserved_for_numparam(value(name_t), loc(name_t))
946
+
947
+ n(:kwoptarg, [ value(name_t).to_sym, value ],
948
+ kwarg_map(name_t, value))
949
+ end
950
+
951
+ def kwrestarg(dstar_t, name_t=nil)
952
+ if name_t
953
+ check_reserved_for_numparam(value(name_t), loc(name_t))
954
+
955
+ n(:kwrestarg, [ value(name_t).to_sym ],
956
+ arg_prefix_map(dstar_t, name_t))
957
+ else
958
+ n0(:kwrestarg,
959
+ arg_prefix_map(dstar_t))
960
+ end
961
+ end
962
+
963
+ def kwnilarg(dstar_t, nil_t)
964
+ n0(:kwnilarg,
965
+ arg_prefix_map(dstar_t, nil_t))
966
+ end
967
+
968
+ def shadowarg(name_t)
969
+ check_reserved_for_numparam(value(name_t), loc(name_t))
970
+
971
+ n(:shadowarg, [ value(name_t).to_sym ],
972
+ variable_map(name_t))
973
+ end
974
+
975
+ def blockarg(amper_t, name_t)
976
+ if !name_t.nil?
977
+ check_reserved_for_numparam(value(name_t), loc(name_t))
978
+ end
979
+
980
+ arg_name = name_t ? value(name_t).to_sym : nil
981
+ n(:blockarg, [ arg_name ],
982
+ arg_prefix_map(amper_t, name_t))
983
+ end
984
+
985
+ def procarg0(arg)
986
+ if self.class.emit_procarg0
987
+ if arg.type == :arg && self.class.emit_arg_inside_procarg0
988
+ n(:procarg0, [ arg ],
989
+ Source::Map::Collection.new(nil, nil, arg.location.expression))
990
+ else
991
+ arg.updated(:procarg0)
992
+ end
993
+ else
994
+ arg
995
+ end
996
+ end
997
+
998
+ # Ruby 1.8 block arguments
999
+
1000
+ def arg_expr(expr)
1001
+ if expr.type == :lvasgn
1002
+ expr.updated(:arg)
1003
+ else
1004
+ n(:arg_expr, [ expr ],
1005
+ expr.loc.dup)
1006
+ end
1007
+ end
1008
+
1009
+ def restarg_expr(star_t, expr=nil)
1010
+ if expr.nil?
1011
+ n0(:restarg, token_map(star_t))
1012
+ elsif expr.type == :lvasgn
1013
+ expr.updated(:restarg)
1014
+ else
1015
+ n(:restarg_expr, [ expr ],
1016
+ expr.loc.dup)
1017
+ end
1018
+ end
1019
+
1020
+ def blockarg_expr(amper_t, expr)
1021
+ if expr.type == :lvasgn
1022
+ expr.updated(:blockarg)
1023
+ else
1024
+ n(:blockarg_expr, [ expr ],
1025
+ expr.loc.dup)
1026
+ end
1027
+ end
1028
+
1029
+ # MacRuby Objective-C arguments
1030
+
1031
+ def objc_kwarg(kwname_t, assoc_t, name_t)
1032
+ kwname_l = loc(kwname_t)
1033
+ if assoc_t.nil? # a: b, not a => b
1034
+ kwname_l = kwname_l.resize(kwname_l.size - 1)
1035
+ operator_l = kwname_l.end.resize(1)
1036
+ else
1037
+ operator_l = loc(assoc_t)
1038
+ end
1039
+
1040
+ n(:objc_kwarg, [ value(kwname_t).to_sym, value(name_t).to_sym ],
1041
+ Source::Map::ObjcKwarg.new(kwname_l, operator_l, loc(name_t),
1042
+ kwname_l.join(loc(name_t))))
1043
+ end
1044
+
1045
+ def objc_restarg(star_t, name=nil)
1046
+ if name.nil?
1047
+ n0(:restarg, arg_prefix_map(star_t))
1048
+ elsif name.type == :arg # regular restarg
1049
+ name.updated(:restarg, nil,
1050
+ { :location => name.loc.with_operator(loc(star_t)) })
1051
+ else # restarg with objc_kwarg inside
1052
+ n(:objc_restarg, [ name ],
1053
+ unary_op_map(star_t, name))
1054
+ end
1055
+ end
1056
+
1057
+ #
1058
+ # Method calls
1059
+ #
1060
+
1061
+ def call_type_for_dot(dot_t)
1062
+ if !dot_t.nil? && value(dot_t) == :anddot
1063
+ :csend
1064
+ else
1065
+ # This case is a bit tricky. ruby23.y returns the token tDOT with
1066
+ # the value :dot, and the token :tANDDOT with the value :anddot.
1067
+ #
1068
+ # But, ruby{18..22}.y (which unconditionally expect tDOT) just
1069
+ # return "." there, since they are to be kept close to the corresponding
1070
+ # Ruby MRI grammars.
1071
+ #
1072
+ # Thankfully, we don't have to care.
1073
+ :send
1074
+ end
1075
+ end
1076
+
1077
+ def forwarded_args(dots_t)
1078
+ n(:forwarded_args, [], token_map(dots_t))
1079
+ end
1080
+
1081
+ def forwarded_restarg(star_t)
1082
+ n(:forwarded_restarg, [], token_map(star_t))
1083
+ end
1084
+
1085
+ def forwarded_kwrestarg(dstar_t)
1086
+ n(:forwarded_kwrestarg, [], token_map(dstar_t))
1087
+ end
1088
+
1089
+ def call_method(receiver, dot_t, selector_t,
1090
+ lparen_t=nil, args=[], rparen_t=nil)
1091
+ type = call_type_for_dot(dot_t)
1092
+
1093
+ if self.class.emit_kwargs
1094
+ rewrite_hash_args_to_kwargs(args)
1095
+ end
1096
+
1097
+ if selector_t.nil?
1098
+ n(type, [ receiver, :call, *args ],
1099
+ send_map(receiver, dot_t, nil, lparen_t, args, rparen_t))
1100
+ else
1101
+ n(type, [ receiver, value(selector_t).to_sym, *args ],
1102
+ send_map(receiver, dot_t, selector_t, lparen_t, args, rparen_t))
1103
+ end
1104
+ end
1105
+
1106
+ def call_lambda(lambda_t)
1107
+ if self.class.emit_lambda
1108
+ n0(:lambda, expr_map(loc(lambda_t)))
1109
+ else
1110
+ n(:send, [ nil, :lambda ],
1111
+ send_map(nil, nil, lambda_t))
1112
+ end
1113
+ end
1114
+
1115
+ def block(method_call, begin_t, args, body, end_t)
1116
+ _receiver, _selector, *call_args = *method_call
1117
+
1118
+ if method_call.type == :yield
1119
+ diagnostic :error, :block_given_to_yield, nil, method_call.loc.keyword, [loc(begin_t)]
1120
+ end
1121
+
1122
+ last_arg = call_args.last
1123
+ if last_arg && (last_arg.type == :block_pass || last_arg.type == :forwarded_args)
1124
+ diagnostic :error, :block_and_blockarg, nil, last_arg.loc.expression, [loc(begin_t)]
1125
+ end
1126
+
1127
+ if args.type == :numargs
1128
+ block_type = :numblock
1129
+ args = args.children[0]
1130
+ else
1131
+ block_type = :block
1132
+ end
1133
+
1134
+ if [:send, :csend, :index, :super, :zsuper, :lambda].include?(method_call.type)
1135
+ n(block_type, [ method_call, args, body ],
1136
+ block_map(method_call.loc.expression, begin_t, end_t))
1137
+ else
1138
+ # Code like "return foo 1 do end" is reduced in a weird sequence.
1139
+ # Here, method_call is actually (return).
1140
+ actual_send, = *method_call
1141
+ block =
1142
+ n(block_type, [ actual_send, args, body ],
1143
+ block_map(actual_send.loc.expression, begin_t, end_t))
1144
+
1145
+ n(method_call.type, [ block ],
1146
+ method_call.loc.with_expression(join_exprs(method_call, block)))
1147
+ end
1148
+ end
1149
+
1150
+ def block_pass(amper_t, arg)
1151
+ n(:block_pass, [ arg ],
1152
+ unary_op_map(amper_t, arg))
1153
+ end
1154
+
1155
+ def objc_varargs(pair, rest_of_varargs)
1156
+ value, first_vararg = *pair
1157
+ vararg_array = array(nil, [ first_vararg, *rest_of_varargs ], nil).
1158
+ updated(:objc_varargs)
1159
+ pair.updated(nil, [ value, vararg_array ],
1160
+ { :location => pair.loc.with_expression(
1161
+ pair.loc.expression.join(vararg_array.loc.expression)) })
1162
+ end
1163
+
1164
+ def attr_asgn(receiver, dot_t, selector_t)
1165
+ method_name = (value(selector_t) + '=').to_sym
1166
+ type = call_type_for_dot(dot_t)
1167
+
1168
+ # Incomplete method call.
1169
+ n(type, [ receiver, method_name ],
1170
+ send_map(receiver, dot_t, selector_t))
1171
+ end
1172
+
1173
+ def index(receiver, lbrack_t, indexes, rbrack_t)
1174
+ if self.class.emit_kwargs
1175
+ rewrite_hash_args_to_kwargs(indexes)
1176
+ end
1177
+
1178
+ if self.class.emit_index
1179
+ n(:index, [ receiver, *indexes ],
1180
+ index_map(receiver, lbrack_t, rbrack_t))
1181
+ else
1182
+ n(:send, [ receiver, :[], *indexes ],
1183
+ send_index_map(receiver, lbrack_t, rbrack_t))
1184
+ end
1185
+ end
1186
+
1187
+ def index_asgn(receiver, lbrack_t, indexes, rbrack_t)
1188
+ if self.class.emit_index
1189
+ n(:indexasgn, [ receiver, *indexes ],
1190
+ index_map(receiver, lbrack_t, rbrack_t))
1191
+ else
1192
+ # Incomplete method call.
1193
+ n(:send, [ receiver, :[]=, *indexes ],
1194
+ send_index_map(receiver, lbrack_t, rbrack_t))
1195
+ end
1196
+ end
1197
+
1198
+ def binary_op(receiver, operator_t, arg)
1199
+ source_map = send_binary_op_map(receiver, operator_t, arg)
1200
+
1201
+ if @parser.version == 18
1202
+ operator = value(operator_t)
1203
+
1204
+ if operator == '!='
1205
+ method_call = n(:send, [ receiver, :==, arg ], source_map)
1206
+ elsif operator == '!~'
1207
+ method_call = n(:send, [ receiver, :=~, arg ], source_map)
1208
+ end
1209
+
1210
+ if %w(!= !~).include?(operator)
1211
+ return n(:not, [ method_call ],
1212
+ expr_map(source_map.expression))
1213
+ end
1214
+ end
1215
+
1216
+ n(:send, [ receiver, value(operator_t).to_sym, arg ],
1217
+ source_map)
1218
+ end
1219
+
1220
+ def match_op(receiver, match_t, arg)
1221
+ source_map = send_binary_op_map(receiver, match_t, arg)
1222
+
1223
+ if (regexp = static_regexp_node(receiver))
1224
+ regexp.names.each do |name|
1225
+ @parser.static_env.declare(name)
1226
+ end
1227
+
1228
+ n(:match_with_lvasgn, [ receiver, arg ],
1229
+ source_map)
1230
+ else
1231
+ n(:send, [ receiver, :=~, arg ],
1232
+ source_map)
1233
+ end
1234
+ end
1235
+
1236
+ def unary_op(op_t, receiver)
1237
+ case value(op_t)
1238
+ when '+', '-'
1239
+ method = value(op_t) + '@'
1240
+ else
1241
+ method = value(op_t)
1242
+ end
1243
+
1244
+ n(:send, [ receiver, method.to_sym ],
1245
+ send_unary_op_map(op_t, receiver))
1246
+ end
1247
+
1248
+ def not_op(not_t, begin_t=nil, receiver=nil, end_t=nil)
1249
+ if @parser.version == 18
1250
+ n(:not, [ check_condition(receiver) ],
1251
+ unary_op_map(not_t, receiver))
1252
+ else
1253
+ if receiver.nil?
1254
+ nil_node = n0(:begin, collection_map(begin_t, nil, end_t))
1255
+
1256
+ n(:send, [
1257
+ nil_node, :'!'
1258
+ ], send_unary_op_map(not_t, nil_node))
1259
+ else
1260
+ n(:send, [ check_condition(receiver), :'!' ],
1261
+ send_map(nil, nil, not_t, begin_t, [receiver], end_t))
1262
+ end
1263
+ end
1264
+ end
1265
+
1266
+ #
1267
+ # Control flow
1268
+ #
1269
+
1270
+ # Logical operations: and, or
1271
+
1272
+ def logical_op(type, lhs, op_t, rhs)
1273
+ n(type, [ lhs, rhs ],
1274
+ binary_op_map(lhs, op_t, rhs))
1275
+ end
1276
+
1277
+ # Conditionals
1278
+
1279
+ def condition(cond_t, cond, then_t,
1280
+ if_true, else_t, if_false, end_t)
1281
+ n(:if, [ check_condition(cond), if_true, if_false ],
1282
+ condition_map(cond_t, cond, then_t, if_true, else_t, if_false, end_t))
1283
+ end
1284
+
1285
+ def condition_mod(if_true, if_false, cond_t, cond)
1286
+ n(:if, [ check_condition(cond), if_true, if_false ],
1287
+ keyword_mod_map(if_true || if_false, cond_t, cond))
1288
+ end
1289
+
1290
+ def ternary(cond, question_t, if_true, colon_t, if_false)
1291
+ n(:if, [ check_condition(cond), if_true, if_false ],
1292
+ ternary_map(cond, question_t, if_true, colon_t, if_false))
1293
+ end
1294
+
1295
+ # Case matching
1296
+
1297
+ def when(when_t, patterns, then_t, body)
1298
+ children = patterns << body
1299
+ n(:when, children,
1300
+ keyword_map(when_t, then_t, children, nil))
1301
+ end
1302
+
1303
+ def case(case_t, expr, when_bodies, else_t, else_body, end_t)
1304
+ n(:case, [ expr, *(when_bodies << else_body)],
1305
+ condition_map(case_t, expr, nil, nil, else_t, else_body, end_t))
1306
+ end
1307
+
1308
+ # Loops
1309
+
1310
+ def loop(type, keyword_t, cond, do_t, body, end_t)
1311
+ n(type, [ check_condition(cond), body ],
1312
+ keyword_map(keyword_t, do_t, nil, end_t))
1313
+ end
1314
+
1315
+ def loop_mod(type, body, keyword_t, cond)
1316
+ if body.type == :kwbegin
1317
+ type = :"#{type}_post"
1318
+ end
1319
+
1320
+ n(type, [ check_condition(cond), body ],
1321
+ keyword_mod_map(body, keyword_t, cond))
1322
+ end
1323
+
1324
+ def for(for_t, iterator, in_t, iteratee,
1325
+ do_t, body, end_t)
1326
+ n(:for, [ iterator, iteratee, body ],
1327
+ for_map(for_t, in_t, do_t, end_t))
1328
+ end
1329
+
1330
+ # Keywords
1331
+
1332
+ def keyword_cmd(type, keyword_t, lparen_t=nil, args=[], rparen_t=nil)
1333
+ if type == :yield && args.count > 0
1334
+ last_arg = args.last
1335
+ if last_arg.type == :block_pass
1336
+ diagnostic :error, :block_given_to_yield, nil, loc(keyword_t), [last_arg.loc.expression]
1337
+ end
1338
+ end
1339
+
1340
+ if %i[yield super].include?(type) && self.class.emit_kwargs
1341
+ rewrite_hash_args_to_kwargs(args)
1342
+ end
1343
+
1344
+ n(type, args,
1345
+ keyword_map(keyword_t, lparen_t, args, rparen_t))
1346
+ end
1347
+
1348
+ # BEGIN, END
1349
+
1350
+ def preexe(preexe_t, lbrace_t, compstmt, rbrace_t)
1351
+ n(:preexe, [ compstmt ],
1352
+ keyword_map(preexe_t, lbrace_t, [], rbrace_t))
1353
+ end
1354
+
1355
+ def postexe(postexe_t, lbrace_t, compstmt, rbrace_t)
1356
+ n(:postexe, [ compstmt ],
1357
+ keyword_map(postexe_t, lbrace_t, [], rbrace_t))
1358
+ end
1359
+
1360
+ # Exception handling
1361
+
1362
+ def rescue_body(rescue_t,
1363
+ exc_list, assoc_t, exc_var,
1364
+ then_t, compound_stmt)
1365
+ n(:resbody, [ exc_list, exc_var, compound_stmt ],
1366
+ rescue_body_map(rescue_t, exc_list, assoc_t,
1367
+ exc_var, then_t, compound_stmt))
1368
+ end
1369
+
1370
+ def begin_body(compound_stmt, rescue_bodies=[],
1371
+ else_t=nil, else_=nil,
1372
+ ensure_t=nil, ensure_=nil)
1373
+ if rescue_bodies.any?
1374
+ if else_t
1375
+ compound_stmt =
1376
+ n(:rescue,
1377
+ [ compound_stmt, *(rescue_bodies + [ else_ ]) ],
1378
+ eh_keyword_map(compound_stmt, nil, rescue_bodies, else_t, else_))
1379
+ else
1380
+ compound_stmt =
1381
+ n(:rescue,
1382
+ [ compound_stmt, *(rescue_bodies + [ nil ]) ],
1383
+ eh_keyword_map(compound_stmt, nil, rescue_bodies, nil, nil))
1384
+ end
1385
+ elsif else_t
1386
+ statements = []
1387
+ if !compound_stmt.nil?
1388
+ if compound_stmt.type == :begin
1389
+ statements += compound_stmt.children
1390
+ else
1391
+ statements.push(compound_stmt)
1392
+ end
1393
+ end
1394
+ statements.push(
1395
+ n(:begin, [ else_ ],
1396
+ collection_map(else_t, [ else_ ], nil)))
1397
+ compound_stmt =
1398
+ n(:begin, statements,
1399
+ collection_map(nil, statements, nil))
1400
+ end
1401
+
1402
+ if ensure_t
1403
+ compound_stmt =
1404
+ n(:ensure,
1405
+ [ compound_stmt, ensure_ ],
1406
+ eh_keyword_map(compound_stmt, ensure_t, [ ensure_ ], nil, nil))
1407
+ end
1408
+
1409
+ compound_stmt
1410
+ end
1411
+
1412
+ #
1413
+ # Expression grouping
1414
+ #
1415
+
1416
+ def compstmt(statements)
1417
+ case
1418
+ when statements.none?
1419
+ nil
1420
+ when statements.one?
1421
+ statements.first
1422
+ else
1423
+ n(:begin, statements,
1424
+ collection_map(nil, statements, nil))
1425
+ end
1426
+ end
1427
+
1428
+ def begin(begin_t, body, end_t)
1429
+ if body.nil?
1430
+ # A nil expression: `()'.
1431
+ n0(:begin,
1432
+ collection_map(begin_t, nil, end_t))
1433
+ elsif body.type == :mlhs ||
1434
+ (body.type == :begin &&
1435
+ body.loc.begin.nil? && body.loc.end.nil?)
1436
+ # Synthesized (begin) from compstmt "a; b" or (mlhs)
1437
+ # from multi_lhs "(a, b) = *foo".
1438
+ n(body.type, body.children,
1439
+ collection_map(begin_t, body.children, end_t))
1440
+ else
1441
+ n(:begin, [ body ],
1442
+ collection_map(begin_t, [ body ], end_t))
1443
+ end
1444
+ end
1445
+
1446
+ def begin_keyword(begin_t, body, end_t)
1447
+ if body.nil?
1448
+ # A nil expression: `begin end'.
1449
+ n0(:kwbegin,
1450
+ collection_map(begin_t, nil, end_t))
1451
+ elsif (body.type == :begin &&
1452
+ body.loc.begin.nil? && body.loc.end.nil?)
1453
+ # Synthesized (begin) from compstmt "a; b".
1454
+ n(:kwbegin, body.children,
1455
+ collection_map(begin_t, body.children, end_t))
1456
+ else
1457
+ n(:kwbegin, [ body ],
1458
+ collection_map(begin_t, [ body ], end_t))
1459
+ end
1460
+ end
1461
+
1462
+ #
1463
+ # PATTERN MATCHING
1464
+ #
1465
+
1466
+ def case_match(case_t, expr, in_bodies, else_t, else_body, end_t)
1467
+ else_body = n(:empty_else, nil, token_map(else_t)) if else_t && !else_body
1468
+ n(:case_match, [ expr, *(in_bodies << else_body)],
1469
+ condition_map(case_t, expr, nil, nil, else_t, else_body, end_t))
1470
+ end
1471
+
1472
+ def in_match(lhs, in_t, rhs)
1473
+ n(:in_match, [lhs, rhs],
1474
+ binary_op_map(lhs, in_t, rhs))
1475
+ end
1476
+
1477
+ def match_pattern(lhs, match_t, rhs)
1478
+ n(:match_pattern, [lhs, rhs],
1479
+ binary_op_map(lhs, match_t, rhs))
1480
+ end
1481
+
1482
+ def match_pattern_p(lhs, match_t, rhs)
1483
+ n(:match_pattern_p, [lhs, rhs],
1484
+ binary_op_map(lhs, match_t, rhs))
1485
+ end
1486
+
1487
+ def in_pattern(in_t, pattern, guard, then_t, body)
1488
+ children = [pattern, guard, body]
1489
+ n(:in_pattern, children,
1490
+ keyword_map(in_t, then_t, children.compact, nil))
1491
+ end
1492
+
1493
+ def if_guard(if_t, if_body)
1494
+ n(:if_guard, [if_body], guard_map(if_t, if_body))
1495
+ end
1496
+
1497
+ def unless_guard(unless_t, unless_body)
1498
+ n(:unless_guard, [unless_body], guard_map(unless_t, unless_body))
1499
+ end
1500
+
1501
+ def match_var(name_t)
1502
+ name = value(name_t).to_sym
1503
+ name_l = loc(name_t)
1504
+
1505
+ check_lvar_name(name, name_l)
1506
+ check_duplicate_pattern_variable(name, name_l)
1507
+ @parser.static_env.declare(name)
1508
+
1509
+ n(:match_var, [ name ],
1510
+ variable_map(name_t))
1511
+ end
1512
+
1513
+ def match_hash_var(name_t)
1514
+ name = value(name_t).to_sym
1515
+
1516
+ expr_l = loc(name_t)
1517
+ name_l = expr_l.adjust(end_pos: -1)
1518
+
1519
+ check_lvar_name(name, name_l)
1520
+ check_duplicate_pattern_variable(name, name_l)
1521
+ @parser.static_env.declare(name)
1522
+
1523
+ n(:match_var, [ name ],
1524
+ Source::Map::Variable.new(name_l, expr_l))
1525
+ end
1526
+
1527
+ def match_hash_var_from_str(begin_t, strings, end_t)
1528
+ if strings.length > 1
1529
+ diagnostic :error, :pm_interp_in_var_name, nil, loc(begin_t).join(loc(end_t))
1530
+ end
1531
+
1532
+ string = strings[0]
1533
+
1534
+ case string.type
1535
+ when :str
1536
+ # MRI supports plain strings in hash pattern matching
1537
+ name, = *string
1538
+ name_l = string.loc.expression
1539
+
1540
+ check_lvar_name(name, name_l)
1541
+ check_duplicate_pattern_variable(name, name_l)
1542
+
1543
+ @parser.static_env.declare(name)
1544
+
1545
+ if (begin_l = string.loc.begin)
1546
+ # exclude beginning of the string from the location of the variable
1547
+ name_l = name_l.adjust(begin_pos: begin_l.length)
1548
+ end
1549
+
1550
+ if (end_l = string.loc.end)
1551
+ # exclude end of the string from the location of the variable
1552
+ name_l = name_l.adjust(end_pos: -end_l.length)
1553
+ end
1554
+
1555
+ expr_l = loc(begin_t).join(string.loc.expression).join(loc(end_t))
1556
+ n(:match_var, [ name.to_sym ],
1557
+ Source::Map::Variable.new(name_l, expr_l))
1558
+ when :begin
1559
+ match_hash_var_from_str(begin_t, string.children, end_t)
1560
+ else
1561
+ # we only can get here if there is an interpolation, e.g., ``in "#{ a }":`
1562
+ diagnostic :error, :pm_interp_in_var_name, nil, loc(begin_t).join(loc(end_t))
1563
+ end
1564
+ end
1565
+
1566
+ def match_rest(star_t, name_t = nil)
1567
+ if name_t.nil?
1568
+ n0(:match_rest,
1569
+ unary_op_map(star_t))
1570
+ else
1571
+ name = match_var(name_t)
1572
+ n(:match_rest, [ name ],
1573
+ unary_op_map(star_t, name))
1574
+ end
1575
+ end
1576
+
1577
+ def hash_pattern(lbrace_t, kwargs, rbrace_t)
1578
+ args = check_duplicate_args(kwargs)
1579
+ n(:hash_pattern, args,
1580
+ collection_map(lbrace_t, args, rbrace_t))
1581
+ end
1582
+
1583
+ def array_pattern(lbrack_t, elements, rbrack_t)
1584
+ return n(:array_pattern, nil, collection_map(lbrack_t, [], rbrack_t)) if elements.nil?
1585
+
1586
+ trailing_comma = false
1587
+
1588
+ node_elements = elements.map do |element|
1589
+ if element.type == :match_with_trailing_comma
1590
+ trailing_comma = true
1591
+ element.children.first
1592
+ else
1593
+ trailing_comma = false
1594
+ element
1595
+ end
1596
+ end
1597
+
1598
+ node_type = trailing_comma ? :array_pattern_with_tail : :array_pattern
1599
+
1600
+ n(node_type, node_elements,
1601
+ collection_map(lbrack_t, elements, rbrack_t))
1602
+ end
1603
+
1604
+ def find_pattern(lbrack_t, elements, rbrack_t)
1605
+ n(:find_pattern, elements,
1606
+ collection_map(lbrack_t, elements, rbrack_t))
1607
+ end
1608
+
1609
+ def match_with_trailing_comma(match, comma_t)
1610
+ n(:match_with_trailing_comma, [ match ], expr_map(match.loc.expression.join(loc(comma_t))))
1611
+ end
1612
+
1613
+ def const_pattern(const, ldelim_t, pattern, rdelim_t)
1614
+ n(:const_pattern, [const, pattern],
1615
+ Source::Map::Collection.new(
1616
+ loc(ldelim_t), loc(rdelim_t),
1617
+ const.loc.expression.join(loc(rdelim_t))
1618
+ )
1619
+ )
1620
+ end
1621
+
1622
+ def pin(pin_t, var)
1623
+ n(:pin, [ var ],
1624
+ send_unary_op_map(pin_t, var))
1625
+ end
1626
+
1627
+ def match_alt(left, pipe_t, right)
1628
+ source_map = binary_op_map(left, pipe_t, right)
1629
+
1630
+ n(:match_alt, [ left, right ],
1631
+ source_map)
1632
+ end
1633
+
1634
+ def match_as(value, assoc_t, as)
1635
+ source_map = binary_op_map(value, assoc_t, as)
1636
+
1637
+ n(:match_as, [ value, as ],
1638
+ source_map)
1639
+ end
1640
+
1641
+ def match_nil_pattern(dstar_t, nil_t)
1642
+ n0(:match_nil_pattern,
1643
+ arg_prefix_map(dstar_t, nil_t))
1644
+ end
1645
+
1646
+ def match_pair(label_type, label, value)
1647
+ if label_type == :label
1648
+ check_duplicate_pattern_key(label[0], label[1])
1649
+ pair_keyword(label, value)
1650
+ else
1651
+ begin_t, parts, end_t = label
1652
+ label_loc = loc(begin_t).join(loc(end_t))
1653
+
1654
+ # quoted label like "label": value
1655
+ if (var_name = static_string(parts))
1656
+ check_duplicate_pattern_key(var_name, label_loc)
1657
+ else
1658
+ diagnostic :error, :pm_interp_in_var_name, nil, label_loc
1659
+ end
1660
+
1661
+ pair_quoted(begin_t, parts, end_t, value)
1662
+ end
1663
+ end
1664
+
1665
+ def match_label(label_type, label)
1666
+ if label_type == :label
1667
+ match_hash_var(label)
1668
+ else
1669
+ # quoted label like "label": value
1670
+ begin_t, strings, end_t = label
1671
+ match_hash_var_from_str(begin_t, strings, end_t)
1672
+ end
1673
+ end
1674
+
1675
+ private
1676
+
1677
+ #
1678
+ # VERIFICATION
1679
+ #
1680
+
1681
+ def check_condition(cond)
1682
+ case cond.type
1683
+ when :masgn
1684
+ if @parser.version <= 23
1685
+ diagnostic :error, :masgn_as_condition, nil, cond.loc.expression
1686
+ else
1687
+ cond
1688
+ end
1689
+
1690
+ when :begin
1691
+ if cond.children.count == 1
1692
+ cond.updated(nil, [
1693
+ check_condition(cond.children.last)
1694
+ ])
1695
+ else
1696
+ cond
1697
+ end
1698
+
1699
+ when :and, :or, :irange, :erange
1700
+ lhs, rhs = *cond
1701
+
1702
+ type = case cond.type
1703
+ when :irange then :iflipflop
1704
+ when :erange then :eflipflop
1705
+ end
1706
+
1707
+ if [:and, :or].include?(cond.type) &&
1708
+ @parser.version == 18
1709
+ cond
1710
+ else
1711
+ cond.updated(type, [
1712
+ check_condition(lhs),
1713
+ check_condition(rhs)
1714
+ ])
1715
+ end
1716
+
1717
+ when :regexp
1718
+ n(:match_current_line, [ cond ], expr_map(cond.loc.expression))
1719
+
1720
+ else
1721
+ cond
1722
+ end
1723
+ end
1724
+
1725
+ def check_duplicate_args(args, map={})
1726
+ args.each do |this_arg|
1727
+ case this_arg.type
1728
+ when :arg, :optarg, :restarg, :blockarg,
1729
+ :kwarg, :kwoptarg, :kwrestarg,
1730
+ :shadowarg
1731
+
1732
+ check_duplicate_arg(this_arg, map)
1733
+
1734
+ when :procarg0
1735
+
1736
+ if this_arg.children[0].is_a?(Symbol)
1737
+ # s(:procarg0, :a)
1738
+ check_duplicate_arg(this_arg, map)
1739
+ else
1740
+ # s(:procarg0, s(:arg, :a), ...)
1741
+ check_duplicate_args(this_arg.children, map)
1742
+ end
1743
+
1744
+ when :mlhs
1745
+ check_duplicate_args(this_arg.children, map)
1746
+ end
1747
+ end
1748
+ end
1749
+
1750
+ def check_duplicate_arg(this_arg, map={})
1751
+ this_name, = *this_arg
1752
+
1753
+ that_arg = map[this_name]
1754
+ that_name, = *that_arg
1755
+
1756
+ if that_arg.nil?
1757
+ map[this_name] = this_arg
1758
+ elsif arg_name_collides?(this_name, that_name)
1759
+ diagnostic :error, :duplicate_argument, nil,
1760
+ this_arg.loc.name, [ that_arg.loc.name ]
1761
+ end
1762
+ end
1763
+
1764
+ def validate_no_forward_arg_after_restarg(args)
1765
+ restarg = nil
1766
+ forward_arg = nil
1767
+ args.each do |arg|
1768
+ case arg.type
1769
+ when :restarg then restarg = arg
1770
+ when :forward_arg then forward_arg = arg
1771
+ end
1772
+ end
1773
+
1774
+ if !forward_arg.nil? && !restarg.nil?
1775
+ diagnostic :error, :forward_arg_after_restarg, nil, forward_arg.loc.expression, [restarg.loc.expression]
1776
+ end
1777
+ end
1778
+
1779
+ def check_assignment_to_numparam(name, loc)
1780
+ # MRI < 2.7 treats numbered parameters as regular variables
1781
+ # and so it's allowed to perform assignments like `_1 = 42`.
1782
+ return if @parser.version < 27
1783
+
1784
+ assigning_to_numparam =
1785
+ @parser.context.in_dynamic_block? &&
1786
+ name =~ /\A_([1-9])\z/ &&
1787
+ @parser.max_numparam_stack.has_numparams?
1788
+
1789
+ if assigning_to_numparam
1790
+ diagnostic :error, :cant_assign_to_numparam, { :name => name }, loc
1791
+ end
1792
+ end
1793
+
1794
+ def check_reserved_for_numparam(name, loc)
1795
+ # MRI < 3.0 accepts assignemnt to variables like _1
1796
+ # if it's not a numbered parameter. MRI 3.0 and newer throws an error.
1797
+ return if @parser.version < 30
1798
+
1799
+ if name =~ /\A_([1-9])\z/
1800
+ diagnostic :error, :reserved_for_numparam, { :name => name }, loc
1801
+ end
1802
+ end
1803
+
1804
+ def arg_name_collides?(this_name, that_name)
1805
+ case @parser.version
1806
+ when 18
1807
+ this_name == that_name
1808
+ when 19
1809
+ # Ignore underscore.
1810
+ this_name != :_ &&
1811
+ this_name == that_name
1812
+ else
1813
+ # Ignore everything beginning with underscore.
1814
+ this_name && this_name[0] != '_' &&
1815
+ this_name == that_name
1816
+ end
1817
+ end
1818
+
1819
+ def check_lvar_name(name, loc)
1820
+ if name =~ /\A[[[:lower:]]_][[[:alnum:]]_]*\z/
1821
+ # OK
1822
+ else
1823
+ diagnostic :error, :lvar_name, { name: name }, loc
1824
+ end
1825
+ end
1826
+
1827
+ def check_duplicate_pattern_variable(name, loc)
1828
+ return if name.to_s.start_with?('_')
1829
+
1830
+ if @parser.pattern_variables.declared?(name)
1831
+ diagnostic :error, :duplicate_variable_name, { name: name.to_s }, loc
1832
+ end
1833
+
1834
+ @parser.pattern_variables.declare(name)
1835
+ end
1836
+
1837
+ def check_duplicate_pattern_key(name, loc)
1838
+ if @parser.pattern_hash_keys.declared?(name)
1839
+ diagnostic :error, :duplicate_pattern_key, { name: name.to_s }, loc
1840
+ end
1841
+
1842
+ @parser.pattern_hash_keys.declare(name)
1843
+ end
1844
+
1845
+ #
1846
+ # SOURCE MAPS
1847
+ #
1848
+
1849
+ def n(type, children, source_map)
1850
+ AST::Node.new(type, children, :location => source_map)
1851
+ end
1852
+
1853
+ def n0(type, source_map)
1854
+ n(type, [], source_map)
1855
+ end
1856
+
1857
+ def join_exprs(left_expr, right_expr)
1858
+ left_expr.loc.expression.
1859
+ join(right_expr.loc.expression)
1860
+ end
1861
+
1862
+ def token_map(token)
1863
+ Source::Map.new(loc(token))
1864
+ end
1865
+
1866
+ def delimited_string_map(string_t)
1867
+ str_range = loc(string_t)
1868
+
1869
+ begin_l = str_range.with(end_pos: str_range.begin_pos + 1)
1870
+
1871
+ end_l = str_range.with(begin_pos: str_range.end_pos - 1)
1872
+
1873
+ Source::Map::Collection.new(begin_l, end_l,
1874
+ loc(string_t))
1875
+ end
1876
+
1877
+ def prefix_string_map(symbol)
1878
+ str_range = loc(symbol)
1879
+
1880
+ begin_l = str_range.with(end_pos: str_range.begin_pos + 1)
1881
+
1882
+ Source::Map::Collection.new(begin_l, nil,
1883
+ loc(symbol))
1884
+ end
1885
+
1886
+ def unquoted_map(token)
1887
+ Source::Map::Collection.new(nil, nil,
1888
+ loc(token))
1889
+ end
1890
+
1891
+ def pair_keyword_map(key_t, value_e)
1892
+ key_range = loc(key_t)
1893
+
1894
+ key_l = key_range.adjust(end_pos: -1)
1895
+
1896
+ colon_l = key_range.with(begin_pos: key_range.end_pos - 1)
1897
+
1898
+ [ # key map
1899
+ Source::Map::Collection.new(nil, nil,
1900
+ key_l),
1901
+ # pair map
1902
+ Source::Map::Operator.new(colon_l,
1903
+ key_range.join(value_e.loc.expression)) ]
1904
+ end
1905
+
1906
+ def pair_quoted_map(begin_t, end_t, value_e)
1907
+ end_l = loc(end_t)
1908
+
1909
+ quote_l = end_l.with(begin_pos: end_l.end_pos - 2,
1910
+ end_pos: end_l.end_pos - 1)
1911
+
1912
+ colon_l = end_l.with(begin_pos: end_l.end_pos - 1)
1913
+
1914
+ [ # modified end token
1915
+ [ value(end_t), quote_l ],
1916
+ # pair map
1917
+ Source::Map::Operator.new(colon_l,
1918
+ loc(begin_t).join(value_e.loc.expression)) ]
1919
+ end
1920
+
1921
+ def expr_map(loc)
1922
+ Source::Map.new(loc)
1923
+ end
1924
+
1925
+ def collection_map(begin_t, parts, end_t)
1926
+ if begin_t.nil? || end_t.nil?
1927
+ if parts.any?
1928
+ expr_l = join_exprs(parts.first, parts.last)
1929
+ elsif !begin_t.nil?
1930
+ expr_l = loc(begin_t)
1931
+ elsif !end_t.nil?
1932
+ expr_l = loc(end_t)
1933
+ end
1934
+ else
1935
+ expr_l = loc(begin_t).join(loc(end_t))
1936
+ end
1937
+
1938
+ Source::Map::Collection.new(loc(begin_t), loc(end_t), expr_l)
1939
+ end
1940
+
1941
+ def string_map(begin_t, parts, end_t)
1942
+ if begin_t && value(begin_t).start_with?('<<')
1943
+ if parts.any?
1944
+ expr_l = join_exprs(parts.first, parts.last)
1945
+ else
1946
+ expr_l = loc(end_t).begin
1947
+ end
1948
+
1949
+ Source::Map::Heredoc.new(loc(begin_t), expr_l, loc(end_t))
1950
+ else
1951
+ collection_map(begin_t, parts, end_t)
1952
+ end
1953
+ end
1954
+
1955
+ def regexp_map(begin_t, end_t, options_e)
1956
+ Source::Map::Collection.new(loc(begin_t), loc(end_t),
1957
+ loc(begin_t).join(options_e.loc.expression))
1958
+ end
1959
+
1960
+ def constant_map(scope, colon2_t, name_t)
1961
+ if scope.nil?
1962
+ expr_l = loc(name_t)
1963
+ else
1964
+ expr_l = scope.loc.expression.join(loc(name_t))
1965
+ end
1966
+
1967
+ Source::Map::Constant.new(loc(colon2_t), loc(name_t), expr_l)
1968
+ end
1969
+
1970
+ def variable_map(name_t)
1971
+ Source::Map::Variable.new(loc(name_t))
1972
+ end
1973
+
1974
+ def binary_op_map(left_e, op_t, right_e)
1975
+ Source::Map::Operator.new(loc(op_t), join_exprs(left_e, right_e))
1976
+ end
1977
+
1978
+ def unary_op_map(op_t, arg_e=nil)
1979
+ if arg_e.nil?
1980
+ expr_l = loc(op_t)
1981
+ else
1982
+ expr_l = loc(op_t).join(arg_e.loc.expression)
1983
+ end
1984
+
1985
+ Source::Map::Operator.new(loc(op_t), expr_l)
1986
+ end
1987
+
1988
+ def range_map(start_e, op_t, end_e)
1989
+ if start_e && end_e
1990
+ expr_l = join_exprs(start_e, end_e)
1991
+ elsif start_e
1992
+ expr_l = start_e.loc.expression.join(loc(op_t))
1993
+ elsif end_e
1994
+ expr_l = loc(op_t).join(end_e.loc.expression)
1995
+ end
1996
+
1997
+ Source::Map::Operator.new(loc(op_t), expr_l)
1998
+ end
1999
+
2000
+ def arg_prefix_map(op_t, name_t=nil)
2001
+ if name_t.nil?
2002
+ expr_l = loc(op_t)
2003
+ else
2004
+ expr_l = loc(op_t).join(loc(name_t))
2005
+ end
2006
+
2007
+ Source::Map::Variable.new(loc(name_t), expr_l)
2008
+ end
2009
+
2010
+ def kwarg_map(name_t, value_e=nil)
2011
+ label_range = loc(name_t)
2012
+ name_range = label_range.adjust(end_pos: -1)
2013
+
2014
+ if value_e
2015
+ expr_l = loc(name_t).join(value_e.loc.expression)
2016
+ else
2017
+ expr_l = loc(name_t)
2018
+ end
2019
+
2020
+ Source::Map::Variable.new(name_range, expr_l)
2021
+ end
2022
+
2023
+ def module_definition_map(keyword_t, name_e, operator_t, end_t)
2024
+ if name_e
2025
+ name_l = name_e.loc.expression
2026
+ end
2027
+
2028
+ Source::Map::Definition.new(loc(keyword_t),
2029
+ loc(operator_t), name_l,
2030
+ loc(end_t))
2031
+ end
2032
+
2033
+ def definition_map(keyword_t, operator_t, name_t, end_t)
2034
+ Source::Map::MethodDefinition.new(loc(keyword_t),
2035
+ loc(operator_t), loc(name_t),
2036
+ loc(end_t), nil, nil)
2037
+ end
2038
+
2039
+ def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e)
2040
+ body_l = body_e.loc.expression
2041
+
2042
+ Source::Map::MethodDefinition.new(loc(keyword_t),
2043
+ loc(operator_t), loc(name_t), nil,
2044
+ loc(assignment_t), body_l)
2045
+ end
2046
+
2047
+ def send_map(receiver_e, dot_t, selector_t, begin_t=nil, args=[], end_t=nil)
2048
+ if receiver_e
2049
+ begin_l = receiver_e.loc.expression
2050
+ elsif selector_t
2051
+ begin_l = loc(selector_t)
2052
+ end
2053
+
2054
+ if end_t
2055
+ end_l = loc(end_t)
2056
+ elsif args.any?
2057
+ end_l = args.last.loc.expression
2058
+ elsif selector_t
2059
+ end_l = loc(selector_t)
2060
+ end
2061
+
2062
+ Source::Map::Send.new(loc(dot_t), loc(selector_t),
2063
+ loc(begin_t), loc(end_t),
2064
+ begin_l.join(end_l))
2065
+ end
2066
+
2067
+ def var_send_map(variable_e)
2068
+ Source::Map::Send.new(nil, variable_e.loc.expression,
2069
+ nil, nil,
2070
+ variable_e.loc.expression)
2071
+ end
2072
+
2073
+ def send_binary_op_map(lhs_e, selector_t, rhs_e)
2074
+ Source::Map::Send.new(nil, loc(selector_t),
2075
+ nil, nil,
2076
+ join_exprs(lhs_e, rhs_e))
2077
+ end
2078
+
2079
+ def send_unary_op_map(selector_t, arg_e)
2080
+ if arg_e.nil?
2081
+ expr_l = loc(selector_t)
2082
+ else
2083
+ expr_l = loc(selector_t).join(arg_e.loc.expression)
2084
+ end
2085
+
2086
+ Source::Map::Send.new(nil, loc(selector_t),
2087
+ nil, nil,
2088
+ expr_l)
2089
+ end
2090
+
2091
+ def index_map(receiver_e, lbrack_t, rbrack_t)
2092
+ Source::Map::Index.new(loc(lbrack_t), loc(rbrack_t),
2093
+ receiver_e.loc.expression.join(loc(rbrack_t)))
2094
+ end
2095
+
2096
+ def send_index_map(receiver_e, lbrack_t, rbrack_t)
2097
+ Source::Map::Send.new(nil, loc(lbrack_t).join(loc(rbrack_t)),
2098
+ nil, nil,
2099
+ receiver_e.loc.expression.join(loc(rbrack_t)))
2100
+ end
2101
+
2102
+ def block_map(receiver_l, begin_t, end_t)
2103
+ Source::Map::Collection.new(loc(begin_t), loc(end_t),
2104
+ receiver_l.join(loc(end_t)))
2105
+ end
2106
+
2107
+ def keyword_map(keyword_t, begin_t, args, end_t)
2108
+ args ||= []
2109
+
2110
+ if end_t
2111
+ end_l = loc(end_t)
2112
+ elsif args.any? && !args.last.nil?
2113
+ end_l = args.last.loc.expression
2114
+ elsif args.any? && args.count > 1
2115
+ end_l = args[-2].loc.expression
2116
+ else
2117
+ end_l = loc(keyword_t)
2118
+ end
2119
+
2120
+ Source::Map::Keyword.new(loc(keyword_t), loc(begin_t), loc(end_t),
2121
+ loc(keyword_t).join(end_l))
2122
+ end
2123
+
2124
+ def keyword_mod_map(pre_e, keyword_t, post_e)
2125
+ Source::Map::Keyword.new(loc(keyword_t), nil, nil,
2126
+ join_exprs(pre_e, post_e))
2127
+ end
2128
+
2129
+ def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t)
2130
+ if end_t
2131
+ end_l = loc(end_t)
2132
+ elsif else_e && else_e.loc.expression
2133
+ end_l = else_e.loc.expression
2134
+ elsif loc(else_t)
2135
+ end_l = loc(else_t)
2136
+ elsif body_e && body_e.loc.expression
2137
+ end_l = body_e.loc.expression
2138
+ elsif loc(begin_t)
2139
+ end_l = loc(begin_t)
2140
+ else
2141
+ end_l = cond_e.loc.expression
2142
+ end
2143
+
2144
+ Source::Map::Condition.new(loc(keyword_t),
2145
+ loc(begin_t), loc(else_t), loc(end_t),
2146
+ loc(keyword_t).join(end_l))
2147
+ end
2148
+
2149
+ def ternary_map(begin_e, question_t, mid_e, colon_t, end_e)
2150
+ Source::Map::Ternary.new(loc(question_t), loc(colon_t),
2151
+ join_exprs(begin_e, end_e))
2152
+ end
2153
+
2154
+ def for_map(keyword_t, in_t, begin_t, end_t)
2155
+ Source::Map::For.new(loc(keyword_t), loc(in_t),
2156
+ loc(begin_t), loc(end_t),
2157
+ loc(keyword_t).join(loc(end_t)))
2158
+ end
2159
+
2160
+ def rescue_body_map(keyword_t, exc_list_e, assoc_t,
2161
+ exc_var_e, then_t,
2162
+ compstmt_e)
2163
+ end_l = compstmt_e.loc.expression if compstmt_e
2164
+ end_l = loc(then_t) if end_l.nil? && then_t
2165
+ end_l = exc_var_e.loc.expression if end_l.nil? && exc_var_e
2166
+ end_l = exc_list_e.loc.expression if end_l.nil? && exc_list_e
2167
+ end_l = loc(keyword_t) if end_l.nil?
2168
+
2169
+ Source::Map::RescueBody.new(loc(keyword_t), loc(assoc_t), loc(then_t),
2170
+ loc(keyword_t).join(end_l))
2171
+ end
2172
+
2173
+ def eh_keyword_map(compstmt_e, keyword_t, body_es,
2174
+ else_t, else_e)
2175
+ if compstmt_e.nil?
2176
+ if keyword_t.nil?
2177
+ begin_l = body_es.first.loc.expression
2178
+ else
2179
+ begin_l = loc(keyword_t)
2180
+ end
2181
+ else
2182
+ begin_l = compstmt_e.loc.expression
2183
+ end
2184
+
2185
+ if else_t
2186
+ if else_e.nil?
2187
+ end_l = loc(else_t)
2188
+ else
2189
+ end_l = else_e.loc.expression
2190
+ end
2191
+ elsif !body_es.last.nil?
2192
+ end_l = body_es.last.loc.expression
2193
+ else
2194
+ end_l = loc(keyword_t)
2195
+ end
2196
+
2197
+ Source::Map::Condition.new(loc(keyword_t), nil, loc(else_t), nil,
2198
+ begin_l.join(end_l))
2199
+ end
2200
+
2201
+ def guard_map(keyword_t, guard_body_e)
2202
+ keyword_l = loc(keyword_t)
2203
+ guard_body_l = guard_body_e.loc.expression
2204
+
2205
+ Source::Map::Keyword.new(keyword_l, nil, nil, keyword_l.join(guard_body_l))
2206
+ end
2207
+
2208
+ #
2209
+ # HELPERS
2210
+ #
2211
+
2212
+ # Extract a static string from e.g. a regular expression,
2213
+ # honoring the fact that MRI expands interpolations like #{""}
2214
+ # at parse time.
2215
+ def static_string(nodes)
2216
+ nodes.map do |node|
2217
+ case node.type
2218
+ when :str
2219
+ node.children[0]
2220
+ when :begin
2221
+ if (string = static_string(node.children))
2222
+ string
2223
+ else
2224
+ return nil
2225
+ end
2226
+ else
2227
+ return nil
2228
+ end
2229
+ end.join
2230
+ end
2231
+
2232
+ def static_regexp(parts, options)
2233
+ source = static_string(parts)
2234
+ return nil if source.nil?
2235
+
2236
+ source = case
2237
+ when options.children.include?(:u)
2238
+ source.encode(Encoding::UTF_8)
2239
+ when options.children.include?(:e)
2240
+ source.encode(Encoding::EUC_JP)
2241
+ when options.children.include?(:s)
2242
+ source.encode(Encoding::WINDOWS_31J)
2243
+ when options.children.include?(:n)
2244
+ source.encode(Encoding::BINARY)
2245
+ else
2246
+ source
2247
+ end
2248
+
2249
+ Regexp.new(source, (Regexp::EXTENDED if options.children.include?(:x)))
2250
+ end
2251
+
2252
+ def static_regexp_node(node)
2253
+ if node.type == :regexp
2254
+ parts, options = node.children[0..-2], node.children[-1]
2255
+ static_regexp(parts, options)
2256
+ end
2257
+ end
2258
+
2259
+ def collapse_string_parts?(parts)
2260
+ parts.one? &&
2261
+ [:str, :dstr].include?(parts.first.type)
2262
+ end
2263
+
2264
+ def value(token)
2265
+ token[0]
2266
+ end
2267
+
2268
+ def string_value(token)
2269
+ unless token[0].valid_encoding?
2270
+ diagnostic(:error, :invalid_encoding, nil, token[1])
2271
+ end
2272
+
2273
+ token[0]
2274
+ end
2275
+
2276
+ def loc(token)
2277
+ # Pass through `nil`s and return nil for tNL.
2278
+ token[1] if token && token[0]
2279
+ end
2280
+
2281
+ def diagnostic(type, reason, arguments, location, highlights=[])
2282
+ @parser.diagnostics.process(
2283
+ Diagnostic.new(type, reason, arguments, location, highlights))
2284
+
2285
+ if type == :error
2286
+ @parser.send :yyerror
2287
+ end
2288
+ end
2289
+
2290
+ def validate_definee(definee)
2291
+ case definee.type
2292
+ when :int, :str, :dstr, :sym, :dsym,
2293
+ :regexp, :array, :hash
2294
+
2295
+ diagnostic :error, :singleton_literal, nil, definee.loc.expression
2296
+ false
2297
+ else
2298
+ true
2299
+ end
2300
+ end
2301
+
2302
+ def rewrite_hash_args_to_kwargs(args)
2303
+ if args.any? && kwargs?(args.last)
2304
+ # foo(..., bar: baz)
2305
+ args[args.length - 1] = args[args.length - 1].updated(:kwargs)
2306
+ elsif args.length > 1 && args.last.type == :block_pass && kwargs?(args[args.length - 2])
2307
+ # foo(..., bar: baz, &blk)
2308
+ args[args.length - 2] = args[args.length - 2].updated(:kwargs)
2309
+ end
2310
+ end
2311
+
2312
+ def kwargs?(node)
2313
+ node.type == :hash && node.loc.begin.nil? && node.loc.end.nil?
2314
+ end
2315
+ end
2316
+
2317
+ end