dropup 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dropup +9 -10
  3. data/dropup.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a03754a4747eef5b1938fe47b553685ab63be063
4
- data.tar.gz: 92bedd3c2711fe348e1a1c4911811bcbabb0c0b8
3
+ metadata.gz: 223dcfde3ab9c1f5a3991c7a18b0a1ed7471606f
4
+ data.tar.gz: 6d89d60e2b2b47fb5a6d8adf868df401dccdbf5b
5
5
  SHA512:
6
- metadata.gz: 1480e362f5fc041135570edde3b870b0f8601edd732efdf2adc20883b940e8dd28b0ec9b4c935a8311aee1449dc7dec7b2c6a3f6214ee3af5d357052dba66200
7
- data.tar.gz: 4043a53236c625b587d0004664e397127a548e4f80eff2030e0d8f85a253a6ccd9f906c62ecc5e6a547a5be050f35e999991647e3b51323cca1458d5b352338f
6
+ metadata.gz: f8e1c4603921077ce3531f957586c466eaf59208c0a1c0bf9c0c76bd478097d99e989fb3e607ccac469b635ca034c1abc8a233b54bdc90ba5434eb8247059395
7
+ data.tar.gz: 4adbe28422f2818e02538e023ee01261809238a590fef88bc73c134ca79aaf3e4055a22b97be66e66c31912ad567c8dd1ff5c5a003ed33342647e1102103c5fd
data/bin/dropup CHANGED
@@ -74,8 +74,7 @@ def backup(srcs, temp, password, size)
74
74
  stdin.printf(password)
75
75
  stdin.close
76
76
 
77
- yield wait.value == 0
78
-
77
+ yield wait.value == 0 ? nil : stderr.read
79
78
  end
80
79
  end
81
80
 
@@ -92,14 +91,18 @@ end
92
91
  temp = temp_pattern.gsub(/%/, time)
93
92
  dest = dest_pattern.gsub(/%/, time)
94
93
 
94
+ TerminalNotifier.notify('Backup Starting') if options[:notification]
95
95
  puts "Creating: #{dest}" if options[:verbose]
96
96
 
97
- backup(ARGV, temp, password, options[:size]) do |success|
97
+ backup(ARGV, temp, password, options[:size]) do |error|
98
+
98
99
 
99
- TerminalNotifier.notify('Backup Starting') if options[:notification]
100
- puts "Building dmg" if options[:verbose]
100
+ if error then
101
+
102
+ TerminalNotifier.notify('Backup Failed', :title => 'Error', :sound => 'default') if options[:notification]
103
+ puts "Error: #{error}" if options[:verbose]
101
104
 
102
- if success then
105
+ else
103
106
 
104
107
  TerminalNotifier.notify('Backup Successful', :title => 'Success') if options[:notification]
105
108
  puts "Success" if options[:verbose]
@@ -114,9 +117,5 @@ backup(ARGV, temp, password, options[:size]) do |success|
114
117
 
115
118
  FileUtils.move(temp, dest)
116
119
 
117
- else
118
-
119
- TerminalNotifier.notify('Backup Failed', :title => 'Error', :sound => 'default') if options[:notification]
120
- puts "Error: #{stderr.read}" if options[:verbose]
121
120
  end
122
121
  end
data/dropup.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'dropup'
3
- s.version = '0.4'
3
+ s.version = '0.5'
4
4
  s.date = '2014-10-02'
5
5
 
6
6
  s.authors = [ 'Torsten Curdt' ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropup
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Curdt