vagrant-invade 0.4.2 → 0.4.3
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/Gemfile.lock +1 -1
- data/invade.yml.dist +16 -9
- data/lib/vagrant-invade/action/validate.rb +2 -1
- data/lib/vagrant-invade/validator/provision/puppet_apply.rb +1 -1
- data/lib/vagrant-invade/validator.rb +27 -12
- data/lib/vagrant-invade/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aba5690c67bf8be3a92972afeea071ba2db65abf
|
|
4
|
+
data.tar.gz: 3549648116557e3afe4230e82626e6191c8e81e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 917698d86d2986182f2eb9305cfe80c1a5f6094ae853f47af396eac1eb12a3ea4d15b68d86b38eb2173698646be2d1b5e43f1b06e4be2264cf75cfb023ac6acb
|
|
7
|
+
data.tar.gz: 5822ca5a1d8b47a739c48a966ab8b8a744caac4c84c5b9c5b3aaaf4084a9d66972e8f2a1d1ecdac10c4fb478a5a3f5995808d5af785a13881911e57c994d0419
|
data/Gemfile.lock
CHANGED
data/invade.yml.dist
CHANGED
|
@@ -34,7 +34,8 @@ machines:
|
|
|
34
34
|
# synced_folder:
|
|
35
35
|
# nfs:
|
|
36
36
|
# name: 'www'
|
|
37
|
-
#
|
|
37
|
+
# path: '/www'
|
|
38
|
+
# source: '..'
|
|
38
39
|
# mount_options:
|
|
39
40
|
# - nolock
|
|
40
41
|
|
|
@@ -48,12 +49,17 @@ machines:
|
|
|
48
49
|
# path: '/home/vagrant/provision/shell/run-composer.sh'
|
|
49
50
|
|
|
50
51
|
# puppet:
|
|
51
|
-
# manifests_path: '
|
|
52
|
+
# manifests_path: 'puppet/manifests'
|
|
52
53
|
# manifest_file: 'init.pp'
|
|
53
54
|
# module_path:
|
|
54
|
-
# - '
|
|
55
|
-
# - '
|
|
56
|
-
# facter:
|
|
55
|
+
# - 'puppet/modules'
|
|
56
|
+
# - 'puppet/vendor'
|
|
57
|
+
# facter:
|
|
58
|
+
# composer: true
|
|
59
|
+
# shared_folder_type: 'nfs'
|
|
60
|
+
# shared_folder_path: '/www'
|
|
61
|
+
# package_state: 'present'
|
|
62
|
+
# apt_update: true
|
|
57
63
|
|
|
58
64
|
plugin:
|
|
59
65
|
hostmanager:
|
|
@@ -63,15 +69,16 @@ machines:
|
|
|
63
69
|
|
|
64
70
|
# winnfsd:
|
|
65
71
|
# enabled: true
|
|
72
|
+
# loggin: false
|
|
66
73
|
|
|
67
74
|
# r10k:
|
|
68
75
|
# enabled: true
|
|
69
|
-
# puppet_dir: '
|
|
70
|
-
# puppetfile_path: '
|
|
71
|
-
# module_path: '
|
|
76
|
+
# puppet_dir: 'puppet'
|
|
77
|
+
# puppetfile_path: 'puppet/Puppetfile'
|
|
78
|
+
# module_path: 'puppet/vendor'
|
|
72
79
|
# modules:
|
|
73
80
|
# ssh:
|
|
74
81
|
# url: 'https://github.com/innogames/invade-puppet-ssh.git'
|
|
75
|
-
#
|
|
82
|
+
# mysql:
|
|
76
83
|
# url: 'https://github.com/example42/puppet-mysql.git',
|
|
77
84
|
# version: '2.1.5'
|
|
@@ -140,7 +140,8 @@ module VagrantPlugins
|
|
|
140
140
|
end
|
|
141
141
|
|
|
142
142
|
if Validator.get_validation_errors > 0
|
|
143
|
-
@env[:ui].warn('[Invade] Configuration has validation
|
|
143
|
+
@env[:ui].warn('[Invade] Configuration has validation errors. Run \'vagrant invade validate\' to see details.')
|
|
144
|
+
exit
|
|
144
145
|
else
|
|
145
146
|
@env[:ui].success('[Invade] Configuration validated successfully.')
|
|
146
147
|
end
|
|
@@ -29,7 +29,7 @@ module VagrantPlugins
|
|
|
29
29
|
return nil unless @puppet_apply
|
|
30
30
|
|
|
31
31
|
# MODULES PATH
|
|
32
|
-
@puppet_apply['module_path'] = Validator.
|
|
32
|
+
@puppet_apply['module_path'] = Validator.validate_string_or_array(
|
|
33
33
|
@puppet_apply['module_path'], 'module_path', DEFAULT['module_path']
|
|
34
34
|
)
|
|
35
35
|
|
|
@@ -23,9 +23,7 @@ module VagrantPlugins
|
|
|
23
23
|
# Validates to BOOLEAN and returns the value at success or a default if not
|
|
24
24
|
def self.validate_boolean(value, name, default)
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if [true, false].include? value
|
|
26
|
+
if [true, false].include?(value)
|
|
29
27
|
@env[:ui].success("\t#{name} => #{value}") unless @env[:invade_validate_quiet]
|
|
30
28
|
elsif value === nil
|
|
31
29
|
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
|
@@ -42,15 +40,14 @@ module VagrantPlugins
|
|
|
42
40
|
# Validates to STRING and returns the value at success or a default if not
|
|
43
41
|
def self.validate_string(value, name, default)
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if value.is_a? String
|
|
43
|
+
if value.is_a?(String)
|
|
48
44
|
@env[:ui].success("\t#{name} => '#{value}'") unless @env[:invade_validate_quiet]
|
|
49
45
|
elsif value === nil
|
|
50
46
|
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
|
51
47
|
return default
|
|
52
48
|
elsif value === ''
|
|
53
|
-
@env[:ui].warn("\
|
|
49
|
+
@env[:ui].warn("\tError: Empty string is not valid. Set '#{name}' => '#{default}'.") unless @env[:invade_validate_quiet]
|
|
50
|
+
@validation_errors = @validation_errors + 1
|
|
54
51
|
return default
|
|
55
52
|
else
|
|
56
53
|
@env[:ui].error("\tError: '#{value}' is not a string. Set to '#{name}' to default value '#{default}'.") unless @env[:invade_validate_quiet]
|
|
@@ -61,12 +58,30 @@ module VagrantPlugins
|
|
|
61
58
|
value
|
|
62
59
|
end
|
|
63
60
|
|
|
61
|
+
def self.validate_string_or_array(value, name, default)
|
|
62
|
+
|
|
63
|
+
if value.is_a?(String) || value.is_a?(Array)
|
|
64
|
+
@env[:ui].success("\t#{name} => '#{value}'") unless @env[:invade_validate_quiet]
|
|
65
|
+
elsif value === nil
|
|
66
|
+
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
|
67
|
+
return default
|
|
68
|
+
elsif value === ''
|
|
69
|
+
@env[:ui].warn("\tError: Empty string is not valid. Set '#{name}' => '#{default}'.") unless @env[:invade_validate_quiet]
|
|
70
|
+
@validation_errors = @validation_errors + 1
|
|
71
|
+
return default
|
|
72
|
+
else
|
|
73
|
+
@env[:ui].error("\tError: '#{value}' is not a string or array. Set to '#{name}' to default value '#{default}'.") unless @env[:invade_validate_quiet]
|
|
74
|
+
@validation_errors = @validation_errors + 1
|
|
75
|
+
return default
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
value
|
|
79
|
+
end
|
|
80
|
+
|
|
64
81
|
# Validates to INT and returns the value at success or a default if not
|
|
65
82
|
def self.validate_integer(value, name, default)
|
|
66
83
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if value.is_a? Integer or is_number(value)
|
|
84
|
+
if value.is_a?(Integer) || is_number(value)
|
|
70
85
|
@env[:ui].success("\t#{name} => #{value}") unless @env[:invade_validate_quiet]
|
|
71
86
|
elsif value === nil
|
|
72
87
|
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
|
@@ -83,7 +98,7 @@ module VagrantPlugins
|
|
|
83
98
|
# Validates to ARRAY and returns the value at success or a default if not
|
|
84
99
|
def self.validate_array(value, name, default)
|
|
85
100
|
|
|
86
|
-
if value.is_a?
|
|
101
|
+
if value.is_a?(Array)
|
|
87
102
|
@env[:ui].success("\t#{name} => #{value}") unless @env[:invade_validate_quiet]
|
|
88
103
|
elsif value === nil
|
|
89
104
|
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
|
@@ -100,7 +115,7 @@ module VagrantPlugins
|
|
|
100
115
|
# Validates to HASH and returns the value at success or a default if not
|
|
101
116
|
def self.validate_hash(value, name, default)
|
|
102
117
|
|
|
103
|
-
if value.is_a?
|
|
118
|
+
if value.is_a?(Hash)
|
|
104
119
|
@env[:ui].success("\t#{name} => #{value}") unless @env[:invade_validate_quiet]
|
|
105
120
|
elsif value === nil
|
|
106
121
|
@env[:ui].warn("\t#{name} not set. Use Vagrant default.") unless @env[:invade_validate_quiet]
|
metadata
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-invade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lennart Stein
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.10'
|
|
20
|
-
- -
|
|
20
|
+
- - '>='
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: 1.10.5
|
|
23
23
|
type: :development
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
|
-
- -
|
|
27
|
+
- - ~>
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
29
|
version: '1.10'
|
|
30
|
-
- -
|
|
30
|
+
- - '>='
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 1.10.5
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: rake
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- -
|
|
37
|
+
- - ~>
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0'
|
|
40
40
|
type: :development
|
|
41
41
|
prerelease: false
|
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
|
-
- -
|
|
44
|
+
- - ~>
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '0'
|
|
47
47
|
description: InVaDE is a plugin that uses a YAML configuration file to build a Vagrantfile
|
|
@@ -51,8 +51,8 @@ executables: []
|
|
|
51
51
|
extensions: []
|
|
52
52
|
extra_rdoc_files: []
|
|
53
53
|
files:
|
|
54
|
-
-
|
|
55
|
-
-
|
|
54
|
+
- .gitattributes
|
|
55
|
+
- .gitignore
|
|
56
56
|
- Gemfile
|
|
57
57
|
- Gemfile.lock
|
|
58
58
|
- LICENSE
|
|
@@ -160,17 +160,17 @@ require_paths:
|
|
|
160
160
|
- lib
|
|
161
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
|
163
|
-
- -
|
|
163
|
+
- - '>='
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
165
|
version: 2.0.0
|
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
requirements:
|
|
168
|
-
- -
|
|
168
|
+
- - '>='
|
|
169
169
|
- !ruby/object:Gem::Version
|
|
170
170
|
version: '0'
|
|
171
171
|
requirements: []
|
|
172
172
|
rubyforge_project:
|
|
173
|
-
rubygems_version: 2.4.
|
|
173
|
+
rubygems_version: 2.4.6
|
|
174
174
|
signing_key:
|
|
175
175
|
specification_version: 4
|
|
176
176
|
summary: Create a Vagrantfile with a single YAML configuration file
|