bcome 1.0.0 → 1.1.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fdfc9127a15ab379f61de93de3da8008b55e94b
|
4
|
+
data.tar.gz: 0936141e214a46bcb8c9159755cc18c3bc8f782c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3f7ff8f4c41b6a4bb1d0efece0bfbc757fa82822d2e824ec19d18f985def7ccb98efcaf375d09fd0a6c9f96cb9401560e7478499cc45085f568457c84396e2a
|
7
|
+
data.tar.gz: 3898dce95f069d0988779dfdaca6d1f526391aa0bcb9ac7367cfc85cb5db410878c6ba8dd7ed8193243888be7a58d398507073f28503e30fbd824e2e82f88930
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Bcome::Exception
|
2
2
|
class MissingArgumentForRegistryCommand < ::Bcome::Exception::Base
|
3
3
|
def message_prefix
|
4
|
-
'Cannot find argument for registry command in either your defaults or your
|
4
|
+
'Cannot find argument for registry command in either your defaults or your supplied arguments'
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
@@ -71,7 +71,7 @@ module Bcome::Node::Server
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def enabled_menu_items
|
74
|
-
(super + [:get, :ssh, :tags]) - [:enable, :disable, :enable!, :disable!]
|
74
|
+
(super + [:get, :ssh, :tags, :pseudo_tty]) - [:enable, :disable, :enable!, :disable!]
|
75
75
|
end
|
76
76
|
|
77
77
|
def menu_items
|
@@ -88,7 +88,12 @@ module Bcome::Node::Server
|
|
88
88
|
usage: "get \"/remote/path\", \"/local/path\"",
|
89
89
|
terminal_usage: "get \"/remote/path\" \"/local/path\""
|
90
90
|
}
|
91
|
-
|
91
|
+
base_items[:pseudo_tty] = {
|
92
|
+
description: "Invoke a pseudo-tty session",
|
93
|
+
console_only: false,
|
94
|
+
usage: "pseudo_tty \"your command\"",
|
95
|
+
terminal_usage: "pseudo_tty \"your command\""
|
96
|
+
}
|
92
97
|
|
93
98
|
base_items
|
94
99
|
end
|
@@ -113,6 +118,12 @@ module Bcome::Node::Server
|
|
113
118
|
ssh_driver.do_ssh
|
114
119
|
end
|
115
120
|
|
121
|
+
def pseudo_tty(command)
|
122
|
+
ssh_cmd = ssh_driver.ssh_command.gsub("ssh", "ssh -t")
|
123
|
+
tty_command = "#{ssh_cmd} '#{command}'"
|
124
|
+
execute_local(tty_command)
|
125
|
+
end
|
126
|
+
|
116
127
|
def execute_script(script_name)
|
117
128
|
command_result = ::Bcome::Ssh::ScriptExec.execute(self, script_name)
|
118
129
|
return command_result
|
@@ -24,11 +24,12 @@ module Bcome::Registry::Command
|
|
24
24
|
|
25
25
|
local_command_substitutions.each do |substitution|
|
26
26
|
substitute_with = merged_arguments[substitution.to_sym]
|
27
|
-
|
27
|
+
if substitute_with.nil?
|
28
28
|
error_message_suffix = "- missing '#{substitution}' from command '#{local_command}'"
|
29
29
|
raise Bcome::Exception::MissingArgumentForRegistryCommand, error_message_suffix
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
|
+
substitute_with = [TrueClass, FalseClass].include?(substitute_with.class) ? (substitute_with ? "true" : "false") : substitute_with
|
32
33
|
substituted_command.gsub!("%#{substitution}%", substitute_with)
|
33
34
|
end
|
34
35
|
substituted_command
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Roderick (Webzakimbo)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -271,11 +271,7 @@ homepage: https://github.com/webzakimbo/bcome-kontrol
|
|
271
271
|
licenses:
|
272
272
|
- GPL-3.0
|
273
273
|
metadata: {}
|
274
|
-
post_install_message:
|
275
|
-
backwards compatible with previous versions.\n\n See https://github.com/webzakimbo/bcome-kontrol
|
276
|
-
for our new documentation.\n\n The older version will no longer be supported.
|
277
|
-
If you'd like to stick to the older gem version, then pin your bcome gem to version
|
278
|
-
0.7.0\n "
|
274
|
+
post_install_message:
|
279
275
|
rdoc_options: []
|
280
276
|
require_paths:
|
281
277
|
- lib
|
@@ -291,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
287
|
version: '0'
|
292
288
|
requirements: []
|
293
289
|
rubyforge_project:
|
294
|
-
rubygems_version: 2.6.
|
290
|
+
rubygems_version: 2.6.8
|
295
291
|
signing_key:
|
296
292
|
specification_version: 4
|
297
293
|
summary: Automation and real-time orchestration toolkit
|