vagrant-fsnotify 0.3.0 → 0.3.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
- SHA1:
3
- metadata.gz: 23df182466bd34328e19486f3cd9aa335fc4e197
4
- data.tar.gz: e73a0a426e991d23203c50e80ee27b55f0e1b6bc
2
+ SHA256:
3
+ metadata.gz: afd5d14e23b69bcb7bea32dfa01294ffac09fc37b2fb16d94e3afad4a06306c2
4
+ data.tar.gz: b4c61f02e38a5b7af3bf476a8cf3d8fa6e016be34dfcca7490904bc9711f0768
5
5
  SHA512:
6
- metadata.gz: 7d172404d49d4bbe5e1122eafcaf8673b3910f27963a7c70007a4c5b30800a4e723ebff22efefe0a7726a5807979cc6d8716c5e1fbc3c1611253be5bf77c30f9
7
- data.tar.gz: ec440a43f7aae5eba917448215f3469cb4030d959f2b4c4ba5a7d0b5bef3646dc8390a79a3ebccb8fc1ff2a74e93540d685fbcc72bf4158f64e47abe89db6cf0
6
+ metadata.gz: cf5a30aec9826b8944bdb7bbe75ebfcc83ce6732726a14dfd090d75a679b820974b2c7923388c48a5ee4fa9dbae504020990952515a2164860179bdd03b06f08
7
+ data.tar.gz: 1f53979826c5233e15310f557d2c309f0edf15a6e64e77b7f3bc7e9439b1d47c995288fc20c0bbfe12eb31b6624db5f65af89e6037ecf19a20cfea63bd8e1e41
data/AUTHORS CHANGED
@@ -3,3 +3,4 @@
3
3
  Adrien Kohlbecker <adrien.kohlbecker@gmail.com>
4
4
  Don Morrison <github@elskwid.net>
5
5
  Leandro Facchinetti <me@leafac.com>
6
+ Levon Hakobyan <levon.hakobyan@microbiz.com>
@@ -1,3 +1,7 @@
1
+ 0.4.0 - 2019-04-11
2
+ ==================
3
+ - Update mtime as well as atime to trigger file events on the guest (#28)
4
+
1
5
  0.3.0 - 2016-04-13
2
6
  ==================
3
7
  - Fix for "No such file or directory" on Windows host (#11)
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", ref: 'v1.7.3'
4
+ gem "vagrant", git: "https://github.com/hashicorp/vagrant.git", ref: 'v2.2.4'
5
5
  end
6
6
 
7
7
  group :plugins do
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Adrien Kohlbecker
3
+ Copyright (c) 2015-2019 Adrien Kohlbecker
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -92,6 +92,19 @@ $ vagrant fsnotify
92
92
  This starts the long running process that captures filesystem events on the host
93
93
  and forwards them to the guest virtual machine.
94
94
 
95
+ ### Run automatically on vagrant up
96
+
97
+ To have `vagrant fsnotify` start automatically with your guest, you can use triggers. Add this to your `Vagrantfile`:
98
+
99
+ ```ruby
100
+ config.trigger.after :up do |t|
101
+ t.name = "vagrant-fsnotify"
102
+ t.run = { inline: "vagrant fsnotify" }
103
+ end
104
+ ```
105
+
106
+ Now, whenever you run `vagrant up`, `vagrant fsnotify` will be run as well. Learn more at https://www.vagrantup.com/docs/triggers/
107
+
95
108
  ### Multi-VM environments
96
109
 
97
110
  In multi-VM environments, you can specify the name of the VMs targeted by
@@ -145,6 +158,27 @@ folder, add the following to the `Vagrantfile`:
145
158
  config.vm.synced_folder ".", "/vagrant", fsnotify: [:added]
146
159
  ```
147
160
 
161
+ Development
162
+ -------------
163
+
164
+ To hack on `vagrant-fsnotify`, you need a recent ruby and virtualbox installed.
165
+
166
+ Then, after cloning the repo:
167
+ ```shell
168
+ # install development gems
169
+ bundle install
170
+
171
+ # run vagrant commands by prefixing them with `bundle exec` to run with the plugin installed from source
172
+ # this will launch a basic ubuntu VM and monitor file changes on the current directory
173
+ bundle exec vagrant up
174
+
175
+ # make changes to the code
176
+ vim lib/vagrant-fsnotify/command-fsnotify.rb
177
+ ...
178
+
179
+ # relaunch the process to activate your changes
180
+ bundle exec vagrant fsnotify
181
+ ```
148
182
 
149
183
  Original work
150
184
  -------------
@@ -1,122 +1,14 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
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.
4
+ Vagrant.configure("2") do |config|
5
+ config.vm.box = "ubuntu/bionic64"
42
6
  config.vm.synced_folder ".", "/vagrant", fsnotify: true
43
7
 
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
8
+ config.vm.provision "shell", inline: "sudo apt-get update && sudo apt-get install -y inotify-tools"
99
9
 
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"
10
+ config.trigger.after :up do |t|
11
+ t.name = "vagrant-fsnotify"
12
+ t.run = { inline: "bundle exec vagrant fsnotify" }
13
+ end
122
14
  end
@@ -199,7 +199,7 @@ MESSAGE
199
199
  end
200
200
 
201
201
  tosync.each do |machine, files|
202
- machine.communicate.execute("touch -a '#{files.join("' '")}'")
202
+ machine.communicate.execute("touch -am '#{files.join("' '")}'")
203
203
  remove_from_this_machine = files & todelete
204
204
  unless remove_from_this_machine.empty?
205
205
  machine.communicate.execute("rm -rf '#{remove_from_this_machine.join("' '")}'")
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Fsnotify
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-fsnotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Kohlbecker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubyforge_project:
84
- rubygems_version: 2.5.2
83
+ rubygems_version: 3.0.3
85
84
  signing_key:
86
85
  specification_version: 4
87
86
  summary: Forward filesystem change notifications to your Vagrant VM