ssh_tunnels 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae788942bb584a3aeb278a81eff1e25aff8861668835fc4844bf3ce32a58d3c8
4
- data.tar.gz: b8adc0bf535fa0c219887a69a640dde3d32503f119b2c8b7c8e83c9e4313749c
3
+ metadata.gz: ba405495fb6506f5a69ac1fb1e222ff0b471a6276914f82c46b6960c4fa3796c
4
+ data.tar.gz: fe87c9476685c2d87d7843f098260875561399967c0f504081f92e844a58e4e4
5
5
  SHA512:
6
- metadata.gz: 63367bcdd582fdbfd353f450b8c702930f30473f735a6d33dc6b12a44aaf6529c512756c7becaa061d2c0a51a0ba7b21ed53a40cdd0cb597f803b2af78a66147
7
- data.tar.gz: 6a56b3b03faa392aaa30b0e5cecae91eab88633dd447663c980ee0e37e976b97e8676e43073271b6f463e3457d3d35e3204c5bbf66bf8ef3e5b7b244fc5446e3
6
+ metadata.gz: ded2e91fc8fce982c29a31a7da1e37e0ea3b009407c215dc6bfd4f0a6c451a22e639630a2acbf1f5776de3d8b20337857658e44ddb86554b61c67b86632b27e0
7
+ data.tar.gz: 7827c2125fb9ea315d0e70629c01fde527bba7b027fa8c81b899caab12cb83c465fdaa937351272ded5e0a8b71c423deb3c8f455fda4aeff8c41eeaf44c0ae11
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 2.7.7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ssh_tunnels (0.1.0)
4
+ ssh_tunnels (0.1.1)
5
5
  curses (~> 1.3)
6
6
  net-ssh-gateway (~> 2.0)
7
7
 
@@ -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 + 1}. ")
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\d+\Z/
89
+ return status("Unrecognized input: #{input}") unless input.is_a?(String) && input =~ /\A[0-9a-zA-Z]\Z/
88
90
 
89
- tunnel = @tunnels[input.to_i - 1]
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SshTunnels
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
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.0
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: 2020-06-25 00:00:00.000000000 Z
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.1.2
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: []