vagrant-dokosync 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/AUTHORS +5 -0
- data/CHANGELOG.md +42 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/Vagrantfile +122 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/vagrant-dokosync/command-dokosync.rb +221 -0
- data/lib/vagrant-dokosync/plugin.rb +27 -0
- data/lib/vagrant-dokosync/version.rb +5 -0
- data/lib/vagrant-dokosync.rb +7 -0
- data/vagrant-dokosync.gemspec +20 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e3fbde9d9f40b30ff81500ca73558d0908f81c81
|
4
|
+
data.tar.gz: 0f646c2d6786fc4039eae90df3c9d499bac0d3b0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e19e351bc75800c8cb39be5c0d14fd0568996a2f560d6a3f2cdf2e44fc11cbed7f6859b69bcdc41b158662d3d4a03dfb1787cdfc0a0ca969295a813477ea7905
|
7
|
+
data.tar.gz: 7e32358c28b8efdfaf63bd1528fa468ef968057d0fbd86293c4b136c6833cc57bb0e97e1b62f05cb1ac7b2a06d15acef619b6ca867e2d153db7c10a9e32a1de1
|
data/.gitignore
ADDED
data/AUTHORS
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
0.3.0 - 2016-04-13
|
2
|
+
==================
|
3
|
+
- Fix for "No such file or directory" on Windows host (#11)
|
4
|
+
|
5
|
+
0.2.0 - 2015-07-14
|
6
|
+
==================
|
7
|
+
- *Breaking change:* Minimum required Vagrant version changed to 1.7.3+
|
8
|
+
- Fixed a dependency issue with celluloid (#10, @leafac)
|
9
|
+
|
10
|
+
0.1.1 - 2015-07-05 (yanked)
|
11
|
+
===========================
|
12
|
+
Note: This release was yanked due to a dependency issue, see #9
|
13
|
+
- Added command synopsis (#7, @leafac)
|
14
|
+
- Fix issue with vagrant runtime dependency on celluloid (#8, @leafac)
|
15
|
+
|
16
|
+
0.1.0 - 2015-07-05 (yanked)
|
17
|
+
===========================
|
18
|
+
Note: This release was yanked due to a dependency issue, see #9
|
19
|
+
- *Breaking change:* Added support for forwading file addition/removal (#6, @leafac)
|
20
|
+
- Depend on `vagrant` rather than `listen` for better compatibility with upstream (#5, @leafac)
|
21
|
+
- Added documentation (#3 & #4, @leafac)
|
22
|
+
|
23
|
+
0.0.6 - 2015-04-16
|
24
|
+
==================
|
25
|
+
- Fix multimachine use, allow specifying which machine to target (@elskwid)
|
26
|
+
|
27
|
+
0.0.5 - 2015-04-11
|
28
|
+
==================
|
29
|
+
- Fix `listen` dependency
|
30
|
+
|
31
|
+
0.0.4 - 2014-08-18
|
32
|
+
==================
|
33
|
+
- Uses access time modification, rather than modified time
|
34
|
+
|
35
|
+
0.0.3 - 2014-08-15
|
36
|
+
==================
|
37
|
+
- Allow guest path overriding
|
38
|
+
|
39
|
+
|
40
|
+
0.0.2 - 2014-08-15
|
41
|
+
==================
|
42
|
+
- Increase the delay between changes to 2 seconds
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Adrien Kohlbecker
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
vagrant-dokosync
|
2
|
+
================
|
3
|
+
|
4
|
+
Executes "/home/vagrant/unison" on filesystem change notifications
|
5
|
+
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
`vagrant-dokosync` is a [Vagrant][vagrant] plugin and can be installed by
|
11
|
+
running:
|
12
|
+
|
13
|
+
```console
|
14
|
+
$ vagrant plugin install vagrant-dokosync
|
15
|
+
```
|
16
|
+
|
17
|
+
|
18
|
+
Usage
|
19
|
+
-----
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
config.vm.synced_folder ".", "/vagrant", dokosync: true
|
23
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/Vagrantfile
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
5
|
+
VAGRANTFILE_API_VERSION = "2"
|
6
|
+
|
7
|
+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
8
|
+
# All Vagrant configuration is done here. The most common configuration
|
9
|
+
# options are documented and commented below. For a complete reference,
|
10
|
+
# please see the online documentation at vagrantup.com.
|
11
|
+
|
12
|
+
# Every Vagrant virtual environment requires a box to build off of.
|
13
|
+
config.vm.box = "ubuntu/trusty64"
|
14
|
+
|
15
|
+
# Disable automatic box update checking. If you disable this, then
|
16
|
+
# boxes will only be checked for updates when the user runs
|
17
|
+
# `vagrant box outdated`. This is not recommended.
|
18
|
+
# config.vm.box_check_update = false
|
19
|
+
|
20
|
+
# Create a forwarded port mapping which allows access to a specific port
|
21
|
+
# within the machine from a port on the host machine. In the example below,
|
22
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
23
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
24
|
+
|
25
|
+
# Create a private network, which allows host-only access to the machine
|
26
|
+
# using a specific IP.
|
27
|
+
config.vm.network "private_network", ip: "192.168.33.10"
|
28
|
+
|
29
|
+
# Create a public network, which generally matched to bridged network.
|
30
|
+
# Bridged networks make the machine appear as another physical device on
|
31
|
+
# your network.
|
32
|
+
# config.vm.network "public_network"
|
33
|
+
|
34
|
+
# If true, then any SSH connections made will enable agent forwarding.
|
35
|
+
# Default value: false
|
36
|
+
# config.ssh.forward_agent = true
|
37
|
+
|
38
|
+
# Share an additional folder to the guest VM. The first argument is
|
39
|
+
# the path on the host to the actual folder. The second argument is
|
40
|
+
# the path on the guest to mount the folder. And the optional third
|
41
|
+
# argument is a set of non-required options.
|
42
|
+
config.vm.synced_folder ".", "/vagrant", dokosync: true
|
43
|
+
|
44
|
+
# Provider-specific configuration so you can fine-tune various
|
45
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
46
|
+
# Example for VirtualBox:
|
47
|
+
#
|
48
|
+
# config.vm.provider "virtualbox" do |vb|
|
49
|
+
# # Don't boot with headless mode
|
50
|
+
# vb.gui = true
|
51
|
+
#
|
52
|
+
# # Use VBoxManage to customize the VM. For example to change memory:
|
53
|
+
# vb.customize ["modifyvm", :id, "--memory", "1024"]
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# View the documentation for the provider you're using for more
|
57
|
+
# information on available options.
|
58
|
+
|
59
|
+
# Enable provisioning with CFEngine. CFEngine Community packages are
|
60
|
+
# automatically installed. For example, configure the host as a
|
61
|
+
# policy server and optionally a policy file to run:
|
62
|
+
#
|
63
|
+
# config.vm.provision "cfengine" do |cf|
|
64
|
+
# cf.am_policy_hub = true
|
65
|
+
# # cf.run_file = "motd.cf"
|
66
|
+
# end
|
67
|
+
#
|
68
|
+
# You can also configure and bootstrap a client to an existing
|
69
|
+
# policy server:
|
70
|
+
#
|
71
|
+
# config.vm.provision "cfengine" do |cf|
|
72
|
+
# cf.policy_server_address = "10.0.2.15"
|
73
|
+
# end
|
74
|
+
|
75
|
+
# Enable provisioning with Puppet stand alone. Puppet manifests
|
76
|
+
# are contained in a directory path relative to this Vagrantfile.
|
77
|
+
# You will need to create the manifests directory and a manifest in
|
78
|
+
# the file default.pp in the manifests_path directory.
|
79
|
+
#
|
80
|
+
# config.vm.provision "puppet" do |puppet|
|
81
|
+
# puppet.manifests_path = "manifests"
|
82
|
+
# puppet.manifest_file = "site.pp"
|
83
|
+
# end
|
84
|
+
|
85
|
+
# Enable provisioning with chef solo, specifying a cookbooks path, roles
|
86
|
+
# path, and data_bags path (all relative to this Vagrantfile), and adding
|
87
|
+
# some recipes and/or roles.
|
88
|
+
#
|
89
|
+
# config.vm.provision "chef_solo" do |chef|
|
90
|
+
# chef.cookbooks_path = "../my-recipes/cookbooks"
|
91
|
+
# chef.roles_path = "../my-recipes/roles"
|
92
|
+
# chef.data_bags_path = "../my-recipes/data_bags"
|
93
|
+
# chef.add_recipe "mysql"
|
94
|
+
# chef.add_role "web"
|
95
|
+
#
|
96
|
+
# # You may also specify custom JSON attributes:
|
97
|
+
# chef.json = { mysql_password: "foo" }
|
98
|
+
# end
|
99
|
+
|
100
|
+
# Enable provisioning with chef server, specifying the chef server URL,
|
101
|
+
# and the path to the validation key (relative to this Vagrantfile).
|
102
|
+
#
|
103
|
+
# The Opscode Platform uses HTTPS. Substitute your organization for
|
104
|
+
# ORGNAME in the URL and validation key.
|
105
|
+
#
|
106
|
+
# If you have your own Chef Server, use the appropriate URL, which may be
|
107
|
+
# HTTP instead of HTTPS depending on your configuration. Also change the
|
108
|
+
# validation key to validation.pem.
|
109
|
+
#
|
110
|
+
# config.vm.provision "chef_client" do |chef|
|
111
|
+
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
|
112
|
+
# chef.validation_key_path = "ORGNAME-validator.pem"
|
113
|
+
# end
|
114
|
+
#
|
115
|
+
# If you're using the Opscode platform, your validator client is
|
116
|
+
# ORGNAME-validator, replacing ORGNAME with your organization name.
|
117
|
+
#
|
118
|
+
# If you have your own Chef Server, the default validation client name is
|
119
|
+
# chef-validator, unless you changed the configuration.
|
120
|
+
#
|
121
|
+
# chef.validation_client_name = "ORGNAME-validator"
|
122
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "vagrant-dokosync"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
require 'listen'
|
2
|
+
|
3
|
+
module VagrantPlugins::Dokosync
|
4
|
+
class Command < Vagrant.plugin("2", :command)
|
5
|
+
include Vagrant::Action::Builtin::MixinSyncedFolders
|
6
|
+
|
7
|
+
def self.synopsis
|
8
|
+
'forwards filesystem events to virtual machine'
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute
|
12
|
+
@logger = Log4r::Logger.new("vagrant::commands::dokosync")
|
13
|
+
|
14
|
+
params = OptionParser.new do |o|
|
15
|
+
o.banner = "Usage: vagrant dokosync [vm-name]"
|
16
|
+
o.separator ""
|
17
|
+
end
|
18
|
+
|
19
|
+
argv = parse_options(params)
|
20
|
+
return if !argv
|
21
|
+
|
22
|
+
paths = {}
|
23
|
+
ignores = []
|
24
|
+
@changes = {}
|
25
|
+
|
26
|
+
with_target_vms(argv) do |machine|
|
27
|
+
if !machine.communicate.ready?
|
28
|
+
machine.ui.error("Machine not ready, is it up?")
|
29
|
+
return 1
|
30
|
+
end
|
31
|
+
|
32
|
+
synced_folders(machine).each do |type, folder|
|
33
|
+
|
34
|
+
folder.each do |id, opts|
|
35
|
+
|
36
|
+
if !(
|
37
|
+
(opts[:dokosync] == true) ||
|
38
|
+
(
|
39
|
+
opts[:dokosync].respond_to?(:include?) &&
|
40
|
+
(
|
41
|
+
opts[:dokosync].include?(:modified) ||
|
42
|
+
opts[:dokosync].include?(:added) ||
|
43
|
+
opts[:dokosync].include?(:removed)
|
44
|
+
)
|
45
|
+
)
|
46
|
+
)
|
47
|
+
next
|
48
|
+
end
|
49
|
+
|
50
|
+
# Folder info
|
51
|
+
hostpath = opts[:hostpath]
|
52
|
+
hostpath = File.expand_path(hostpath, machine.env.root_path)
|
53
|
+
hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s
|
54
|
+
|
55
|
+
# Make sure the host path ends with a "/" to avoid creating
|
56
|
+
# a nested directory...
|
57
|
+
if !hostpath.end_with?("/")
|
58
|
+
hostpath += "/"
|
59
|
+
end
|
60
|
+
|
61
|
+
machine.ui.info("dokosync: Watching #{hostpath}")
|
62
|
+
|
63
|
+
paths[hostpath] = {
|
64
|
+
id: id,
|
65
|
+
machine: machine,
|
66
|
+
opts: opts
|
67
|
+
}
|
68
|
+
|
69
|
+
if opts[:exclude]
|
70
|
+
Array(opts[:exclude]).each do |pattern|
|
71
|
+
ignores << exclude_to_regexp(pattern.to_s)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
if paths.empty?
|
82
|
+
@env.ui.info(<<-MESSAGE)
|
83
|
+
Nothing to sync.
|
84
|
+
|
85
|
+
Note that the valid values for the `:dokosync' configuration key on
|
86
|
+
`Vagrantfile' are either `true' (which forwards all kinds of filesystem events)
|
87
|
+
or an Array containing symbols among the following options: `:modified',
|
88
|
+
`:added' and `:removed' (in which case, only the specified filesystem events are
|
89
|
+
forwarded).
|
90
|
+
|
91
|
+
For example, to forward all filesystem events to the default `/vagrant' folder,
|
92
|
+
add the following to the `Vagrantfile':
|
93
|
+
|
94
|
+
config.vm.synced_folder ".", "/vagrant", dokosync: true
|
95
|
+
|
96
|
+
And to forward only added files events to the default `/vagrant' folder, add the
|
97
|
+
following to the `Vagrantfile':
|
98
|
+
|
99
|
+
config.vm.synced_folder ".", "/vagrant", dokosync: [:added]
|
100
|
+
|
101
|
+
Exiting...
|
102
|
+
MESSAGE
|
103
|
+
return 1
|
104
|
+
end
|
105
|
+
|
106
|
+
@logger.info("Listening to paths: #{paths.keys.sort.inspect}")
|
107
|
+
@logger.info("Listening via: #{Listen::Adapter.select.inspect}")
|
108
|
+
@logger.info("Ignoring #{ignores.length} paths:")
|
109
|
+
ignores.each do |ignore|
|
110
|
+
@logger.info(" -- #{ignore.to_s}")
|
111
|
+
end
|
112
|
+
|
113
|
+
listener_callback = method(:callback).to_proc.curry[paths]
|
114
|
+
listener = Listen.to(*paths.keys, ignore: ignores, &listener_callback)
|
115
|
+
|
116
|
+
# Create the callback that lets us know when we've been interrupted
|
117
|
+
queue = Queue.new
|
118
|
+
callback = lambda do
|
119
|
+
# This needs to execute in another thread because Thread
|
120
|
+
# synchronization can't happen in a trap context.
|
121
|
+
Thread.new { queue << true }
|
122
|
+
end
|
123
|
+
|
124
|
+
# Run the listener in a busy block so that we can cleanly
|
125
|
+
# exit once we receive an interrupt.
|
126
|
+
Vagrant::Util::Busy.busy(callback) do
|
127
|
+
listener.start
|
128
|
+
queue.pop
|
129
|
+
listener.stop if listener.state != :stopped
|
130
|
+
end
|
131
|
+
|
132
|
+
return 0
|
133
|
+
end
|
134
|
+
|
135
|
+
def callback(paths, modified, added, removed)
|
136
|
+
|
137
|
+
@logger.info("File change callback called!")
|
138
|
+
@logger.info(" - Modified: #{modified.inspect}")
|
139
|
+
@logger.info(" - Added: #{added.inspect}")
|
140
|
+
@logger.info(" - Removed: #{removed.inspect}")
|
141
|
+
|
142
|
+
@changes.each do |rel_path, time|
|
143
|
+
@changes.delete(rel_path) if time < Time.now.to_i - 2
|
144
|
+
end
|
145
|
+
|
146
|
+
tosync = {}
|
147
|
+
todelete = []
|
148
|
+
|
149
|
+
paths.each do |hostpath, folder|
|
150
|
+
|
151
|
+
toanalyze = []
|
152
|
+
if folder[:opts][:dokosync] == true
|
153
|
+
toanalyze += modified + added + removed
|
154
|
+
else
|
155
|
+
if folder[:opts][:dokosync].include? :modified
|
156
|
+
toanalyze += modified
|
157
|
+
end
|
158
|
+
if folder[:opts][:dokosync].include? :added
|
159
|
+
toanalyze += added
|
160
|
+
end
|
161
|
+
if folder[:opts][:dokosync].include? :removed
|
162
|
+
toanalyze += removed
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
toanalyze.each do |file|
|
167
|
+
|
168
|
+
if file.start_with?(hostpath)
|
169
|
+
|
170
|
+
rel_path = file.sub(hostpath, '')
|
171
|
+
|
172
|
+
if @changes[rel_path] && @changes[rel_path] >= Time.now.to_i - 2
|
173
|
+
@logger.info("#{rel_path} was changed less than two seconds ago, skipping")
|
174
|
+
next
|
175
|
+
end
|
176
|
+
|
177
|
+
@changes[rel_path] = Time.now.to_i
|
178
|
+
if modified.include? file
|
179
|
+
folder[:machine].ui.info("dokosync: Changed: #{rel_path}")
|
180
|
+
elsif added.include? file
|
181
|
+
folder[:machine].ui.info("dokosync: Added: #{rel_path}")
|
182
|
+
elsif removed.include? file
|
183
|
+
folder[:machine].ui.info("dokosync: Removed: #{rel_path}")
|
184
|
+
end
|
185
|
+
|
186
|
+
guestpath = folder[:opts][:override_guestpath] || folder[:opts][:guestpath]
|
187
|
+
guestpath = File.join(guestpath, rel_path)
|
188
|
+
|
189
|
+
tosync[folder[:machine]] = [] if !tosync.has_key?(folder[:machine])
|
190
|
+
tosync[folder[:machine]] << guestpath
|
191
|
+
|
192
|
+
if removed.include? file
|
193
|
+
todelete << guestpath
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
machine.communicate.execute("/home/vagrant/bin/unison")
|
202
|
+
|
203
|
+
rescue => e
|
204
|
+
@logger.error("#{e}: #{e.message}")
|
205
|
+
end
|
206
|
+
|
207
|
+
def exclude_to_regexp(exclude)
|
208
|
+
|
209
|
+
# This is REALLY ghetto, but its a start. We can improve and
|
210
|
+
# keep unit tests passing in the future.
|
211
|
+
exclude = exclude.gsub("**", "|||GLOBAL|||")
|
212
|
+
exclude = exclude.gsub("*", "|||PATH|||")
|
213
|
+
exclude = exclude.gsub("|||PATH|||", "[^/]*")
|
214
|
+
exclude = exclude.gsub("|||GLOBAL|||", ".*")
|
215
|
+
|
216
|
+
Regexp.new(exclude)
|
217
|
+
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The vagrant-dokosync plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
if Vagrant::VERSION < "1.7.3"
|
8
|
+
raise <<-ERROR
|
9
|
+
The vagrant-dokosync plugin is only compatible with Vagrant 1.7.3+. If you can't
|
10
|
+
upgrade, consider installing an old version of vagrant-dokosync with:
|
11
|
+
$ vagrant plugin install vagrant-dokosync --plugin-version 0.0.6.
|
12
|
+
ERROR
|
13
|
+
end
|
14
|
+
|
15
|
+
module VagrantPlugins::Dokosync
|
16
|
+
|
17
|
+
class Plugin < Vagrant.plugin("2")
|
18
|
+
name "vagrant-dokosync"
|
19
|
+
|
20
|
+
command "dokosync" do
|
21
|
+
require_relative "command-dokosync"
|
22
|
+
Command
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vagrant-dokosync/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vagrant-dokosync"
|
8
|
+
spec.version = VagrantPlugins::Dokosync::VERSION
|
9
|
+
spec.authors = ["Doko"]
|
10
|
+
spec.email = ["contacto@doko.com.co"]
|
11
|
+
spec.summary = "Runs /home/vagrant/unison on file system changes"
|
12
|
+
|
13
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
14
|
+
spec.bindir = "exe"
|
15
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
|
18
|
+
spec.add_development_dependency "bundler"
|
19
|
+
spec.add_development_dependency "rake"
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-dokosync
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Doko
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-04-03 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: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description:
|
42
|
+
email:
|
43
|
+
- contacto@doko.com.co
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- AUTHORS
|
50
|
+
- CHANGELOG.md
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- Vagrantfile
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- lib/vagrant-dokosync.rb
|
59
|
+
- lib/vagrant-dokosync/command-dokosync.rb
|
60
|
+
- lib/vagrant-dokosync/plugin.rb
|
61
|
+
- lib/vagrant-dokosync/version.rb
|
62
|
+
- vagrant-dokosync.gemspec
|
63
|
+
homepage:
|
64
|
+
licenses: []
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.5.2.1
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Runs /home/vagrant/unison on file system changes
|
86
|
+
test_files: []
|