ngrok-api 0.9.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.yardopts +1 -0
- data/LICENSE +7 -0
- data/doc/NgrokAPI/Client.html +1469 -125
- data/doc/NgrokAPI/Error.html +3 -3
- data/doc/NgrokAPI/Errors/NotFoundError.html +3 -3
- data/doc/NgrokAPI/Errors.html +3 -3
- data/doc/NgrokAPI/HttpClient.html +66 -36
- data/doc/NgrokAPI/Models/{ApiKey.html → APIKey.html} +110 -179
- data/doc/NgrokAPI/Models/AWSAuth.html +617 -0
- data/doc/NgrokAPI/Models/AWSCredentials.html +617 -0
- data/doc/NgrokAPI/Models/AWSRole.html +543 -0
- data/doc/NgrokAPI/Models/AbuseReport.html +987 -0
- data/doc/NgrokAPI/Models/AbuseReportHostname.html +617 -0
- data/doc/NgrokAPI/Models/AgentIngress.html +1217 -0
- data/doc/NgrokAPI/Models/CertificateAuthority.html +1439 -0
- data/doc/NgrokAPI/Models/Credential.html +1149 -0
- data/doc/NgrokAPI/Models/EndpointCircuitBreaker.html +913 -0
- data/doc/NgrokAPI/Models/EndpointCompression.html +543 -0
- data/doc/NgrokAPI/Models/EndpointConfiguration.html +1323 -512
- data/doc/NgrokAPI/Models/EndpointIPPolicy.html +617 -0
- data/doc/NgrokAPI/Models/EndpointIPPolicyMutate.html +617 -0
- data/doc/NgrokAPI/Models/EndpointLogging.html +617 -0
- data/doc/NgrokAPI/Models/EndpointLoggingMutate.html +617 -0
- data/doc/NgrokAPI/Models/EndpointMutualTLS.html +617 -0
- data/doc/NgrokAPI/Models/EndpointMutualTLSMutate.html +617 -0
- data/doc/NgrokAPI/Models/EndpointOAuth.html +987 -0
- data/doc/NgrokAPI/Models/EndpointOAuthFacebook.html +839 -0
- data/doc/NgrokAPI/Models/EndpointOAuthGitHub.html +987 -0
- data/doc/NgrokAPI/Models/EndpointOAuthGoogle.html +839 -0
- data/doc/NgrokAPI/Models/EndpointOAuthMicrosoft.html +839 -0
- data/doc/NgrokAPI/Models/EndpointOAuthProvider.html +765 -0
- data/doc/NgrokAPI/Models/EndpointOIDC.html +1135 -0
- data/doc/NgrokAPI/Models/EndpointRequestHeaders.html +691 -0
- data/doc/NgrokAPI/Models/EndpointResponseHeaders.html +691 -0
- data/doc/NgrokAPI/Models/EndpointSAML.html +1653 -0
- data/doc/NgrokAPI/Models/EndpointSAMLMutate.html +1283 -0
- data/doc/NgrokAPI/Models/EndpointTLSTermination.html +691 -0
- data/doc/NgrokAPI/Models/EndpointWebhookValidation.html +691 -0
- data/doc/NgrokAPI/Models/EventDestination.html +1058 -0
- data/doc/NgrokAPI/Models/EventSource.html +765 -0
- data/doc/NgrokAPI/Models/EventSourceList.html +617 -0
- data/doc/NgrokAPI/Models/EventSourceReplace.html +691 -0
- data/doc/NgrokAPI/Models/EventStream.html +1309 -0
- data/doc/NgrokAPI/Models/EventSubscription.html +1058 -0
- data/doc/NgrokAPI/Models/EventTarget.html +765 -0
- data/doc/NgrokAPI/Models/EventTargetCloudwatchLogs.html +617 -0
- data/doc/NgrokAPI/Models/EventTargetFirehose.html +617 -0
- data/doc/NgrokAPI/Models/EventTargetKinesis.html +617 -0
- data/doc/NgrokAPI/Models/{TlsCertificate.html → IPPolicy.html} +172 -167
- data/doc/NgrokAPI/Models/IPPolicyRule.html +1149 -0
- data/doc/NgrokAPI/Models/IPRestriction.html +1132 -0
- data/doc/NgrokAPI/Models/Listable.html +120 -52
- data/doc/NgrokAPI/Models/Ref.html +617 -0
- data/doc/NgrokAPI/Models/ReservedAddr.html +1132 -0
- data/doc/NgrokAPI/Models/ReservedDomain.html +186 -1108
- data/doc/NgrokAPI/Models/ReservedDomainCertJob.html +765 -0
- data/doc/NgrokAPI/Models/ReservedDomainCertPolicy.html +617 -0
- data/doc/NgrokAPI/Models/ReservedDomainCertStatus.html +617 -0
- data/doc/NgrokAPI/Models/SSHCertificateAuthority.html +1143 -0
- data/doc/NgrokAPI/Models/SSHCredential.html +1149 -0
- data/doc/NgrokAPI/Models/SSHHostCertificate.html +1513 -0
- data/doc/NgrokAPI/Models/SSHUserCertificate.html +1661 -0
- data/doc/NgrokAPI/Models/TLSCertificate.html +2179 -0
- data/doc/NgrokAPI/Models/TLSCertificateSANs.html +617 -0
- data/doc/NgrokAPI/Models/Tunnel.html +987 -0
- data/doc/NgrokAPI/Models/TunnelSession.html +1209 -0
- data/doc/NgrokAPI/Models.html +6 -6
- data/doc/NgrokAPI/PagedIterator.html +16 -12
- data/{docs/NgrokAPI/Services/ApiKeysClient.html → doc/NgrokAPI/Services/APIKeysClient.html} +404 -153
- data/doc/NgrokAPI/Services/AbuseReportsClient.html +706 -0
- data/doc/NgrokAPI/Services/AgentIngressesClient.html +1600 -0
- data/doc/NgrokAPI/Services/CertificateAuthoritiesClient.html +1602 -0
- data/doc/NgrokAPI/Services/CredentialsClient.html +1644 -0
- data/doc/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointCompressionModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointConfigurationsClient.html +503 -370
- data/doc/NgrokAPI/Services/EndpointIPPolicyModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointLoggingModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointMutualTLSModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointOAuthModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointOIDCModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointRequestHeadersModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointSAMLModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EndpointWebhookValidationModuleClient.html +1043 -0
- data/doc/NgrokAPI/Services/EventDestinationsClient.html +1712 -0
- data/doc/NgrokAPI/Services/EventSourcesClient.html +1532 -0
- data/doc/NgrokAPI/Services/EventStreamsClient.html +1792 -0
- data/doc/NgrokAPI/Services/EventSubscriptionsClient.html +1712 -0
- data/doc/NgrokAPI/Services/IPPoliciesClient.html +1602 -0
- data/doc/NgrokAPI/Services/IPPolicyRulesClient.html +1660 -0
- data/doc/NgrokAPI/Services/IPRestrictionsClient.html +1720 -0
- data/doc/NgrokAPI/Services/ReservedAddrsClient.html +1894 -0
- data/doc/NgrokAPI/Services/ReservedDomainsClient.html +585 -344
- data/doc/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +1644 -0
- data/doc/NgrokAPI/Services/SSHCredentialsClient.html +1662 -0
- data/doc/NgrokAPI/Services/SSHHostCertificatesClient.html +1680 -0
- data/doc/NgrokAPI/Services/SSHUserCertificatesClient.html +1720 -0
- data/{docs/NgrokAPI/Services/TlsCertificatesClient.html → doc/NgrokAPI/Services/TLSCertificatesClient.html} +404 -201
- data/doc/NgrokAPI/Services/TunnelSessionsClient.html +1587 -0
- data/doc/NgrokAPI/Services/TunnelsClient.html +669 -0
- data/doc/NgrokAPI/Services.html +6 -6
- data/doc/NgrokAPI.html +5 -5
- data/doc/README +94 -0
- data/doc/_index.html +621 -25
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +55 -28
- data/doc/frames.html +1 -1
- data/doc/index.html +55 -28
- data/doc/method_list.html +7526 -286
- data/doc/top-level-namespace.html +3 -3
- data/docs/.gitkeep +0 -0
- data/docs/CNAME +1 -0
- data/docs/NgrokAPI/Client.html +1469 -125
- data/docs/NgrokAPI/Error.html +3 -3
- data/docs/NgrokAPI/Errors/NotFoundError.html +3 -3
- data/docs/NgrokAPI/Errors.html +3 -3
- data/docs/NgrokAPI/HttpClient.html +66 -36
- data/docs/NgrokAPI/Models/{ApiKey.html → APIKey.html} +110 -179
- data/docs/NgrokAPI/Models/AWSAuth.html +617 -0
- data/docs/NgrokAPI/Models/AWSCredentials.html +617 -0
- data/docs/NgrokAPI/Models/AWSRole.html +543 -0
- data/docs/NgrokAPI/Models/AbuseReport.html +987 -0
- data/docs/NgrokAPI/Models/AbuseReportHostname.html +617 -0
- data/docs/NgrokAPI/Models/AgentIngress.html +1217 -0
- data/docs/NgrokAPI/Models/CertificateAuthority.html +1439 -0
- data/docs/NgrokAPI/Models/Credential.html +1149 -0
- data/docs/NgrokAPI/Models/EndpointCircuitBreaker.html +913 -0
- data/docs/NgrokAPI/Models/EndpointCompression.html +543 -0
- data/docs/NgrokAPI/Models/EndpointConfiguration.html +1323 -512
- data/docs/NgrokAPI/Models/EndpointIPPolicy.html +617 -0
- data/docs/NgrokAPI/Models/EndpointIPPolicyMutate.html +617 -0
- data/docs/NgrokAPI/Models/EndpointLogging.html +617 -0
- data/docs/NgrokAPI/Models/EndpointLoggingMutate.html +617 -0
- data/docs/NgrokAPI/Models/EndpointMutualTLS.html +617 -0
- data/docs/NgrokAPI/Models/EndpointMutualTLSMutate.html +617 -0
- data/docs/NgrokAPI/Models/EndpointOAuth.html +987 -0
- data/docs/NgrokAPI/Models/EndpointOAuthFacebook.html +839 -0
- data/docs/NgrokAPI/Models/EndpointOAuthGitHub.html +987 -0
- data/docs/NgrokAPI/Models/EndpointOAuthGoogle.html +839 -0
- data/docs/NgrokAPI/Models/EndpointOAuthMicrosoft.html +839 -0
- data/docs/NgrokAPI/Models/EndpointOAuthProvider.html +765 -0
- data/docs/NgrokAPI/Models/EndpointOIDC.html +1135 -0
- data/docs/NgrokAPI/Models/EndpointRequestHeaders.html +691 -0
- data/docs/NgrokAPI/Models/EndpointResponseHeaders.html +691 -0
- data/docs/NgrokAPI/Models/EndpointSAML.html +1653 -0
- data/docs/NgrokAPI/Models/EndpointSAMLMutate.html +1283 -0
- data/docs/NgrokAPI/Models/EndpointTLSTermination.html +691 -0
- data/docs/NgrokAPI/Models/EndpointWebhookValidation.html +691 -0
- data/docs/NgrokAPI/Models/EventDestination.html +1058 -0
- data/docs/NgrokAPI/Models/EventSource.html +765 -0
- data/docs/NgrokAPI/Models/EventSourceList.html +617 -0
- data/docs/NgrokAPI/Models/EventSourceReplace.html +691 -0
- data/docs/NgrokAPI/Models/EventStream.html +1309 -0
- data/docs/NgrokAPI/Models/EventSubscription.html +1058 -0
- data/docs/NgrokAPI/Models/EventTarget.html +765 -0
- data/docs/NgrokAPI/Models/EventTargetCloudwatchLogs.html +617 -0
- data/docs/NgrokAPI/Models/EventTargetFirehose.html +617 -0
- data/docs/NgrokAPI/Models/EventTargetKinesis.html +617 -0
- data/docs/NgrokAPI/Models/{TlsCertificate.html → IPPolicy.html} +172 -167
- data/docs/NgrokAPI/Models/IPPolicyRule.html +1149 -0
- data/docs/NgrokAPI/Models/IPRestriction.html +1132 -0
- data/docs/NgrokAPI/Models/Listable.html +120 -52
- data/docs/NgrokAPI/Models/Ref.html +617 -0
- data/docs/NgrokAPI/Models/ReservedAddr.html +1132 -0
- data/docs/NgrokAPI/Models/ReservedDomain.html +186 -1108
- data/docs/NgrokAPI/Models/ReservedDomainCertJob.html +765 -0
- data/docs/NgrokAPI/Models/ReservedDomainCertPolicy.html +617 -0
- data/docs/NgrokAPI/Models/ReservedDomainCertStatus.html +617 -0
- data/docs/NgrokAPI/Models/SSHCertificateAuthority.html +1143 -0
- data/docs/NgrokAPI/Models/SSHCredential.html +1149 -0
- data/docs/NgrokAPI/Models/SSHHostCertificate.html +1513 -0
- data/docs/NgrokAPI/Models/SSHUserCertificate.html +1661 -0
- data/docs/NgrokAPI/Models/TLSCertificate.html +2179 -0
- data/docs/NgrokAPI/Models/TLSCertificateSANs.html +617 -0
- data/docs/NgrokAPI/Models/Tunnel.html +987 -0
- data/docs/NgrokAPI/Models/TunnelSession.html +1209 -0
- data/docs/NgrokAPI/Models.html +6 -6
- data/docs/NgrokAPI/PagedIterator.html +16 -12
- data/{doc/NgrokAPI/Services/ApiKeysClient.html → docs/NgrokAPI/Services/APIKeysClient.html} +404 -153
- data/docs/NgrokAPI/Services/AbuseReportsClient.html +706 -0
- data/docs/NgrokAPI/Services/AgentIngressesClient.html +1600 -0
- data/docs/NgrokAPI/Services/CertificateAuthoritiesClient.html +1602 -0
- data/docs/NgrokAPI/Services/CredentialsClient.html +1644 -0
- data/docs/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointCompressionModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointConfigurationsClient.html +503 -370
- data/docs/NgrokAPI/Services/EndpointIPPolicyModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointLoggingModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointMutualTLSModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointOAuthModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointOIDCModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointRequestHeadersModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointSAMLModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EndpointWebhookValidationModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/EventDestinationsClient.html +1712 -0
- data/docs/NgrokAPI/Services/EventSourcesClient.html +1532 -0
- data/docs/NgrokAPI/Services/EventStreamsClient.html +1792 -0
- data/docs/NgrokAPI/Services/EventSubscriptionsClient.html +1712 -0
- data/docs/NgrokAPI/Services/IPPoliciesClient.html +1602 -0
- data/docs/NgrokAPI/Services/IPPolicyRulesClient.html +1660 -0
- data/docs/NgrokAPI/Services/IPRestrictionsClient.html +1720 -0
- data/docs/NgrokAPI/Services/ReservedAddrsClient.html +1894 -0
- data/docs/NgrokAPI/Services/ReservedDomainsClient.html +585 -344
- data/docs/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +1644 -0
- data/docs/NgrokAPI/Services/SSHCredentialsClient.html +1662 -0
- data/docs/NgrokAPI/Services/SSHHostCertificatesClient.html +1680 -0
- data/docs/NgrokAPI/Services/SSHUserCertificatesClient.html +1720 -0
- data/{doc/NgrokAPI/Services/TlsCertificatesClient.html → docs/NgrokAPI/Services/TLSCertificatesClient.html} +404 -201
- data/docs/NgrokAPI/Services/TunnelSessionsClient.html +1587 -0
- data/docs/NgrokAPI/Services/TunnelsClient.html +669 -0
- data/docs/NgrokAPI/Services.html +6 -6
- data/docs/NgrokAPI.html +5 -5
- data/docs/README +94 -0
- data/docs/_index.html +621 -25
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +55 -28
- data/docs/frames.html +1 -1
- data/docs/index.html +55 -28
- data/docs/method_list.html +7526 -286
- data/docs/top-level-namespace.html +3 -3
- data/lib/ngrokapi/client.rb +229 -49
- data/lib/ngrokapi/http_client.rb +6 -7
- data/lib/ngrokapi/models/abuse_report.rb +37 -0
- data/lib/ngrokapi/models/abuse_report_hostname.rb +27 -0
- data/lib/ngrokapi/models/agent_ingress.rb +66 -0
- data/lib/ngrokapi/models/api_key.rb +62 -64
- data/lib/ngrokapi/models/aws_auth.rb +27 -0
- data/lib/ngrokapi/models/aws_credentials.rb +27 -0
- data/lib/ngrokapi/models/aws_role.rb +25 -0
- data/lib/ngrokapi/models/certificate_authority.rb +72 -0
- data/lib/ngrokapi/models/credential.rb +67 -0
- data/lib/ngrokapi/models/endpoint_circuit_breaker.rb +35 -0
- data/lib/ngrokapi/models/endpoint_compression.rb +25 -0
- data/lib/ngrokapi/models/endpoint_configuration.rb +130 -119
- data/lib/ngrokapi/models/endpoint_ip_policy.rb +27 -0
- data/lib/ngrokapi/models/endpoint_ip_policy_mutate.rb +27 -0
- data/lib/ngrokapi/models/endpoint_logging.rb +27 -0
- data/lib/ngrokapi/models/endpoint_logging_mutate.rb +27 -0
- data/lib/ngrokapi/models/endpoint_mutual_tls.rb +27 -0
- data/lib/ngrokapi/models/endpoint_mutual_tls_mutate.rb +27 -0
- data/lib/ngrokapi/models/endpoint_o_auth.rb +37 -0
- data/lib/ngrokapi/models/endpoint_o_auth_facebook.rb +33 -0
- data/lib/ngrokapi/models/endpoint_o_auth_git_hub.rb +37 -0
- data/lib/ngrokapi/models/endpoint_o_auth_google.rb +33 -0
- data/lib/ngrokapi/models/endpoint_o_auth_microsoft.rb +33 -0
- data/lib/ngrokapi/models/endpoint_o_auth_provider.rb +31 -0
- data/lib/ngrokapi/models/endpoint_oidc.rb +41 -0
- data/lib/ngrokapi/models/endpoint_request_headers.rb +29 -0
- data/lib/ngrokapi/models/endpoint_response_headers.rb +29 -0
- data/lib/ngrokapi/models/endpoint_saml.rb +55 -0
- data/lib/ngrokapi/models/endpoint_saml_mutate.rb +45 -0
- data/lib/ngrokapi/models/endpoint_tls_termination.rb +29 -0
- data/lib/ngrokapi/models/endpoint_webhook_validation.rb +29 -0
- data/lib/ngrokapi/models/event_destination.rb +49 -0
- data/lib/ngrokapi/models/event_source.rb +31 -0
- data/lib/ngrokapi/models/event_source_list.rb +27 -0
- data/lib/ngrokapi/models/event_source_replace.rb +29 -0
- data/lib/ngrokapi/models/event_stream.rb +77 -0
- data/lib/ngrokapi/models/event_subscription.rb +47 -0
- data/lib/ngrokapi/models/event_target.rb +31 -0
- data/lib/ngrokapi/models/event_target_cloudwatch_logs.rb +27 -0
- data/lib/ngrokapi/models/event_target_firehose.rb +27 -0
- data/lib/ngrokapi/models/event_target_kinesis.rb +27 -0
- data/lib/ngrokapi/models/ip_policy.rb +64 -0
- data/lib/ngrokapi/models/ip_policy_rule.rb +67 -0
- data/lib/ngrokapi/models/ip_restriction.rb +49 -0
- data/lib/ngrokapi/models/listable.rb +13 -2
- data/lib/ngrokapi/models/ref.rb +27 -0
- data/lib/ngrokapi/models/reserved_addr.rb +49 -0
- data/lib/ngrokapi/models/reserved_domain.rb +61 -211
- data/lib/ngrokapi/models/reserved_domain_cert_job.rb +31 -0
- data/lib/ngrokapi/models/reserved_domain_cert_policy.rb +27 -0
- data/lib/ngrokapi/models/reserved_domain_cert_status.rb +27 -0
- data/lib/ngrokapi/models/ssh_certificate_authority.rb +64 -0
- data/lib/ngrokapi/models/ssh_credential.rb +67 -0
- data/lib/ngrokapi/models/ssh_host_certificate.rb +74 -0
- data/lib/ngrokapi/models/ssh_user_certificate.rb +78 -0
- data/lib/ngrokapi/models/tls_certificate.rb +92 -62
- data/lib/ngrokapi/models/tls_certificate_sa_ns.rb +27 -0
- data/lib/ngrokapi/models/tunnel.rb +37 -0
- data/lib/ngrokapi/models/tunnel_session.rb +43 -0
- data/lib/ngrokapi/paged_iterator.rb +4 -2
- data/lib/ngrokapi/services/.gitkeep +0 -0
- data/lib/ngrokapi/services/abuse_reports_client.rb +77 -0
- data/lib/ngrokapi/services/agent_ingresses_client.rb +206 -0
- data/lib/ngrokapi/services/api_keys_client.rb +210 -144
- data/lib/ngrokapi/services/certificate_authorities_client.rb +211 -0
- data/lib/ngrokapi/services/credentials_client.rb +217 -0
- data/lib/ngrokapi/services/endpoint_circuit_breaker_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_compression_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_configurations_client.rb +289 -313
- data/lib/ngrokapi/services/endpoint_ip_policy_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_logging_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_mutual_tls_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_o_auth_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_oidc_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_request_headers_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_response_headers_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_saml_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_tls_termination_module_client.rb +108 -0
- data/lib/ngrokapi/services/endpoint_webhook_validation_module_client.rb +108 -0
- data/lib/ngrokapi/services/event_destinations_client.rb +221 -0
- data/lib/ngrokapi/services/event_sources_client.rb +185 -0
- data/lib/ngrokapi/services/event_streams_client.rb +224 -0
- data/lib/ngrokapi/services/event_subscriptions_client.rb +215 -0
- data/lib/ngrokapi/services/ip_policies_client.rb +215 -0
- data/lib/ngrokapi/services/ip_policy_rules_client.rb +214 -0
- data/lib/ngrokapi/services/ip_restrictions_client.rb +224 -0
- data/lib/ngrokapi/services/reserved_addrs_client.rb +246 -0
- data/lib/ngrokapi/services/reserved_domains_client.rb +360 -313
- data/lib/ngrokapi/services/ssh_certificate_authorities_client.rb +212 -0
- data/lib/ngrokapi/services/ssh_credentials_client.rb +215 -0
- data/lib/ngrokapi/services/ssh_host_certificates_client.rb +217 -0
- data/lib/ngrokapi/services/ssh_user_certificates_client.rb +221 -0
- data/lib/ngrokapi/services/tls_certificates_client.rb +213 -161
- data/lib/ngrokapi/services/tunnel_sessions_client.rb +237 -0
- data/lib/ngrokapi/services/tunnels_client.rb +78 -0
- data/lib/ngrokapi/version.rb +1 -1
- data/lib/ngrokapi.rb +1 -1
- data/ngrok-api.gemspec +1 -1
- data/spec/ngrokapi/client_spec.rb +158 -33
- data/spec/ngrokapi/models/abuse_report_hostname_spec.rb +21 -0
- data/spec/ngrokapi/models/abuse_report_spec.rb +21 -0
- data/spec/ngrokapi/models/agent_ingress_spec.rb +42 -0
- data/spec/ngrokapi/models/api_key_spec.rb +42 -43
- data/spec/ngrokapi/models/aws_auth_spec.rb +21 -0
- data/spec/ngrokapi/models/aws_credentials_spec.rb +21 -0
- data/spec/ngrokapi/models/aws_role_spec.rb +21 -0
- data/spec/ngrokapi/models/certificate_authority_spec.rb +42 -0
- data/spec/ngrokapi/models/credential_spec.rb +45 -0
- data/spec/ngrokapi/models/endpoint_circuit_breaker_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_compression_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_configuration_spec.rb +78 -0
- data/spec/ngrokapi/models/endpoint_ip_policy_mutate_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_ip_policy_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_logging_mutate_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_logging_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_mutual_tls_mutate_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_mutual_tls_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_facebook_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_git_hub_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_google_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_microsoft_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_provider_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_o_auth_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_oidc_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_request_headers_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_response_headers_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_saml_mutate_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_saml_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_tls_termination_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_webhook_validation_spec.rb +21 -0
- data/spec/ngrokapi/models/event_destination_spec.rb +28 -0
- data/spec/ngrokapi/models/event_source_list_spec.rb +21 -0
- data/spec/ngrokapi/models/event_source_replace_spec.rb +21 -0
- data/spec/ngrokapi/models/event_source_spec.rb +21 -0
- data/spec/ngrokapi/models/event_stream_spec.rb +51 -0
- data/spec/ngrokapi/models/event_subscription_spec.rb +28 -0
- data/spec/ngrokapi/models/event_target_cloudwatch_logs_spec.rb +21 -0
- data/spec/ngrokapi/models/event_target_firehose_spec.rb +21 -0
- data/spec/ngrokapi/models/event_target_kinesis_spec.rb +21 -0
- data/spec/ngrokapi/models/event_target_spec.rb +21 -0
- data/spec/ngrokapi/models/ip_policy_rule_spec.rb +45 -0
- data/spec/ngrokapi/models/ip_policy_spec.rb +42 -0
- data/spec/ngrokapi/models/ip_restriction_spec.rb +28 -0
- data/spec/ngrokapi/models/listable_spec.rb +4 -4
- data/spec/ngrokapi/models/ref_spec.rb +21 -0
- data/spec/ngrokapi/models/reserved_addr_spec.rb +28 -0
- data/spec/ngrokapi/models/reserved_domain_cert_job_spec.rb +21 -0
- data/spec/ngrokapi/models/reserved_domain_cert_policy_spec.rb +21 -0
- data/spec/ngrokapi/models/reserved_domain_cert_status_spec.rb +21 -0
- data/spec/ngrokapi/models/reserved_domain_spec.rb +28 -100
- data/spec/ngrokapi/models/ssh_certificate_authority_spec.rb +42 -0
- data/spec/ngrokapi/models/ssh_credential_spec.rb +45 -0
- data/spec/ngrokapi/models/ssh_host_certificate_spec.rb +42 -0
- data/spec/ngrokapi/models/ssh_user_certificate_spec.rb +42 -0
- data/spec/ngrokapi/models/tls_certificate_sa_ns_spec.rb +21 -0
- data/spec/ngrokapi/models/tls_certificate_spec.rb +42 -0
- data/spec/ngrokapi/models/tunnel_session_spec.rb +21 -0
- data/spec/ngrokapi/models/tunnel_spec.rb +21 -0
- data/spec/ngrokapi/paged_iterator_spec.rb +7 -7
- data/spec/ngrokapi/services/.gitkeep +0 -0
- data/spec/ngrokapi/services/abuse_reports_client_spec.rb +65 -0
- data/spec/ngrokapi/services/agent_ingresses_client_spec.rb +159 -0
- data/spec/ngrokapi/services/api_keys_client_spec.rb +157 -127
- data/spec/ngrokapi/services/certificate_authorities_client_spec.rb +159 -0
- data/spec/ngrokapi/services/credentials_client_spec.rb +163 -0
- data/spec/ngrokapi/services/endpoint_circuit_breaker_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_compression_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_configurations_client_spec.rb +237 -0
- data/spec/ngrokapi/services/endpoint_ip_policy_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_logging_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_mutual_tls_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_o_auth_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_oidc_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_request_headers_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_response_headers_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_saml_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_tls_termination_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/endpoint_webhook_validation_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/event_destinations_client_spec.rb +172 -0
- data/spec/ngrokapi/services/event_sources_client_spec.rb +192 -0
- data/spec/ngrokapi/services/event_streams_client_spec.rb +177 -0
- data/spec/ngrokapi/services/event_subscriptions_client_spec.rb +169 -0
- data/spec/ngrokapi/services/ip_policies_client_spec.rb +159 -0
- data/spec/ngrokapi/services/ip_policy_rules_client_spec.rb +165 -0
- data/spec/ngrokapi/services/ip_restrictions_client_spec.rb +171 -0
- data/spec/ngrokapi/services/reserved_addrs_client_spec.rb +206 -0
- data/spec/ngrokapi/services/reserved_domains_client_spec.rb +349 -0
- data/spec/ngrokapi/services/ssh_certificate_authorities_client_spec.rb +163 -0
- data/spec/ngrokapi/services/ssh_credentials_client_spec.rb +165 -0
- data/spec/ngrokapi/services/ssh_host_certificates_client_spec.rb +167 -0
- data/spec/ngrokapi/services/ssh_user_certificates_client_spec.rb +171 -0
- data/spec/ngrokapi/services/tls_certificates_client_spec.rb +161 -0
- data/spec/ngrokapi/services/tunnel_sessions_client_spec.rb +183 -0
- data/spec/ngrokapi/services/tunnels_client_spec.rb +21 -0
- data/spec/spec_helper.rb +1096 -80
- metadata +360 -11
@@ -0,0 +1,237 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NgrokAPI
|
4
|
+
module Services
|
5
|
+
##
|
6
|
+
# Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel
|
7
|
+
# sessions that are running and connected to the ngrok service. Each tunnel
|
8
|
+
# session can include one or more Tunnels.
|
9
|
+
#
|
10
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions
|
11
|
+
class TunnelSessionsClient
|
12
|
+
# The List Property from the resulting API for list calls
|
13
|
+
LIST_PROPERTY = 'tunnel_sessions'
|
14
|
+
# The API path for the requests
|
15
|
+
PATH = '/tunnel_sessions'
|
16
|
+
|
17
|
+
attr_reader :client
|
18
|
+
|
19
|
+
def initialize(client:)
|
20
|
+
@client = client
|
21
|
+
end
|
22
|
+
|
23
|
+
##
|
24
|
+
# List all online tunnel sessions running on this account.
|
25
|
+
#
|
26
|
+
# @param [string] before_id
|
27
|
+
# @param [string] limit
|
28
|
+
# @param [string] url optional and mutually exclusive from before_id and limit
|
29
|
+
# @return [NgrokAPI::Models::Listable] result from the API request
|
30
|
+
#
|
31
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-list
|
32
|
+
def list(before_id: nil, limit: nil,
|
33
|
+
url: nil)
|
34
|
+
result = @client.list(
|
35
|
+
before_id: before_id,
|
36
|
+
limit: limit,
|
37
|
+
url: url,
|
38
|
+
path: PATH
|
39
|
+
)
|
40
|
+
|
41
|
+
NgrokAPI::Models::Listable.new(
|
42
|
+
client: self,
|
43
|
+
result: result,
|
44
|
+
list_property: LIST_PROPERTY,
|
45
|
+
klass: NgrokAPI::Models::TunnelSession
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# List all online tunnel sessions running on this account.
|
51
|
+
# Throws an exception if API error.
|
52
|
+
#
|
53
|
+
# @param [string] before_id
|
54
|
+
# @param [string] limit
|
55
|
+
# @param [string] url optional and mutually exclusive from before_id and limit
|
56
|
+
# @return [NgrokAPI::Models::Listable] result from the API request
|
57
|
+
#
|
58
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-list
|
59
|
+
def list!(before_id: nil, limit: nil,
|
60
|
+
url: nil)
|
61
|
+
result = @client.list(
|
62
|
+
before_id: before_id,
|
63
|
+
limit: limit,
|
64
|
+
danger: true,
|
65
|
+
url: url,
|
66
|
+
path: PATH
|
67
|
+
)
|
68
|
+
|
69
|
+
NgrokAPI::Models::Listable.new(
|
70
|
+
client: self,
|
71
|
+
result: result,
|
72
|
+
list_property: LIST_PROPERTY,
|
73
|
+
klass: NgrokAPI::Models::TunnelSession,
|
74
|
+
danger: true
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Get the detailed status of a tunnel session by ID
|
80
|
+
#
|
81
|
+
# @param [string] id a resource identifier
|
82
|
+
# @return [NgrokAPI::Models::TunnelSession] result from the API request
|
83
|
+
#
|
84
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-get
|
85
|
+
def get(id: "")
|
86
|
+
path = '/tunnel_sessions/%{id}'
|
87
|
+
replacements = {
|
88
|
+
id: id,
|
89
|
+
}
|
90
|
+
data = {}
|
91
|
+
result = @client.get(path % replacements, data: data)
|
92
|
+
NgrokAPI::Models::TunnelSession.new(client: self, result: result)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Get the detailed status of a tunnel session by ID
|
97
|
+
# Throws an exception if API error.
|
98
|
+
#
|
99
|
+
# @param [string] id a resource identifier
|
100
|
+
# @return [NgrokAPI::Models::TunnelSession] result from the API request
|
101
|
+
#
|
102
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-get
|
103
|
+
def get!(id: "")
|
104
|
+
path = '/tunnel_sessions/%{id}'
|
105
|
+
replacements = {
|
106
|
+
id: id,
|
107
|
+
}
|
108
|
+
data = {}
|
109
|
+
result = @client.get(path % replacements, data: data, danger: true)
|
110
|
+
NgrokAPI::Models::TunnelSession.new(client: self, result: result)
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Issues a command instructing the ngrok agent to restart. The agent restarts
|
115
|
+
# itself by calling exec() on platforms that support it. This operation is notably
|
116
|
+
# not supported on Windows. When an agent restarts, it reconnects with a new
|
117
|
+
# tunnel session ID.
|
118
|
+
#
|
119
|
+
# @param [string] id a resource identifier
|
120
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
121
|
+
#
|
122
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-restart
|
123
|
+
def restart(id: "")
|
124
|
+
path = '/tunnel_sessions/%{id}/restart'
|
125
|
+
replacements = {
|
126
|
+
id: id,
|
127
|
+
}
|
128
|
+
@client.post(path % replacements)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Issues a command instructing the ngrok agent to restart. The agent restarts
|
133
|
+
# itself by calling exec() on platforms that support it. This operation is notably
|
134
|
+
# not supported on Windows. When an agent restarts, it reconnects with a new
|
135
|
+
# tunnel session ID.
|
136
|
+
# Throws an exception if API error.
|
137
|
+
#
|
138
|
+
# @param [string] id a resource identifier
|
139
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
140
|
+
#
|
141
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-restart
|
142
|
+
def restart!(id: "")
|
143
|
+
path = '/tunnel_sessions/%{id}/restart'
|
144
|
+
replacements = {
|
145
|
+
id: id,
|
146
|
+
}
|
147
|
+
@client.post(path % replacements, danger: true)
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Issues a command instructing the ngrok agent that started this tunnel session to
|
152
|
+
# exit.
|
153
|
+
#
|
154
|
+
# @param [string] id a resource identifier
|
155
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
156
|
+
#
|
157
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-stop
|
158
|
+
def stop(id: "")
|
159
|
+
path = '/tunnel_sessions/%{id}/stop'
|
160
|
+
replacements = {
|
161
|
+
id: id,
|
162
|
+
}
|
163
|
+
@client.post(path % replacements)
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Issues a command instructing the ngrok agent that started this tunnel session to
|
168
|
+
# exit.
|
169
|
+
# Throws an exception if API error.
|
170
|
+
#
|
171
|
+
# @param [string] id a resource identifier
|
172
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
173
|
+
#
|
174
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-stop
|
175
|
+
def stop!(id: "")
|
176
|
+
path = '/tunnel_sessions/%{id}/stop'
|
177
|
+
replacements = {
|
178
|
+
id: id,
|
179
|
+
}
|
180
|
+
@client.post(path % replacements, danger: true)
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Issues a command instructing the ngrok agent to update itself to the latest
|
185
|
+
# version. After this call completes successfully, the ngrok agent will be in the
|
186
|
+
# update process. A caller should wait some amount of time to allow the update to
|
187
|
+
# complete (at least 10 seconds) before making a call to the Restart endpoint to
|
188
|
+
# request that the agent restart itself to start using the new code. This call
|
189
|
+
# will never update an ngrok agent to a new major version which could cause
|
190
|
+
# breaking compatibility issues. If you wish to update to a new major version,
|
191
|
+
# that must be done manually. Still, please be aware that updating your ngrok
|
192
|
+
# agent could break your integration. This call will fail in any of the following
|
193
|
+
# circumstances: there is no update available the ngrok agent's configuration
|
194
|
+
# disabled update checks the agent is currently in process of updating the agent
|
195
|
+
# has already successfully updated but has not yet been restarted
|
196
|
+
#
|
197
|
+
# @param [string] id
|
198
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
199
|
+
#
|
200
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-update
|
201
|
+
def update(id: "", version: "")
|
202
|
+
path = '/tunnel_sessions/%{id}/update'
|
203
|
+
replacements = {
|
204
|
+
id: id,
|
205
|
+
}
|
206
|
+
@client.post(path % replacements)
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Issues a command instructing the ngrok agent to update itself to the latest
|
211
|
+
# version. After this call completes successfully, the ngrok agent will be in the
|
212
|
+
# update process. A caller should wait some amount of time to allow the update to
|
213
|
+
# complete (at least 10 seconds) before making a call to the Restart endpoint to
|
214
|
+
# request that the agent restart itself to start using the new code. This call
|
215
|
+
# will never update an ngrok agent to a new major version which could cause
|
216
|
+
# breaking compatibility issues. If you wish to update to a new major version,
|
217
|
+
# that must be done manually. Still, please be aware that updating your ngrok
|
218
|
+
# agent could break your integration. This call will fail in any of the following
|
219
|
+
# circumstances: there is no update available the ngrok agent's configuration
|
220
|
+
# disabled update checks the agent is currently in process of updating the agent
|
221
|
+
# has already successfully updated but has not yet been restarted
|
222
|
+
# Throws an exception if API error.
|
223
|
+
#
|
224
|
+
# @param [string] id
|
225
|
+
# @return [NgrokAPI::Models::Empty] result from the API request
|
226
|
+
#
|
227
|
+
# https://ngrok.com/docs/api#api-tunnel-sessions-update
|
228
|
+
def update!(id: "", version: "")
|
229
|
+
path = '/tunnel_sessions/%{id}/update'
|
230
|
+
replacements = {
|
231
|
+
id: id,
|
232
|
+
}
|
233
|
+
@client.post(path % replacements, danger: true)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NgrokAPI
|
4
|
+
module Services
|
5
|
+
##
|
6
|
+
# Tunnels provide endpoints to access services exposed by a running ngrok
|
7
|
+
# agent tunnel session or an SSH reverse tunnel session.
|
8
|
+
#
|
9
|
+
# https://ngrok.com/docs/api#api-tunnels
|
10
|
+
class TunnelsClient
|
11
|
+
# The List Property from the resulting API for list calls
|
12
|
+
LIST_PROPERTY = 'tunnels'
|
13
|
+
# The API path for the requests
|
14
|
+
PATH = '/tunnels'
|
15
|
+
|
16
|
+
attr_reader :client
|
17
|
+
|
18
|
+
def initialize(client:)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# List all online tunnels currently running on the account.
|
24
|
+
#
|
25
|
+
# @param [string] before_id
|
26
|
+
# @param [string] limit
|
27
|
+
# @param [string] url optional and mutually exclusive from before_id and limit
|
28
|
+
# @return [NgrokAPI::Models::Listable] result from the API request
|
29
|
+
#
|
30
|
+
# https://ngrok.com/docs/api#api-tunnels-list
|
31
|
+
def list(before_id: nil, limit: nil,
|
32
|
+
url: nil)
|
33
|
+
result = @client.list(
|
34
|
+
before_id: before_id,
|
35
|
+
limit: limit,
|
36
|
+
url: url,
|
37
|
+
path: PATH
|
38
|
+
)
|
39
|
+
|
40
|
+
NgrokAPI::Models::Listable.new(
|
41
|
+
client: self,
|
42
|
+
result: result,
|
43
|
+
list_property: LIST_PROPERTY,
|
44
|
+
klass: NgrokAPI::Models::Tunnel
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# List all online tunnels currently running on the account.
|
50
|
+
# Throws an exception if API error.
|
51
|
+
#
|
52
|
+
# @param [string] before_id
|
53
|
+
# @param [string] limit
|
54
|
+
# @param [string] url optional and mutually exclusive from before_id and limit
|
55
|
+
# @return [NgrokAPI::Models::Listable] result from the API request
|
56
|
+
#
|
57
|
+
# https://ngrok.com/docs/api#api-tunnels-list
|
58
|
+
def list!(before_id: nil, limit: nil,
|
59
|
+
url: nil)
|
60
|
+
result = @client.list(
|
61
|
+
before_id: before_id,
|
62
|
+
limit: limit,
|
63
|
+
danger: true,
|
64
|
+
url: url,
|
65
|
+
path: PATH
|
66
|
+
)
|
67
|
+
|
68
|
+
NgrokAPI::Models::Listable.new(
|
69
|
+
client: self,
|
70
|
+
result: result,
|
71
|
+
list_property: LIST_PROPERTY,
|
72
|
+
klass: NgrokAPI::Models::Tunnel,
|
73
|
+
danger: true
|
74
|
+
)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/lib/ngrokapi/version.rb
CHANGED
data/lib/ngrokapi.rb
CHANGED
data/ngrok-api.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.description = 'This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make
|
17
17
|
it easier to consume in Ruby.'
|
18
18
|
|
19
|
-
s.required_ruby_version = '>=
|
19
|
+
s.required_ruby_version = '>= 2.7.2'
|
20
20
|
|
21
21
|
all_files = `git ls-files`.split("\n")
|
22
22
|
test_files = `git ls-files -- {test,spec,features}/*`.split('\n')
|
@@ -1,33 +1,158 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ostruct'
|
3
|
+
|
4
|
+
RSpec.describe NgrokAPI::Client do
|
5
|
+
before(:each) do
|
6
|
+
@client = NgrokAPI::Client.new(api_key: 'abc')
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#abuse_reports" do
|
10
|
+
it "returns an instance of the AbuseReportsClient" do
|
11
|
+
expect(@client.abuse_reports.class).to eq(NgrokAPI::Services::AbuseReportsClient)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#agent_ingresses" do
|
16
|
+
it "returns an instance of the AgentIngressesClient" do
|
17
|
+
expect(@client.agent_ingresses.class).to eq(NgrokAPI::Services::AgentIngressesClient)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#api_keys" do
|
22
|
+
it "returns an instance of the APIKeysClient" do
|
23
|
+
expect(@client.api_keys.class).to eq(NgrokAPI::Services::APIKeysClient)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#certificate_authorities" do
|
28
|
+
it "returns an instance of the CertificateAuthoritiesClient" do
|
29
|
+
expect(@client.certificate_authorities.class).to eq(NgrokAPI::Services::CertificateAuthoritiesClient)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#credentials" do
|
34
|
+
it "returns an instance of the CredentialsClient" do
|
35
|
+
expect(@client.credentials.class).to eq(NgrokAPI::Services::CredentialsClient)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "#endpoint_configurations" do
|
40
|
+
it "returns an instance of the EndpointConfigurationsClient" do
|
41
|
+
expect(@client.endpoint_configurations.class).to eq(NgrokAPI::Services::EndpointConfigurationsClient)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#event_streams" do
|
46
|
+
it "returns an instance of the EventStreamsClient" do
|
47
|
+
expect(@client.event_streams.class).to eq(NgrokAPI::Services::EventStreamsClient)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#event_destinations" do
|
52
|
+
it "returns an instance of the EventDestinationsClient" do
|
53
|
+
expect(@client.event_destinations.class).to eq(NgrokAPI::Services::EventDestinationsClient)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "#event_subscriptions" do
|
58
|
+
it "returns an instance of the EventSubscriptionsClient" do
|
59
|
+
expect(@client.event_subscriptions.class).to eq(NgrokAPI::Services::EventSubscriptionsClient)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "#event_sources" do
|
64
|
+
it "returns an instance of the EventSourcesClient" do
|
65
|
+
expect(@client.event_sources.class).to eq(NgrokAPI::Services::EventSourcesClient)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "#ip_policies" do
|
70
|
+
it "returns an instance of the IPPoliciesClient" do
|
71
|
+
expect(@client.ip_policies.class).to eq(NgrokAPI::Services::IPPoliciesClient)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe "#ip_policy_rules" do
|
76
|
+
it "returns an instance of the IPPolicyRulesClient" do
|
77
|
+
expect(@client.ip_policy_rules.class).to eq(NgrokAPI::Services::IPPolicyRulesClient)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "#ip_restrictions" do
|
82
|
+
it "returns an instance of the IPRestrictionsClient" do
|
83
|
+
expect(@client.ip_restrictions.class).to eq(NgrokAPI::Services::IPRestrictionsClient)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
describe "#reserved_addrs" do
|
88
|
+
it "returns an instance of the ReservedAddrsClient" do
|
89
|
+
expect(@client.reserved_addrs.class).to eq(NgrokAPI::Services::ReservedAddrsClient)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe "#reserved_domains" do
|
94
|
+
it "returns an instance of the ReservedDomainsClient" do
|
95
|
+
expect(@client.reserved_domains.class).to eq(NgrokAPI::Services::ReservedDomainsClient)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "#ssh_certificate_authorities" do
|
100
|
+
it "returns an instance of the SSHCertificateAuthoritiesClient" do
|
101
|
+
expect(@client.ssh_certificate_authorities.class).to eq(NgrokAPI::Services::SSHCertificateAuthoritiesClient)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe "#ssh_credentials" do
|
106
|
+
it "returns an instance of the SSHCredentialsClient" do
|
107
|
+
expect(@client.ssh_credentials.class).to eq(NgrokAPI::Services::SSHCredentialsClient)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
describe "#ssh_host_certificates" do
|
112
|
+
it "returns an instance of the SSHHostCertificatesClient" do
|
113
|
+
expect(@client.ssh_host_certificates.class).to eq(NgrokAPI::Services::SSHHostCertificatesClient)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
describe "#ssh_user_certificates" do
|
118
|
+
it "returns an instance of the SSHUserCertificatesClient" do
|
119
|
+
expect(@client.ssh_user_certificates.class).to eq(NgrokAPI::Services::SSHUserCertificatesClient)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe "#tls_certificates" do
|
124
|
+
it "returns an instance of the TLSCertificatesClient" do
|
125
|
+
expect(@client.tls_certificates.class).to eq(NgrokAPI::Services::TLSCertificatesClient)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe "#tunnel_sessions" do
|
130
|
+
it "returns an instance of the TunnelSessionsClient" do
|
131
|
+
expect(@client.tunnel_sessions.class).to eq(NgrokAPI::Services::TunnelSessionsClient)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
describe "#tunnels" do
|
136
|
+
it "returns an instance of the TunnelsClient" do
|
137
|
+
expect(@client.tunnels.class).to eq(NgrokAPI::Services::TunnelsClient)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "#pointcfg_module" do
|
142
|
+
it "returns an instance of OpenStruct covering namespaces" do
|
143
|
+
ns = @client.pointcfg_module
|
144
|
+
expect(ns.logging.class).to eq(NgrokAPI::Services::EndpointLoggingModuleClient)
|
145
|
+
expect(ns.circuit_breaker.class).to eq(NgrokAPI::Services::EndpointCircuitBreakerModuleClient)
|
146
|
+
expect(ns.compression.class).to eq(NgrokAPI::Services::EndpointCompressionModuleClient)
|
147
|
+
expect(ns.tls_termination.class).to eq(NgrokAPI::Services::EndpointTLSTerminationModuleClient)
|
148
|
+
expect(ns.ip_policy.class).to eq(NgrokAPI::Services::EndpointIPPolicyModuleClient)
|
149
|
+
expect(ns.mutual_tls.class).to eq(NgrokAPI::Services::EndpointMutualTLSModuleClient)
|
150
|
+
expect(ns.request_headers.class).to eq(NgrokAPI::Services::EndpointRequestHeadersModuleClient)
|
151
|
+
expect(ns.response_headers.class).to eq(NgrokAPI::Services::EndpointResponseHeadersModuleClient)
|
152
|
+
expect(ns.oauth.class).to eq(NgrokAPI::Services::EndpointOAuthModuleClient)
|
153
|
+
expect(ns.webhook_validation.class).to eq(NgrokAPI::Services::EndpointWebhookValidationModuleClient)
|
154
|
+
expect(ns.saml.class).to eq(NgrokAPI::Services::EndpointSAMLModuleClient)
|
155
|
+
expect(ns.oidc.class).to eq(NgrokAPI::Services::EndpointOIDCModuleClient)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe NgrokAPI::Models::AbuseReportHostname do
|
4
|
+
before(:each) do
|
5
|
+
@client = class_double("AbuseReportHostnamesClient")
|
6
|
+
@abuse_report_hostname = NgrokAPI::Models::AbuseReportHostname.new(client: @client, result: abuse_report_hostname_result)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#==" do
|
10
|
+
it "is equal if the results are the same" do
|
11
|
+
other = NgrokAPI::Models::AbuseReportHostname.new(client: @client, result: abuse_report_hostname_result)
|
12
|
+
expect(@abuse_report_hostname == other).to eq true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#to_s" do
|
17
|
+
it "stringifies as result.to_s" do
|
18
|
+
expect(@abuse_report_hostname.to_s).to eq abuse_report_hostname_result.to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe NgrokAPI::Models::AbuseReport do
|
4
|
+
before(:each) do
|
5
|
+
@client = class_double("AbuseReportsClient")
|
6
|
+
@abuse_report = NgrokAPI::Models::AbuseReport.new(client: @client, result: abuse_report_result)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#==" do
|
10
|
+
it "is equal if the results are the same" do
|
11
|
+
other = NgrokAPI::Models::AbuseReport.new(client: @client, result: abuse_report_result)
|
12
|
+
expect(@abuse_report == other).to eq true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#to_s" do
|
17
|
+
it "stringifies as result.to_s" do
|
18
|
+
expect(@abuse_report.to_s).to eq abuse_report_result.to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe NgrokAPI::Models::AgentIngress do
|
4
|
+
before(:each) do
|
5
|
+
@client = class_double("AgentIngresssClient")
|
6
|
+
@agent_ingress = NgrokAPI::Models::AgentIngress.new(client: @client, result: agent_ingress_result)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#==" do
|
10
|
+
it "is equal if the results are the same" do
|
11
|
+
other = NgrokAPI::Models::AgentIngress.new(client: @client, result: agent_ingress_result)
|
12
|
+
expect(@agent_ingress == other).to eq true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#to_s" do
|
17
|
+
it "stringifies as result.to_s" do
|
18
|
+
expect(@agent_ingress.to_s).to eq agent_ingress_result.to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#delete" do
|
23
|
+
it "calls delete on the client" do
|
24
|
+
expect(@agent_ingress.client).to receive(:delete)
|
25
|
+
@agent_ingress.delete
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#update" do
|
30
|
+
it "calls update on the client" do
|
31
|
+
new_description = 'New description'
|
32
|
+
new_metadata = 'New metadata'
|
33
|
+
expect(@agent_ingress.client).to receive(:update)
|
34
|
+
@agent_ingress.update(
|
35
|
+
description: new_description,
|
36
|
+
metadata: new_metadata
|
37
|
+
)
|
38
|
+
expect(@agent_ingress.description).to eq new_description
|
39
|
+
expect(@agent_ingress.metadata).to eq new_metadata
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|