boxr 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/boxr.rb +11 -4
- data/lib/boxr/client.rb +1 -1
- data/lib/boxr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f849171875f3edd0a0b62558c2c7d78fa9b06fae858d09ea4f031b943a3da80
|
4
|
+
data.tar.gz: 5ea0d5bee9dffe5b897e8c917d6ee926759957fa342563d8f771a96f7f4b2a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde5b109120de0b88606ff059082388e8aa32ae6c0bec6c237d689a1b65887d0ad734d9531e64f1db72b45ff2171f69a2e31f17c6903e1e6bf236338158e84f2
|
7
|
+
data.tar.gz: 0675dfa9b0743557a4d113fd7c6d8282d2ca83650f541377e5723f5b5d8243d666f8c3b896207a9f3cbc889e155d80c398672677f3bb5eb6302275b85329af0e
|
data/lib/boxr.rb
CHANGED
@@ -24,17 +24,24 @@ require 'boxr/auth'
|
|
24
24
|
require 'boxr/web_links'
|
25
25
|
require 'boxr/watermarking'
|
26
26
|
|
27
|
-
|
27
|
+
class BoxrCollection < Array
|
28
28
|
def files
|
29
|
-
|
29
|
+
collection_for_type('file')
|
30
30
|
end
|
31
31
|
|
32
32
|
def folders
|
33
|
-
|
33
|
+
collection_for_type('folder')
|
34
34
|
end
|
35
35
|
|
36
36
|
def web_links
|
37
|
-
|
37
|
+
collection_for_type('web_link')
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def collection_for_type(type)
|
43
|
+
items = select { |i| i.type == type }
|
44
|
+
BoxrCollection.new(items)
|
38
45
|
end
|
39
46
|
end
|
40
47
|
|
data/lib/boxr/client.rb
CHANGED
@@ -133,7 +133,7 @@ module Boxr
|
|
133
133
|
end
|
134
134
|
end until offset - total_count >= 0
|
135
135
|
|
136
|
-
entries.flatten.map{|i| BoxrMash.new(i)}
|
136
|
+
BoxrCollection.new(entries.flatten.map{ |i| BoxrMash.new(i) })
|
137
137
|
end
|
138
138
|
|
139
139
|
def post(uri, body, query: nil, success_codes: [201], process_body: true, content_md5: nil, content_type: nil, if_match: nil)
|
data/lib/boxr/version.rb
CHANGED