vagrant-rsync-only-changed 0.8.2 → 0.8.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: 84335fb9a319e405195abf2856b75f0f1d825da1
4
- data.tar.gz: 2edf9d16d90568943ac0a4d10504d04841eb48be
3
+ metadata.gz: a7c5455b92a2ce5546f572f1deca758c34f6681e
4
+ data.tar.gz: 12228d11eaffe01ccd951ba3bfd8327511a2dae6
5
5
  SHA512:
6
- metadata.gz: bd06495a655aa03c2337e04bb4c63edd5a1a8b667c7535c55f6512a0b58d49a11c4a17fbb3bc737183e8db4a121db41b33064e6caa682d5751c640b07044e4ec
7
- data.tar.gz: 39cf93794b53c6abfbe4f7d93941c0932d8e0ffcdb86a54140603fab6f3bc5048ef2d158416d7075bb1e9216695ece9ef79c033f60657f9de5669bb484913110
6
+ metadata.gz: d186e6095fd4650975b1644fedfe1cae751a7f88cf94d8a32db9df977b24afda8a894c59a7f42dec9001a0c61e149c7c0aecad16d012f1dd0e4c2742c41906e6
7
+ data.tar.gz: 98a2cbd14f6e75812579e4825d495c954c8ddbf89fa1622361e894a52bfa856e0e360c5338a3fe078f6962020f8cd70619e0d2fe964f4bfe408294409d7175b4
@@ -12,7 +12,7 @@ module VagrantPlugins
12
12
  module RsyncOnlyChanged
13
13
  lib_path = Pathname.new(File.expand_path("../vagrant-rsync-only-changed", __FILE__))
14
14
  autoload :Errors, lib_path.join("errors")
15
- autoload :Errors, lib_path.join("helper")
15
+ autoload :Helper, lib_path.join("helper")
16
16
 
17
17
  # This returns the path to the source of this plugin.
18
18
  #
@@ -14,6 +14,10 @@ module VagrantPlugins
14
14
  class Vagrant15RequiredError < VagrantRsyncOnlyChangedError
15
15
  error_key(:vagrant_15_required)
16
16
  end
17
+
18
+ class Rsync310RequiredError < VagrantRsyncOnlyChangedError
19
+ error_key(:rsync_310_required)
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -18,6 +18,25 @@ module VagrantPlugins
18
18
  I18n.reload!
19
19
  end
20
20
 
21
+ def self.usable(raise_error=false)
22
+
23
+ # Build up the actual command to execute
24
+ command = [
25
+ "rsync",
26
+ "--version"
27
+ ].flatten
28
+
29
+ r = Vagrant::Util::Subprocess.execute(*(command))
30
+
31
+ version_re = /version (\d.\d.\d)/
32
+ m = version_re.match( r.stdout )
33
+
34
+ return true if Gem::Version.new(m[1]) >= Gem::Version.new('3.1.0')
35
+ return false if !raise_error
36
+ require_relative "errors"
37
+ raise Errors::Rsync310RequiredError
38
+ end
39
+
21
40
  action_hook "startup-rsync" do |hook|
22
41
  setup_i18n
23
42
  require_relative "action/startup_rsync"
@@ -25,6 +44,8 @@ module VagrantPlugins
25
44
  end
26
45
 
27
46
  command "rsync-auto-only-changed" do
47
+ is_usable = usable(raise_error=true)
48
+ puts is_usable
28
49
  setup_i18n
29
50
  require_relative "command/rsync_auto"
30
51
  RsyncOnlyChangedAuto
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module RsyncOnlyChanged
3
- VERSION = "0.8.2"
3
+ VERSION = "0.8.3"
4
4
  end
5
5
  end
@@ -5,4 +5,6 @@ en:
5
5
  errors:
6
6
  vagrant_17_required: |-
7
7
  The vagrant-rsync-only-changed plugin requires Vagrant 1.7.3 or newer to function.
8
+ rsync_310_required: |-
9
+ For the rsync-auto-changed-only command to work, it is necessary to have rsync with version at least 3.1.0
8
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rsync-only-changed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flávio Botelho
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-12 00:00:00.000000000 Z
11
+ date: 2016-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler