guard-remote-sync 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- guard-rsync-remote
1
+ guard-remote-sync
2
2
  ============
3
3
 
4
4
  **Usage**
@@ -7,8 +7,8 @@ bundle exec guard
7
7
  ```
8
8
 
9
9
  **Example Guardfile**
10
- ```
11
- guard 'rsync-remote',
10
+ ```ruby
11
+ guard 'remote-sync',
12
12
  :source => ".",
13
13
  :destination => '/export/home/{username}/tmp',
14
14
  :user => '{user}',
@@ -20,5 +20,3 @@ guard 'rsync-remote',
20
20
  watch(%r{^.+\.(js|xml|php|class|config)$})
21
21
  end
22
22
  ```
23
-
24
- A more extensive and tested rsync guard
@@ -12,9 +12,9 @@ module Guard
12
12
  end
13
13
 
14
14
  def sync
15
- UI.info "Guard::RsyncX `#{@command}`"
15
+ UI.info "Guard::RemoteSync `#{@command}`"
16
16
  r = `#{@command}`
17
- UI.info "Guard::RsyncX Status : \n #{r}" if @options[:verbose]
17
+ UI.info "Guard::RemoteSync Status : \n #{r}" if @options[:verbose]
18
18
  end
19
19
 
20
20
  def test
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RemoteSyncVersion
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -45,9 +45,9 @@ module Guard
45
45
  # Call once when Guard starts. Please override initialize method to init stuff.
46
46
  # @raise [:task_has_failed] when start has failed
47
47
  def start
48
- throw([:task_has_failed], "Guard::RsyncX options invalid") unless options_valid?
49
- UI.info "Guard::RsyncX started in source directory '#{File.expand_path @source.directory}'"
50
- Notifier.notify("Guard::RsyncX is running in directory #{File.expand_path @source.directory}", notifier_options)
48
+ throw([:task_has_failed], "Guard::RemoteSync options invalid") unless options_valid?
49
+ UI.info "Guard::RemoteSync started in source directory '#{File.expand_path @source.directory}'"
50
+ Notifier.notify("Guard::RemoteSync is running in directory #{File.expand_path @source.directory}", notifier_options)
51
51
  @command.sync if options[:sync_on_start] && @command.test
52
52
 
53
53
  end
@@ -56,15 +56,15 @@ module Guard
56
56
  # @raise [:task_has_failed] when stop has failed
57
57
 
58
58
  def stop
59
- UI.info "Guard::RsyncX stopped."
60
- Notifier.notify("Guard::RsyncX stopped.",notifier_options)
59
+ UI.info "Guard::RemoteSync stopped."
60
+ Notifier.notify("Guard::RemoteSync stopped.",notifier_options)
61
61
  end
62
62
 
63
63
  # Called when `reload|r|z + enter` is pressed.
64
64
  # This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
65
65
  # @raise [:task_has_failed] when reload has failed
66
66
  def reload
67
- Notifier.notify("Manual Guard::RsyncX synchronize #{File.expand_path @source.directory} to #{@destination.directory}",notifier_options)
67
+ Notifier.notify("Manual Guard::RemoteSync synchronize #{File.expand_path @source.directory} to #{@destination.directory}",notifier_options)
68
68
  @command.sync
69
69
  end
70
70
 
@@ -72,7 +72,7 @@ module Guard
72
72
  # This method should be principally used for long action like running all specs/tests/...
73
73
  # @raise [:task_has_failed] when run_all has failed
74
74
  def run_all
75
- Notifier.notify("Manual Guard::RsyncX synchronize #{@source.directory} to #{@destination.directory}",notifier_options)
75
+ Notifier.notify("Manual Guard::RemoteSync synchronize #{@source.directory} to #{@destination.directory}",notifier_options)
76
76
  @command.sync
77
77
  end
78
78
 
@@ -103,18 +103,18 @@ module Guard
103
103
  def options_valid?
104
104
  valid = true
105
105
  if options[:source].nil? && options[:cli_options].nil?
106
- UI.error("Guard::RsyncX a source directory is required")
106
+ UI.error("Guard::RemoteSync a source directory is required")
107
107
  valid = false
108
108
  end
109
109
  if options[:destination].nil? && options[:cli_options].nil?
110
- UI.error("Guard::RsyncX a source directory is required")
110
+ UI.error("Guard::RemoteSync a source directory is required")
111
111
  valid = false
112
112
  end
113
113
  valid
114
114
  end
115
115
 
116
116
  def notifier_options
117
- {:title => "Guard::RsyncX", :image => :success}
117
+ {:title => "Guard::RemoteSync", :image => :success}
118
118
  end
119
119
 
120
120
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-remote-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: