vagrant-unificar 0.0.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 243dff696190b365d298a4c6f94418c935ffe349
4
+ data.tar.gz: 5ac552a71abcd1a521dccbfd406b4ace3e81d190
5
+ SHA512:
6
+ metadata.gz: f35055d7bbc69ec05abcc07e533128f1670d97938bd5a0f24e0d96ba7c3edf0bc6fe7e0840cdea963b9e4550f93111b445c521d205c5b70b1ccdacb0342db15a
7
+ data.tar.gz: d6d4b09d30a7e183c7e149aa62b278d5cfa82e8c9565cb32afc169821d1dbbc297777b095a864100b5c60c8dcdebc4f723906c488efefb2417ea60fdaf9f1557
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
5
+ end
6
+
7
+ group :plugins do
8
+ gem "vagrant-unificar", path: "."
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,101 @@
1
+ GIT
2
+ remote: git://github.com/mitchellh/vagrant.git
3
+ revision: 1ae499670e5f91a782da2f3df212ba452c29e2ef
4
+ specs:
5
+ vagrant (1.8.2.dev)
6
+ bundler (>= 1.5.2, <= 1.10.6)
7
+ childprocess (~> 0.5.0)
8
+ erubis (~> 2.7.0)
9
+ hashicorp-checkpoint (~> 0.1.1)
10
+ i18n (>= 0.6.0, <= 0.8.0)
11
+ listen (~> 3.0.2)
12
+ log4r (~> 1.1.9, < 1.1.11)
13
+ net-scp (~> 1.1.0)
14
+ net-sftp (~> 2.1)
15
+ net-ssh (~> 3.0.1)
16
+ nokogiri (= 1.6.3.1)
17
+ rb-kqueue (~> 0.2.0)
18
+ rest-client (>= 1.6.0, < 2.0)
19
+ wdm (~> 0.1.0)
20
+ winrm (~> 1.3)
21
+ winrm-fs (~> 0.2.2)
22
+
23
+ PATH
24
+ remote: .
25
+ specs:
26
+ vagrant-unificar (0.0.2)
27
+
28
+ GEM
29
+ remote: https://rubygems.org/
30
+ specs:
31
+ builder (3.2.2)
32
+ childprocess (0.5.9)
33
+ ffi (~> 1.0, >= 1.0.11)
34
+ domain_name (0.5.25)
35
+ unf (>= 0.0.5, < 1.0.0)
36
+ erubis (2.7.0)
37
+ ffi (1.9.10)
38
+ gssapi (1.2.0)
39
+ ffi (>= 1.0.1)
40
+ gyoku (1.3.1)
41
+ builder (>= 2.1.2)
42
+ hashicorp-checkpoint (0.1.4)
43
+ http-cookie (1.0.2)
44
+ domain_name (~> 0.5)
45
+ httpclient (2.7.1)
46
+ i18n (0.7.0)
47
+ listen (3.0.5)
48
+ rb-fsevent (>= 0.9.3)
49
+ rb-inotify (>= 0.9)
50
+ little-plugger (1.1.4)
51
+ log4r (1.1.10)
52
+ logging (1.8.2)
53
+ little-plugger (>= 1.1.3)
54
+ multi_json (>= 1.8.4)
55
+ mime-types (2.99)
56
+ multi_json (1.11.2)
57
+ net-scp (1.1.2)
58
+ net-ssh (>= 2.6.5)
59
+ net-sftp (2.1.2)
60
+ net-ssh (>= 2.6.5)
61
+ net-ssh (3.0.2)
62
+ netrc (0.11.0)
63
+ nokogiri (1.6.3.1)
64
+ nori (2.6.0)
65
+ rb-fsevent (0.9.7)
66
+ rb-inotify (0.9.5)
67
+ ffi (>= 0.5.0)
68
+ rb-kqueue (0.2.4)
69
+ ffi (>= 0.5.0)
70
+ rest-client (1.8.0)
71
+ http-cookie (>= 1.0.2, < 2.0)
72
+ mime-types (>= 1.16, < 3.0)
73
+ netrc (~> 0.7)
74
+ rubyntlm (0.4.0)
75
+ rubyzip (1.1.7)
76
+ unf (0.1.4)
77
+ unf_ext
78
+ unf_ext (0.0.7.1)
79
+ uuidtools (2.1.5)
80
+ wdm (0.1.1)
81
+ winrm (1.3.6)
82
+ builder (>= 2.1.2)
83
+ gssapi (~> 1.2)
84
+ gyoku (~> 1.0)
85
+ httpclient (~> 2.2, >= 2.2.0.2)
86
+ logging (>= 1.6.1, < 3.0)
87
+ nori (~> 2.0)
88
+ rubyntlm (~> 0.4.0)
89
+ uuidtools (~> 2.1.2)
90
+ winrm-fs (0.2.3)
91
+ erubis (~> 2.7)
92
+ logging (~> 1.6, >= 1.6.1)
93
+ rubyzip (~> 1.1)
94
+ winrm (~> 1.3.0)
95
+
96
+ PLATFORMS
97
+ ruby
98
+
99
+ DEPENDENCIES
100
+ vagrant!
101
+ vagrant-unificar!
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2016 Sebastián Álvarez
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,62 @@
1
+ require "vagrant"
2
+
3
+ module Vagrant
4
+ module Unificar
5
+ class Command < Vagrant.plugin('2', :command)
6
+ def execute
7
+ with_target_vms do |machine|
8
+ init(machine)
9
+ end
10
+
11
+ 0
12
+ end
13
+
14
+
15
+ def init(machine)
16
+
17
+ usuario = self.usuario
18
+ host_ip = machine.config.unificar.host_ip
19
+ local_dir = machine.config.unificar.local_dir
20
+ remote_mountpoint = machine.config.unificar.remote_mountpoint
21
+
22
+ if usuario.nil? || host_ip.nil? || local_dir.nil? || remote_mountpoint.nil?
23
+ machine.ui.error("Alguno de los valores necesarios en el archivo Vagrantfile no fueron cargados" , {:prefix => false})
24
+ machine.ui.error("Ejemplo de configuracion valida: " , {:prefix => false})
25
+ machine.ui.info("config.unificar.local_dir = \"/home/usuario/proyecto\"", {:prefix => false})
26
+ machine.ui.info("config.unificar.remote_mountpoint = \"/vagrant\"", {:prefix => false})
27
+ machine.ui.info("config.unificar.host_ip = \"10.6.1.78\"", {:prefix => false})
28
+
29
+ #TODO: Hacer mejor devolucion de error
30
+ return 1
31
+ end
32
+
33
+ password = machine.ui.ask("#{usuario}@#{host_ip} (no se vera el password al ser tecleado): ", {:prefix => false, :echo => false})
34
+
35
+ cmd = "echo \"#{password}\" | sshfs -o password_stdin #{usuario}@#{host_ip}:#{local_dir} #{remote_mountpoint}"
36
+
37
+ #TODO: Habilitar debug para poder ver el comando
38
+ #puts cmd
39
+ ret = machine.communicate.execute(cmd, {:error_check => false})
40
+ if ret == 0
41
+ machine.ui.info("#{local_dir} -> #{remote_mountpoint} Montado correctamente", {:prefix => false})
42
+ else
43
+ machine.ui.error("#{local_dir} -> #{remote_mountpoint} Imposible montar" , {:prefix => false})
44
+ machine.ui.info("Posibles problemas:", {:prefix => false})
45
+ machine.ui.info("\t-> Password esta mal escrito", {:prefix => false})
46
+ machine.ui.info("\t-> Se encuentra ya montado", {:prefix => false})
47
+ machine.ui.info("\t-> Mounpoint no esta vacio", {:prefix => false})
48
+ machine.ui.info("\t-> Mounpoint no tiene los permisos correctos", {:prefix => false})
49
+ machine.ui.info("\t-> Mounpoint o el directorio local no existen", {:prefix => false})
50
+ end
51
+
52
+
53
+ end
54
+
55
+
56
+ def usuario
57
+ #TODO: Hacer version para Windows
58
+ `whoami`.strip
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,11 @@
1
+ module Vagrant
2
+ module Unificar
3
+
4
+ class Config < Vagrant.plugin("2", :config)
5
+ attr_accessor :local_dir
6
+ attr_accessor :remote_mountpoint
7
+ attr_accessor :host_ip
8
+
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,24 @@
1
+ require "vagrant-unificar/version"
2
+
3
+ module Vagrant
4
+ module Unificar
5
+ # Your code goes here...
6
+ class Plugin < Vagrant.plugin("2")
7
+ name "Unificar"
8
+ description = <<-DESC
9
+ PRUEBA DE DESCRIPCION
10
+ DESC
11
+
12
+ command 'unificar' do
13
+ require_relative "command"
14
+ Command
15
+ end
16
+
17
+ config 'unificar' do
18
+ require_relative "config"
19
+ Config
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ module Vagrant
2
+ module Unificar
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ require "bundler"
2
+
3
+ begin
4
+ require 'vagrant'
5
+ rescue LoadError
6
+ Bundler.require(:default, :development)
7
+ end
8
+
9
+ require 'vagrant-unificar/plugin'
10
+ require 'vagrant-unificar/command'
11
+
Binary file
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant-unificar/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vagrant-unificar"
8
+ spec.version = Vagrant::Unificar::VERSION
9
+ spec.authors = ["Raichuk"]
10
+ spec.email = [""]
11
+ spec.summary = %q{Plugin para Vagrant que mantiene sincronizadas la carpeta entre host y guest}
12
+ spec.description = %q{Plugin para Vagrant que mantiene sincronizadas la carpeta entre host y guest}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-unificar
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Raichuk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-27 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.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Plugin para Vagrant que mantiene sincronizadas la carpeta entre host
42
+ y guest
43
+ email:
44
+ - ''
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - lib/vagrant-unificar.rb
55
+ - lib/vagrant-unificar/command.rb
56
+ - lib/vagrant-unificar/config.rb
57
+ - lib/vagrant-unificar/plugin.rb
58
+ - lib/vagrant-unificar/version.rb
59
+ - pkg/vagrant-unificar-0.0.1.gem
60
+ - vagrant-unificar.gemspec
61
+ homepage: ''
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubyforge_project:
81
+ rubygems_version: 2.2.2
82
+ signing_key:
83
+ specification_version: 4
84
+ summary: Plugin para Vagrant que mantiene sincronizadas la carpeta entre host y guest
85
+ test_files: []