dropbox-api 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/dropbox-api/objects/dir.rb +4 -0
- data/lib/dropbox-api/version.rb +1 -1
- data/spec/lib/dropbox-api/dir_spec.rb +36 -21
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a497d50d7c10eb7ace7e89beffe53806096d7e7
|
4
|
+
data.tar.gz: 638bebfaa0400f030068dcc07d8549fbea9d284e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d62dc7f4c700a210e9853ee2919db1bbab97224ca2ae7a512b095199e1a93e08a1057cb3c6c46e48b57044bb251567bdb95e446d2a26222ec7c8cb020f81822
|
7
|
+
data.tar.gz: 0b91edbe79fb4e0bab7d4af3d849b5f785b49758196ff9b89dad14c19eb995b452202daeb32827e45c85669a68391315cce833b3a71ba281a21efe3a80177356
|
data/CHANGELOG
ADDED
data/lib/dropbox-api/version.rb
CHANGED
@@ -2,41 +2,56 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Dropbox::API::Dir do
|
4
4
|
|
5
|
-
before do
|
6
|
-
@client = Dropbox::Spec.instance
|
7
|
-
@dirname = "#{Dropbox::Spec.test_dir}/spec-dir-test-#{Time.now.to_i}"
|
8
|
-
@dir = @client.mkdir @dirname
|
9
|
-
end
|
10
|
-
|
11
5
|
after do
|
12
6
|
# @dir.delete
|
13
7
|
end
|
14
8
|
|
15
|
-
describe "#
|
9
|
+
describe "#hash" do
|
10
|
+
|
11
|
+
let(:hash) { "dasdsaf32da" }
|
16
12
|
|
17
|
-
it "
|
18
|
-
|
19
|
-
|
20
|
-
@dir.path.should == new_dirname
|
13
|
+
it "returns the hash from Dropbox" do
|
14
|
+
dir = Dropbox::API::Dir.new("hash" => hash)
|
15
|
+
dir.hash.should == hash
|
21
16
|
end
|
22
17
|
|
23
18
|
end
|
24
19
|
|
25
|
-
|
20
|
+
context "operations" do
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
@dir.
|
30
|
-
@dir.
|
22
|
+
before do
|
23
|
+
@client = Dropbox::Spec.instance
|
24
|
+
@dirname = "#{Dropbox::Spec.test_dir}/spec-dir-test-#{Time.now.to_i}"
|
25
|
+
@dir = @client.mkdir @dirname
|
31
26
|
end
|
32
27
|
|
33
|
-
|
28
|
+
describe "#copy" do
|
29
|
+
|
30
|
+
it "copies the dir properly" do
|
31
|
+
new_dirname = @dirname + "-copied"
|
32
|
+
@dir.copy new_dirname
|
33
|
+
@dir.path.should == new_dirname
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "#move" do
|
39
|
+
|
40
|
+
it "moves the dir properly" do
|
41
|
+
new_dirname = @dirname + "-copied"
|
42
|
+
@dir.move new_dirname
|
43
|
+
@dir.path.should == new_dirname
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#destroy" do
|
34
49
|
|
35
|
-
|
50
|
+
it "destroys the dir properly" do
|
51
|
+
@dir.destroy
|
52
|
+
@dir.is_deleted.should == true
|
53
|
+
end
|
36
54
|
|
37
|
-
it "destroys the dir properly" do
|
38
|
-
@dir.destroy
|
39
|
-
@dir.is_deleted.should == true
|
40
55
|
end
|
41
56
|
|
42
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropbox-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Bunsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -117,6 +117,7 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rspec"
|
120
|
+
- CHANGELOG
|
120
121
|
- Gemfile
|
121
122
|
- LICENSE
|
122
123
|
- README.markdown
|