ngrok-api 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +21 -0
  3. data/.gitignore +13 -0
  4. data/.rubocop.yml +28 -0
  5. data/.rubocop_airbnb.yml +2 -0
  6. data/.simplecov +1 -0
  7. data/Gemfile +33 -0
  8. data/Guardfile +16 -0
  9. data/README.md +61 -0
  10. data/Rakefile +7 -0
  11. data/doc/NgrokAPI/Client.html +542 -0
  12. data/doc/NgrokAPI/Error.html +305 -0
  13. data/doc/NgrokAPI/Errors/NotFoundError.html +309 -0
  14. data/doc/NgrokAPI/Errors.html +115 -0
  15. data/doc/NgrokAPI/HttpClient.html +1104 -0
  16. data/doc/NgrokAPI/Models/ApiKey.html +1138 -0
  17. data/doc/NgrokAPI/Models/EndpointConfiguration.html +1366 -0
  18. data/doc/NgrokAPI/Models/Listable.html +934 -0
  19. data/doc/NgrokAPI/Models/ReservedDomain.html +2498 -0
  20. data/doc/NgrokAPI/Models/TlsCertificate.html +1064 -0
  21. data/doc/NgrokAPI/Models.html +117 -0
  22. data/doc/NgrokAPI/PagedIterator.html +631 -0
  23. data/doc/NgrokAPI/Services/ApiKeysClient.html +1333 -0
  24. data/doc/NgrokAPI/Services/EndpointConfigurationsClient.html +2201 -0
  25. data/doc/NgrokAPI/Services/ReservedDomainsClient.html +2541 -0
  26. data/doc/NgrokAPI/Services/TlsCertificatesClient.html +1417 -0
  27. data/doc/NgrokAPI/Services.html +117 -0
  28. data/doc/NgrokAPI.html +157 -0
  29. data/doc/_index.html +309 -0
  30. data/doc/class_list.html +51 -0
  31. data/doc/css/common.css +1 -0
  32. data/doc/css/full_list.css +58 -0
  33. data/doc/css/style.css +497 -0
  34. data/doc/file.README.html +126 -0
  35. data/doc/file_list.html +56 -0
  36. data/doc/frames.html +17 -0
  37. data/doc/index.html +126 -0
  38. data/doc/js/app.js +314 -0
  39. data/doc/js/full_list.js +216 -0
  40. data/doc/js/jquery.js +4 -0
  41. data/doc/method_list.html +1227 -0
  42. data/doc/top-level-namespace.html +110 -0
  43. data/docs/NgrokAPI/Client.html +542 -0
  44. data/docs/NgrokAPI/Error.html +305 -0
  45. data/docs/NgrokAPI/Errors/NotFoundError.html +309 -0
  46. data/docs/NgrokAPI/Errors.html +115 -0
  47. data/docs/NgrokAPI/HttpClient.html +1104 -0
  48. data/docs/NgrokAPI/Models/ApiKey.html +1138 -0
  49. data/docs/NgrokAPI/Models/EndpointConfiguration.html +1366 -0
  50. data/docs/NgrokAPI/Models/Listable.html +934 -0
  51. data/docs/NgrokAPI/Models/ReservedDomain.html +2498 -0
  52. data/docs/NgrokAPI/Models/TlsCertificate.html +1064 -0
  53. data/docs/NgrokAPI/Models.html +117 -0
  54. data/docs/NgrokAPI/PagedIterator.html +631 -0
  55. data/docs/NgrokAPI/Services/ApiKeysClient.html +1333 -0
  56. data/docs/NgrokAPI/Services/EndpointConfigurationsClient.html +2201 -0
  57. data/docs/NgrokAPI/Services/ReservedDomainsClient.html +2541 -0
  58. data/docs/NgrokAPI/Services/TlsCertificatesClient.html +1417 -0
  59. data/docs/NgrokAPI/Services.html +117 -0
  60. data/docs/NgrokAPI.html +157 -0
  61. data/docs/_index.html +309 -0
  62. data/docs/class_list.html +51 -0
  63. data/docs/css/common.css +1 -0
  64. data/docs/css/full_list.css +58 -0
  65. data/docs/css/style.css +497 -0
  66. data/docs/file.README.html +126 -0
  67. data/docs/file_list.html +56 -0
  68. data/docs/frames.html +17 -0
  69. data/docs/index.html +126 -0
  70. data/docs/js/app.js +314 -0
  71. data/docs/js/full_list.js +216 -0
  72. data/docs/js/jquery.js +4 -0
  73. data/docs/method_list.html +1227 -0
  74. data/docs/top-level-namespace.html +110 -0
  75. data/lib/ngrokapi/client.rb +49 -0
  76. data/lib/ngrokapi/error.rb +14 -0
  77. data/lib/ngrokapi/errors/not_found_error.rb +16 -0
  78. data/lib/ngrokapi/http_client.rb +132 -0
  79. data/lib/ngrokapi/models/api_key.rb +64 -0
  80. data/lib/ngrokapi/models/endpoint_configuration.rb +119 -0
  81. data/lib/ngrokapi/models/listable.rb +42 -0
  82. data/lib/ngrokapi/models/reserved_domain.rb +211 -0
  83. data/lib/ngrokapi/models/tls_certificate.rb +62 -0
  84. data/lib/ngrokapi/paged_iterator.rb +40 -0
  85. data/lib/ngrokapi/services/api_keys_client.rb +144 -0
  86. data/lib/ngrokapi/services/endpoint_configurations_client.rb +313 -0
  87. data/lib/ngrokapi/services/reserved_domains_client.rb +313 -0
  88. data/lib/ngrokapi/services/tls_certificates_client.rb +161 -0
  89. data/lib/ngrokapi/version.rb +7 -0
  90. data/lib/ngrokapi.rb +13 -0
  91. data/ngrok-api.gemspec +27 -0
  92. data/spec/ngrokapi/client_spec.rb +33 -0
  93. data/spec/ngrokapi/http_client_spec.rb +75 -0
  94. data/spec/ngrokapi/models/api_key_spec.rb +43 -0
  95. data/spec/ngrokapi/models/listable_spec.rb +43 -0
  96. data/spec/ngrokapi/models/reserved_domain_spec.rb +100 -0
  97. data/spec/ngrokapi/paged_iterator_spec.rb +84 -0
  98. data/spec/ngrokapi/services/api_keys_client_spec.rb +127 -0
  99. data/spec/spec_helper.rb +80 -0
  100. metadata +144 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3daf4a45dac0de79d93aa36eb3d107352274a246566bb4bd3fccde49d6d83287
4
+ data.tar.gz: 24b4c876aefbddbdd9a8a15ed2e5fb9a1fad13e0965bdf6a85726c4a35cf2887
5
+ SHA512:
6
+ metadata.gz: 9c67d35a0070b5f96e99e086ad35b211ba1c157088d5ddc9ecddcfd4a359b30153774a8bbaaaca6a7ecbcf2716df623476cbcbe1d02721f1b1b1e93f9501dade
7
+ data.tar.gz: 920d1394126e42e8ddaf73766059fc7ff68b7769c90e9877fb739fcc83132858fec5e8e7f5c40fc79bb214ff754ebc9e1637416116c4153b9cf1c4d7aa64372b
@@ -0,0 +1,21 @@
1
+ name: CI
2
+ on: [push]
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ matrix:
8
+ ruby: ['3.0']
9
+ steps:
10
+ - name: Check out repository code
11
+ uses: actions/checkout@v2
12
+ - name: Set up Ruby
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ - name: Install bundler
17
+ run: gem install bundler
18
+ - name: Run bundler
19
+ run: bundle install --jobs 4 --retry 3
20
+ - name: Run Rake
21
+ run: bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ Gemfile.lock
2
+ .DS_Store
3
+ .yardoc/
4
+ tmp/
5
+ log/
6
+ pkg/
7
+ *.swp
8
+ /.bundle
9
+ .rvmrc
10
+ coverage
11
+ *.gem
12
+ .idea
13
+ .env
data/.rubocop.yml ADDED
@@ -0,0 +1,28 @@
1
+ inherit_from:
2
+ - .rubocop_airbnb.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 3.0
6
+
7
+ Metrics/LineLength:
8
+ Max: 120
9
+
10
+ # Ignore Rails-y Airbnb recommendation
11
+ Airbnb/ClassOrModuleDeclaredInWrongFile:
12
+ Enabled: false
13
+
14
+ # Ignore Rails-y Airbnb recommendation
15
+ Airbnb/ConstAssignedInWrongFile:
16
+ Enabled: false
17
+
18
+ # Allow empty examples to stub out specs
19
+ RSpec/EmptyExampleGroup:
20
+ Enabled: false
21
+
22
+ # Allow fake tests to stub out specs
23
+ RSpec/ExpectActual:
24
+ Enabled: false
25
+
26
+ # It just looks nicer
27
+ Layout/ArgumentAlignment:
28
+ EnforcedStyle: with_fixed_indentation
@@ -0,0 +1,2 @@
1
+ require:
2
+ - rubocop-airbnb
data/.simplecov ADDED
@@ -0,0 +1 @@
1
+ SimpleCov.start "test_frameworks"
data/Gemfile ADDED
@@ -0,0 +1,33 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'rake'
5
+
6
+ group :development do
7
+ # https://github.com/guard/guard
8
+ gem 'guard'
9
+ # https://github.com/guard/guard-rspec
10
+ gem 'guard-rspec'
11
+ # https://github.com/guard/guard-bundler
12
+ gem 'guard-bundler'
13
+ end
14
+
15
+ group :test do
16
+ # https://github.com/rspec/rspec
17
+ gem 'rspec'
18
+ # https://github.com/simplecov-ruby/simplecov
19
+ gem 'simplecov', require: false
20
+ # https://github.com/bblimke/webmock
21
+ gem 'webmock'
22
+ end
23
+
24
+ group :development, :test do
25
+ # https://github.com/pry/pry
26
+ gem 'pry'
27
+ # https://github.com/lsegal/yard
28
+ gem 'yard'
29
+ # https://github.com/airbnb/ruby/tree/master/rubocop
30
+ gem 'rubocop'
31
+ # https://github.com/airbnb/ruby/tree/master/rubocop-airbnb
32
+ gem 'rubocop-airbnb'
33
+ end
data/Guardfile ADDED
@@ -0,0 +1,16 @@
1
+ rspec_options = {
2
+ version: 1,
3
+ all_after_pass: false,
4
+ all_on_start: false
5
+ }
6
+
7
+ guard 'rspec', rspec_options do
8
+ watch(%r{^spec/.+_spec\.rb$})
9
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
10
+ watch('spec/spec_helper.rb') { "spec" }
11
+ end
12
+
13
+ guard 'bundler' do
14
+ watch('Gemfile')
15
+ watch(/^.+\.gemspec/)
16
+ end
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # ngrok API client library for Ruby
2
+
3
+ This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it
4
+ easier to consume in Ruby.
5
+
6
+ ## Installation
7
+
8
+ This library is published on [Rubygems](https://rubygems.org/gems/ngrok-api)
9
+
10
+ ```ruby
11
+ gem install ngrok-api
12
+ ```
13
+
14
+ ## Documentation
15
+
16
+ A quickstart guide and a full API reference are included in the [ngrok Ruby API documentation](https://ruby-api.docs.ngrok.com)
17
+
18
+ ## Quickstart
19
+
20
+ Please consult the [documentation](https://ruby-api.docs.ngrok.com) for additional examples.
21
+
22
+ ```ruby
23
+ require 'ngrokapi/client'
24
+ client = NgrokAPI::Client.new(api_key: '<API KEY>')
25
+
26
+ # Get an instance of the api_keys client and list all API keys
27
+ keys_client = client.api_keys
28
+ keys_client.list
29
+ ```
30
+
31
+ ## Local Documentation
32
+
33
+ Documentation can be generated with the command:
34
+
35
+ ```ruby
36
+ bundle exec yard doc 'lib/**/*.rb'
37
+ ```
38
+
39
+ This will generate documentation which can be viewed within the doc folder.
40
+
41
+ ## Specs
42
+
43
+ Specs can be run with the command:
44
+
45
+ ```ruby
46
+ bundle exec rake
47
+ ```
48
+
49
+ This will generate a coverage report which can be viewed within the coverage folder.
50
+
51
+ ## Rubocop
52
+
53
+ Rubocop can be run with the command:
54
+
55
+ ```ruby
56
+ # Run rubocop on lib folder
57
+ bundle exec rubocop 'lib'
58
+
59
+ # Run rubcop on all files
60
+ bundle exec rubocop
61
+ ```
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+ RSpec::Core::RakeTask.new(:spec)
4
+ rescue LoadError
5
+ end
6
+
7
+ task default: [:spec]