seafile-api 0.3 → 0.3.1

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: 54e398775894849745a2610842feaf87a9b99299
4
- data.tar.gz: f7fa0e20d960ae94f80b96516543ff596eba7860
3
+ metadata.gz: 25ca2b4419ce90eae438987c2d3057c97527e574
4
+ data.tar.gz: e0132c7298291849ce06c1316c52cdcb39ea088c
5
5
  SHA512:
6
- metadata.gz: 72914bcc9f9c22314b149d95c9f9cd6b42e11757dda8c24a20efae523186cafe1dfc14d5495c8b71f815edce60478570c0f164385c457eaa636ffc2ffa51903b
7
- data.tar.gz: 99c54f7d852655cdcceda883bd878fe73e8748df6c0d627b3969f83dfb8b61780aef7d5ac2858c4af50c85c4cc1a70439b863d83a657115e59b57bf75558dd3e
6
+ metadata.gz: de80a427c9449d6ee6ea6e95037c78d1d317c762706505ee5ff6093c8bb40ce27e643a3ef5c6f3ea6a23928135a12f4fc9ba234ab2837b1beb0d9eb54432fa83
7
+ data.tar.gz: 5117e63ba2bd3b60c62d23cadc0292578117f85cd484bfbfefd6a1cb24c7dab81d469e7db1fc88212905bdac51a275fdb808821254f5fafcba612e440a215c83
data/lib/seafile-api.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'json'
2
2
  require 'curb'
3
3
  require 'net/http'
4
- include URI
4
+ require 'uri'
5
5
 
6
6
  module SeafileApi
7
7
  class Connect
@@ -17,7 +17,6 @@ module SeafileApi
17
17
  delete_acc(email)
18
18
  end
19
19
  private
20
- #TODO: add result processing
21
20
  #https://cloud.seafile.com/api2/accounts/{email}/
22
21
  def delete_acc(email)
23
22
  curl_delete("#{self.host}/api2/accounts/#{email}").body_str
@@ -11,7 +11,6 @@ module SeafileApi
11
11
  def file_detail(filename,repo=self.repo)
12
12
  get_description(filename,repo)
13
13
  end
14
- #TODO: write test
15
14
  def link_revision(filename,commit_id,repo=self.repo)
16
15
  get_link_file_revision(filename,commit_id,repo)
17
16
  end
@@ -27,7 +26,6 @@ module SeafileApi
27
26
  def upload_file(file,path='/',repo=self.repo)
28
27
  post_upload(repo,{"file"=> file,"filename"=> File.basename(file),"parent_dir"=> "#{path}"})
29
28
  end
30
- #TODO: write test
31
29
  def update_file(file,target_file=nil,repo=self.repo)
32
30
  post_update(repo,{"file" => file, "filename" =>File.basename(file), "target_file"=> target_file ||File.basename(file)})
33
31
  end
@@ -40,7 +38,7 @@ module SeafileApi
40
38
  post_rename(old_name,repo,{"operation"=>"rename", "newname" => new_name})
41
39
  end
42
40
 
43
- #TODO: missing arguments
41
+ #TODO: missing arguments at 3,0,3 , at 3.0.0 all wark
44
42
  def copy_file(filename,dst_dir='/',dst_repo=self.repo,src_repo=self.repo)
45
43
  post_copy(src_repo,{"file_names"=>filename, "dst_repo" => dst_repo, "dst_dir"=>dst_dir})
46
44
  end
@@ -25,7 +25,7 @@ module SeafileApi
25
25
  end
26
26
 
27
27
  #
28
- #TODO need know what is private shared file -> need test"error_msg\": \"Token not found\"}
28
+ #`TODO need know what is private shared file -> need test"error_msg\": \"Token not found\"}
29
29
  def download_private_shared_file(file_t)
30
30
  get_private_shared_file_link(file_t)
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seafile-api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kostiantyn Semchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-18 00:00:00.000000000 Z
11
+ date: 2014-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec