synchrotron 0.0.5 → 0.0.6
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 +4 -4
- data/bin/synchrotron +1 -0
- data/lib/synchrotron.rb +7 -1
- data/lib/synchrotron/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 221bdfa7be51e3188cbacd6471970efce7913b98
|
|
4
|
+
data.tar.gz: e730a7ab32dc170dfd410201396328af7228c362
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5dcf7fc162fc0574bb68dbeb9261f43cadcd10ebfd7edf855550a5970bd5d4c4a014c1ce6128c116f41fdb9e28ad2f3adf5f73b91630e61b3f8d7d1a1303a52
|
|
7
|
+
data.tar.gz: 35d8404a22164e76211dbaa02ab88e4fded9d00991268a1a0c83795c927787f7f01c42a0ec0ecaf3e697f2f392cd9e5345f713187c8649eae6d9749119b63ce8
|
data/bin/synchrotron
CHANGED
|
@@ -25,6 +25,7 @@ BANNER
|
|
|
25
25
|
opt :exclude_from, "File containing pathnames and patterns to exclude", :short => :none, :multi => true, :type => :string
|
|
26
26
|
opt :rsync_path, "Path to the rsync binary", :short => :none, :default => '/usr/bin/rsync'
|
|
27
27
|
opt :verbosity, "Output verbosity: debug, verbose, info, warn, error, or fatal", :short => '-V', :default => 'info'
|
|
28
|
+
opt :notify, "Display an OS X notification when finished synchronizing to remote", :short => :none
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
config[:remote_path] = ARGV.shift or abort("Error: Remote path not specified")
|
data/lib/synchrotron.rb
CHANGED
|
@@ -111,7 +111,13 @@ module Synchrotron; class << self
|
|
|
111
111
|
|
|
112
112
|
@log.debug rsync_cmd
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
lines = 0
|
|
115
|
+
`#{rsync_cmd}`.each_line {|line| @log.info line; lines = lines + 1 }
|
|
116
|
+
|
|
117
|
+
if @config[:notify] && lines > 0
|
|
118
|
+
require 'terminal-notifier'
|
|
119
|
+
TerminalNotifier.notify("Synced #{lines} files to #{rsync_remote}", :title => 'Synchrotron', :Group=>Process.pid)
|
|
120
|
+
end
|
|
115
121
|
end
|
|
116
122
|
|
|
117
123
|
private
|
data/lib/synchrotron/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: synchrotron
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Grove
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb-fsevent
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - ~>
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 0.9.3
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: terminal-notifier
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ~>
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 1.4.2
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ~>
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 1.4.2
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: trollop
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|