vagrant-invade 0.6.0 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e06288dca14df145c0464799d0da097feab7916
4
- data.tar.gz: 5a151c1e3e863aabfeb0497df3874159dad6a13a
3
+ metadata.gz: b26a83ceef2c6f5da8509d206bf4abcfab0d7225
4
+ data.tar.gz: 5a5039deff0e7169bcce99372509c17478076864
5
5
  SHA512:
6
- metadata.gz: 7b1339ac0eda98c1df71fd55261db75e03deeab302e3afcb7d2dc24e435f8ab62b040e73a8554a329e39ed09970f0056b5763a099d14e71f0a467d4177ad4730
7
- data.tar.gz: 5a59b6bf983099845b2c3b5ea8af59d0ac1a56e3beefe1323c06a823504e145637fe5ce8e7aa90e733c7f67f2e53d1cdbd378334660ba44f4a8b92711e35c569
6
+ metadata.gz: ba8eb47717c0faeba35803cb63be44a4ce28bc916ffa74f7fa7660a534527a9c1547e3176164f1830d0918a2a133a1f1951e07b9396779c8d20243118045dbac
7
+ data.tar.gz: d5a7832668e5b7888b4aa7e25aa4cc9c8e6ed24b7549167d85ea4454be7ec427b5e204c26a5a2538c02068daa959bfadf68386263855f87f0d522e1e9f743405
data/.gitignore CHANGED
@@ -1,6 +1,9 @@
1
1
  invade.yml
2
2
  Vagrantfile
3
+ !Vagrantfile/
4
+ !vagrantfile.rb
3
5
  Vagrantfile-*
4
6
  Vagrantfile.new
7
+ !vagrantfile.rb
5
8
  .vagrant
6
9
  .idea
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: https://github.com/devopsgroup-io/vagrant-hostmanager
3
- revision: 4ae7655be4ca149482b43592acf0e759463a0bfc
3
+ revision: e97bc6fd169bed754755d8f3f68786610ef48281
4
4
  specs:
5
5
  vagrant-hostmanager (1.8.5)
6
6
 
@@ -37,7 +37,7 @@ GIT
37
37
  PATH
38
38
  remote: .
39
39
  specs:
40
- vagrant-invade (0.5.5)
40
+ vagrant-invade (0.6.0)
41
41
 
42
42
  GEM
43
43
  remote: https://rubygems.org/
@@ -48,7 +48,7 @@ GEM
48
48
  colored (1.2)
49
49
  cri (2.6.1)
50
50
  colored (~> 1.2)
51
- domain_name (0.5.20160615)
51
+ domain_name (0.5.20161021)
52
52
  unf (>= 0.0.5, < 1.0.0)
53
53
  erubis (2.7.0)
54
54
  faraday (0.9.2)
@@ -64,7 +64,7 @@ GEM
64
64
  gettext (3.2.2)
65
65
  locale (>= 2.0.5)
66
66
  text (>= 1.3.0)
67
- gettext-setup (0.6)
67
+ gettext-setup (0.7)
68
68
  fast_gettext (~> 1.1.0)
69
69
  gettext (>= 3.0.2)
70
70
  gssapi (1.2.0)
@@ -72,11 +72,11 @@ GEM
72
72
  gyoku (1.3.1)
73
73
  builder (>= 2.1.2)
74
74
  hashicorp-checkpoint (0.1.4)
75
- http-cookie (1.0.2)
75
+ http-cookie (1.0.3)
76
76
  domain_name (~> 0.5)
77
- httpclient (2.8.2.2)
77
+ httpclient (2.8.2.4)
78
78
  i18n (0.7.0)
79
- jruby-jars (1.7.25)
79
+ jruby-jars (1.7.26)
80
80
  jruby-parser (0.5.4)
81
81
  json_pure (1.8.3)
82
82
  listen (3.1.5)
@@ -114,10 +114,10 @@ GEM
114
114
  log4r (= 1.1.10)
115
115
  multi_json (~> 1.10)
116
116
  semantic_puppet (~> 0.1.0)
117
- rack (1.6.4)
117
+ rack (1.6.5)
118
118
  rack-protection (1.5.3)
119
119
  rack
120
- rb-fsevent (0.9.7)
120
+ rb-fsevent (0.9.8)
121
121
  rb-inotify (0.9.7)
122
122
  ffi (>= 0.5.0)
123
123
  rb-kqueue (0.2.4)
@@ -150,8 +150,8 @@ GEM
150
150
  rsense-core (~> 0.6.6)
151
151
  sinatra
152
152
  spoon (~> 0.0.4)
153
- ruby_dep (1.4.0)
154
- rubyntlm (0.6.0)
153
+ ruby_dep (1.5.0)
154
+ rubyntlm (0.6.1)
155
155
  rubyzip (1.2.0)
156
156
  semantic_puppet (0.1.4)
157
157
  gettext-setup (>= 0.3)
@@ -159,7 +159,7 @@ GEM
159
159
  rack (~> 1.5)
160
160
  rack-protection (~> 1.4)
161
161
  tilt (>= 1.3, < 3)
162
- spoon (0.0.4)
162
+ spoon (0.0.6)
163
163
  ffi
164
164
  text (1.3.1)
165
165
  thor (0.19.1)
@@ -22,14 +22,14 @@ module VagrantPlugins
22
22
  # Generates the templates with validated data
23
23
  case @type
24
24
  when Invade::Generator::Type::VAGRANTFILE
25
- generated_data = InvadeModule::Invade::Vagrantfile.new(data).build
25
+ generated_data = InvadeModule::Vagrant::Vagrantfile.new(data).build
26
26
 
27
27
  when Invade::Generator::Type::VAGRANT_PART
28
28
  generator_class_name = type.split('_').collect(&:capitalize).join
29
29
  generated_data = InvadeModule.const_get(generator_class_name).new(data).build
30
30
 
31
31
  when Invade::Generator::Type::MACHINE
32
- generated_data = InvadeModule::Invade::Machine.new(machine, data).build
32
+ generated_data = InvadeModule::Vagrant::Machine.new(machine, data).build
33
33
 
34
34
  when Invade::Generator::Type::MACHINE_NESTED_PART
35
35
  type_formatted = type.split('_').collect(&:capitalize).join
@@ -3,15 +3,15 @@ module VagrantPlugins
3
3
  module InvadeModule
4
4
 
5
5
  autoload :Hostmanager, 'vagrant-invade/module/hostmanager/hostmanager'
6
- autoload :Invade, 'vagrant-invade/module/invade/invade'
7
6
  autoload :Network, 'vagrant-invade/module/network/network'
7
+ autoload :Nfs, 'vagrant-invade/module/nfs/nfs'
8
8
  autoload :Plugin, 'vagrant-invade/module/plugin/plugin'
9
9
  autoload :Provider, 'vagrant-invade/module/provider/provider'
10
10
  autoload :Provision, 'vagrant-invade/module/provision/provision'
11
11
  autoload :Ssh, 'vagrant-invade/module/ssh/ssh'
12
12
  autoload :SyncedFolder, 'vagrant-invade/module/synced_folder/synced_folder'
13
+ autoload :Vagrant, 'vagrant-invade/module/vagrant/vagrant'
13
14
  autoload :Vm, 'vagrant-invade/module/vm/vm'
14
- autoload :Nfs, 'vagrant-invade/module/nfs/nfs'
15
15
 
16
16
  class InvadeModule
17
17
  require 'erubis'
@@ -5,42 +5,37 @@ module VagrantPlugins
5
5
 
6
6
  class Hostmanager < InvadeModule
7
7
 
8
+ require 'vagrant'
9
+
8
10
  attr_reader :result
9
11
  attr_accessor :machine_name, :ui, :hostmanager_data
10
12
 
11
- def initialize(machine_name, ui, hostmanager_data, result: nil)
13
+ def initialize(machine_name, hostmanager_data, result: nil)
12
14
  @machine_name = machine_name
13
15
  @hostmanager_data = hostmanager_data
14
- @ui = ui
15
16
  @result = result
16
17
  end
17
18
 
18
19
  def build
19
20
 
20
- if Vagrant.has_plugin?('vagrant-hostmanager')
21
-
22
- b = binding
21
+ b = binding
23
22
 
24
- begin
23
+ begin
25
24
 
26
- # Get machine name
27
- machine_name = @machine_name
25
+ # Get machine name
26
+ machine_name = @machine_name
28
27
 
29
- # Values for hostmanager section
30
- enabled = @hostmanager_data['enabled']
31
- manage_host = @hostmanager_data['manage_host']
32
- ignore_private_ip = @hostmanager_data['ignore_private_ip']
33
- include_offline =@hostmanager_data['include_offline']
34
- aliases = @hostmanager_data['aliases']
28
+ # Values for hostmanager section
29
+ enabled = @hostmanager_data['enabled']
30
+ manage_host = @hostmanager_data['manage_host']
31
+ ignore_private_ip = @hostmanager_data['ignore_private_ip']
32
+ include_offline =@hostmanager_data['include_offline']
33
+ aliases = @hostmanager_data['aliases']
35
34
 
36
- eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__)))
37
- @result = eruby.result b
38
- rescue TypeError, SyntaxError, SystemCallError => e
39
- raise(e)
40
- end
41
- else
42
- @ui.error("[Invade] Plugin 'vagrant-hostmanager' not installed but defined. Use 'vagrant plugin install vagrant-hostmanager' to install it.")
43
- @result = ''
35
+ eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__)))
36
+ @result = eruby.result b
37
+ rescue TypeError, SyntaxError, SystemCallError => e
38
+ raise(e)
44
39
  end
45
40
  end
46
41
  end
@@ -3,7 +3,7 @@ module VagrantPlugins
3
3
  module InvadeModule
4
4
  module Plugin
5
5
 
6
- autoload :HostManager, 'vagrant-invade/module/plugin/hostmanager/hostmanager'
6
+ autoload :Hostmanager, 'vagrant-invade/module/plugin/hostmanager/hostmanager'
7
7
  autoload :WinNFSd, 'vagrant-invade/module/plugin/winnfsd/winnfsd'
8
8
  autoload :R10k, 'vagrant-invade/module/plugin/r10k/r10k'
9
9
 
@@ -1,7 +1,7 @@
1
1
  module VagrantPlugins
2
2
  module Invade
3
3
  module InvadeModule
4
- module Invade
4
+ module Vagrant
5
5
 
6
6
  class Machine < InvadeModule
7
7
 
@@ -0,0 +1,12 @@
1
+ module VagrantPlugins
2
+ module Invade
3
+ module InvadeModule
4
+ module Vagrant
5
+
6
+ autoload :Machine, 'vagrant-invade/module/vagrant/machine/machine'
7
+ autoload :Vagrantfile, 'vagrant-invade/module/vagrant/vagrantfile/vagrantfile'
8
+
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure(2) do |config|
5
+
6
+ <% machines.each do |_, data| %>
7
+ <%= data %>
8
+ <% end %>
9
+ <%= hostmanager %>
10
+ end
@@ -0,0 +1,36 @@
1
+ module VagrantPlugins
2
+ module Invade
3
+ module InvadeModule
4
+ module Vagrant
5
+
6
+ class Vagrantfile < InvadeModule
7
+
8
+ attr_reader :result
9
+ attr_accessor :vagrantfile_data
10
+
11
+ def initialize(vagrantfile_data, result: nil)
12
+ @vagrantfile_data = vagrantfile_data
13
+ @result = result
14
+ end
15
+
16
+ def build
17
+ b = binding
18
+
19
+ begin
20
+
21
+ # Set variables for template files
22
+ hostmanager = @vagrantfile_data['hostmanager']
23
+ machines = @vagrantfile_data['machines']
24
+
25
+ eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__)))
26
+ @result = eruby.result b
27
+ rescue TypeError, SyntaxError, SystemCallError => e
28
+ raise(e)
29
+ end
30
+ end
31
+ end
32
+
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Invade
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
4
4
  end
5
5
  end
@@ -14,10 +14,10 @@ Gem::Specification.new do |s|
14
14
  s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
15
  s.require_paths = ['lib']
16
16
  s.homepage = 'https://github.com/frgmt/vagrant-invade'
17
- s.license = 'GNUv3'
17
+ s.license = 'CC-BY-NC-SA-4.0'
18
18
 
19
19
  s.required_ruby_version = '>= 2.0.0'
20
20
 
21
- s.add_development_dependency 'bundler', '~> 1.10', '>= 1.10.5'
22
- s.add_development_dependency 'rake', '~> 0'
21
+ s.add_development_dependency 'bundler', '~> 1.12', '>= 1.12.5'
22
+ s.add_development_dependency 'rake', '~> 10.0'
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-invade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lennart Stein
@@ -16,34 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '1.12'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.10.5
22
+ version: 1.12.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
- version: '1.10'
29
+ version: '1.12'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.10.5
32
+ version: 1.12.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
- version: '0'
39
+ version: '10.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
- version: '0'
46
+ version: '10.0'
47
47
  description: InVaDE is a plugin that uses a YAML configuration file to build a Vagrantfile
48
48
  from it.
49
49
  email: frgmt@posteo.de
@@ -85,9 +85,6 @@ files:
85
85
  - lib/vagrant-invade/module/hostmanager/hostmanager.rb
86
86
  - lib/vagrant-invade/module/hostmanager/rules.yml
87
87
  - lib/vagrant-invade/module/hostmanager/template.erb
88
- - lib/vagrant-invade/module/invade/invade.rb
89
- - lib/vagrant-invade/module/invade/machine/machine.rb
90
- - lib/vagrant-invade/module/invade/machine/template.erb
91
88
  - lib/vagrant-invade/module/network/forwarded_port/forwarded_port.rb
92
89
  - lib/vagrant-invade/module/network/forwarded_port/rules.yml
93
90
  - lib/vagrant-invade/module/network/forwarded_port/template.erb
@@ -144,6 +141,11 @@ files:
144
141
  - lib/vagrant-invade/module/synced_folder/virtualbox/rules.yml
145
142
  - lib/vagrant-invade/module/synced_folder/virtualbox/template.erb
146
143
  - lib/vagrant-invade/module/synced_folder/virtualbox/virtualbox.rb
144
+ - lib/vagrant-invade/module/vagrant/machine/machine.rb
145
+ - lib/vagrant-invade/module/vagrant/machine/template.erb
146
+ - lib/vagrant-invade/module/vagrant/vagrant.rb
147
+ - lib/vagrant-invade/module/vagrant/vagrantfile/template.erb
148
+ - lib/vagrant-invade/module/vagrant/vagrantfile/vagrantfile.rb
147
149
  - lib/vagrant-invade/module/vm/rules.yml
148
150
  - lib/vagrant-invade/module/vm/template.erb
149
151
  - lib/vagrant-invade/module/vm/vm.rb
@@ -162,7 +164,7 @@ files:
162
164
  - vagrant-invade.gemspec
163
165
  homepage: https://github.com/frgmt/vagrant-invade
164
166
  licenses:
165
- - GNUv3
167
+ - CC-BY-NC-SA-4.0
166
168
  metadata: {}
167
169
  post_install_message:
168
170
  rdoc_options: []
@@ -1,12 +0,0 @@
1
- module VagrantPlugins
2
- module Invade
3
- module InvadeModule
4
- module Invade
5
-
6
- autoload :Machine, 'vagrant-invade/module/invade/machine/machine'
7
- autoload :Vagrantfile, 'vagrant-invade/module/invade/vagrantfile/vagrantfile'
8
-
9
- end
10
- end
11
- end
12
- end