vagrant-invade 0.4.7 → 0.4.8

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: c8dc480d74b95f717060f3fc518a654eaa525097
4
- data.tar.gz: 8b379149b20e1cf8385efa5391803253c175251f
3
+ metadata.gz: 8aa063a5bb88cb75629fc5e12cd9f97fa4094a90
4
+ data.tar.gz: e80c31179ae0efac9aecc2f971651a22edd7f321
5
5
  SHA512:
6
- metadata.gz: 5e32a52662ffcbed939a5d226b5b24cfbc45c18bf58b0d21afc0de7a4b156c3e8f144d667e8a99184eff558c1720ef756e76293ba4120ecbee40c2d01b3be020
7
- data.tar.gz: a7616beb2ff4285fe4e65185a8d595457409143379ab901f216abd82698b69c5ba935ffe7907c87588b18ddd8071f21e62e02aa660db19d0a25c60e4b0af3486
6
+ metadata.gz: 87f1af65c50937a5d6be87c20197e75c6276d68e7b71f878c42ea197c39002636b501ef7ae66cd0bc57d72c7d826aa85d504f3295986328cd35d49edb812449a
7
+ data.tar.gz: 769fb0830b2a1a6575501692d3b109fcca5f8b787d6a9ef395459d6023efc15bca0a8851571107a2b85feb62066f54a62542bcb4517ba86bdb9059f0cfc65f0c
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  group :development do
4
- gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
4
+ gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", :ref => 'v1.7.4'
5
5
  end
6
6
 
7
7
  group :plugins do
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  GIT
2
2
  remote: https://github.com/mitchellh/vagrant.git
3
- revision: e6bb09831bb47803c8b8e0ca50d0218717b4cd2d
3
+ revision: 78ea5e4a78ce644717ab16d8001ab77430168f0f
4
+ ref: v1.7.4
4
5
  specs:
5
- vagrant (1.8.0.dev)
6
- bundler (>= 1.5.2, <= 1.10.6)
6
+ vagrant (1.7.4)
7
+ bundler (>= 1.5.2, <= 1.10.5)
7
8
  childprocess (~> 0.5.0)
8
9
  erubis (~> 2.7.0)
9
10
  hashicorp-checkpoint (~> 0.1.1)
@@ -18,18 +19,18 @@ GIT
18
19
  rest-client (>= 1.6.0, < 2.0)
19
20
  wdm (~> 0.1.0)
20
21
  winrm (~> 1.3)
21
- winrm-fs (~> 0.2.2)
22
+ winrm-fs (~> 0.2.0)
22
23
 
23
24
  PATH
24
25
  remote: .
25
26
  specs:
26
- vagrant-invade (0.4.6)
27
+ vagrant-invade (0.4.8)
27
28
 
28
29
  GEM
29
30
  remote: https://rubygems.org/
30
31
  specs:
31
32
  builder (3.2.2)
32
- childprocess (0.5.6)
33
+ childprocess (0.5.8)
33
34
  ffi (~> 1.0, >= 1.0.11)
34
35
  domain_name (0.5.25)
35
36
  unf (>= 0.0.5, < 1.0.0)
@@ -42,9 +43,9 @@ GEM
42
43
  hashicorp-checkpoint (0.1.4)
43
44
  http-cookie (1.0.2)
44
45
  domain_name (~> 0.5)
45
- httpclient (2.6.0.1)
46
+ httpclient (2.7.0.1)
46
47
  i18n (0.7.0)
47
- listen (3.0.3)
48
+ listen (3.0.5)
48
49
  rb-fsevent (>= 0.9.3)
49
50
  rb-inotify (>= 0.9)
50
51
  little-plugger (1.1.4)
@@ -52,7 +53,7 @@ GEM
52
53
  logging (1.8.2)
53
54
  little-plugger (>= 1.1.3)
54
55
  multi_json (>= 1.8.4)
55
- mime-types (2.6.2)
56
+ mime-types (2.99)
56
57
  mini_portile (0.6.0)
57
58
  multi_json (1.11.2)
58
59
  net-scp (1.1.2)
@@ -60,7 +61,7 @@ GEM
60
61
  net-sftp (2.1.2)
61
62
  net-ssh (>= 2.6.5)
62
63
  net-ssh (2.9.2)
63
- netrc (0.10.3)
64
+ netrc (0.11.0)
64
65
  nokogiri (1.6.3.1)
65
66
  mini_portile (= 0.6.0)
66
67
  nori (2.6.0)
@@ -80,16 +81,16 @@ GEM
80
81
  unf_ext (0.0.7.1)
81
82
  uuidtools (2.1.5)
82
83
  wdm (0.1.1)
83
- winrm (1.3.4)
84
+ winrm (1.3.5)
84
85
  builder (>= 2.1.2)
85
86
  gssapi (~> 1.2)
86
87
  gyoku (~> 1.0)
87
88
  httpclient (~> 2.2, >= 2.2.0.2)
88
- logging (~> 1.6, >= 1.6.1)
89
+ logging (>= 1.6.1, < 3.0)
89
90
  nori (~> 2.0)
90
91
  rubyntlm (~> 0.4.0)
91
92
  uuidtools (~> 2.1.2)
92
- winrm-fs (0.2.2)
93
+ winrm-fs (0.2.3)
93
94
  erubis (~> 2.7)
94
95
  logging (~> 1.6, >= 1.6.1)
95
96
  rubyzip (~> 1.1)
@@ -103,4 +104,4 @@ DEPENDENCIES
103
104
  vagrant-invade!
104
105
 
105
106
  BUNDLED WITH
106
- 1.10.6
107
+ 1.10.5
data/invade.yml.dist CHANGED
@@ -17,6 +17,10 @@ machines:
17
17
  private:
18
18
  ip: '10.42.133.7'
19
19
 
20
+ # SSH settings
21
+ ssh:
22
+ forward_agent: true
23
+
20
24
  # Provider related settings. Performance, naming
21
25
  provider:
22
26
 
@@ -41,6 +41,11 @@ module VagrantPlugins
41
41
  end
42
42
  end
43
43
 
44
+ # SSH
45
+ unless section['ssh'] == nil
46
+ part['ssh'] = (Generator::Section::SSH.new(machine, section['ssh']).generate)
47
+ end
48
+
44
49
  # PROVIDER
45
50
  unless section['provider'] == nil
46
51
  part['provider'] = ''
@@ -81,11 +86,6 @@ module VagrantPlugins
81
86
  end
82
87
  end
83
88
 
84
- # # SSH
85
- # unless section['ssh'] == nil
86
- # part['ssh'] = Generator::Section::SSH.new(machine, section['ssh']).generate
87
- # end
88
-
89
89
  # Add as definition
90
90
  definition[machine] = Generator::Definition.new(machine, part).generate
91
91
  end
@@ -27,6 +27,7 @@ module VagrantPlugins
27
27
  # Data to build definition entry
28
28
  vm = @definition_data['vm']
29
29
  network = @definition_data['network']
30
+ ssh = @definition_data['ssh']
30
31
  provider = @definition_data['provider']
31
32
  synced_folder = @definition_data['synced_folder']
32
33
  plugin = @definition_data['plugin']
@@ -0,0 +1,41 @@
1
+ module VagrantPlugins
2
+ module Invade
3
+ module Builder
4
+
5
+ require 'erubis'
6
+
7
+ class SSH
8
+
9
+ attr_reader :result
10
+ attr_accessor :machine_name, :ssh_data
11
+
12
+ def initialize(machine_name, ssh_data, result: nil)
13
+ @machine_name = machine_name
14
+ @ssh_data = ssh_data
15
+ @result = result
16
+ end
17
+
18
+ def build
19
+ b = binding
20
+ template_file = "#{TEMPLATE_PATH}/ssh/ssh.erb"
21
+
22
+ begin
23
+
24
+ # Get machine name
25
+ machine_name = @machine_name
26
+
27
+ # Values for vm section
28
+ forward_agent = @ssh_data['forward_agent']
29
+ enabled = @ssh_data['enabled']
30
+ path = @ssh_data['path']
31
+
32
+ eruby = Erubis::Eruby.new(File.read(template_file))
33
+ @result = eruby.result b
34
+ rescue TypeError, SyntaxError, SystemCallError => e
35
+ raise(e)
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -4,6 +4,7 @@ module VagrantPlugins
4
4
 
5
5
  autoload :VM, 'vagrant-invade/builder/vm'
6
6
  autoload :Network, 'vagrant-invade/builder/network'
7
+ autoload :SSH, 'vagrant-invade/builder/ssh'
7
8
  autoload :Provider, 'vagrant-invade/builder/provider'
8
9
  autoload :Provision, 'vagrant-invade/builder/provision'
9
10
  autoload :SyncedFolder, 'vagrant-invade/builder/synced_folder'
@@ -0,0 +1,27 @@
1
+ module VagrantPlugins
2
+ module Invade
3
+ module Generator
4
+ module Section
5
+
6
+ class SSH
7
+
8
+ attr_accessor :machine_name, :ssh_data
9
+
10
+ def initialize(machine_name, ssh_data)
11
+ @machine_name = machine_name
12
+ @ssh_data = ssh_data
13
+ end
14
+
15
+ def generate
16
+ vm = Builder::SSH.new(@machine_name, @ssh_data)
17
+ vm.build
18
+
19
+ vm.result
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+ end
26
+ end
27
+ end
@@ -5,6 +5,7 @@ module VagrantPlugins
5
5
 
6
6
  autoload :VM, 'vagrant-invade/generator/section/vm'
7
7
  autoload :Network, 'vagrant-invade/generator/section/network'
8
+ autoload :SSH, 'vagrant-invade/generator/section/ssh'
8
9
  autoload :Provider, 'vagrant-invade/generator/section/provider'
9
10
  autoload :SyncedFolder, 'vagrant-invade/generator/section/synced_folder'
10
11
  autoload :Provision, 'vagrant-invade/generator/section/provision'
@@ -8,6 +8,10 @@ config.vm.define "<%= machine_name %>" do |<%= machine_name %>|
8
8
  # --- Network Section ---
9
9
  <%= network %>
10
10
  <% end %>
11
+ <% if ssh %>
12
+ # --- SSH Section ---
13
+ <%= ssh %>
14
+ <% end %>
11
15
  <% if provider %>
12
16
  # --- Provider Section ---
13
17
  <%= provider %>
@@ -0,0 +1,2 @@
1
+
2
+ <%= machine_name %>.ssh.forward_agent = <% if forward_agent %>true<% else %>false<% end %>
@@ -7,8 +7,7 @@ module VagrantPlugins
7
7
  attr_accessor :env, :ssh
8
8
 
9
9
  DEFAULT = {
10
- 'enabled' => nil,
11
- 'path' => '~/.ssh/'
10
+ 'forward_agent' => true
12
11
  }
13
12
 
14
13
  def initialize(env, ssh)
@@ -19,14 +18,8 @@ module VagrantPlugins
19
18
  def validate
20
19
  return DEFAULT unless @ssh
21
20
 
22
- # ENABLED
23
- @ssh['enabled'] = Validator.validate_boolean(
24
- @ssh['enabled'], 'enabled', DEFAULT['enabled']
25
- )
26
-
27
- # PATH TO HOST SSH FOLDER
28
- @ssh['path'] = Validator.validate_string(
29
- @ssh['path'], 'path', DEFAULT['path']
21
+ @ssh['forward_agent'] = Validator.validate_boolean(
22
+ @ssh['forward_agent'], 'forward_agent', DEFAULT['forward_agent']
30
23
  )
31
24
 
32
25
  @ssh
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Invade
3
- VERSION = '0.4.7'
3
+ VERSION = '0.4.8'
4
4
  end
5
5
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.required_ruby_version = '>= 2.0.0'
20
20
 
21
- s.add_development_dependency 'bundler', '~> 1.10', '>= 1.10.6'
21
+ s.add_development_dependency 'bundler', '~> 1.10', '>= 1.10.5'
22
22
  s.add_development_dependency 'rake', '~> 0'
23
23
  end
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.7
4
+ version: 0.4.8
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-11-04 00:00:00.000000000 Z
11
+ date: 2015-11-23 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
- version: 1.10.6
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
- version: 1.10.6
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
- - .gitattributes
55
- - .gitignore
54
+ - ".gitattributes"
55
+ - ".gitignore"
56
56
  - Gemfile
57
57
  - Gemfile.lock
58
58
  - LICENSE
@@ -87,6 +87,7 @@ files:
87
87
  - lib/vagrant-invade/builder/provision/puppet_apply.rb
88
88
  - lib/vagrant-invade/builder/provision/shell.rb
89
89
  - lib/vagrant-invade/builder/provision/shell_inline.rb
90
+ - lib/vagrant-invade/builder/ssh.rb
90
91
  - lib/vagrant-invade/builder/synced_folder.rb
91
92
  - lib/vagrant-invade/builder/synced_folder/nfs.rb
92
93
  - lib/vagrant-invade/builder/synced_folder/virtualbox.rb
@@ -104,6 +105,7 @@ files:
104
105
  - lib/vagrant-invade/generator/section/plugin.rb
105
106
  - lib/vagrant-invade/generator/section/provider.rb
106
107
  - lib/vagrant-invade/generator/section/provision.rb
108
+ - lib/vagrant-invade/generator/section/ssh.rb
107
109
  - lib/vagrant-invade/generator/section/synced_folder.rb
108
110
  - lib/vagrant-invade/generator/section/vm.rb
109
111
  - lib/vagrant-invade/generator/vagrantfile.rb
@@ -121,6 +123,7 @@ files:
121
123
  - lib/vagrant-invade/template/provision/puppet_apply.erb
122
124
  - lib/vagrant-invade/template/provision/shell.erb
123
125
  - lib/vagrant-invade/template/provision/shell_inline.erb
126
+ - lib/vagrant-invade/template/ssh/ssh.erb
124
127
  - lib/vagrant-invade/template/synced_folder/nfs.erb
125
128
  - lib/vagrant-invade/template/synced_folder/virtualbox.erb
126
129
  - lib/vagrant-invade/template/v2.erb
@@ -160,17 +163,17 @@ require_paths:
160
163
  - lib
161
164
  required_ruby_version: !ruby/object:Gem::Requirement
162
165
  requirements:
163
- - - '>='
166
+ - - ">="
164
167
  - !ruby/object:Gem::Version
165
168
  version: 2.0.0
166
169
  required_rubygems_version: !ruby/object:Gem::Requirement
167
170
  requirements:
168
- - - '>='
171
+ - - ">="
169
172
  - !ruby/object:Gem::Version
170
173
  version: '0'
171
174
  requirements: []
172
175
  rubyforge_project:
173
- rubygems_version: 2.4.8
176
+ rubygems_version: 2.4.6
174
177
  signing_key:
175
178
  specification_version: 4
176
179
  summary: Create a Vagrantfile with a single YAML configuration file