vagrant-invade 0.3.3 → 0.3.4
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 +0 -1
- data/Gemfile.lock +6 -6
- data/README.md +22 -2
- data/images/invade-logo-128.png +0 -0
- data/images/invade-logo-256.png +0 -0
- data/images/invade-logo-512.png +0 -0
- data/invade.yml.dist +1 -3
- data/lib/vagrant-invade/action/create.rb +11 -9
- data/lib/vagrant-invade/action/validate.rb +0 -7
- data/lib/vagrant-invade/command/validate.rb +1 -1
- data/lib/vagrant-invade/plugin.rb +11 -9
- data/lib/vagrant-invade/version.rb +1 -1
- data/vagrant-invade.gemspec +6 -1
- metadata +45 -11
- data/images/logo-128.png +0 -0
- data/images/logo-256.png +0 -0
- data/images/logo-512.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f8250dda79bfa6bd1ea542d2c6c305147e0e398
|
|
4
|
+
data.tar.gz: c411d68908ce389a033b3cc8e1ce73ac48729616
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: deca05716d35430d20ea7b919ab39aa2411a8ae768d06187770b92acc709b41cba464a513ae4f433254f1446b6b984d16b5715d05655ae252f1e6a183a92ff68
|
|
7
|
+
data.tar.gz: 3c1898be7bb613f0be500b2edbf6b1ff8484f3b3a1a25a9fa1e213e6c1a9b0777b834d7af3ee9b5ffe0783a85e99f408aed8bbccb45a7df20bb1f13bb52ebc3b
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
GIT
|
|
2
2
|
remote: https://github.com/mitchellh/vagrant.git
|
|
3
|
-
revision:
|
|
3
|
+
revision: e6bb09831bb47803c8b8e0ca50d0218717b4cd2d
|
|
4
4
|
specs:
|
|
5
|
-
vagrant (1.
|
|
6
|
-
bundler (>= 1.5.2, <= 1.10.
|
|
5
|
+
vagrant (1.8.0.dev)
|
|
6
|
+
bundler (>= 1.5.2, <= 1.10.6)
|
|
7
7
|
childprocess (~> 0.5.0)
|
|
8
8
|
erubis (~> 2.7.0)
|
|
9
9
|
hashicorp-checkpoint (~> 0.1.1)
|
|
@@ -23,7 +23,7 @@ GIT
|
|
|
23
23
|
PATH
|
|
24
24
|
remote: .
|
|
25
25
|
specs:
|
|
26
|
-
vagrant-invade (0.3.
|
|
26
|
+
vagrant-invade (0.3.3)
|
|
27
27
|
|
|
28
28
|
GEM
|
|
29
29
|
remote: https://rubygems.org/
|
|
@@ -31,7 +31,7 @@ GEM
|
|
|
31
31
|
builder (3.2.2)
|
|
32
32
|
childprocess (0.5.6)
|
|
33
33
|
ffi (~> 1.0, >= 1.0.11)
|
|
34
|
-
domain_name (0.5.
|
|
34
|
+
domain_name (0.5.25)
|
|
35
35
|
unf (>= 0.0.5, < 1.0.0)
|
|
36
36
|
erubis (2.7.0)
|
|
37
37
|
ffi (1.9.10)
|
|
@@ -103,4 +103,4 @@ DEPENDENCIES
|
|
|
103
103
|
vagrant-invade!
|
|
104
104
|
|
|
105
105
|
BUNDLED WITH
|
|
106
|
-
1.10.
|
|
106
|
+
1.10.5
|
data/README.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
# vagrant-invade
|
|
2
|
-

|
|
3
2
|
|
|
4
|
-
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://codeclimate.com/github/frgmt/vagrant-invade)
|
|
6
|
+
|
|
7
|
+
**vagrant-invade** is a plugin for Vagrant, the tool for creating and maintain virtual machines.
|
|
8
|
+
It uses a simple **YAML** configuration file to automatically build a **Vagrantfile** for your projects.
|
|
9
|
+
|
|
10
|
+
## How to install
|
|
11
|
+
Simply run `vagrant plugin install vagrant-invade`
|
|
12
|
+
To install a certain version use the `-v 'VERSION'` option.
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
There are new commands you can use to init, validate and build your Vagrantfile.
|
|
16
|
+
|
|
17
|
+
### Init
|
|
18
|
+
`vagrant invade init` creates the default **invade.yml** configuration file for you.
|
|
19
|
+
|
|
20
|
+
### Validate
|
|
21
|
+
`vagrant invade validate` will validate the **invade.yml** file and gives you a **detailed output of missing values, wrong parameters and defaults** for each option.
|
|
22
|
+
|
|
23
|
+
### Build
|
|
24
|
+
`vagrant invade build` will **build a Vagrantfile** based on what you set in the 'invade.yml' configuration file and place it to the directory you did run the command.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/invade.yml.dist
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
invade:
|
|
2
|
-
# auto: true
|
|
3
|
-
# replace: true
|
|
4
2
|
# debug: true
|
|
5
3
|
|
|
6
4
|
# Machine settings. Each entry is one box
|
|
@@ -11,7 +9,7 @@ machines:
|
|
|
11
9
|
|
|
12
10
|
# VM related settings
|
|
13
11
|
vm:
|
|
14
|
-
box:
|
|
12
|
+
box: boxcutter/debian82
|
|
15
13
|
hostname: 'invade.vm'
|
|
16
14
|
|
|
17
15
|
# Network settings
|
|
@@ -14,22 +14,23 @@ module VagrantPlugins
|
|
|
14
14
|
|
|
15
15
|
def call(env)
|
|
16
16
|
|
|
17
|
-
# Get project root
|
|
17
|
+
# Get project root where vagrant is running from
|
|
18
|
+
# Since it is possible to set it through the environment we need to validate it
|
|
18
19
|
root_path = Dir.pwd
|
|
19
20
|
ENV['VAGRANT_VAGRANTFILE'] ? vagrantfile_name = ENV['VAGRANT_VAGRANTFILE'] : vagrantfile_name = "Vagrantfile"
|
|
20
21
|
|
|
21
22
|
# Get generated Vagrantfile from environment
|
|
22
23
|
if @env[:invade]['vagrantfile']
|
|
23
|
-
|
|
24
|
+
generated_vagrantfile_data = @env[:invade]['vagrantfile']
|
|
24
25
|
else
|
|
25
26
|
raise "[Invade]: No generated data found. Can't build Vagrantfile."
|
|
26
27
|
end
|
|
27
28
|
|
|
28
|
-
# Write new Vagrantfile if checksum is not equal
|
|
29
|
-
unless check_md5_checksum(@env[:ui], root_path, vagrantfile_name,
|
|
29
|
+
# Write new Vagrantfile if checksum is not equal
|
|
30
|
+
unless check_md5_checksum(@env[:ui], root_path, vagrantfile_name, generated_vagrantfile_data)
|
|
30
31
|
@env[:invade_build_force] ?
|
|
31
|
-
write_vagrantfile(@env[:ui], root_path,
|
|
32
|
-
write_vagrantfile(@env[:ui], root_path,
|
|
32
|
+
write_vagrantfile(@env[:ui], root_path, generated_vagrantfile_data, vagrantfile_name, true) :
|
|
33
|
+
write_vagrantfile(@env[:ui], root_path, generated_vagrantfile_data, vagrantfile_name, false)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
@app.call(env)
|
|
@@ -38,11 +39,11 @@ module VagrantPlugins
|
|
|
38
39
|
private
|
|
39
40
|
|
|
40
41
|
# Compare md5 strings to replace Vagrantfile
|
|
41
|
-
def check_md5_checksum(ui, root_path, vagrantfile_name,
|
|
42
|
+
def check_md5_checksum(ui, root_path, vagrantfile_name, generated_vagrantfile_data)
|
|
42
43
|
|
|
43
44
|
require 'digest'
|
|
44
45
|
|
|
45
|
-
md5_new = Digest::MD5.hexdigest(
|
|
46
|
+
md5_new = Digest::MD5.hexdigest(generated_vagrantfile_data)
|
|
46
47
|
|
|
47
48
|
if File.exists?("#{root_path}/#{vagrantfile_name}")
|
|
48
49
|
md5_current = Digest::MD5.file("#{root_path}/#{vagrantfile_name}").hexdigest
|
|
@@ -56,10 +57,11 @@ module VagrantPlugins
|
|
|
56
57
|
ui.warn "[Invade] Checksum not equal!"
|
|
57
58
|
ui.warn "[Invade] Current : '#{md5_current}'"
|
|
58
59
|
ui.warn "[Invade] Generated : '#{md5_new}'"
|
|
60
|
+
|
|
59
61
|
return false
|
|
60
62
|
end
|
|
61
63
|
|
|
62
|
-
ui.success "[Invade] Vagrantfile is still valid.
|
|
64
|
+
ui.success "[Invade] Vagrantfile is still valid. Use '--f' to force replacing it."
|
|
63
65
|
|
|
64
66
|
true
|
|
65
67
|
end
|
|
@@ -33,7 +33,6 @@ module VagrantPlugins
|
|
|
33
33
|
# VM
|
|
34
34
|
unless sections['vm'] == nil
|
|
35
35
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating VM configuration...") unless quiet
|
|
36
|
-
sleep 1 unless quiet
|
|
37
36
|
|
|
38
37
|
sections['vm'] = Validator::VM.new(env, sections['vm']).validate
|
|
39
38
|
end
|
|
@@ -41,7 +40,6 @@ module VagrantPlugins
|
|
|
41
40
|
# NETWORK
|
|
42
41
|
unless sections['network'] == nil
|
|
43
42
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating network configuration...") unless quiet
|
|
44
|
-
sleep 1 unless quiet
|
|
45
43
|
|
|
46
44
|
sections['network'].each do |type, network|
|
|
47
45
|
@env[:ui].info("\tNetwork: #{type}") unless quiet
|
|
@@ -61,7 +59,6 @@ module VagrantPlugins
|
|
|
61
59
|
# PROVIDER
|
|
62
60
|
unless sections['provider'] == nil
|
|
63
61
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating provider configuration...") unless quiet
|
|
64
|
-
sleep 1 unless quiet
|
|
65
62
|
|
|
66
63
|
sections['provider'].each do |type, provider|
|
|
67
64
|
@env[:ui].info("\tProvider: #{type}") unless quiet
|
|
@@ -79,7 +76,6 @@ module VagrantPlugins
|
|
|
79
76
|
# SYNCED FOLDER
|
|
80
77
|
unless sections['synced_folder'] == nil
|
|
81
78
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating synced folder configuration...") unless quiet
|
|
82
|
-
sleep 1 unless quiet
|
|
83
79
|
|
|
84
80
|
sections['synced_folder'].each do |type, sf|
|
|
85
81
|
@env[:ui].info("\tSynced Folder: #{type}") unless quiet
|
|
@@ -97,7 +93,6 @@ module VagrantPlugins
|
|
|
97
93
|
# PROVISION
|
|
98
94
|
unless sections['provision'] == nil
|
|
99
95
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating provision configuration...") unless quiet
|
|
100
|
-
sleep 1 unless quiet
|
|
101
96
|
|
|
102
97
|
sections['provision'].each do |type, provision|
|
|
103
98
|
@env[:ui].info("\tProvision: #{type}") unless quiet
|
|
@@ -115,14 +110,12 @@ module VagrantPlugins
|
|
|
115
110
|
# SSH
|
|
116
111
|
unless sections['ssh'] == nil
|
|
117
112
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating SSH configuration...") unless quiet
|
|
118
|
-
sleep 1 unless quiet
|
|
119
113
|
|
|
120
114
|
sections['ssh'] = Validator::SSH.new(env, sections['ssh']).validate
|
|
121
115
|
end
|
|
122
116
|
|
|
123
117
|
unless sections['plugin'] == nil
|
|
124
118
|
@env[:ui].info("\n[Invade] #{machine.upcase}: Validating plugin configuration...") unless quiet
|
|
125
|
-
sleep 1 unless quiet
|
|
126
119
|
|
|
127
120
|
sections['plugin'].each do |type, plugin|
|
|
128
121
|
@env[:ui].info("\tPlugin: #{type}") unless quiet
|
|
@@ -10,7 +10,7 @@ module VagrantPlugins
|
|
|
10
10
|
opts = OptionParser.new do |o|
|
|
11
11
|
o.banner = "Usage: vagrant invade validate [-f|--force] [-q|--quiet] [-h]"
|
|
12
12
|
o.separator ""
|
|
13
|
-
o.on("-f", "--force", "
|
|
13
|
+
o.on("-f", "--force", "Force replacing current Vagrantfile") do |f|
|
|
14
14
|
options[:force] = f
|
|
15
15
|
end
|
|
16
16
|
o.on("-q", "--quiet", "Just make it whisper.") do |q|
|
|
@@ -11,16 +11,18 @@ module VagrantPlugins
|
|
|
11
11
|
Command::Root
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
action_hook(:invade, :machine_action_up) do |hook|
|
|
16
|
-
require 'vagrant-invade/action'
|
|
14
|
+
# Disable hook for now. Use commands instead of auto mode
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
# Hook - Do all the invade magic before Vagrant itself comes alive
|
|
17
|
+
# action_hook(:invade, :machine_action_up) do |hook|
|
|
18
|
+
# require 'vagrant-invade/action'
|
|
19
|
+
#
|
|
20
|
+
# # 1. Checks config file
|
|
21
|
+
# # 2. Validates config file
|
|
22
|
+
# # 3. Generates Vagrantfile from invade config
|
|
23
|
+
# # 4. Creates generated Vagrantfile
|
|
24
|
+
# hook.prepend(Action.build)
|
|
25
|
+
# end
|
|
24
26
|
end
|
|
25
27
|
|
|
26
28
|
autoload :Action, File.expand_path("../action/", __FILE__)
|
data/vagrant-invade.gemspec
CHANGED
|
@@ -4,6 +4,7 @@ require File.expand_path('../lib/vagrant-invade/version', __FILE__)
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'vagrant-invade'
|
|
6
6
|
s.version = VagrantPlugins::Invade::VERSION
|
|
7
|
+
s.platform = Gem::Platform::RUBY
|
|
7
8
|
s.date = Date.today.to_s
|
|
8
9
|
s.summary = "Create a Vagrantfile with a single YAML configuration file"
|
|
9
10
|
s.description = "InVaDE is a plugin that uses a YAML configuration file to build a Vagrantfile from it."
|
|
@@ -13,6 +14,10 @@ Gem::Specification.new do |s|
|
|
|
13
14
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
14
15
|
s.require_paths = ['lib']
|
|
15
16
|
s.homepage = 'https://github.com/frgmt/vagrant-invade'
|
|
16
|
-
s.license = '
|
|
17
|
+
s.license = 'GNUv3'
|
|
18
|
+
|
|
17
19
|
s.required_ruby_version = '>= 2.0.0'
|
|
20
|
+
|
|
21
|
+
s.add_development_dependency 'bundler', '~> 1.10', '>= 1.10.5'
|
|
22
|
+
s.add_development_dependency 'rake', '~> 0'
|
|
18
23
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,49 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-invade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
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-
|
|
12
|
-
dependencies:
|
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.10'
|
|
20
|
+
- - '>='
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 1.10.5
|
|
23
|
+
type: :development
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ~>
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '1.10'
|
|
30
|
+
- - '>='
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 1.10.5
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: rake
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ~>
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ~>
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
13
47
|
description: InVaDE is a plugin that uses a YAML configuration file to build a Vagrantfile
|
|
14
48
|
from it.
|
|
15
49
|
email: frgmt@posteo.de
|
|
@@ -17,16 +51,16 @@ executables: []
|
|
|
17
51
|
extensions: []
|
|
18
52
|
extra_rdoc_files: []
|
|
19
53
|
files:
|
|
20
|
-
-
|
|
21
|
-
-
|
|
54
|
+
- .gitattributes
|
|
55
|
+
- .gitignore
|
|
22
56
|
- Gemfile
|
|
23
57
|
- Gemfile.lock
|
|
24
58
|
- LICENSE
|
|
25
59
|
- README.md
|
|
26
60
|
- Rakefile
|
|
27
|
-
- images/logo-128.png
|
|
28
|
-
- images/logo-256.png
|
|
29
|
-
- images/logo-512.png
|
|
61
|
+
- images/invade-logo-128.png
|
|
62
|
+
- images/invade-logo-256.png
|
|
63
|
+
- images/invade-logo-512.png
|
|
30
64
|
- invade.yml.dist
|
|
31
65
|
- lib/vagrant-invade.rb
|
|
32
66
|
- lib/vagrant-invade/action.rb
|
|
@@ -107,7 +141,7 @@ files:
|
|
|
107
141
|
- vagrant-invade.gemspec
|
|
108
142
|
homepage: https://github.com/frgmt/vagrant-invade
|
|
109
143
|
licenses:
|
|
110
|
-
-
|
|
144
|
+
- GNUv3
|
|
111
145
|
metadata: {}
|
|
112
146
|
post_install_message:
|
|
113
147
|
rdoc_options: []
|
|
@@ -115,12 +149,12 @@ require_paths:
|
|
|
115
149
|
- lib
|
|
116
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
151
|
requirements:
|
|
118
|
-
- -
|
|
152
|
+
- - '>='
|
|
119
153
|
- !ruby/object:Gem::Version
|
|
120
154
|
version: 2.0.0
|
|
121
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
156
|
requirements:
|
|
123
|
-
- -
|
|
157
|
+
- - '>='
|
|
124
158
|
- !ruby/object:Gem::Version
|
|
125
159
|
version: '0'
|
|
126
160
|
requirements: []
|
data/images/logo-128.png
DELETED
|
Binary file
|
data/images/logo-256.png
DELETED
|
Binary file
|
data/images/logo-512.png
DELETED
|
Binary file
|