directory_push 0.0.2 → 0.0.3

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: d6b1c4c9d852154cb16f1092282a83a248bb64cb
4
- data.tar.gz: eeee6b3a199eb39deb53e950499c921adddd12d4
3
+ metadata.gz: 377f174e678abffd7f7edd112e7322be29ec537e
4
+ data.tar.gz: f5ce5f0f9e1e69a50175e847037a8bb1ce522643
5
5
  SHA512:
6
- metadata.gz: a93b48eb6c6c45df621b6bb385b2384744ba65ecc118c5f69393c89a672d42e75ba48079905a017692d88383af8659a80b6bc574323a1847e7ada3f6bd86b99d
7
- data.tar.gz: 208418314bac3d46d40adec1361ff29d313d5caf8ba326c7d7c596822533e1a9097124b0f73b20cfa83c3f7037e1a2046d22a4f454720d73d95733b9ba31af5a
6
+ metadata.gz: 6e23e45e536121fc6aa9a24cfc62e4de4fe29974cc3402e3f10e7fa6281fcfcf3af67a75c12e454244fda9acf293092130a34c7d0b0581a515c578d53be6c8e0
7
+ data.tar.gz: 02b03b1332e84652a62dd8ce143ec67dea8f4d5408d3082e2208877a7aa022e172a37cfcc873bed8d89c6f4acd7f2fa55a750c9a80ba06e9281512d194d02cbf
@@ -1,3 +1,3 @@
1
1
  module DirectoryPush
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -40,6 +40,9 @@ remote = %Q{#{config.delete(:user)}@#{config.delete(:remote_address)}:"#{config.
40
40
  rsync_options << source << remote
41
41
  $rsync_command = rsync_options.join(' ')
42
42
 
43
+ rsync_options_without_delete = rsync_options.reject { |o| o.match('--del') }
44
+ $rsync_command_without_delete = rsync_options_without_delete.join(' ')
45
+
43
46
  module ::Guard
44
47
  class DirectoryPush < Plugin
45
48
  def start() sync end
@@ -47,15 +50,15 @@ module ::Guard
47
50
  def run_all() sync end
48
51
  def run_on_additions(paths)
49
52
  Compat::UI.info "Guard::DirectoryPush Files created: #{paths}."
50
- sync
53
+ sync_without_delete
51
54
  end
52
55
  def run_on_modifications(paths)
53
56
  Compat::UI.info "Guard::DirectoryPush Files changed: #{paths}."
54
- sync
57
+ sync_without_delete
55
58
  end
56
59
  def run_on_removals(paths)
57
60
  Compat::UI.info "Guard::DirectoryPush Files removed: #{paths}."
58
- sync
61
+ sync_without_delete
59
62
  end
60
63
 
61
64
  private
@@ -63,6 +66,11 @@ module ::Guard
63
66
  Compat::UI.info %Q{Guard::DirectoryPush `#{$rsync_command}`.}
64
67
  system $rsync_command
65
68
  end
69
+
70
+ def sync_without_delete()
71
+ Compat::UI.info %Q{Guard::DirectoryPush `#{$rsync_command_without_delete}`.}
72
+ system $rsync_command_without_delete
73
+ end
66
74
  end
67
75
  end
68
76
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directory_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill