coral_backup 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6696eac6bcef14bbd55c082a15ac6f1de41731a3
4
- data.tar.gz: 5a1afbdc26147bff1a10587ca28824ecefea1c1b
3
+ metadata.gz: 4805d6ac74e7cdeaaad6be240d574fbed59d3090
4
+ data.tar.gz: 67127b0f482f26bbd498dd94ff0be00a34321d39
5
5
  SHA512:
6
- metadata.gz: 8a0fe327dfc9b5dc5205cc9d43831041dc13be94423d02731532f5dc7b48826f8ce0b8edd89fdab061e3a9dae80a5fee87b8532fcea0d298d8b67d8c526389a8
7
- data.tar.gz: 8cc60782182e9ada0a83853a1c8a5a9fc951b2f57274bc1e946ff58ea710adc1d2bcc61de4ecb929a842a902c55ee296e1ebce31f6537725e7177c7a3ee3b489
6
+ metadata.gz: 0ce618630fbc5f7da2f8d604df7c6f238b8fbcd16b06947a0692352699a04a551162a495e7df801270baa4dda216cb4e8a2d2ec973fb719bfffb8c34ab384d93
7
+ data.tar.gz: a63560f860be3f75c00e60227e4e391cc3dde36f4700d6cf356757d608808ea857baff991726a4061cab278e41322216ddad239927e8e06b29318b450d8f3553
@@ -22,14 +22,6 @@ module CoralBackup
22
22
  end
23
23
  source << "/" unless source.end_with?("/")
24
24
 
25
- puts "Drag and drop or input destination directory."
26
- destination = FileSelector.single_select
27
- unless FileTest.directory?(destination)
28
- warn "ERROR: Not a directory: #{destination}"
29
- exit 1
30
- end
31
- destination << "/" unless destination.end_with?("/")
32
-
33
25
  puts "Drag and drop or input exclusion files/directories."
34
26
  puts "Press Ctrl + D to finish."
35
27
  exclusions = FileSelector.select
@@ -41,6 +33,14 @@ module CoralBackup
41
33
  }
42
34
  exclusions.uniq!
43
35
 
36
+ puts "Drag and drop or input destination directory."
37
+ destination = FileSelector.single_select
38
+ unless FileTest.directory?(destination)
39
+ warn "ERROR: Not a directory: #{destination}"
40
+ exit 1
41
+ end
42
+ destination << "/" unless destination.end_with?("/")
43
+
44
44
  @settings.add(action_name, source, destination, exclusions)
45
45
  end
46
46
 
@@ -46,12 +46,15 @@ module CoralBackup
46
46
  while !file_added && buf = Readline.readline("> ")
47
47
  expanded = Shellwords.split(buf)
48
48
  warn "WARNING: #{expanded.length} files are being added:" unless expanded.length == 1
49
- begin
50
- file_selector.add_file(expanded[0])
51
- rescue Errno::ENOENT => e
52
- warn e
53
- else
54
- file_added = true
49
+ expanded.each do |ex|
50
+ begin
51
+ file_selector.add_file(ex)
52
+ rescue Errno::ENOENT => e
53
+ warn e
54
+ else
55
+ warn ex
56
+ file_added = true
57
+ end
55
58
  end
56
59
  end
57
60
 
@@ -1,3 +1,3 @@
1
1
  module CoralBackup
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coral_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OTSUKA Tatsuya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-12 00:00:00.000000000 Z
11
+ date: 2015-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor