dropbox-api 0.4.3 → 0.4.4

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: 5c1d8914b2294e4ca594597d1d20589822ab8357
4
- data.tar.gz: 1523fde081a4a3dc3a9d7b9a1db40f2d52d8ab26
3
+ metadata.gz: 5a497d50d7c10eb7ace7e89beffe53806096d7e7
4
+ data.tar.gz: 638bebfaa0400f030068dcc07d8549fbea9d284e
5
5
  SHA512:
6
- metadata.gz: f276d9a4e2684036681843c7eb62b46b374a745d3feb978714388510b52d2e5e12615dca50ff373f7b248a04bca314cd2f6e106a16757a841be1811d006fe14c
7
- data.tar.gz: db0295a231b0cbc0ec80e26ff5c8fe7400d0b79e42842b0a7add9e2e1c0b5c4dfc7f5bbd2b18ff396e56f5b8f55d17d5abeb10f03d683020c73169fb9f21bf8c
6
+ metadata.gz: 9d62dc7f4c700a210e9853ee2919db1bbab97224ca2ae7a512b095199e1a93e08a1057cb3c6c46e48b57044bb251567bdb95e446d2a26222ec7c8cb020f81822
7
+ data.tar.gz: 0b91edbe79fb4e0bab7d4af3d849b5f785b49758196ff9b89dad14c19eb995b452202daeb32827e45c85669a68391315cce833b3a71ba281a21efe3a80177356
@@ -0,0 +1,4 @@
1
+ 0.4.4
2
+ + Add Dropbox::API::Dir#hash which returns the dropbox hash
3
+ 0.4.3
4
+ + Allow passing of parameters to Dropbox::API::Client#delta
@@ -19,6 +19,10 @@ module Dropbox
19
19
  Dropbox::API::Object.init(response, client)
20
20
  end
21
21
 
22
+ def hash
23
+ self[:hash]
24
+ end
25
+
22
26
  end
23
27
 
24
28
  end
@@ -1,5 +1,5 @@
1
1
  module Dropbox
2
2
  module API
3
- VERSION = "0.4.3"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  end
@@ -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 "#copy" do
9
+ describe "#hash" do
10
+
11
+ let(:hash) { "dasdsaf32da" }
16
12
 
17
- it "copies the dir properly" do
18
- new_dirname = @dirname + "-copied"
19
- @dir.copy new_dirname
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
- describe "#move" do
20
+ context "operations" do
26
21
 
27
- it "moves the dir properly" do
28
- new_dirname = @dirname + "-copied"
29
- @dir.move new_dirname
30
- @dir.path.should == new_dirname
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
- end
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
- describe "#destroy" do
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.3
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-29 00:00:00.000000000 Z
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