sparoid 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9949f3421911f8f9d588b87ba8955407b68ac62bae5ad7f53ef5b707077ef60
4
- data.tar.gz: 06b115e1db22eb0222dd9f7a439024e18d8579255324aaff1bb1c935e35c10f4
3
+ metadata.gz: 594f1917e9cea3e563dcb027f0fb0ddc9fc41e4a0240a405b7fbba8445de61d9
4
+ data.tar.gz: 7d39ad302157dfce633b339338e6564d407074556614422efc71b3e645272ac2
5
5
  SHA512:
6
- metadata.gz: d6ef1abb4e1c01d435f771ffbf779aeced9a04a2384a309c623fef0546d8cf8adae7ab76a86ba60b485c49ddbd386e545ecc9ce7c62efdcec465732c23cd1f59
7
- data.tar.gz: f616bb367217c07aa36865be2c1eaeeecce685c260911aaf6a97f1e8cb80f8652d906944edca1954d1f161a123bcf333945947992c40ea289be0911e40be7c29
6
+ metadata.gz: 7c037f995e1fd41822c9b726e7d79e2fc065a75dff5697df4182b6e6294889c305f2d224bf6436bd4f26e4e790316d507cffd2dc58d7f6041cf6e4a6484e3098
7
+ data.tar.gz: 2478cbdb04f16035a93c37711a1bb7eaab1cd7482a6c80418ba71f60c276d356513d1210b51615ea984167ba9b654cc1bf51c4d4899e37894a348abdfaa7e76a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.0.3] - 2021-03-17
2
+
3
+ - Nicer error handling in CLI, remove --fdpass option
4
+
1
5
  ## [1.0.2] - 2021-03-15
2
6
 
3
7
  - `sparoid send` renamed to `sparoid auth`
data/lib/sparoid/cli.rb CHANGED
@@ -8,23 +8,22 @@ module Sparoid
8
8
  class CLI < Thor
9
9
  desc "auth HOST [PORT]", "Send a authorization packet"
10
10
  method_option :config, desc: "Path to a config file, INI format, with key and hmac-key"
11
- method_option :fdpass,
12
- type: :numeric,
13
- desc: "After sending, open a TCP connection and pass the FD back to the calling process. \
14
- For use with OpenSSH ProxyCommand and ProxyUseFdpass"
15
11
  def auth(host, port = 8484)
16
12
  config = File.expand_path(options[:config] || "~/.sparoid.ini")
17
13
  abort "Config '#{config}' not found" unless File.exist? config
18
14
 
19
15
  key, hmac_key = get_keys(parse_ini(config))
20
16
  Sparoid.auth(key, hmac_key, host, port.to_i)
21
- Sparoid.fdpass(host, options[:fdpass]) if options[:fdpass]
17
+ rescue StandardError => e
18
+ abort e.message
22
19
  end
23
20
 
24
- desc "connect", "Send a SPA, TCP connect, and then pass the FD back to the parent"
21
+ desc "connect HOST PORT [SPA-PORT]", "Send a SPA, TCP connect, and then pass the FD back to the parent"
25
22
  def connect(host, port, spa_port = 8484)
26
23
  auth(host, spa_port)
27
24
  Sparoid.fdpass(host, port)
25
+ rescue StandardError => e
26
+ abort e.message
28
27
  end
29
28
 
30
29
  desc "keygen", "Generate an encryption key and a HMAC key"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sparoid
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Hörberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor