terminalwire 0.1.8 → 0.1.10
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 +4 -4
- data/lib/terminalwire/client/resource.rb +4 -2
- data/lib/terminalwire/rails.rb +2 -2
- data/lib/terminalwire/server/resource.rb +8 -1
- data/lib/terminalwire/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cd319cc4f277520d44209f8317dabcb9113f1cb925f1ee6090e842ec007770b
|
4
|
+
data.tar.gz: 1a7f2c111dfd9ac6576ae63d52b8342ebaff87e64c7a41202a8baf96cd786434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baf4b6ba33de5b317ce0fb52322b5b77c3bdc9cb7804245abf0b4969458024c24d58b08a45df88890d1bd902efdc61fbb7b78aef9a14be8ccde633eb10a7b2c8
|
7
|
+
data.tar.gz: 3b553a00a66b9b6f26fbca86efa973058e6fca4ae3a13a5182772e3f2cfe83db8467ef49d0400e448fb55d70604f3207804aafcb550231fb0bd0decb06d494bd
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "fileutils"
|
2
|
+
|
1
3
|
module Terminalwire::Client::Resource
|
2
4
|
# Dispatches messages from the Client::Handler to the appropriate resource.
|
3
5
|
class Handler
|
@@ -136,11 +138,11 @@ module Terminalwire::Client::Resource
|
|
136
138
|
File = ::File
|
137
139
|
|
138
140
|
def list(path:)
|
139
|
-
Dir.glob
|
141
|
+
Dir.glob File.expand_path(path)
|
140
142
|
end
|
141
143
|
|
142
144
|
def create(path:)
|
143
|
-
|
145
|
+
FileUtils.mkdir_p File.expand_path(path)
|
144
146
|
rescue Errno::EEXIST
|
145
147
|
# Do nothing
|
146
148
|
end
|
data/lib/terminalwire/rails.rb
CHANGED
@@ -18,7 +18,7 @@ module Terminalwire::Rails
|
|
18
18
|
|
19
19
|
def initialize(context:, path: nil, secret_key: self.class.secret_key)
|
20
20
|
@context = context
|
21
|
-
@path = path || context.storage_path
|
21
|
+
@path = Pathname.new(path || context.storage_path)
|
22
22
|
@config_file_path = @path.join(FILENAME)
|
23
23
|
@secret_key = secret_key
|
24
24
|
|
@@ -57,7 +57,7 @@ module Terminalwire::Rails
|
|
57
57
|
def ensure_file
|
58
58
|
return true if @context.file.exist? @config_file_path
|
59
59
|
# Create the path if it doesn't exist on the client.
|
60
|
-
@context.
|
60
|
+
@context.directory.create @path
|
61
61
|
# Write an empty configuration on initialization
|
62
62
|
write(EMPTY_SESSION)
|
63
63
|
end
|
@@ -11,7 +11,14 @@ module Terminalwire::Server
|
|
11
11
|
command: command,
|
12
12
|
parameters: parameters
|
13
13
|
)
|
14
|
-
|
14
|
+
|
15
|
+
response = @adapter.recv
|
16
|
+
case response.fetch(:status)
|
17
|
+
when "success"
|
18
|
+
response.fetch(:response)
|
19
|
+
when "failure"
|
20
|
+
raise Terminalwire::Error, response.inspect
|
21
|
+
end
|
15
22
|
end
|
16
23
|
end
|
17
24
|
|
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.1.
|
4
|
+
version: 0.1.10
|
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-09-
|
11
|
+
date: 2024-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-websocket
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
rubygems_version: 3.5.
|
199
|
+
rubygems_version: 3.5.9
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Ship a CLI for your web app. No API required.
|