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.
Files changed (424) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -2
  3. data/.yardopts +1 -0
  4. data/LICENSE +7 -0
  5. data/doc/NgrokAPI/Client.html +1469 -125
  6. data/doc/NgrokAPI/Error.html +3 -3
  7. data/doc/NgrokAPI/Errors/NotFoundError.html +3 -3
  8. data/doc/NgrokAPI/Errors.html +3 -3
  9. data/doc/NgrokAPI/HttpClient.html +66 -36
  10. data/doc/NgrokAPI/Models/{ApiKey.html → APIKey.html} +110 -179
  11. data/doc/NgrokAPI/Models/AWSAuth.html +617 -0
  12. data/doc/NgrokAPI/Models/AWSCredentials.html +617 -0
  13. data/doc/NgrokAPI/Models/AWSRole.html +543 -0
  14. data/doc/NgrokAPI/Models/AbuseReport.html +987 -0
  15. data/doc/NgrokAPI/Models/AbuseReportHostname.html +617 -0
  16. data/doc/NgrokAPI/Models/AgentIngress.html +1217 -0
  17. data/doc/NgrokAPI/Models/CertificateAuthority.html +1439 -0
  18. data/doc/NgrokAPI/Models/Credential.html +1149 -0
  19. data/doc/NgrokAPI/Models/EndpointCircuitBreaker.html +913 -0
  20. data/doc/NgrokAPI/Models/EndpointCompression.html +543 -0
  21. data/doc/NgrokAPI/Models/EndpointConfiguration.html +1323 -512
  22. data/doc/NgrokAPI/Models/EndpointIPPolicy.html +617 -0
  23. data/doc/NgrokAPI/Models/EndpointIPPolicyMutate.html +617 -0
  24. data/doc/NgrokAPI/Models/EndpointLogging.html +617 -0
  25. data/doc/NgrokAPI/Models/EndpointLoggingMutate.html +617 -0
  26. data/doc/NgrokAPI/Models/EndpointMutualTLS.html +617 -0
  27. data/doc/NgrokAPI/Models/EndpointMutualTLSMutate.html +617 -0
  28. data/doc/NgrokAPI/Models/EndpointOAuth.html +987 -0
  29. data/doc/NgrokAPI/Models/EndpointOAuthFacebook.html +839 -0
  30. data/doc/NgrokAPI/Models/EndpointOAuthGitHub.html +987 -0
  31. data/doc/NgrokAPI/Models/EndpointOAuthGoogle.html +839 -0
  32. data/doc/NgrokAPI/Models/EndpointOAuthMicrosoft.html +839 -0
  33. data/doc/NgrokAPI/Models/EndpointOAuthProvider.html +765 -0
  34. data/doc/NgrokAPI/Models/EndpointOIDC.html +1135 -0
  35. data/doc/NgrokAPI/Models/EndpointRequestHeaders.html +691 -0
  36. data/doc/NgrokAPI/Models/EndpointResponseHeaders.html +691 -0
  37. data/doc/NgrokAPI/Models/EndpointSAML.html +1653 -0
  38. data/doc/NgrokAPI/Models/EndpointSAMLMutate.html +1283 -0
  39. data/doc/NgrokAPI/Models/EndpointTLSTermination.html +691 -0
  40. data/doc/NgrokAPI/Models/EndpointWebhookValidation.html +691 -0
  41. data/doc/NgrokAPI/Models/EventDestination.html +1058 -0
  42. data/doc/NgrokAPI/Models/EventSource.html +765 -0
  43. data/doc/NgrokAPI/Models/EventSourceList.html +617 -0
  44. data/doc/NgrokAPI/Models/EventSourceReplace.html +691 -0
  45. data/doc/NgrokAPI/Models/EventStream.html +1309 -0
  46. data/doc/NgrokAPI/Models/EventSubscription.html +1058 -0
  47. data/doc/NgrokAPI/Models/EventTarget.html +765 -0
  48. data/doc/NgrokAPI/Models/EventTargetCloudwatchLogs.html +617 -0
  49. data/doc/NgrokAPI/Models/EventTargetFirehose.html +617 -0
  50. data/doc/NgrokAPI/Models/EventTargetKinesis.html +617 -0
  51. data/doc/NgrokAPI/Models/{TlsCertificate.html → IPPolicy.html} +172 -167
  52. data/doc/NgrokAPI/Models/IPPolicyRule.html +1149 -0
  53. data/doc/NgrokAPI/Models/IPRestriction.html +1132 -0
  54. data/doc/NgrokAPI/Models/Listable.html +120 -52
  55. data/doc/NgrokAPI/Models/Ref.html +617 -0
  56. data/doc/NgrokAPI/Models/ReservedAddr.html +1132 -0
  57. data/doc/NgrokAPI/Models/ReservedDomain.html +186 -1108
  58. data/doc/NgrokAPI/Models/ReservedDomainCertJob.html +765 -0
  59. data/doc/NgrokAPI/Models/ReservedDomainCertPolicy.html +617 -0
  60. data/doc/NgrokAPI/Models/ReservedDomainCertStatus.html +617 -0
  61. data/doc/NgrokAPI/Models/SSHCertificateAuthority.html +1143 -0
  62. data/doc/NgrokAPI/Models/SSHCredential.html +1149 -0
  63. data/doc/NgrokAPI/Models/SSHHostCertificate.html +1513 -0
  64. data/doc/NgrokAPI/Models/SSHUserCertificate.html +1661 -0
  65. data/doc/NgrokAPI/Models/TLSCertificate.html +2179 -0
  66. data/doc/NgrokAPI/Models/TLSCertificateSANs.html +617 -0
  67. data/doc/NgrokAPI/Models/Tunnel.html +987 -0
  68. data/doc/NgrokAPI/Models/TunnelSession.html +1209 -0
  69. data/doc/NgrokAPI/Models.html +6 -6
  70. data/doc/NgrokAPI/PagedIterator.html +16 -12
  71. data/{docs/NgrokAPI/Services/ApiKeysClient.html → doc/NgrokAPI/Services/APIKeysClient.html} +404 -153
  72. data/doc/NgrokAPI/Services/AbuseReportsClient.html +706 -0
  73. data/doc/NgrokAPI/Services/AgentIngressesClient.html +1600 -0
  74. data/doc/NgrokAPI/Services/CertificateAuthoritiesClient.html +1602 -0
  75. data/doc/NgrokAPI/Services/CredentialsClient.html +1644 -0
  76. data/doc/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html +1043 -0
  77. data/doc/NgrokAPI/Services/EndpointCompressionModuleClient.html +1043 -0
  78. data/doc/NgrokAPI/Services/EndpointConfigurationsClient.html +503 -370
  79. data/doc/NgrokAPI/Services/EndpointIPPolicyModuleClient.html +1043 -0
  80. data/doc/NgrokAPI/Services/EndpointLoggingModuleClient.html +1043 -0
  81. data/doc/NgrokAPI/Services/EndpointMutualTLSModuleClient.html +1043 -0
  82. data/doc/NgrokAPI/Services/EndpointOAuthModuleClient.html +1043 -0
  83. data/doc/NgrokAPI/Services/EndpointOIDCModuleClient.html +1043 -0
  84. data/doc/NgrokAPI/Services/EndpointRequestHeadersModuleClient.html +1043 -0
  85. data/doc/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html +1043 -0
  86. data/doc/NgrokAPI/Services/EndpointSAMLModuleClient.html +1043 -0
  87. data/doc/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html +1043 -0
  88. data/doc/NgrokAPI/Services/EndpointWebhookValidationModuleClient.html +1043 -0
  89. data/doc/NgrokAPI/Services/EventDestinationsClient.html +1712 -0
  90. data/doc/NgrokAPI/Services/EventSourcesClient.html +1532 -0
  91. data/doc/NgrokAPI/Services/EventStreamsClient.html +1792 -0
  92. data/doc/NgrokAPI/Services/EventSubscriptionsClient.html +1712 -0
  93. data/doc/NgrokAPI/Services/IPPoliciesClient.html +1602 -0
  94. data/doc/NgrokAPI/Services/IPPolicyRulesClient.html +1660 -0
  95. data/doc/NgrokAPI/Services/IPRestrictionsClient.html +1720 -0
  96. data/doc/NgrokAPI/Services/ReservedAddrsClient.html +1894 -0
  97. data/doc/NgrokAPI/Services/ReservedDomainsClient.html +585 -344
  98. data/doc/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +1644 -0
  99. data/doc/NgrokAPI/Services/SSHCredentialsClient.html +1662 -0
  100. data/doc/NgrokAPI/Services/SSHHostCertificatesClient.html +1680 -0
  101. data/doc/NgrokAPI/Services/SSHUserCertificatesClient.html +1720 -0
  102. data/{docs/NgrokAPI/Services/TlsCertificatesClient.html → doc/NgrokAPI/Services/TLSCertificatesClient.html} +404 -201
  103. data/doc/NgrokAPI/Services/TunnelSessionsClient.html +1587 -0
  104. data/doc/NgrokAPI/Services/TunnelsClient.html +669 -0
  105. data/doc/NgrokAPI/Services.html +6 -6
  106. data/doc/NgrokAPI.html +5 -5
  107. data/doc/README +94 -0
  108. data/doc/_index.html +621 -25
  109. data/doc/class_list.html +1 -1
  110. data/doc/file.README.html +55 -28
  111. data/doc/frames.html +1 -1
  112. data/doc/index.html +55 -28
  113. data/doc/method_list.html +7526 -286
  114. data/doc/top-level-namespace.html +3 -3
  115. data/docs/.gitkeep +0 -0
  116. data/docs/CNAME +1 -0
  117. data/docs/NgrokAPI/Client.html +1469 -125
  118. data/docs/NgrokAPI/Error.html +3 -3
  119. data/docs/NgrokAPI/Errors/NotFoundError.html +3 -3
  120. data/docs/NgrokAPI/Errors.html +3 -3
  121. data/docs/NgrokAPI/HttpClient.html +66 -36
  122. data/docs/NgrokAPI/Models/{ApiKey.html → APIKey.html} +110 -179
  123. data/docs/NgrokAPI/Models/AWSAuth.html +617 -0
  124. data/docs/NgrokAPI/Models/AWSCredentials.html +617 -0
  125. data/docs/NgrokAPI/Models/AWSRole.html +543 -0
  126. data/docs/NgrokAPI/Models/AbuseReport.html +987 -0
  127. data/docs/NgrokAPI/Models/AbuseReportHostname.html +617 -0
  128. data/docs/NgrokAPI/Models/AgentIngress.html +1217 -0
  129. data/docs/NgrokAPI/Models/CertificateAuthority.html +1439 -0
  130. data/docs/NgrokAPI/Models/Credential.html +1149 -0
  131. data/docs/NgrokAPI/Models/EndpointCircuitBreaker.html +913 -0
  132. data/docs/NgrokAPI/Models/EndpointCompression.html +543 -0
  133. data/docs/NgrokAPI/Models/EndpointConfiguration.html +1323 -512
  134. data/docs/NgrokAPI/Models/EndpointIPPolicy.html +617 -0
  135. data/docs/NgrokAPI/Models/EndpointIPPolicyMutate.html +617 -0
  136. data/docs/NgrokAPI/Models/EndpointLogging.html +617 -0
  137. data/docs/NgrokAPI/Models/EndpointLoggingMutate.html +617 -0
  138. data/docs/NgrokAPI/Models/EndpointMutualTLS.html +617 -0
  139. data/docs/NgrokAPI/Models/EndpointMutualTLSMutate.html +617 -0
  140. data/docs/NgrokAPI/Models/EndpointOAuth.html +987 -0
  141. data/docs/NgrokAPI/Models/EndpointOAuthFacebook.html +839 -0
  142. data/docs/NgrokAPI/Models/EndpointOAuthGitHub.html +987 -0
  143. data/docs/NgrokAPI/Models/EndpointOAuthGoogle.html +839 -0
  144. data/docs/NgrokAPI/Models/EndpointOAuthMicrosoft.html +839 -0
  145. data/docs/NgrokAPI/Models/EndpointOAuthProvider.html +765 -0
  146. data/docs/NgrokAPI/Models/EndpointOIDC.html +1135 -0
  147. data/docs/NgrokAPI/Models/EndpointRequestHeaders.html +691 -0
  148. data/docs/NgrokAPI/Models/EndpointResponseHeaders.html +691 -0
  149. data/docs/NgrokAPI/Models/EndpointSAML.html +1653 -0
  150. data/docs/NgrokAPI/Models/EndpointSAMLMutate.html +1283 -0
  151. data/docs/NgrokAPI/Models/EndpointTLSTermination.html +691 -0
  152. data/docs/NgrokAPI/Models/EndpointWebhookValidation.html +691 -0
  153. data/docs/NgrokAPI/Models/EventDestination.html +1058 -0
  154. data/docs/NgrokAPI/Models/EventSource.html +765 -0
  155. data/docs/NgrokAPI/Models/EventSourceList.html +617 -0
  156. data/docs/NgrokAPI/Models/EventSourceReplace.html +691 -0
  157. data/docs/NgrokAPI/Models/EventStream.html +1309 -0
  158. data/docs/NgrokAPI/Models/EventSubscription.html +1058 -0
  159. data/docs/NgrokAPI/Models/EventTarget.html +765 -0
  160. data/docs/NgrokAPI/Models/EventTargetCloudwatchLogs.html +617 -0
  161. data/docs/NgrokAPI/Models/EventTargetFirehose.html +617 -0
  162. data/docs/NgrokAPI/Models/EventTargetKinesis.html +617 -0
  163. data/docs/NgrokAPI/Models/{TlsCertificate.html → IPPolicy.html} +172 -167
  164. data/docs/NgrokAPI/Models/IPPolicyRule.html +1149 -0
  165. data/docs/NgrokAPI/Models/IPRestriction.html +1132 -0
  166. data/docs/NgrokAPI/Models/Listable.html +120 -52
  167. data/docs/NgrokAPI/Models/Ref.html +617 -0
  168. data/docs/NgrokAPI/Models/ReservedAddr.html +1132 -0
  169. data/docs/NgrokAPI/Models/ReservedDomain.html +186 -1108
  170. data/docs/NgrokAPI/Models/ReservedDomainCertJob.html +765 -0
  171. data/docs/NgrokAPI/Models/ReservedDomainCertPolicy.html +617 -0
  172. data/docs/NgrokAPI/Models/ReservedDomainCertStatus.html +617 -0
  173. data/docs/NgrokAPI/Models/SSHCertificateAuthority.html +1143 -0
  174. data/docs/NgrokAPI/Models/SSHCredential.html +1149 -0
  175. data/docs/NgrokAPI/Models/SSHHostCertificate.html +1513 -0
  176. data/docs/NgrokAPI/Models/SSHUserCertificate.html +1661 -0
  177. data/docs/NgrokAPI/Models/TLSCertificate.html +2179 -0
  178. data/docs/NgrokAPI/Models/TLSCertificateSANs.html +617 -0
  179. data/docs/NgrokAPI/Models/Tunnel.html +987 -0
  180. data/docs/NgrokAPI/Models/TunnelSession.html +1209 -0
  181. data/docs/NgrokAPI/Models.html +6 -6
  182. data/docs/NgrokAPI/PagedIterator.html +16 -12
  183. data/{doc/NgrokAPI/Services/ApiKeysClient.html → docs/NgrokAPI/Services/APIKeysClient.html} +404 -153
  184. data/docs/NgrokAPI/Services/AbuseReportsClient.html +706 -0
  185. data/docs/NgrokAPI/Services/AgentIngressesClient.html +1600 -0
  186. data/docs/NgrokAPI/Services/CertificateAuthoritiesClient.html +1602 -0
  187. data/docs/NgrokAPI/Services/CredentialsClient.html +1644 -0
  188. data/docs/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html +1043 -0
  189. data/docs/NgrokAPI/Services/EndpointCompressionModuleClient.html +1043 -0
  190. data/docs/NgrokAPI/Services/EndpointConfigurationsClient.html +503 -370
  191. data/docs/NgrokAPI/Services/EndpointIPPolicyModuleClient.html +1043 -0
  192. data/docs/NgrokAPI/Services/EndpointLoggingModuleClient.html +1043 -0
  193. data/docs/NgrokAPI/Services/EndpointMutualTLSModuleClient.html +1043 -0
  194. data/docs/NgrokAPI/Services/EndpointOAuthModuleClient.html +1043 -0
  195. data/docs/NgrokAPI/Services/EndpointOIDCModuleClient.html +1043 -0
  196. data/docs/NgrokAPI/Services/EndpointRequestHeadersModuleClient.html +1043 -0
  197. data/docs/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html +1043 -0
  198. data/docs/NgrokAPI/Services/EndpointSAMLModuleClient.html +1043 -0
  199. data/docs/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html +1043 -0
  200. data/docs/NgrokAPI/Services/EndpointWebhookValidationModuleClient.html +1043 -0
  201. data/docs/NgrokAPI/Services/EventDestinationsClient.html +1712 -0
  202. data/docs/NgrokAPI/Services/EventSourcesClient.html +1532 -0
  203. data/docs/NgrokAPI/Services/EventStreamsClient.html +1792 -0
  204. data/docs/NgrokAPI/Services/EventSubscriptionsClient.html +1712 -0
  205. data/docs/NgrokAPI/Services/IPPoliciesClient.html +1602 -0
  206. data/docs/NgrokAPI/Services/IPPolicyRulesClient.html +1660 -0
  207. data/docs/NgrokAPI/Services/IPRestrictionsClient.html +1720 -0
  208. data/docs/NgrokAPI/Services/ReservedAddrsClient.html +1894 -0
  209. data/docs/NgrokAPI/Services/ReservedDomainsClient.html +585 -344
  210. data/docs/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +1644 -0
  211. data/docs/NgrokAPI/Services/SSHCredentialsClient.html +1662 -0
  212. data/docs/NgrokAPI/Services/SSHHostCertificatesClient.html +1680 -0
  213. data/docs/NgrokAPI/Services/SSHUserCertificatesClient.html +1720 -0
  214. data/{doc/NgrokAPI/Services/TlsCertificatesClient.html → docs/NgrokAPI/Services/TLSCertificatesClient.html} +404 -201
  215. data/docs/NgrokAPI/Services/TunnelSessionsClient.html +1587 -0
  216. data/docs/NgrokAPI/Services/TunnelsClient.html +669 -0
  217. data/docs/NgrokAPI/Services.html +6 -6
  218. data/docs/NgrokAPI.html +5 -5
  219. data/docs/README +94 -0
  220. data/docs/_index.html +621 -25
  221. data/docs/class_list.html +1 -1
  222. data/docs/file.README.html +55 -28
  223. data/docs/frames.html +1 -1
  224. data/docs/index.html +55 -28
  225. data/docs/method_list.html +7526 -286
  226. data/docs/top-level-namespace.html +3 -3
  227. data/lib/ngrokapi/client.rb +229 -49
  228. data/lib/ngrokapi/http_client.rb +6 -7
  229. data/lib/ngrokapi/models/abuse_report.rb +37 -0
  230. data/lib/ngrokapi/models/abuse_report_hostname.rb +27 -0
  231. data/lib/ngrokapi/models/agent_ingress.rb +66 -0
  232. data/lib/ngrokapi/models/api_key.rb +62 -64
  233. data/lib/ngrokapi/models/aws_auth.rb +27 -0
  234. data/lib/ngrokapi/models/aws_credentials.rb +27 -0
  235. data/lib/ngrokapi/models/aws_role.rb +25 -0
  236. data/lib/ngrokapi/models/certificate_authority.rb +72 -0
  237. data/lib/ngrokapi/models/credential.rb +67 -0
  238. data/lib/ngrokapi/models/endpoint_circuit_breaker.rb +35 -0
  239. data/lib/ngrokapi/models/endpoint_compression.rb +25 -0
  240. data/lib/ngrokapi/models/endpoint_configuration.rb +130 -119
  241. data/lib/ngrokapi/models/endpoint_ip_policy.rb +27 -0
  242. data/lib/ngrokapi/models/endpoint_ip_policy_mutate.rb +27 -0
  243. data/lib/ngrokapi/models/endpoint_logging.rb +27 -0
  244. data/lib/ngrokapi/models/endpoint_logging_mutate.rb +27 -0
  245. data/lib/ngrokapi/models/endpoint_mutual_tls.rb +27 -0
  246. data/lib/ngrokapi/models/endpoint_mutual_tls_mutate.rb +27 -0
  247. data/lib/ngrokapi/models/endpoint_o_auth.rb +37 -0
  248. data/lib/ngrokapi/models/endpoint_o_auth_facebook.rb +33 -0
  249. data/lib/ngrokapi/models/endpoint_o_auth_git_hub.rb +37 -0
  250. data/lib/ngrokapi/models/endpoint_o_auth_google.rb +33 -0
  251. data/lib/ngrokapi/models/endpoint_o_auth_microsoft.rb +33 -0
  252. data/lib/ngrokapi/models/endpoint_o_auth_provider.rb +31 -0
  253. data/lib/ngrokapi/models/endpoint_oidc.rb +41 -0
  254. data/lib/ngrokapi/models/endpoint_request_headers.rb +29 -0
  255. data/lib/ngrokapi/models/endpoint_response_headers.rb +29 -0
  256. data/lib/ngrokapi/models/endpoint_saml.rb +55 -0
  257. data/lib/ngrokapi/models/endpoint_saml_mutate.rb +45 -0
  258. data/lib/ngrokapi/models/endpoint_tls_termination.rb +29 -0
  259. data/lib/ngrokapi/models/endpoint_webhook_validation.rb +29 -0
  260. data/lib/ngrokapi/models/event_destination.rb +49 -0
  261. data/lib/ngrokapi/models/event_source.rb +31 -0
  262. data/lib/ngrokapi/models/event_source_list.rb +27 -0
  263. data/lib/ngrokapi/models/event_source_replace.rb +29 -0
  264. data/lib/ngrokapi/models/event_stream.rb +77 -0
  265. data/lib/ngrokapi/models/event_subscription.rb +47 -0
  266. data/lib/ngrokapi/models/event_target.rb +31 -0
  267. data/lib/ngrokapi/models/event_target_cloudwatch_logs.rb +27 -0
  268. data/lib/ngrokapi/models/event_target_firehose.rb +27 -0
  269. data/lib/ngrokapi/models/event_target_kinesis.rb +27 -0
  270. data/lib/ngrokapi/models/ip_policy.rb +64 -0
  271. data/lib/ngrokapi/models/ip_policy_rule.rb +67 -0
  272. data/lib/ngrokapi/models/ip_restriction.rb +49 -0
  273. data/lib/ngrokapi/models/listable.rb +13 -2
  274. data/lib/ngrokapi/models/ref.rb +27 -0
  275. data/lib/ngrokapi/models/reserved_addr.rb +49 -0
  276. data/lib/ngrokapi/models/reserved_domain.rb +61 -211
  277. data/lib/ngrokapi/models/reserved_domain_cert_job.rb +31 -0
  278. data/lib/ngrokapi/models/reserved_domain_cert_policy.rb +27 -0
  279. data/lib/ngrokapi/models/reserved_domain_cert_status.rb +27 -0
  280. data/lib/ngrokapi/models/ssh_certificate_authority.rb +64 -0
  281. data/lib/ngrokapi/models/ssh_credential.rb +67 -0
  282. data/lib/ngrokapi/models/ssh_host_certificate.rb +74 -0
  283. data/lib/ngrokapi/models/ssh_user_certificate.rb +78 -0
  284. data/lib/ngrokapi/models/tls_certificate.rb +92 -62
  285. data/lib/ngrokapi/models/tls_certificate_sa_ns.rb +27 -0
  286. data/lib/ngrokapi/models/tunnel.rb +37 -0
  287. data/lib/ngrokapi/models/tunnel_session.rb +43 -0
  288. data/lib/ngrokapi/paged_iterator.rb +4 -2
  289. data/lib/ngrokapi/services/.gitkeep +0 -0
  290. data/lib/ngrokapi/services/abuse_reports_client.rb +77 -0
  291. data/lib/ngrokapi/services/agent_ingresses_client.rb +206 -0
  292. data/lib/ngrokapi/services/api_keys_client.rb +210 -144
  293. data/lib/ngrokapi/services/certificate_authorities_client.rb +211 -0
  294. data/lib/ngrokapi/services/credentials_client.rb +217 -0
  295. data/lib/ngrokapi/services/endpoint_circuit_breaker_module_client.rb +108 -0
  296. data/lib/ngrokapi/services/endpoint_compression_module_client.rb +108 -0
  297. data/lib/ngrokapi/services/endpoint_configurations_client.rb +289 -313
  298. data/lib/ngrokapi/services/endpoint_ip_policy_module_client.rb +108 -0
  299. data/lib/ngrokapi/services/endpoint_logging_module_client.rb +108 -0
  300. data/lib/ngrokapi/services/endpoint_mutual_tls_module_client.rb +108 -0
  301. data/lib/ngrokapi/services/endpoint_o_auth_module_client.rb +108 -0
  302. data/lib/ngrokapi/services/endpoint_oidc_module_client.rb +108 -0
  303. data/lib/ngrokapi/services/endpoint_request_headers_module_client.rb +108 -0
  304. data/lib/ngrokapi/services/endpoint_response_headers_module_client.rb +108 -0
  305. data/lib/ngrokapi/services/endpoint_saml_module_client.rb +108 -0
  306. data/lib/ngrokapi/services/endpoint_tls_termination_module_client.rb +108 -0
  307. data/lib/ngrokapi/services/endpoint_webhook_validation_module_client.rb +108 -0
  308. data/lib/ngrokapi/services/event_destinations_client.rb +221 -0
  309. data/lib/ngrokapi/services/event_sources_client.rb +185 -0
  310. data/lib/ngrokapi/services/event_streams_client.rb +224 -0
  311. data/lib/ngrokapi/services/event_subscriptions_client.rb +215 -0
  312. data/lib/ngrokapi/services/ip_policies_client.rb +215 -0
  313. data/lib/ngrokapi/services/ip_policy_rules_client.rb +214 -0
  314. data/lib/ngrokapi/services/ip_restrictions_client.rb +224 -0
  315. data/lib/ngrokapi/services/reserved_addrs_client.rb +246 -0
  316. data/lib/ngrokapi/services/reserved_domains_client.rb +360 -313
  317. data/lib/ngrokapi/services/ssh_certificate_authorities_client.rb +212 -0
  318. data/lib/ngrokapi/services/ssh_credentials_client.rb +215 -0
  319. data/lib/ngrokapi/services/ssh_host_certificates_client.rb +217 -0
  320. data/lib/ngrokapi/services/ssh_user_certificates_client.rb +221 -0
  321. data/lib/ngrokapi/services/tls_certificates_client.rb +213 -161
  322. data/lib/ngrokapi/services/tunnel_sessions_client.rb +237 -0
  323. data/lib/ngrokapi/services/tunnels_client.rb +78 -0
  324. data/lib/ngrokapi/version.rb +1 -1
  325. data/lib/ngrokapi.rb +1 -1
  326. data/ngrok-api.gemspec +1 -1
  327. data/spec/ngrokapi/client_spec.rb +158 -33
  328. data/spec/ngrokapi/models/abuse_report_hostname_spec.rb +21 -0
  329. data/spec/ngrokapi/models/abuse_report_spec.rb +21 -0
  330. data/spec/ngrokapi/models/agent_ingress_spec.rb +42 -0
  331. data/spec/ngrokapi/models/api_key_spec.rb +42 -43
  332. data/spec/ngrokapi/models/aws_auth_spec.rb +21 -0
  333. data/spec/ngrokapi/models/aws_credentials_spec.rb +21 -0
  334. data/spec/ngrokapi/models/aws_role_spec.rb +21 -0
  335. data/spec/ngrokapi/models/certificate_authority_spec.rb +42 -0
  336. data/spec/ngrokapi/models/credential_spec.rb +45 -0
  337. data/spec/ngrokapi/models/endpoint_circuit_breaker_spec.rb +21 -0
  338. data/spec/ngrokapi/models/endpoint_compression_spec.rb +21 -0
  339. data/spec/ngrokapi/models/endpoint_configuration_spec.rb +78 -0
  340. data/spec/ngrokapi/models/endpoint_ip_policy_mutate_spec.rb +21 -0
  341. data/spec/ngrokapi/models/endpoint_ip_policy_spec.rb +21 -0
  342. data/spec/ngrokapi/models/endpoint_logging_mutate_spec.rb +21 -0
  343. data/spec/ngrokapi/models/endpoint_logging_spec.rb +21 -0
  344. data/spec/ngrokapi/models/endpoint_mutual_tls_mutate_spec.rb +21 -0
  345. data/spec/ngrokapi/models/endpoint_mutual_tls_spec.rb +21 -0
  346. data/spec/ngrokapi/models/endpoint_o_auth_facebook_spec.rb +21 -0
  347. data/spec/ngrokapi/models/endpoint_o_auth_git_hub_spec.rb +21 -0
  348. data/spec/ngrokapi/models/endpoint_o_auth_google_spec.rb +21 -0
  349. data/spec/ngrokapi/models/endpoint_o_auth_microsoft_spec.rb +21 -0
  350. data/spec/ngrokapi/models/endpoint_o_auth_provider_spec.rb +21 -0
  351. data/spec/ngrokapi/models/endpoint_o_auth_spec.rb +21 -0
  352. data/spec/ngrokapi/models/endpoint_oidc_spec.rb +21 -0
  353. data/spec/ngrokapi/models/endpoint_request_headers_spec.rb +21 -0
  354. data/spec/ngrokapi/models/endpoint_response_headers_spec.rb +21 -0
  355. data/spec/ngrokapi/models/endpoint_saml_mutate_spec.rb +21 -0
  356. data/spec/ngrokapi/models/endpoint_saml_spec.rb +21 -0
  357. data/spec/ngrokapi/models/endpoint_tls_termination_spec.rb +21 -0
  358. data/spec/ngrokapi/models/endpoint_webhook_validation_spec.rb +21 -0
  359. data/spec/ngrokapi/models/event_destination_spec.rb +28 -0
  360. data/spec/ngrokapi/models/event_source_list_spec.rb +21 -0
  361. data/spec/ngrokapi/models/event_source_replace_spec.rb +21 -0
  362. data/spec/ngrokapi/models/event_source_spec.rb +21 -0
  363. data/spec/ngrokapi/models/event_stream_spec.rb +51 -0
  364. data/spec/ngrokapi/models/event_subscription_spec.rb +28 -0
  365. data/spec/ngrokapi/models/event_target_cloudwatch_logs_spec.rb +21 -0
  366. data/spec/ngrokapi/models/event_target_firehose_spec.rb +21 -0
  367. data/spec/ngrokapi/models/event_target_kinesis_spec.rb +21 -0
  368. data/spec/ngrokapi/models/event_target_spec.rb +21 -0
  369. data/spec/ngrokapi/models/ip_policy_rule_spec.rb +45 -0
  370. data/spec/ngrokapi/models/ip_policy_spec.rb +42 -0
  371. data/spec/ngrokapi/models/ip_restriction_spec.rb +28 -0
  372. data/spec/ngrokapi/models/listable_spec.rb +4 -4
  373. data/spec/ngrokapi/models/ref_spec.rb +21 -0
  374. data/spec/ngrokapi/models/reserved_addr_spec.rb +28 -0
  375. data/spec/ngrokapi/models/reserved_domain_cert_job_spec.rb +21 -0
  376. data/spec/ngrokapi/models/reserved_domain_cert_policy_spec.rb +21 -0
  377. data/spec/ngrokapi/models/reserved_domain_cert_status_spec.rb +21 -0
  378. data/spec/ngrokapi/models/reserved_domain_spec.rb +28 -100
  379. data/spec/ngrokapi/models/ssh_certificate_authority_spec.rb +42 -0
  380. data/spec/ngrokapi/models/ssh_credential_spec.rb +45 -0
  381. data/spec/ngrokapi/models/ssh_host_certificate_spec.rb +42 -0
  382. data/spec/ngrokapi/models/ssh_user_certificate_spec.rb +42 -0
  383. data/spec/ngrokapi/models/tls_certificate_sa_ns_spec.rb +21 -0
  384. data/spec/ngrokapi/models/tls_certificate_spec.rb +42 -0
  385. data/spec/ngrokapi/models/tunnel_session_spec.rb +21 -0
  386. data/spec/ngrokapi/models/tunnel_spec.rb +21 -0
  387. data/spec/ngrokapi/paged_iterator_spec.rb +7 -7
  388. data/spec/ngrokapi/services/.gitkeep +0 -0
  389. data/spec/ngrokapi/services/abuse_reports_client_spec.rb +65 -0
  390. data/spec/ngrokapi/services/agent_ingresses_client_spec.rb +159 -0
  391. data/spec/ngrokapi/services/api_keys_client_spec.rb +157 -127
  392. data/spec/ngrokapi/services/certificate_authorities_client_spec.rb +159 -0
  393. data/spec/ngrokapi/services/credentials_client_spec.rb +163 -0
  394. data/spec/ngrokapi/services/endpoint_circuit_breaker_module_client_spec.rb +125 -0
  395. data/spec/ngrokapi/services/endpoint_compression_module_client_spec.rb +125 -0
  396. data/spec/ngrokapi/services/endpoint_configurations_client_spec.rb +237 -0
  397. data/spec/ngrokapi/services/endpoint_ip_policy_module_client_spec.rb +125 -0
  398. data/spec/ngrokapi/services/endpoint_logging_module_client_spec.rb +125 -0
  399. data/spec/ngrokapi/services/endpoint_mutual_tls_module_client_spec.rb +125 -0
  400. data/spec/ngrokapi/services/endpoint_o_auth_module_client_spec.rb +125 -0
  401. data/spec/ngrokapi/services/endpoint_oidc_module_client_spec.rb +125 -0
  402. data/spec/ngrokapi/services/endpoint_request_headers_module_client_spec.rb +125 -0
  403. data/spec/ngrokapi/services/endpoint_response_headers_module_client_spec.rb +125 -0
  404. data/spec/ngrokapi/services/endpoint_saml_module_client_spec.rb +125 -0
  405. data/spec/ngrokapi/services/endpoint_tls_termination_module_client_spec.rb +125 -0
  406. data/spec/ngrokapi/services/endpoint_webhook_validation_module_client_spec.rb +125 -0
  407. data/spec/ngrokapi/services/event_destinations_client_spec.rb +172 -0
  408. data/spec/ngrokapi/services/event_sources_client_spec.rb +192 -0
  409. data/spec/ngrokapi/services/event_streams_client_spec.rb +177 -0
  410. data/spec/ngrokapi/services/event_subscriptions_client_spec.rb +169 -0
  411. data/spec/ngrokapi/services/ip_policies_client_spec.rb +159 -0
  412. data/spec/ngrokapi/services/ip_policy_rules_client_spec.rb +165 -0
  413. data/spec/ngrokapi/services/ip_restrictions_client_spec.rb +171 -0
  414. data/spec/ngrokapi/services/reserved_addrs_client_spec.rb +206 -0
  415. data/spec/ngrokapi/services/reserved_domains_client_spec.rb +349 -0
  416. data/spec/ngrokapi/services/ssh_certificate_authorities_client_spec.rb +163 -0
  417. data/spec/ngrokapi/services/ssh_credentials_client_spec.rb +165 -0
  418. data/spec/ngrokapi/services/ssh_host_certificates_client_spec.rb +167 -0
  419. data/spec/ngrokapi/services/ssh_user_certificates_client_spec.rb +171 -0
  420. data/spec/ngrokapi/services/tls_certificates_client_spec.rb +161 -0
  421. data/spec/ngrokapi/services/tunnel_sessions_client_spec.rb +183 -0
  422. data/spec/ngrokapi/services/tunnels_client_spec.rb +21 -0
  423. data/spec/spec_helper.rb +1096 -80
  424. 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
@@ -2,6 +2,6 @@ module NgrokAPI
2
2
  # rubocop:disable Layout/SpaceAroundOperators
3
3
 
4
4
  # The current version of the gem
5
- VERSION="0.9.0".freeze
5
+ VERSION="0.16.0".freeze
6
6
  # rubocop:enable Layout/SpaceAroundOperators
7
7
  end
data/lib/ngrokapi.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'json'
4
4
  require 'net/http'
5
5
 
6
- Dir[File.join('.', 'lib', '**/*.rb')].each do |f|
6
+ Dir[File.join('.', 'lib', '**/*.rb')].sort.each do |f|
7
7
  require f
8
8
  end
9
9
 
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 = '>= 3.0.0'
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
- RSpec.describe NgrokAPI::Client do
4
- before(:each) do
5
- @client = NgrokAPI::Client.new(api_key: 'abc')
6
- end
7
-
8
- describe "#api_keys" do
9
- it "returns an instance of the api_keys_client" do
10
- expect(@client.api_keys.class).to eq(NgrokAPI::Services::ApiKeysClient)
11
- end
12
- end
13
-
14
- describe "#endpoint_configurations" do
15
- it "returns an instance of the endpoint_configurations_client" do
16
- expect(@client.endpoint_configurations.class).to eq(
17
- NgrokAPI::Services::EndpointConfigurationsClient
18
- )
19
- end
20
- end
21
-
22
- describe "#reserved_domains" do
23
- it "returns an instance of the reserved_domains_client" do
24
- expect(@client.reserved_domains.class).to eq(NgrokAPI::Services::ReservedDomainsClient)
25
- end
26
- end
27
-
28
- describe "#tls_certificates" do
29
- it "returns an instance of the tls_certificates_client" do
30
- expect(@client.tls_certificates.class).to eq(NgrokAPI::Services::TlsCertificatesClient)
31
- end
32
- end
33
- end
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