ssh_tunnels 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +1 -1
- data/lib/ssh_tunnels/ui.rb +5 -3
- data/lib/ssh_tunnels/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba405495fb6506f5a69ac1fb1e222ff0b471a6276914f82c46b6960c4fa3796c
|
4
|
+
data.tar.gz: fe87c9476685c2d87d7843f098260875561399967c0f504081f92e844a58e4e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded2e91fc8fce982c29a31a7da1e37e0ea3b009407c215dc6bfd4f0a6c451a22e639630a2acbf1f5776de3d8b20337857658e44ddb86554b61c67b86632b27e0
|
7
|
+
data.tar.gz: 7827c2125fb9ea315d0e70629c01fde527bba7b027fa8c81b899caab12cb83c465fdaa937351272ded5e0a8b71c423deb3c8f455fda4aeff8c41eeaf44c0ae11
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.7
|
data/Gemfile.lock
CHANGED
data/lib/ssh_tunnels/ui.rb
CHANGED
@@ -4,6 +4,8 @@ module SshTunnels
|
|
4
4
|
# rubocop:disable Metrics/ClassLength
|
5
5
|
# User Interface
|
6
6
|
class UI
|
7
|
+
IDENTIFIERS = ['1'..'9', 'a'..'z', 'A'..'Z'].map(&:to_a).flatten
|
8
|
+
|
7
9
|
def initialize(tunnels)
|
8
10
|
@tunnels = tunnels
|
9
11
|
end
|
@@ -67,7 +69,7 @@ module SshTunnels
|
|
67
69
|
def display_tunnel(tunnel, index)
|
68
70
|
window.setpos(index + 2, 2)
|
69
71
|
window.attrset(color(:white))
|
70
|
-
window.addstr("#{index
|
72
|
+
window.addstr("#{IDENTIFIERS[index]}. ")
|
71
73
|
window.attrset(tunnel_color(tunnel))
|
72
74
|
window.addstr("#{tunnel.name} ")
|
73
75
|
window.attrset(color(:cyan))
|
@@ -84,9 +86,9 @@ module SshTunnels
|
|
84
86
|
|
85
87
|
def process_input(input)
|
86
88
|
raise UserQuit if input == 'q'
|
87
|
-
return status("Unrecognized input: #{input}") unless input.is_a?(String) && input =~ /\A\
|
89
|
+
return status("Unrecognized input: #{input}") unless input.is_a?(String) && input =~ /\A[0-9a-zA-Z]\Z/
|
88
90
|
|
89
|
-
tunnel = @tunnels[
|
91
|
+
tunnel = @tunnels[IDENTIFIERS.index { |value| value == input }]
|
90
92
|
return status("Unrecognized tunnel: #{input}") if tunnel.nil?
|
91
93
|
|
92
94
|
if tunnel.active?
|
data/lib/ssh_tunnels/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssh_tunnels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -112,7 +112,7 @@ metadata:
|
|
112
112
|
homepage_uri: https://github.com/bobf/ssh_tunnels
|
113
113
|
source_code_uri: https://github.com/bobf/ssh_tunnels
|
114
114
|
changelog_uri: https://github.com/bobf/ssh_tunnels/blob/master/CHANGELOG.md
|
115
|
-
post_install_message:
|
115
|
+
post_install_message:
|
116
116
|
rdoc_options: []
|
117
117
|
require_paths:
|
118
118
|
- lib
|
@@ -127,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
131
|
-
signing_key:
|
130
|
+
rubygems_version: 3.4.13
|
131
|
+
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Interactive SSH tunnel management
|
134
134
|
test_files: []
|