terminalwire 0.2.2 → 0.2.4

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: 89f9aee85ea5da79613c84fe3c5ecabb199d973c0b313050bb4d857b1ae493e2
4
- data.tar.gz: 4f7a3f2ef2454cb3a630ffbb8b1d92f7c72a17e905e3059a376e20a5e058681d
3
+ metadata.gz: c8a974238ae54d86b1c98334295187af746fede63382fe22d3cb527c4216f728
4
+ data.tar.gz: c99cdc090e070a11eb5a05ad2e2e0aebbb1d0c919899b5b0ed891c6ef693a9e8
5
5
  SHA512:
6
- metadata.gz: f29cb799b97b678e163a0685e0a7be9de49fb6464eb4916b8412ed6eb30400f0ff29b9ba5bc02ab208a50bbfb7a7e027f507cd14bd827ebf1ae5b01be29d992d
7
- data.tar.gz: 615e9dea3dc7fc01f04bce0f0a2c4f82c4dd7670853f43741e99f82b8159067ab92d292a0230a6ea73439ac7c023815259fe1d6d7694c8b991f7e524d0bd4ef8
6
+ metadata.gz: 0df6c3219578c496eb45b8050164d9427207feb57012071abcf9d683ab6953ea95a92bf9c8eee0ab32c13f5335161777f4d4b1e06e53fdeb524f1d8f4d8987b7
7
+ data.tar.gz: 988d13343b1b408d7c70c3e3252ccd43385081c7438263f8add6c21c6320ac93a9e0a8795764dc250a1db601daccd86253fd3c09c2b487dcdec377350ccb6f4e
@@ -52,6 +52,19 @@ module Terminalwire::Client::Entitlement
52
52
  class Root < Base
53
53
  AUTHORITY = "terminalwire.com".freeze
54
54
 
55
+ # Terminalwire checks these to install the binary stubs path.
56
+ SHELL_INITIALIZATION_FILE_PATHS = %w[
57
+ ~/.bash_profile
58
+ ~/.bashrc
59
+ ~/.zprofile
60
+ ~/.zshrc
61
+ ~/.profile
62
+ ~/.config/fish/config.fish
63
+ ~/.bash_login
64
+ ~/.cshrc
65
+ ~/.tcshrc
66
+ ].freeze
67
+
55
68
  # Ensure the binary stubs are executable. This increases the
56
69
  # file mode entitlement so that stubs created in ./bin are executable.
57
70
  BINARY_PATH_FILE_MODE = 0o755
@@ -63,6 +76,10 @@ module Terminalwire::Client::Entitlement
63
76
  # Now setup special permitted paths.
64
77
  @paths.permit root_path
65
78
  @paths.permit root_pattern
79
+ # Permit the dotfiles so terminalwire can install the binary stubs.
80
+ SHELL_INITIALIZATION_FILE_PATHS.each do |path|
81
+ @paths.permit path
82
+ end
66
83
 
67
84
  # Permit terminalwire to grant execute permissions to the binary stubs.
68
85
  @paths.permit binary_pattern, mode: BINARY_PATH_FILE_MODE
@@ -53,6 +53,22 @@ module Terminalwire::Server
53
53
  end
54
54
  end
55
55
 
56
+ # Wraps the environment variables in a hash-like object that can be accessed
57
+ # from client#ENV. This makes it look and feel just like the ENV object in Ruby.
58
+ class Env
59
+ def initialize(context:)
60
+ @context = context
61
+ end
62
+
63
+ def [](name)
64
+ @context.environment_variable.read(name)
65
+ end
66
+ end
67
+
68
+ def ENV
69
+ @ENV ||= Env.new(context: self)
70
+ end
71
+
56
72
  def exit(status = 0)
57
73
  @adapter.write(event: "exit", status: status)
58
74
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Terminalwire
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.4"
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.2
4
+ version: 0.2.4
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-08 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: