baidu-sdk 0.0.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.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +15 -0
  5. data/.yardopts +1 -0
  6. data/Gemfile +17 -0
  7. data/Guardfile +6 -0
  8. data/HISTORY.md +2 -0
  9. data/LICENSE.txt +22 -0
  10. data/README.md +161 -0
  11. data/Rakefile +4 -0
  12. data/baidu-pcs.gemspec +24 -0
  13. data/lib/baidu/configure.rb +27 -0
  14. data/lib/baidu/core.rb +19 -0
  15. data/lib/baidu/errors/error.rb +22 -0
  16. data/lib/baidu/oauth.rb +11 -0
  17. data/lib/baidu/oauth/client.rb +66 -0
  18. data/lib/baidu/oauth/flow/base.rb +44 -0
  19. data/lib/baidu/oauth/flow/code.rb +69 -0
  20. data/lib/baidu/oauth/flow/device.rb +75 -0
  21. data/lib/baidu/pcs.rb +19 -0
  22. data/lib/baidu/pcs/client.rb +1090 -0
  23. data/lib/baidu/session.rb +36 -0
  24. data/lib/baidu/support/cacert.pem +37 -0
  25. data/lib/baidu/support/request.rb +127 -0
  26. data/lib/baidu/support/util.rb +67 -0
  27. data/lib/baidu/version.rb +5 -0
  28. data/spec/baidu/core_spec.rb +20 -0
  29. data/spec/baidu/oauth/client_spec.rb +199 -0
  30. data/spec/baidu/pcs/client_spec.rb +878 -0
  31. data/spec/baidu/session_spec.rb +27 -0
  32. data/spec/baidu/support/request_spec.rb +58 -0
  33. data/spec/baidu/support/util_spec.rb +48 -0
  34. data/spec/fixtures/add_task.json +1 -0
  35. data/spec/fixtures/cancel_task.json +3 -0
  36. data/spec/fixtures/copy.json +7 -0
  37. data/spec/fixtures/delete.json +3 -0
  38. data/spec/fixtures/diff.json +17 -0
  39. data/spec/fixtures/empty.json +1 -0
  40. data/spec/fixtures/get_token_code.json +8 -0
  41. data/spec/fixtures/get_token_device.json +8 -0
  42. data/spec/fixtures/list.json +11 -0
  43. data/spec/fixtures/list_task_0.json +1 -0
  44. data/spec/fixtures/list_task_1.json +1 -0
  45. data/spec/fixtures/listrecycle.json +23 -0
  46. data/spec/fixtures/logo.png +0 -0
  47. data/spec/fixtures/meta.json +11 -0
  48. data/spec/fixtures/mkdir.json +7 -0
  49. data/spec/fixtures/move.json +8 -0
  50. data/spec/fixtures/query_task_0.json +24 -0
  51. data/spec/fixtures/query_task_1.json +22 -0
  52. data/spec/fixtures/quota.json +5 -0
  53. data/spec/fixtures/rapidupload.json +10 -0
  54. data/spec/fixtures/refresh_token.json +8 -0
  55. data/spec/fixtures/restore.json +1 -0
  56. data/spec/fixtures/search.json +11 -0
  57. data/spec/fixtures/stream_list.json +16 -0
  58. data/spec/fixtures/streaming.m3u8 +5 -0
  59. data/spec/fixtures/upload.json +9 -0
  60. data/spec/fixtures/upload_block.json +4 -0
  61. data/spec/fixtures/user_and_device_code.json +8 -0
  62. data/spec/spec_helper.rb +66 -0
  63. metadata +169 -0
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: baidu-sdk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Lonre Wang
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: multipart-post
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ description: Unofficial Baidu REST api sdk for ruby, including OAuth, PCS, etc.
42
+ email:
43
+ - me@wanglong.me
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".rspec"
50
+ - ".travis.yml"
51
+ - ".yardopts"
52
+ - Gemfile
53
+ - Guardfile
54
+ - HISTORY.md
55
+ - LICENSE.txt
56
+ - README.md
57
+ - Rakefile
58
+ - baidu-pcs.gemspec
59
+ - lib/baidu/configure.rb
60
+ - lib/baidu/core.rb
61
+ - lib/baidu/errors/error.rb
62
+ - lib/baidu/oauth.rb
63
+ - lib/baidu/oauth/client.rb
64
+ - lib/baidu/oauth/flow/base.rb
65
+ - lib/baidu/oauth/flow/code.rb
66
+ - lib/baidu/oauth/flow/device.rb
67
+ - lib/baidu/pcs.rb
68
+ - lib/baidu/pcs/client.rb
69
+ - lib/baidu/session.rb
70
+ - lib/baidu/support/cacert.pem
71
+ - lib/baidu/support/request.rb
72
+ - lib/baidu/support/util.rb
73
+ - lib/baidu/version.rb
74
+ - spec/baidu/core_spec.rb
75
+ - spec/baidu/oauth/client_spec.rb
76
+ - spec/baidu/pcs/client_spec.rb
77
+ - spec/baidu/session_spec.rb
78
+ - spec/baidu/support/request_spec.rb
79
+ - spec/baidu/support/util_spec.rb
80
+ - spec/fixtures/add_task.json
81
+ - spec/fixtures/cancel_task.json
82
+ - spec/fixtures/copy.json
83
+ - spec/fixtures/delete.json
84
+ - spec/fixtures/diff.json
85
+ - spec/fixtures/empty.json
86
+ - spec/fixtures/get_token_code.json
87
+ - spec/fixtures/get_token_device.json
88
+ - spec/fixtures/list.json
89
+ - spec/fixtures/list_task_0.json
90
+ - spec/fixtures/list_task_1.json
91
+ - spec/fixtures/listrecycle.json
92
+ - spec/fixtures/logo.png
93
+ - spec/fixtures/meta.json
94
+ - spec/fixtures/mkdir.json
95
+ - spec/fixtures/move.json
96
+ - spec/fixtures/query_task_0.json
97
+ - spec/fixtures/query_task_1.json
98
+ - spec/fixtures/quota.json
99
+ - spec/fixtures/rapidupload.json
100
+ - spec/fixtures/refresh_token.json
101
+ - spec/fixtures/restore.json
102
+ - spec/fixtures/search.json
103
+ - spec/fixtures/stream_list.json
104
+ - spec/fixtures/streaming.m3u8
105
+ - spec/fixtures/upload.json
106
+ - spec/fixtures/upload_block.json
107
+ - spec/fixtures/user_and_device_code.json
108
+ - spec/spec_helper.rb
109
+ homepage: https://github.com/lonre/baidu-sdk-ruby
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 2.1.11
130
+ signing_key:
131
+ specification_version: 4
132
+ summary: Unofficial Baidu REST API SDK for Ruby.
133
+ test_files:
134
+ - spec/baidu/core_spec.rb
135
+ - spec/baidu/oauth/client_spec.rb
136
+ - spec/baidu/pcs/client_spec.rb
137
+ - spec/baidu/session_spec.rb
138
+ - spec/baidu/support/request_spec.rb
139
+ - spec/baidu/support/util_spec.rb
140
+ - spec/fixtures/add_task.json
141
+ - spec/fixtures/cancel_task.json
142
+ - spec/fixtures/copy.json
143
+ - spec/fixtures/delete.json
144
+ - spec/fixtures/diff.json
145
+ - spec/fixtures/empty.json
146
+ - spec/fixtures/get_token_code.json
147
+ - spec/fixtures/get_token_device.json
148
+ - spec/fixtures/list.json
149
+ - spec/fixtures/list_task_0.json
150
+ - spec/fixtures/list_task_1.json
151
+ - spec/fixtures/listrecycle.json
152
+ - spec/fixtures/logo.png
153
+ - spec/fixtures/meta.json
154
+ - spec/fixtures/mkdir.json
155
+ - spec/fixtures/move.json
156
+ - spec/fixtures/query_task_0.json
157
+ - spec/fixtures/query_task_1.json
158
+ - spec/fixtures/quota.json
159
+ - spec/fixtures/rapidupload.json
160
+ - spec/fixtures/refresh_token.json
161
+ - spec/fixtures/restore.json
162
+ - spec/fixtures/search.json
163
+ - spec/fixtures/stream_list.json
164
+ - spec/fixtures/streaming.m3u8
165
+ - spec/fixtures/upload.json
166
+ - spec/fixtures/upload_block.json
167
+ - spec/fixtures/user_and_device_code.json
168
+ - spec/spec_helper.rb
169
+ has_rdoc: