vagrant-dotvm 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7b62f83672b10c1f5c244ca3fbc4ad6e46495d0
4
- data.tar.gz: 80d84606b9c7346020b3b6d4634dd466ee16728a
3
+ metadata.gz: dc456bf715d4b8612e9c6c7d0084199165971172
4
+ data.tar.gz: 5f173b97006ad6c2abf724521427eb7a91e7617f
5
5
  SHA512:
6
- metadata.gz: 59669ce6f5ca80e04a5d3a1615c447b3a526c80cab355dc0816de41e80b7cffbcf708c46ac7199dfcaa59133f2f742ebe0dc445299837a6a2c55153e3fa36e4c
7
- data.tar.gz: 0839355b47428666ceb101c54b46e71f1cbf07ec87af417fed2cd5d05c6914e2c64a288f2442407ce5196d016dcb384943480fa16cf514b924c4bdc06eaf0657
6
+ metadata.gz: d6ab000283ad59a213f7267dd95fbd418993579c5917836d7a9c2b5fed0b20f9fb95b9d1eeecfe372dbdf6f2d4bd03381cc0a0d0cf0ed234e0068046046dbd74
7
+ data.tar.gz: 3c57965cbf5667b3ef6fa604c04c1db0c9db4d78b1a0454367f473d5528fff77d4cacaf0b25434380bd774c9a7ea61a38673b44515572ed328ad339641ea26ae
data/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
1
+ # 0.13.0
2
+ * Ability to configure some vm related options
3
+ * Ability to use shorter forms of network
4
+ * Ability to configure public network
5
+ * Ability to set some options on shared folders
6
+ * Fix bug in port forwarding
7
+
8
+ # 0.12.0
9
+ * Ability to forward port
10
+
11
+ # 0.11.0
12
+ * Ability to authorize ssh public key from file or hardcoded string
13
+
14
+ # 0.10.0
15
+ * Make `/vagrant` available in guest
16
+
17
+ # 0.9.0
18
+ * Ability to select network interface in private network
19
+
20
+ # 0.8.0
21
+ * Now forwarding of X11 via SSH is enabled
22
+ * Ability to configure nat network
23
+ * Ability to use variables in many configuration options
24
+ * Ability to pass args to provision script
25
+ * Now project directory is available in guest
26
+
27
+ # 0.7.0
28
+ * Better handling of network configuration
29
+
30
+ # 0.6.0
31
+ * Ability to configure primary machine
32
+
33
+ # 0.5.0
34
+ * Ability to configure groups for `vagrant-group` users
35
+
36
+ # 0.4.0
37
+ * Ability to use environment variables in configuration
38
+
39
+ # 0.3.0
40
+ * Ability to use predefined variables
41
+ * Ability to configure shared folders
42
+
43
+ # 0.2.0
44
+ * Now configs are spread across projects directories
45
+
46
+ # 0.1.0
47
+ * Initial version
@@ -10,6 +10,11 @@ module VagrantPlugins
10
10
  vc.vm.define machine_cfg[:nick], primary: machine_cfg[:primary] do |machine|
11
11
  machine.vm.box = machine_cfg[:box]
12
12
  machine.vm.hostname = machine_cfg[:name]
13
+ machine.vm.boot_timeout = machine_cfg[:boot_timeout]
14
+ machine.vm.box_check_update = machine_cfg[:box_check_update]
15
+ machine.vm.box_version = machine_cfg[:box_version]
16
+ machine.vm.graceful_halt_timeout = machine_cfg[:graceful_halt_timeout]
17
+ machine.vm.post_up_message = machine_cfg[:post_up_message]
13
18
 
14
19
  machine.vm.provider "virtualbox" do |vb|
15
20
  vb.customize ['modifyvm', :id, '--memory', machine_cfg['memory'] ||= 1024]
@@ -20,17 +25,23 @@ module VagrantPlugins
20
25
  end
21
26
 
22
27
  machine_cfg[:networks].each do |net|
23
- if net[:net] == 'private_network'
28
+ if net[:net] == :private_network
24
29
  machine.vm.network net[:net],
25
- type: net[:type] ||= 'static',
30
+ type: net[:type],
26
31
  ip: net[:ip],
27
32
  netmask: net[:mask],
28
33
  virtualbox__intnet: net[:interface]
29
- elsif net[:net] = 'forwarded_port'
34
+ elsif net[:net] == :public_network
35
+ machine.vm.network net[:net],
36
+ type: net[:type],
37
+ ip: net[:ip],
38
+ netmask: net[:mask],
39
+ bridge: net[:bridge]
40
+ elsif net[:net] == :forwarded_port
30
41
  machine.vm.network net[:net],
31
42
  guest: net[:guest],
32
43
  host: net[:host],
33
- protocol: net[:protocol]
44
+ protocol: net[:protocol]
34
45
  end
35
46
  end
36
47
 
@@ -52,7 +63,11 @@ module VagrantPlugins
52
63
  end
53
64
 
54
65
  machine_cfg[:folders].each do |folder|
55
- machine.vm.synced_folder folder[:host], folder[:guest], disabled: folder[:disabled]
66
+ machine.vm.synced_folder folder[:host],
67
+ folder[:guest],
68
+ disabled: folder[:disabled],
69
+ create: folder[:create],
70
+ type: folder[:type]
56
71
  end
57
72
 
58
73
  machine_cfg[:authorized_keys].each do |key|
@@ -3,8 +3,13 @@ module VagrantPlugins
3
3
  class ConfigParser
4
4
 
5
5
  DEFAULT_NET = 'private_network'
6
+ DEFAULT_NET_TYPE = 'static'
6
7
  DEFAULT_NETMASK = '255.255.255.0'
7
8
  DEFAULT_PROTOCOL = 'tcp'
9
+ DEFAULT_BOOT_TIMEOUT = 300
10
+ DEFAULT_BOX_CHECK_UPDATE = true
11
+ DEFAULT_BOX_VERSION = '>= 0'
12
+ DEFAULT_GRACEFUL_HALT_TIMEOUT = 60
8
13
 
9
14
  def initialize(vars = {})
10
15
  @vars = vars
@@ -55,24 +60,43 @@ module VagrantPlugins
55
60
  :host => '%project.host%',
56
61
  :guest => '%project.guest%',
57
62
  :disabled => false,
63
+ :create => false,
64
+ :type => nil,
58
65
  }
59
66
  ],
60
67
  :groups => [],
61
68
  :authorized_keys => [],
69
+ :boot_timeout => self.coalesce(machine['boot_timeout'], DEFAULT_BOOT_TIMEOUT),
70
+ :box_check_update => self.coalesce(machine['box_check_update'], DEFAULT_BOX_CHECK_UPDATE),
71
+ :box_version => self.coalesce(machine['box_version'], DEFAULT_BOX_VERSION),
72
+ :graceful_halt_timeout => self.coalesce(machine['graceful_halt_timeout'], DEFAULT_GRACEFUL_HALT_TIMEOUT),
73
+ :post_up_message => machine['post_up_message'],
62
74
  }
63
75
  end
64
76
 
65
77
 
66
78
  def parse_net(net)
79
+ case net['net']
80
+ when 'private_network', 'private'
81
+ nettype = :private_network
82
+ when 'forwarded_port', 'port'
83
+ nettype = :forwarded_port
84
+ when 'public_network', 'public', 'bridged'
85
+ nettype = :public_network
86
+ else
87
+ nettype = DEFAULT_NET
88
+ end
89
+
67
90
  return {
68
- :net => self.coalesce(net['net'], DEFAULT_NET),
69
- :type => net['type'],
91
+ :net => nettype,
92
+ :type => self.coalesce(net['type'], DEFAULT_NET_TYPE),
70
93
  :ip => net['ip'],
71
94
  :mask => self.coalesce(net['mask'], net['netmask'], DEFAULT_NETMASK),
72
95
  :interface => net['interface'],
73
96
  :guest => net['guest'],
74
97
  :host => net['host'],
75
98
  :protocol => self.coalesce(net['protocol'], DEFAULT_PROTOCOL),
99
+ :bridge => net['bridge'],
76
100
  }
77
101
  end
78
102
 
@@ -96,6 +120,8 @@ module VagrantPlugins
96
120
  :host => folder['host'],
97
121
  :guest => folder['guest'],
98
122
  :disabled => self.coalesce(folder['disabled'], false),
123
+ :create => self.coalesce(folder['create'], false),
124
+ :type => folder['type'],
99
125
  }
100
126
  end
101
127
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Dotvm
3
- VERSION = "0.12.0"
3
+ VERSION = "0.13.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-dotvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Magosa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - .gitignore
49
+ - CHANGELOG.md
49
50
  - Gemfile
50
51
  - LICENSE.txt
51
52
  - README.md