terminalwire 0.2.3 → 0.2.5

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: 39232fa4bba65cc98bf87a3625e80a8c01ccee009277adeb53bd57efe28fd73c
4
- data.tar.gz: 94ceb432cdd3f10fb3492cdfb5025eb3e71edbe352bdf0e2cd2a8438aef6f22d
3
+ metadata.gz: 309645ee703cb95d71b6157e1e315c050617f88559ddfd4c8085fed535996b87
4
+ data.tar.gz: db83793b2917d729086286e3aed97fd254d7b0191f7fc2359bf1f4674e09cb0e
5
5
  SHA512:
6
- metadata.gz: a05475187aa41b8bb7b3e21ae13975a48f739ee95e00a2f099e7d13817a5192b9298a79236e008668416d8f385c31b02d716c404255e96148c385ff6268d4f10
7
- data.tar.gz: 36fff6322f43fd783906e9e8a1878dd192b0b44695134cc6df12085da305f8cd34a758415ebb8d14a7d21ec4860172eb250c94508da27f5728149bf7cf76cbd8
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
- puts "Could not find a user with that email and password."
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
- puts "Not logged in. Run `#{self.class.basename} login` to login."
31
+ fail "Not logged in. Run `#{self.class.basename} login` to login."
32
32
  end
33
33
  end
34
34
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Terminalwire
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.5"
5
5
  end
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.3
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-07 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-websocket
@@ -203,6 +203,7 @@ metadata:
203
203
  homepage_uri: https://terminalwire.com/ruby
204
204
  source_code_uri: https://github.com/terminalwire/ruby
205
205
  changelog_uri: https://github.com/terminalwire/ruby/tags
206
+ funding_uri: https://terminalwire.com/funding
206
207
  post_install_message:
207
208
  rdoc_options: []
208
209
  require_paths: