remote_sh 0.1.9 → 0.1.11
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/remote_sh/cli.rb +22 -2
- data/lib/remote_sh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729720f5e179074120b151e1a6622f63099c49b82617178cdb2c1ac88a1eb10a
|
4
|
+
data.tar.gz: 714b00e743fd31e78644d0a3a0b70ece775ada40b35d21cad39a64f77fa274b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '048ac7735ea42e943ca163b159aae5873013d65a9edc5c0bd701f824944e3d6f286609a3c44cec83912cf96542ef09a1c01d37b2d4b43d18ce4f1b85da1798e5'
|
7
|
+
data.tar.gz: '0107946270dfbdd7cf614854297ed18419b159aa373fa9a25fb6920622b31d0d44339114f8ad337ff0179d3a55c29fd9ffbe000943fb2080c2fabe5f76ee1064'
|
data/lib/remote_sh/cli.rb
CHANGED
@@ -57,13 +57,33 @@ module RemoteSh
|
|
57
57
|
|
58
58
|
desc "exec", "executes given command within remote context"
|
59
59
|
def exec(*argv)
|
60
|
-
|
60
|
+
hostname = WorkspaceConfiguration.host_config["name"]
|
61
|
+
|
62
|
+
FileUtils.mkdir_p("#{PID_FOLDER}/#{hostname}")
|
63
|
+
|
64
|
+
local_path = WorkspaceConfiguration::WOKRING_DIR
|
65
|
+
pid_filename = "#{PID_FOLDER}/#{hostname}/#{local_path.gsub("/", "__")}"
|
66
|
+
|
67
|
+
unless File.exist?(pid_filename)
|
68
|
+
File.open(pid_filename, "w") do |f|
|
69
|
+
@owns_sync = true
|
70
|
+
f.write("busy")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
61
74
|
host = WorkspaceConfiguration.host_config["host"]
|
62
75
|
host_path = WorkspaceConfiguration.config["host_path"]
|
76
|
+
|
77
|
+
if @owns_sync
|
78
|
+
FileSyncer.start(host, host_path, WorkspaceConfiguration.config["ignore"] || [])
|
79
|
+
PortForwarder.start_or_skip(WorkspaceConfiguration.host_config)
|
80
|
+
end
|
81
|
+
|
63
82
|
SshHelper.exec(host, host_path, argv)
|
64
83
|
sync_down
|
84
|
+
ensure
|
85
|
+
File.delete(pid_filename) if @owns_sync
|
65
86
|
end
|
66
|
-
map 'e' => :exec
|
67
87
|
|
68
88
|
desc "init", "inits"
|
69
89
|
def init
|
data/lib/remote_sh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_sh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Egorov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: filewatcher
|