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 +4 -4
- data/lib/terminalwire/client/entitlement/policy.rb +17 -0
- data/lib/terminalwire/server/context.rb +16 -0
- data/lib/terminalwire/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8a974238ae54d86b1c98334295187af746fede63382fe22d3cb527c4216f728
|
4
|
+
data.tar.gz: c99cdc090e070a11eb5a05ad2e2e0aebbb1d0c919899b5b0ed891c6ef693a9e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.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-
|
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:
|