ngrok-wrapper 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -8
- data/.github/workflows/codeql-analysis.yml +1 -1
- data/.gitignore +1 -0
- data/.rubocop.yml +2 -1
- data/.tool-versions +1 -1
- data/CHANGELOG.md +24 -1
- data/Gemfile +7 -0
- data/README.md +11 -9
- data/disabled.yml +3 -0
- data/lib/ngrok/wrapper/version.rb +1 -1
- data/lib/ngrok/wrapper.rb +2 -2
- data/ngrok-wrapper.gemspec +1 -9
- data/spec/ngrok/wrapper_spec.rb +8 -8
- data/tea.yaml +6 -0
- metadata +7 -96
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87e9c41fe2c57a9412ff8d75fb5950cc24623778c3b1d5e9a3969fe4c07899e4
|
4
|
+
data.tar.gz: cddba38da8b0e540b52534fbd591233a5941b2dcdaf130075215f29a4eb87437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1195f3f59babf99244efbb65ba5c1a2ff6e39cd990dcf5472db1bd8eadd1b326161a93a1dafc0fed02e0d544400902ed01ace3bf52bcbedd2bcf4eae1a6eab6a
|
7
|
+
data.tar.gz: 66f62592b48a9537d6eeea87661c5a93b076ab03ed4097e726deb3cfa7245e9ef25382e241dccab50e00c31000c3d391da05b7858364440f99437f4a0a7a4ed4
|
data/.github/workflows/ci.yml
CHANGED
@@ -13,19 +13,16 @@ jobs:
|
|
13
13
|
fail-fast: false
|
14
14
|
matrix:
|
15
15
|
include:
|
16
|
-
- ruby: 2.6
|
17
|
-
|
18
|
-
- ruby: 2.7
|
19
|
-
|
20
|
-
- ruby: 3.0
|
21
|
-
|
22
16
|
- ruby: 3.1
|
17
|
+
- ruby: 3.2
|
18
|
+
- ruby: 3.3
|
19
|
+
- ruby: head
|
23
20
|
|
24
21
|
name: ruby ${{ matrix.ruby }}
|
25
22
|
|
26
23
|
steps:
|
27
24
|
- name: Checkout
|
28
|
-
uses: actions/checkout@
|
25
|
+
uses: actions/checkout@v4
|
29
26
|
|
30
27
|
- name: Set up Ruby
|
31
28
|
uses: ruby/setup-ruby@v1
|
@@ -40,6 +37,6 @@ jobs:
|
|
40
37
|
run: bundle exec rspec
|
41
38
|
|
42
39
|
- name: Code Climate
|
43
|
-
uses: paambaati/codeclimate-action@
|
40
|
+
uses: paambaati/codeclimate-action@v9
|
44
41
|
env:
|
45
42
|
CC_TEST_REPORTER_ID: d1116c05a48e27785cb11369bde3a5e7f9d9e5a114d294bcbefa19cd193b029c
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require:
|
5
5
|
- rubocop-performance
|
6
|
+
- rubocop-rake
|
6
7
|
- rubocop-rspec
|
7
8
|
|
8
9
|
inherit_from:
|
@@ -24,7 +25,7 @@ AllCops:
|
|
24
25
|
# Additional cops that do not reference a style guide rule may be enabled by
|
25
26
|
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
|
26
27
|
# the --only-guide-cops option.
|
27
|
-
TargetRubyVersion:
|
28
|
+
TargetRubyVersion: 3.1
|
28
29
|
|
29
30
|
Layout/LineLength:
|
30
31
|
Max: 120
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.3.4
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,33 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.3.1](https://github.com/texpert/ngrok-wrapper/tree/v0.3.1) (2024-08-25)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/texpert/ngrok-wrapper/compare/v0.3.0...v0.3.1)
|
6
|
+
|
7
|
+
### Maintenance release
|
8
|
+
|
9
|
+
Ruby, Rubocop, and CI upgrades
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- Config error with Ngrok v3.3.3 [\#31](https://github.com/texpert/ngrok-wrapper/issues/31)
|
14
|
+
- The ngrok agent \(v3\) only accepts long name flags prefixed with -- and will error if a single hyphen is used [\#20](https://github.com/texpert/ngrok-wrapper/issues/20)
|
15
|
+
|
16
|
+
**Merged pull requests:**
|
17
|
+
|
18
|
+
- Upgrade paambaati/codeclimate-action to version 9 [\#34](https://github.com/texpert/ngrok-wrapper/pull/34) ([texpert](https://github.com/texpert))
|
19
|
+
- Upgrade actions/checkout to version 4 [\#33](https://github.com/texpert/ngrok-wrapper/pull/33) ([texpert](https://github.com/texpert))
|
20
|
+
- Restrict Ruby minimal version to 3.1 [\#32](https://github.com/texpert/ngrok-wrapper/pull/32) ([texpert](https://github.com/texpert))
|
21
|
+
- Bump actions/checkout to 3.5.0 [\#30](https://github.com/texpert/ngrok-wrapper/pull/30) ([texpert](https://github.com/texpert))
|
22
|
+
- Bump actions/checkout to 3.3.0 [\#29](https://github.com/texpert/ngrok-wrapper/pull/29) ([texpert](https://github.com/texpert))
|
23
|
+
- Bump main Ruby version to 2.7.7 [\#28](https://github.com/texpert/ngrok-wrapper/pull/28) ([texpert](https://github.com/texpert))
|
24
|
+
- Fix Code Climate issues [\#27](https://github.com/texpert/ngrok-wrapper/pull/27) ([texpert](https://github.com/texpert))
|
25
|
+
|
3
26
|
## [v0.3.0](https://github.com/texpert/ngrok-wrapper/tree/v0.3.0) (2022-11-19)
|
4
27
|
|
5
28
|
[Full Changelog](https://github.com/texpert/ngrok-wrapper/compare/v0.2.0...v0.3.0)
|
6
29
|
|
7
|
-
Both Ngrok v2, and v3 are now supported.
|
30
|
+
### Both Ngrok v2, and v3 are now supported.
|
8
31
|
|
9
32
|
Tested and working on Ubuntu Linux and macOS.
|
10
33
|
|
data/Gemfile
CHANGED
@@ -5,4 +5,11 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in ngrok-wrapper.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
+
gem 'github_changelog_generator', git: 'https://github.com/github-changelog-generator/github-changelog-generator'
|
9
|
+
gem 'rake'
|
10
|
+
gem 'rspec'
|
11
|
+
gem 'rubocop'
|
12
|
+
gem 'rubocop-performance'
|
13
|
+
gem 'rubocop-rake'
|
14
|
+
gem 'rubocop-rspec'
|
8
15
|
gem 'simplecov', require: false, group: :test
|
data/README.md
CHANGED
@@ -50,32 +50,32 @@ Ngrok::Wrapper.start
|
|
50
50
|
|
51
51
|
# ngrok local_port
|
52
52
|
Ngrok::Wrapper.port
|
53
|
-
=> 3001
|
53
|
+
# => 3001
|
54
54
|
|
55
55
|
# ngrok external url
|
56
56
|
Ngrok::Wrapper.ngrok_url
|
57
|
-
=> "http://aaa0e65.ngrok.io"
|
57
|
+
# => "http://aaa0e65.ngrok.io"
|
58
58
|
|
59
59
|
Ngrok::Wrapper.ngrok_url_https
|
60
|
-
=> "https://aaa0e65.ngrok.io"
|
60
|
+
# => "https://aaa0e65.ngrok.io"
|
61
61
|
|
62
62
|
Ngrok::Wrapper.running?
|
63
|
-
=> true
|
63
|
+
# => true
|
64
64
|
|
65
65
|
Ngrok::Wrapper.stopped?
|
66
|
-
=> false
|
66
|
+
# => false
|
67
67
|
|
68
68
|
# ngrok process id
|
69
69
|
Ngrok::Wrapper.pid
|
70
|
-
=> 27384
|
70
|
+
# => 27384
|
71
71
|
|
72
72
|
# ngrok log file descriptor
|
73
73
|
Ngrok::Wrapper.log
|
74
|
-
=> #<File:/tmp/ngrok20141022-27376-cmmiq4>
|
74
|
+
# => #<File:/tmp/ngrok20141022-27376-cmmiq4>
|
75
75
|
|
76
76
|
# kill ngrok
|
77
77
|
Ngrok::Wrapper.stop
|
78
|
-
=> :stopped
|
78
|
+
# => :stopped
|
79
79
|
|
80
80
|
```
|
81
81
|
|
@@ -200,6 +200,7 @@ git pull
|
|
200
200
|
|
201
201
|
github_changelog_generator -u texpert -p ngrok-wrapper --future-release v0.1.0
|
202
202
|
```
|
203
|
+
Adjust the new gem version number in the `lib/ngrok/wrapper/version.rb` file.
|
203
204
|
|
204
205
|
Then add the changes to `git`, commit and push the `Preparing the new release` commit directly into the `main` branch:
|
205
206
|
|
@@ -221,7 +222,8 @@ gem owner ngrok-wrapper -a branzeanu.aurel@gmail.com
|
|
221
222
|
|
222
223
|
### Building a new gem version
|
223
224
|
|
224
|
-
|
225
|
+
Check if the new gem version number in the `lib/ngrok/wrapper/version.rb` file has been specified.
|
226
|
+
It is used when building the gem by the following command:
|
225
227
|
|
226
228
|
```
|
227
229
|
gem build ngrok-wrapper.gemspec
|
data/disabled.yml
CHANGED
data/lib/ngrok/wrapper.rb
CHANGED
@@ -42,7 +42,7 @@ module Ngrok
|
|
42
42
|
# Attempt to read the attributes of an existing process instead of starting a new process.
|
43
43
|
try_params_from_running_ngrok if persistent_ngrok
|
44
44
|
|
45
|
-
spawn_new_ngrok(persistent_ngrok:
|
45
|
+
spawn_new_ngrok(persistent_ngrok:) if stopped?
|
46
46
|
|
47
47
|
@status = :running
|
48
48
|
if persistent_ngrok
|
@@ -116,7 +116,7 @@ module Ngrok
|
|
116
116
|
def ngrok_process_status_lines(refetch: false)
|
117
117
|
return @ngrok_process_status_lines if defined?(@ngrok_process_status_lines) && !refetch
|
118
118
|
|
119
|
-
@ngrok_process_status_lines =
|
119
|
+
@ngrok_process_status_lines = `ps ax | grep "ngrok http"`.split("\n").map(&:strip)
|
120
120
|
end
|
121
121
|
|
122
122
|
def try_params_from_running_ngrok
|
data/ngrok-wrapper.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.summary = 'Ngrok-wrapper gem is a ruby wrapper for ngrok2'
|
15
15
|
spec.description = 'Ngrok-wrapper gem is a ruby wrapper for ngrok2'
|
16
16
|
spec.homepage = 'https://github.com/texpert/ngrok-wrapper'
|
17
|
-
spec.required_ruby_version = '>=
|
17
|
+
spec.required_ruby_version = '>= 3.1.0'
|
18
18
|
spec.license = 'MIT'
|
19
19
|
|
20
20
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
@@ -25,13 +25,5 @@ Gem::Specification.new do |spec|
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
27
|
spec.files = `git ls-files -z`.split("\x0")
|
28
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
29
28
|
spec.require_paths = ['lib']
|
30
|
-
|
31
|
-
spec.add_development_dependency 'github_changelog_generator'
|
32
|
-
spec.add_development_dependency 'rake'
|
33
|
-
spec.add_development_dependency 'rspec'
|
34
|
-
spec.add_development_dependency 'rubocop'
|
35
|
-
spec.add_development_dependency 'rubocop-performance'
|
36
|
-
spec.add_development_dependency 'rubocop-rspec'
|
37
29
|
end
|
data/spec/ngrok/wrapper_spec.rb
CHANGED
@@ -21,7 +21,7 @@ RSpec.describe 'Ngrok::Wrapper' do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'has a version number' do
|
24
|
-
expect(Ngrok::Wrapper::VERSION).not_to
|
24
|
+
expect(Ngrok::Wrapper::VERSION).not_to be_nil
|
25
25
|
end
|
26
26
|
|
27
27
|
describe 'Before start' do
|
@@ -87,10 +87,10 @@ RSpec.describe 'Ngrok::Wrapper' do
|
|
87
87
|
|
88
88
|
it 'uses custom log file' do
|
89
89
|
Ngrok::Wrapper.start(log: 'test.log')
|
90
|
-
expect(Ngrok::Wrapper.running?).to
|
90
|
+
expect(Ngrok::Wrapper.running?).to be_truthy
|
91
91
|
expect(Ngrok::Wrapper.params[:log].path).to eq 'test.log'
|
92
92
|
Ngrok::Wrapper.stop
|
93
|
-
expect(Ngrok::Wrapper.stopped?).to
|
93
|
+
expect(Ngrok::Wrapper.stopped?).to be_truthy
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -125,19 +125,19 @@ RSpec.describe 'Ngrok::Wrapper' do
|
|
125
125
|
|
126
126
|
it 'maps port param to addr' do
|
127
127
|
port = 10_010
|
128
|
-
Ngrok::Wrapper.start(port:
|
128
|
+
Ngrok::Wrapper.start(port:)
|
129
129
|
expect(Ngrok::Wrapper.addr).to eq port
|
130
130
|
end
|
131
131
|
|
132
132
|
it 'returns just the port when the address contains a host' do
|
133
133
|
addr = '192.168.0.5:10010'
|
134
|
-
Ngrok::Wrapper.start(addr:
|
134
|
+
Ngrok::Wrapper.start(addr:)
|
135
135
|
expect(Ngrok::Wrapper.port).to eq 10_010
|
136
136
|
end
|
137
137
|
|
138
138
|
it 'supports remote addresses' do
|
139
139
|
addr = '192.168.0.5:10010'
|
140
|
-
Ngrok::Wrapper.start(addr:
|
140
|
+
Ngrok::Wrapper.start(addr:)
|
141
141
|
expect(Ngrok::Wrapper.addr).to eq addr
|
142
142
|
end
|
143
143
|
end
|
@@ -154,7 +154,7 @@ RSpec.describe 'Ngrok::Wrapper' do
|
|
154
154
|
|
155
155
|
it 'includes the -region parameter with the correct value when it is provided' do
|
156
156
|
region = 'eu'
|
157
|
-
Ngrok::Wrapper.start(region:
|
157
|
+
Ngrok::Wrapper.start(region:)
|
158
158
|
expect(Ngrok::Wrapper.__send__(:ngrok_exec_params)).to include("-region=#{region}")
|
159
159
|
end
|
160
160
|
end
|
@@ -198,7 +198,7 @@ RSpec.describe 'Ngrok::Wrapper' do
|
|
198
198
|
it 'includes the -host-header parameter with the correct value when it is provided' do
|
199
199
|
expect(Ngrok::Wrapper).to receive(:fetch_urls)
|
200
200
|
host_header = 'foo.bar'
|
201
|
-
Ngrok::Wrapper.start(host_header:
|
201
|
+
Ngrok::Wrapper.start(host_header:)
|
202
202
|
expect(Ngrok::Wrapper.__send__(:ngrok_exec_params)).to include("-host-header=#{host_header}")
|
203
203
|
end
|
204
204
|
end
|
data/tea.yaml
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ngrok-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Bogdanovich
|
@@ -9,92 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: github_changelog_generator
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: rspec
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rubocop
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: rubocop-performance
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rubocop-rspec
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - ">="
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
12
|
+
date: 2024-08-25 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
98
14
|
description: Ngrok-wrapper gem is a ruby wrapper for ngrok2
|
99
15
|
email:
|
100
16
|
- 27bogdanovich@gmail.com
|
@@ -109,7 +25,6 @@ files:
|
|
109
25
|
- ".gitignore"
|
110
26
|
- ".rspec"
|
111
27
|
- ".rubocop.yml"
|
112
|
-
- ".ruby-version"
|
113
28
|
- ".simplecov"
|
114
29
|
- ".tool-versions"
|
115
30
|
- CHANGELOG.md
|
@@ -128,6 +43,7 @@ files:
|
|
128
43
|
- spec/fixtures/ngrok_invalid_auth_token.log
|
129
44
|
- spec/ngrok/wrapper_spec.rb
|
130
45
|
- spec/spec_helper.rb
|
46
|
+
- tea.yaml
|
131
47
|
homepage: https://github.com/texpert/ngrok-wrapper
|
132
48
|
licenses:
|
133
49
|
- MIT
|
@@ -144,20 +60,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
60
|
requirements:
|
145
61
|
- - ">="
|
146
62
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
63
|
+
version: 3.1.0
|
148
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
65
|
requirements:
|
150
66
|
- - ">="
|
151
67
|
- !ruby/object:Gem::Version
|
152
68
|
version: '0'
|
153
69
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
70
|
+
rubygems_version: 3.5.11
|
155
71
|
signing_key:
|
156
72
|
specification_version: 4
|
157
73
|
summary: Ngrok-wrapper gem is a ruby wrapper for ngrok2
|
158
|
-
test_files:
|
159
|
-
- spec/fixtures/ngrok.no_auth_token.log
|
160
|
-
- spec/fixtures/ngrok.sample.log
|
161
|
-
- spec/fixtures/ngrok_invalid_auth_token.log
|
162
|
-
- spec/ngrok/wrapper_spec.rb
|
163
|
-
- spec/spec_helper.rb
|
74
|
+
test_files: []
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.7.6
|