ngrok-api 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +21 -0
- data/.gitignore +13 -0
- data/.rubocop.yml +28 -0
- data/.rubocop_airbnb.yml +2 -0
- data/.simplecov +1 -0
- data/Gemfile +33 -0
- data/Guardfile +16 -0
- data/README.md +61 -0
- data/Rakefile +7 -0
- data/doc/NgrokAPI/Client.html +542 -0
- data/doc/NgrokAPI/Error.html +305 -0
- data/doc/NgrokAPI/Errors/NotFoundError.html +309 -0
- data/doc/NgrokAPI/Errors.html +115 -0
- data/doc/NgrokAPI/HttpClient.html +1104 -0
- data/doc/NgrokAPI/Models/ApiKey.html +1138 -0
- data/doc/NgrokAPI/Models/EndpointConfiguration.html +1366 -0
- data/doc/NgrokAPI/Models/Listable.html +934 -0
- data/doc/NgrokAPI/Models/ReservedDomain.html +2498 -0
- data/doc/NgrokAPI/Models/TlsCertificate.html +1064 -0
- data/doc/NgrokAPI/Models.html +117 -0
- data/doc/NgrokAPI/PagedIterator.html +631 -0
- data/doc/NgrokAPI/Services/ApiKeysClient.html +1333 -0
- data/doc/NgrokAPI/Services/EndpointConfigurationsClient.html +2201 -0
- data/doc/NgrokAPI/Services/ReservedDomainsClient.html +2541 -0
- data/doc/NgrokAPI/Services/TlsCertificatesClient.html +1417 -0
- data/doc/NgrokAPI/Services.html +117 -0
- data/doc/NgrokAPI.html +157 -0
- data/doc/_index.html +309 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +126 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +126 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1227 -0
- data/doc/top-level-namespace.html +110 -0
- data/docs/NgrokAPI/Client.html +542 -0
- data/docs/NgrokAPI/Error.html +305 -0
- data/docs/NgrokAPI/Errors/NotFoundError.html +309 -0
- data/docs/NgrokAPI/Errors.html +115 -0
- data/docs/NgrokAPI/HttpClient.html +1104 -0
- data/docs/NgrokAPI/Models/ApiKey.html +1138 -0
- data/docs/NgrokAPI/Models/EndpointConfiguration.html +1366 -0
- data/docs/NgrokAPI/Models/Listable.html +934 -0
- data/docs/NgrokAPI/Models/ReservedDomain.html +2498 -0
- data/docs/NgrokAPI/Models/TlsCertificate.html +1064 -0
- data/docs/NgrokAPI/Models.html +117 -0
- data/docs/NgrokAPI/PagedIterator.html +631 -0
- data/docs/NgrokAPI/Services/ApiKeysClient.html +1333 -0
- data/docs/NgrokAPI/Services/EndpointConfigurationsClient.html +2201 -0
- data/docs/NgrokAPI/Services/ReservedDomainsClient.html +2541 -0
- data/docs/NgrokAPI/Services/TlsCertificatesClient.html +1417 -0
- data/docs/NgrokAPI/Services.html +117 -0
- data/docs/NgrokAPI.html +157 -0
- data/docs/_index.html +309 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +126 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +126 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +1227 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/ngrokapi/client.rb +49 -0
- data/lib/ngrokapi/error.rb +14 -0
- data/lib/ngrokapi/errors/not_found_error.rb +16 -0
- data/lib/ngrokapi/http_client.rb +132 -0
- data/lib/ngrokapi/models/api_key.rb +64 -0
- data/lib/ngrokapi/models/endpoint_configuration.rb +119 -0
- data/lib/ngrokapi/models/listable.rb +42 -0
- data/lib/ngrokapi/models/reserved_domain.rb +211 -0
- data/lib/ngrokapi/models/tls_certificate.rb +62 -0
- data/lib/ngrokapi/paged_iterator.rb +40 -0
- data/lib/ngrokapi/services/api_keys_client.rb +144 -0
- data/lib/ngrokapi/services/endpoint_configurations_client.rb +313 -0
- data/lib/ngrokapi/services/reserved_domains_client.rb +313 -0
- data/lib/ngrokapi/services/tls_certificates_client.rb +161 -0
- data/lib/ngrokapi/version.rb +7 -0
- data/lib/ngrokapi.rb +13 -0
- data/ngrok-api.gemspec +27 -0
- data/spec/ngrokapi/client_spec.rb +33 -0
- data/spec/ngrokapi/http_client_spec.rb +75 -0
- data/spec/ngrokapi/models/api_key_spec.rb +43 -0
- data/spec/ngrokapi/models/listable_spec.rb +43 -0
- data/spec/ngrokapi/models/reserved_domain_spec.rb +100 -0
- data/spec/ngrokapi/paged_iterator_spec.rb +84 -0
- data/spec/ngrokapi/services/api_keys_client_spec.rb +127 -0
- data/spec/spec_helper.rb +80 -0
- 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
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
|
data/.rubocop_airbnb.yml
ADDED
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
|
+
```
|