rapidshare-ext 0.0.4 → 0.0.5
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.
- data/History.md +5 -1
- data/README.md +5 -3
- data/lib/rapidshare-ext/api.rb +1 -1
- data/lib/rapidshare-ext/version.rb +1 -1
- data/lib/rapidshare-ext.rb +7 -7
- metadata +1 -1
data/History.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## ver. 0.0.5 2012-11-21
|
|
2
|
+
|
|
3
|
+
* [fixed] remove_orphans!()
|
|
4
|
+
|
|
1
5
|
## ver. 0.0.4 2012-11-21
|
|
2
6
|
|
|
3
7
|
* [changed] folders_hierarchy(): :validate param added
|
|
@@ -36,4 +40,4 @@ It has began. We have the features as follows:
|
|
|
36
40
|
* [added] Erasing all account data
|
|
37
41
|
* [added] Get file info
|
|
38
42
|
* [added] Folder/file identification by path
|
|
39
|
-
* [added] Integration tests (Forkers, be careful, account is fully erased
|
|
43
|
+
* [added] Integration tests (Forkers, be careful, account is fully erased before each test execution being performed!)
|
data/README.md
CHANGED
|
@@ -174,20 +174,22 @@ api.remove_folder "/a" # This will correctly delete all child directories
|
|
|
174
174
|
But if you already have orphans in your account there is possible to fix them.
|
|
175
175
|
The next method detects all orphan folders in your account and moves them into a specific folder:
|
|
176
176
|
```ruby
|
|
177
|
-
move_orphans :to => "/"
|
|
177
|
+
api.move_orphans :to => "/"
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
Or we can just delete all of them (be careful):
|
|
181
181
|
```ruby
|
|
182
|
-
remove_orphans!
|
|
182
|
+
api.remove_orphans!
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
### Account
|
|
186
|
-
You can null your account by deleting all data stored inside
|
|
186
|
+
You can null your account by deleting all the data stored inside:
|
|
187
187
|
```ruby
|
|
188
188
|
api.erase_all_data!
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
+
**Be careful with it, because all you lose all your data**
|
|
192
|
+
|
|
191
193
|
## Contributing
|
|
192
194
|
|
|
193
195
|
1. Fork it
|
data/lib/rapidshare-ext/api.rb
CHANGED
|
@@ -348,7 +348,7 @@ module Rapidshare
|
|
|
348
348
|
# by deleting orphan folders (folders with no parent folder), this folders are invisible in Rapidshare File Manager
|
|
349
349
|
# So, this method deletes orphan folders
|
|
350
350
|
def remove_orphans!
|
|
351
|
-
@tree = folders_hierarchy
|
|
351
|
+
@tree = folders_hierarchy :validate => false
|
|
352
352
|
@tree.each_pair do |folder_id, data|
|
|
353
353
|
@tree.delete_if do |folder_id, data|
|
|
354
354
|
if orphan? folder_id
|
data/lib/rapidshare-ext.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
3
|
-
require
|
|
4
|
-
require
|
|
5
|
-
require
|
|
6
|
-
require
|
|
7
|
-
require
|
|
1
|
+
require 'rest-client'
|
|
2
|
+
require 'rapidshare'
|
|
3
|
+
require 'rapidshare-base/utils'
|
|
4
|
+
require 'rapidshare-base/api'
|
|
5
|
+
require 'rapidshare-ext/api'
|
|
6
|
+
require 'rapidshare-ext/download'
|
|
7
|
+
require 'rapidshare-ext/version'
|
|
8
8
|
|
|
9
9
|
class Rapidshare::API
|
|
10
10
|
include Rapidshare::Ext::API
|