vagrant-unison2 1.2.2 → 1.2.3

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: 3f9c0f38337bb5960bb29c8da31e978a23695887
4
- data.tar.gz: 966b97b53ea314c8461d8690bcaa507dad9b6bc9
3
+ metadata.gz: 87a35ea31a8192ca39297beeb53277d516a58f8f
4
+ data.tar.gz: ca4509331a2bb649fbb959cc1619177a837e3e04
5
5
  SHA512:
6
- metadata.gz: 3abcb7f645f70a8b3f006b79f10d106ef9365ebdf15c84279c787db7567d8b461293a4f37bc6305293960a62c4fc24cd064102395c039a4ebd430c5117ab86ee
7
- data.tar.gz: e4e96ea90142df5d27c9d67a07d7b435a02f55d22e7e74937150d134a8c0b565c1cae94423636645dbc8a7649d78b3e0cfdeae33964e077c5d40823f9beb04b5
6
+ metadata.gz: 11f2dfcd7259fe59fa8a10fd71fd231e9caff772b7def9cdeb5c0376d36f4f9a7d399f943c876fa3aa1ab8b8e6d1403b93d6dea5ae80e845a50663ecae747162
7
+ data.tar.gz: 62a52069e8664093dd546aaac1ebe268b6f29156d97b205b1780e34b4bb9b004973a7586b14edb45192a09a16efbbc5d4aeadb6fda7784eeffd2ad48a8bad03a
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ Vagrantfile
16
16
  # IDEs
17
17
  .project
18
18
  .idea
19
+ .tags*
data/README.md CHANGED
@@ -23,32 +23,38 @@ to your Vagrant VM (local or on AWS). Under the covers it uses [Unison](http://
23
23
  * Other 64-bit Linux:
24
24
  * Install package from `http://ftp5.gwdg.de/pub/linux/archlinux/extra/os/x86_64/unison-2.48.3-2-x86_64.pkg.tar.xz`. (Install at your own risk, this is a plain http link. If someone knows of a signed version, checksum, or https host let me know so I can update it).
25
25
  * On Windows, download [2.40.102](http://alan.petitepomme.net/unison/assets/Unison-2.40.102.zip), unzip, rename `Unison-2.40.102 Text.exe` to `unison.exe` and copy to somewhere in your path.
26
- 1. Install using standard Vagrant 1.1+ plugin installation methods.
27
- ```
28
- $ vagrant plugin install vagrant-unison2
29
- ```
30
- 1. After installing, edit your Vagrantfile and add a configuration directive similar to the below:
31
- ```ruby
32
- Vagrant.configure("2") do |config|
33
- config.vm.box = "dummy"
34
26
 
35
- # Required configs
36
- config.unison.host_folder = "src/" #relative to the folder your Vagrantfile is in
37
- config.unison.guest_folder = "src/" #relative to the vagrant home folder -> /home/vagrant
27
+ 2. Install using standard Vagrant 1.1+ plugin installation methods.
28
+ * `vagrant plugin install vagrant-unison2`
38
29
 
39
- # Optional configs
40
- # File patterns to ignore when syncing. Ensure you don't have spaces between the commas!
41
- config.unison.ignore = "Name {.DS_Store,.git,node_modules}" # Default: none
42
- # SSH connection details for Vagrant to communicate with VM.
43
- config.unison.ssh_host = "10.0.0.1" # Default: '127.0.0.1'
44
- config.unison.ssh_port = 22 # Default: 2222
45
- config.unison.ssh_user = "deploy" # Default: 'vagrant'
46
- # `vagrant unison-sync-polling` command will restart unison in VM if memory usage gets above this threshold (in MB).
47
- config.unison.mem_cap_mb = 500 # Default: 200
30
+ 3. Configure unison in your Vagrantfile, as shown below.
48
31
 
49
- end
50
- ```
51
- 1. Start up your starting your vagrant box as normal (eg: `vagrant up`)
32
+ 4. Start your vagrant box as normal (eg: `vagrant up`)
33
+
34
+ ## Configuration
35
+
36
+ ```ruby
37
+ Vagrant.configure("2") do |config|
38
+ config.vm.box = "dummy"
39
+
40
+ # Required configs
41
+ config.unison.host_folder = "src/" #relative to the folder your Vagrantfile is in
42
+ config.unison.guest_folder = "src/" #relative to the vagrant home folder (e.g. /home/vagrant)
43
+
44
+ # Optional configs
45
+ # File patterns to ignore when syncing. Ensure you don't have spaces between the commas!
46
+ config.unison.ignore = "Name {.DS_Store,.git,node_modules}" # Default: none
47
+ # SSH connection details for Vagrant to communicate with VM.
48
+ config.unison.ssh_host = "10.0.0.1" # Default: '127.0.0.1'
49
+ config.unison.ssh_port = 22 # Default: 2222
50
+ config.unison.ssh_user = "deploy" # Default: 'vagrant'
51
+ config.unison.perms = 0 # if you get "properties changed on both sides" error
52
+ # `vagrant unison-sync-polling` command will restart unison in VM if memory
53
+ # usage gets above this threshold (in MB).
54
+ config.unison.mem_cap_mb = 500 # Default: 200
55
+
56
+ end
57
+ ```
52
58
 
53
59
 
54
60
  ## Start syncing Folders
@@ -105,7 +111,7 @@ Unison failed: Uncaught exception Failure("input_value: bad bigarray kind")
105
111
  ```
106
112
 
107
113
  This is caused when the unison on your host and guest were compiled with different versions of ocaml. To fix ensure that
108
- both are compiled with the same ocaml version. [More Info Here](https://gist.github.com/pch/aa1c9c4ec8522a11193b)
114
+ both are compiled with the same ocaml version. [More Info Here](https://gist.github.com/pch/aa1c9c4ec8522a11193b)
109
115
 
110
116
  ### Skipping files changed on both sides
111
117
 
@@ -119,6 +125,20 @@ sync the file. (I'm looking for a way to fix this particular error case).
119
125
 
120
126
  Running a unison-cleanup should fix this state.
121
127
 
128
+ ### Properties changed on both sides
129
+
130
+ The error is:
131
+ ```
132
+ Synchronization complete at 13:00:33 (0 item transferred, 1 skipped, 0 failed)
133
+ skipped: (properties changed on both sides)
134
+ props <-?-> props /
135
+ ```
136
+
137
+ This can be caused by file permissions being synced. If you get this error set
138
+ the perms arg to 0 as in the [example configuration](#configuration).
139
+
140
+ See [perms documentation](http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#perms) for more info.
141
+
122
142
 
123
143
  ## Development
124
144
 
@@ -44,6 +44,11 @@ module VagrantPlugins
44
44
  # @return [int]
45
45
  attr_accessor :mem_cap_mb
46
46
 
47
+ # perms arg value
48
+ #
49
+ # @return [int]
50
+ attr_accessor :perms
51
+
47
52
  def initialize(region_specific=false)
48
53
  @host_folder = UNSET_VALUE
49
54
  @guest_folder = UNSET_VALUE
@@ -53,6 +58,7 @@ module VagrantPlugins
53
58
  @ssh_port = UNSET_VALUE
54
59
  @ssh_user = UNSET_VALUE
55
60
  @mem_cap_mb = UNSET_VALUE
61
+ @perms = UNSET_VALUE
56
62
  end
57
63
 
58
64
  def finalize!
@@ -31,6 +31,7 @@ module VagrantPlugins
31
31
  terse_arg,
32
32
  repeat_arg,
33
33
  ignore_arg,
34
+ perms_arg,
34
35
  ['-sshargs', %("#{@ssh_command.ssh_args}")],
35
36
  ].flatten.compact
36
37
  _args
@@ -44,6 +45,10 @@ module VagrantPlugins
44
45
  ['-ignore', %("#{@machine.config.unison.ignore}")] if @machine.config.unison.ignore
45
46
  end
46
47
 
48
+ def perms_arg
49
+ ['-perms', @machine.config.unison.perms] if @machine.config.unison.perms
50
+ end
51
+
47
52
  def repeat_arg
48
53
  ['-repeat', @machine.config.unison.repeat] if repeat && @machine.config.unison.repeat
49
54
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Unison
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-unison2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Laing
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-03-19 00:00:00.000000000 Z
13
+ date: 2016-03-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: listen