wocker 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wocker.rb +1 -0
- data/lib/wocker/cli.rb +1 -0
- data/lib/wocker/cli/keyboard/key_command.rb +27 -0
- data/lib/wocker/cli/keyboard/write_command.rb +17 -0
- data/lib/wocker/cli/keyboard_command.rb +17 -0
- data/lib/wocker/cli/root_command.rb +1 -0
- data/lib/wocker/version.rb +1 -1
- data/lib/wocker/virtualbox.rb +11 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edebd22ba00be6730c4138c5891ddae248e570a5ea86cd4390300500f2e4406a
|
4
|
+
data.tar.gz: 63d38e68a52df9550d61ee07bf5f4da159be8be268f138aed1b80d3e32cd5c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d57f8cd7a34383ebab3c8794fbf2b249f999ddfa21d0b6940f4c7be05d6fde9eaf4e4d5e4fcb5bdcdb2035784f9ba55bd0d0ff8dfb49b1f8e8a41027af75933
|
7
|
+
data.tar.gz: d4fe66cc5a4d6f40d67993c2d250bd0683c142e985b8de686af9e981636ed4ccc3611428bad57df9ccd765917a2ea6164cb3520494496deabe5ec83a1bc5875b
|
data/Gemfile.lock
CHANGED
data/lib/wocker.rb
CHANGED
data/lib/wocker/cli.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Wocker
|
4
|
+
module Cli
|
5
|
+
class KeyboardCommand < Clamp::Command
|
6
|
+
class KeyCommand < Clamp::Command
|
7
|
+
parameter "KEY ...", "control alt del"
|
8
|
+
|
9
|
+
def execute
|
10
|
+
first_vm_name = Wocker::Virtualbox.first_running_vm_name
|
11
|
+
|
12
|
+
scancodes = case key_list
|
13
|
+
when ["control","alt","del"]
|
14
|
+
"1d 38 53 d3 b8 9d"
|
15
|
+
when ["enter"]
|
16
|
+
"1c"
|
17
|
+
else
|
18
|
+
puts "unknown: #{key_list.inspect}"
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
|
22
|
+
`VBoxManage controlvm #{first_vm_name} keyboardputscancode #{scancodes}`
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Wocker
|
4
|
+
module Cli
|
5
|
+
class KeyboardCommand < Clamp::Command
|
6
|
+
class WriteCommand < Clamp::Command
|
7
|
+
parameter "STRING", "string"
|
8
|
+
|
9
|
+
def execute
|
10
|
+
first_vm_name = Wocker::Virtualbox.first_running_vm_name
|
11
|
+
|
12
|
+
`VBoxManage controlvm #{first_vm_name} keyboardputstring #{string}`
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "keyboard/key_command"
|
3
|
+
require_relative "keyboard/write_command"
|
4
|
+
|
5
|
+
module Wocker
|
6
|
+
module Cli
|
7
|
+
class KeyboardCommand < Clamp::Command
|
8
|
+
subcommand ["key"], "press keys", KeyboardCommand::KeyCommand
|
9
|
+
subcommand ["write"], "write string", KeyboardCommand::WriteCommand
|
10
|
+
|
11
|
+
def execute
|
12
|
+
puts "see --help"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
data/lib/wocker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
@@ -92,6 +92,9 @@ files:
|
|
92
92
|
- lib/wocker/cli/build_command.rb
|
93
93
|
- lib/wocker/cli/exec_command.rb
|
94
94
|
- lib/wocker/cli/init_command.rb
|
95
|
+
- lib/wocker/cli/keyboard/key_command.rb
|
96
|
+
- lib/wocker/cli/keyboard/write_command.rb
|
97
|
+
- lib/wocker/cli/keyboard_command.rb
|
95
98
|
- lib/wocker/cli/port_command.rb
|
96
99
|
- lib/wocker/cli/ps_command.rb
|
97
100
|
- lib/wocker/cli/restart_command.rb
|
@@ -104,6 +107,7 @@ files:
|
|
104
107
|
- lib/wocker/vagrantfile.rb
|
105
108
|
- lib/wocker/vagrantfile_template.rb
|
106
109
|
- lib/wocker/version.rb
|
110
|
+
- lib/wocker/virtualbox.rb
|
107
111
|
- lib/wocker/wockerfile.rb
|
108
112
|
- scripts/wocker-install-chocolatey.ps1
|
109
113
|
- templates/Vagrantfile
|