terminalwire 0.2.4 → 0.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 309645ee703cb95d71b6157e1e315c050617f88559ddfd4c8085fed535996b87
|
4
|
+
data.tar.gz: db83793b2917d729086286e3aed97fd254d7b0191f7fc2359bf1f4674e09cb0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bf0d6aff7c74689343d33f91ef8cbbd3f65277b0882c821159aab58979c5bfad22400c4159179e8b659851b276abda353943d853a289a720bb8c92a901bbc52
|
7
|
+
data.tar.gz: caac5ae325c02b144da767aacf7d54d6e112dfee712664e6bffff5822c3e02f536e589cd7113d273ec3be7c6ddfe5fcde5688e0b9875ed48de51b4447dd51bd1
|
@@ -19,7 +19,7 @@ class MainTerminal < ApplicationTerminal
|
|
19
19
|
self.current_user = user
|
20
20
|
puts "Successfully logged in as #{current_user.email}."
|
21
21
|
else
|
22
|
-
|
22
|
+
fail "Could not find a user with that email and password."
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ class MainTerminal < ApplicationTerminal
|
|
28
28
|
if self.current_user
|
29
29
|
puts "Logged in as #{current_user.email}."
|
30
30
|
else
|
31
|
-
|
31
|
+
fail "Not logged in. Run `#{self.class.basename} login` to login."
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
data/lib/terminalwire/thor.rb
CHANGED
@@ -37,6 +37,18 @@ module Terminalwire
|
|
37
37
|
def_delegators :stdin,
|
38
38
|
:gets, :getpass
|
39
39
|
|
40
|
+
# Prints text to the standard error stream.
|
41
|
+
def warn(...)
|
42
|
+
stderr.puts(...)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Prints text to the standard error stream and exits the program.
|
46
|
+
def fail(...)
|
47
|
+
stderr.puts(...)
|
48
|
+
context.exit 1
|
49
|
+
ensure
|
50
|
+
super
|
51
|
+
end
|
40
52
|
# Feels more naturual to call `client.files` etc. from
|
41
53
|
# the serve since it's more apparent that it's a client.
|
42
54
|
alias :client :context
|
data/lib/terminalwire/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminalwire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-websocket
|