droxi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/droxi +1 -1
- data/droxi.1.template +8 -1
- data/droxi.gemspec +2 -2
- data/lib/droxi/commands.rb +169 -92
- data/lib/droxi/complete.rb +1 -1
- data/lib/droxi.rb +24 -8
- data/spec/commands_spec.rb +273 -113
- data/spec/testutils.rb +6 -3
- metadata +2 -2
data/spec/testutils.rb
CHANGED
@@ -36,7 +36,7 @@ module TestUtils
|
|
36
36
|
paths.map! { |path| "#{TEST_ROOT}/#{path}" }
|
37
37
|
dead_paths = state.contents(TEST_ROOT).select { |p| paths.include?(p) }
|
38
38
|
return if dead_paths.empty?
|
39
|
-
Commands::RM.exec(client, state, *dead_paths)
|
39
|
+
Commands::RM.exec(client, state, '-r', *dead_paths)
|
40
40
|
end
|
41
41
|
|
42
42
|
# Ensure that the remote directory structure under +TEST_ROOT+ exactly
|
@@ -46,7 +46,7 @@ module TestUtils
|
|
46
46
|
paths.map! { |path| "#{TEST_ROOT}/#{path}" }
|
47
47
|
dead_paths = state.contents(TEST_ROOT).reject { |p| paths.include?(p) }
|
48
48
|
return if dead_paths.empty?
|
49
|
-
Commands::RM.exec(client, state, *dead_paths)
|
49
|
+
Commands::RM.exec(client, state, '-r', *dead_paths)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Returns a new +DropboxClient+ and +State+.
|
@@ -59,10 +59,13 @@ module TestUtils
|
|
59
59
|
|
60
60
|
# Creates a remote file at the given path.
|
61
61
|
def self.put_temp_file(client, state, path)
|
62
|
-
`mkdir testing`
|
62
|
+
`[ -d testing ] || mkdir testing`
|
63
63
|
basename = File.basename(path)
|
64
64
|
`touch testing/#{basename}`
|
65
|
+
real_stdout = $stdout
|
66
|
+
$stdout = StringIO.new
|
65
67
|
Commands::PUT.exec(client, state, "testing/#{basename}", path)
|
68
|
+
$stdout = real_stdout
|
66
69
|
`rm -rf testing`
|
67
70
|
end
|
68
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droxi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mulcahy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dropbox-sdk
|