synchrotron 0.0.5 → 0.0.6

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: 76336efe910a6510eb7af73cc5013891f4326b2d
4
- data.tar.gz: 8b2bef1006aaa019352ba130e78e5c228755d9f2
3
+ metadata.gz: 221bdfa7be51e3188cbacd6471970efce7913b98
4
+ data.tar.gz: e730a7ab32dc170dfd410201396328af7228c362
5
5
  SHA512:
6
- metadata.gz: 53297cbc50b374666ee8f6a51a739c6dd72a25efe4f89573b780fbcf4bdf8393eaf9ed58bf39a35a4f2137023e7eb801f60b731be3c81b7c8fc9d36956ec3148
7
- data.tar.gz: 8417df76c7e438fbf05fd434cc24c1a0bbfe15ff9f3a9afc9c2dafbee31f9dac1a1661dbef34e0e580a35b8394aca2fb0e62ab99867bb991f738e73343fb816e
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
- `#{rsync_cmd}`.each_line {|line| @log.info line }
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
@@ -1,6 +1,6 @@
1
1
  module Synchrotron
2
2
  APP_NAME = 'Synchrotron'
3
- APP_VERSION = '0.0.5'
3
+ APP_VERSION = '0.0.6'
4
4
  APP_AUTHOR = 'Ryan Grove'
5
5
  APP_EMAIL = 'ryan@wonko.com'
6
6
  APP_URL = 'http://github.com/rgrove/synchrotron/'
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.5
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-06-10 00:00:00.000000000 Z
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