vagrant-vaimo-unison 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 665a6ac67e4fccd7dc7277186858488fbe94214f
4
- data.tar.gz: a42e74a68dcd28324af7c9a0e01dbe97d7c76380
3
+ metadata.gz: d0dfc2c9527b5c0f8a8218c166e62b066b5a6474
4
+ data.tar.gz: 370dc703f3f5844a769203a0468245cc6174e28f
5
5
  SHA512:
6
- metadata.gz: d1681956f1bdd042532d52f5229e265a4d5c6592f04ef58cafd610b422f9c570c11ef826b708602483e88ed1619168f556b4d5e2753e9c9ee772a91cba067fa4
7
- data.tar.gz: 9a71bcbfb28214619e303b7085317db6ebaec8d0b6d55b90fe9f1e5bc6992dfdad3ad65eaf245d20f6a58700c809ebc36b88c0d893a51f6cc50d4023e8dc5d91
6
+ metadata.gz: 13c669a03e5845a66f6945a17974d6013ca68bd0d452e4972fa8c0baa433841fee1f09225d6284550597c66080a18c689779df50be5908450ad2c5fbb3356ead
7
+ data.tar.gz: 1b6fd39a2d502765a132aee4004c401a57c4af41adcf0b3903b9b15f1a3bced553b5927ae88e0a1c2e32095137e5a8368f2a0643344574e10898548f9bcb404d
@@ -10,6 +10,7 @@ module VagrantPlugins
10
10
  attr_accessor :batch, :repeat, :terse
11
11
  attr_accessor :force_remote, :force_local
12
12
  attr_accessor :prefer_remote, :prefer_local
13
+ attr_accessor :project
13
14
 
14
15
  def to_a
15
16
  args.map do |arg|
@@ -1,13 +1,14 @@
1
1
  module VagrantPlugins
2
2
  module Unison
3
3
  class UnisonPaths
4
- def initialize(env, machine)
4
+ def initialize(env, machine, project = '')
5
5
  @env = env
6
6
  @machine = machine
7
+ @project = project
7
8
  end
8
9
 
9
10
  def guest
10
- @machine.config.unison.guest_folder
11
+ "#{@machine.config.unison.guest_folder}/#{@project}"
11
12
  end
12
13
 
13
14
  def host
@@ -16,7 +17,7 @@ module VagrantPlugins
16
17
 
17
18
  # Make sure there is a trailing slash on the host path to
18
19
  # avoid creating an additional directory with rsync
19
- path = "#{path}/" if path !~ /\/$/
20
+ path = "#{path}/#{@project}" if path !~ /\/$/
20
21
  end
21
22
  end
22
23
  end
@@ -9,7 +9,8 @@ module VagrantPlugins
9
9
 
10
10
  return unless machine.config.unison.host_folder
11
11
 
12
- unison_paths = UnisonPaths.new(@env, machine)
12
+ unison_paths = UnisonPaths.new(@env, machine, options[:project])
13
+
13
14
  guest_path = unison_paths.guest
14
15
  host_path = unison_paths.host
15
16
 
@@ -26,6 +27,7 @@ module VagrantPlugins
26
27
  shell_command.prefer_remote = options[:prefer_remote]
27
28
  shell_command.force_local = options[:force_local]
28
29
  shell_command.force_remote = options[:force_remote]
30
+ shell_command.project = options[:project]
29
31
 
30
32
  yield shell_command
31
33
  end
@@ -55,6 +57,7 @@ module VagrantPlugins
55
57
  :force_local => false,
56
58
  :force_remote => false,
57
59
  :verbose => false,
60
+ :project => nil,
58
61
  }
59
62
  end
60
63
 
@@ -85,6 +88,10 @@ module VagrantPlugins
85
88
  o.on('--verbose', 'Print additional debug information') do |flag|
86
89
  options[:verbose] = flag
87
90
  end
91
+
92
+ o.on('-p', '--project=project', 'Project') do |project|
93
+ options[:project] = project;
94
+ end
88
95
  end
89
96
  end
90
97
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Unison
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vaimo-unison
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2017-06-07 00:00:00.000000000 Z
13
+ date: 2017-06-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake