vagrant-rdp 0.5.1 → 0.6.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 +4 -4
- data/README.md +15 -13
- data/lib/vagrant-rdp.rb +1 -0
- data/lib/vagrant-rdp/command.rb +3 -3
- data/lib/vagrant-rdp/config.rb +26 -0
- data/lib/vagrant-rdp/plugin.rb +5 -1
- data/lib/vagrant-rdp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c2e28e22fe7ab625e3101bdd77a9e8e9335bd86
|
4
|
+
data.tar.gz: e7dbe476c4d103a7d8988e73fb16e411fde71cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5abaa4700ac72b93bf34c206795ad2d75b9feb29ad210726dbf59570167fe8867502b5e44b4d9e677151a18ecf9dc2f28aa3e24efe609de17cf1018d4bc4a469
|
7
|
+
data.tar.gz: ec8e385565270fccf521aa62d77bfcc77eb841e772e455adbac7f82d42345ea42a3631a9a9697d48d2399836154349ead5efa9fa0dc2ea919f8a99040f7cd088
|
data/README.md
CHANGED
@@ -1,24 +1,26 @@
|
|
1
|
-
#
|
1
|
+
# vagrant-rdp
|
2
2
|
|
3
|
-
|
3
|
+
With this plugin, you can connect to windows VM by remote desktop connection.
|
4
4
|
|
5
|
-
|
5
|
+
# Installation
|
6
6
|
|
7
|
-
|
7
|
+
```
|
8
|
+
$ vagrant plugin install vagrant-rdp
|
9
|
+
```
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
11
|
+
## Usage
|
14
12
|
|
15
|
-
|
13
|
+
Add the following to your Vagrantfile of Windows guest
|
16
14
|
|
17
|
-
|
15
|
+
```
|
16
|
+
config.vm.network :forwarded_port, guest: 3389, host: 33389, auto_correct: true
|
17
|
+
```
|
18
18
|
|
19
|
-
|
19
|
+
Now you can connect to windows guest by following command
|
20
20
|
|
21
|
-
|
21
|
+
```
|
22
|
+
$ vagrant rdp
|
23
|
+
```
|
22
24
|
|
23
25
|
## Contributing
|
24
26
|
|
data/lib/vagrant-rdp.rb
CHANGED
data/lib/vagrant-rdp/command.rb
CHANGED
@@ -32,7 +32,7 @@ module VagrantPlugins
|
|
32
32
|
rdp_file = rdp_file(vm, rdpport)
|
33
33
|
|
34
34
|
tf.puts <<EOS
|
35
|
-
open -
|
35
|
+
open -a "/Applications/Microsoft Remote Desktop.app/Contents/MacOS/Microsoft Remote Desktop" "#{rdp_file}"
|
36
36
|
sleep 5 #HACK
|
37
37
|
rm "#{rdp_file}"
|
38
38
|
EOS
|
@@ -55,8 +55,8 @@ EOS
|
|
55
55
|
File.open(path, "w") { |io|
|
56
56
|
io.puts <<EOF
|
57
57
|
screen mode id:i:0
|
58
|
-
desktopwidth:i
|
59
|
-
desktopheight:i
|
58
|
+
desktopwidth:i:#{vm.config.rdp.width}
|
59
|
+
desktopheight:i:#{vm.config.rdp.height}
|
60
60
|
use multimon:i:1
|
61
61
|
session bpp:i:32
|
62
62
|
full address:s:localhost:#{rdpport}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module RDP
|
5
|
+
class Config < Vagrant.plugin("2", :config)
|
6
|
+
attr_accessor :width
|
7
|
+
attr_accessor :height
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@width = UNSET_VALUE
|
11
|
+
@height = UNSET_VALUE
|
12
|
+
end
|
13
|
+
|
14
|
+
def validate(machine)
|
15
|
+
errors = []
|
16
|
+
|
17
|
+
{ "RDP" => errors }
|
18
|
+
end
|
19
|
+
|
20
|
+
def finalize!
|
21
|
+
@width = 1024 if @width == UNSET_VALUE
|
22
|
+
@height = 768 if @height == UNSET_VALUE
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/vagrant-rdp/plugin.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require "vagrant"
|
3
3
|
rescue LoadError
|
4
|
-
raise "The Vagrant
|
4
|
+
raise "The Vagrant RDP plugin must be run within Vagrant."
|
5
5
|
end
|
6
6
|
|
7
7
|
module VagrantPlugins
|
@@ -12,6 +12,10 @@ module VagrantPlugins
|
|
12
12
|
With this plugin, you can connect to windows VM by remote desktop connection.
|
13
13
|
DESC
|
14
14
|
|
15
|
+
config(:rdp) do
|
16
|
+
Config
|
17
|
+
end
|
18
|
+
|
15
19
|
command "rdp" do
|
16
20
|
Command
|
17
21
|
end
|
data/lib/vagrant-rdp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-rdp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toru Nayuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- lib/vagrant-rdp.rb
|
54
54
|
- lib/vagrant-rdp/command.rb
|
55
|
+
- lib/vagrant-rdp/config.rb
|
55
56
|
- lib/vagrant-rdp/plugin.rb
|
56
57
|
- lib/vagrant-rdp/version.rb
|
57
58
|
- vagrant-rdp.gemspec
|