groupdocs 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -200,14 +200,16 @@ module GroupDocs
200
200
  api.add_params(options)
201
201
  json = api.execute!
202
202
 
203
- json[:entities].map do |entity|
204
- entity.merge!(path: path)
205
- if entity[:dir]
206
- Storage::Folder.new(entity)
207
- else
208
- Storage::File.new(entity)
209
- end
203
+ folders = json[:folders].map do |folder|
204
+ folder.merge!(path: path)
205
+ Storage::Folder.new(folder)
206
+ end
207
+ files = json[:files].map do |file|
208
+ file.merge!(path: path)
209
+ Storage::File.new(file)
210
210
  end
211
+
212
+ folders + files
211
213
  end
212
214
 
213
215
  #
@@ -1,3 +1,3 @@
1
1
  module GroupDocs
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end # GroupDocs
@@ -196,7 +196,7 @@ describe GroupDocs::Storage::Folder do
196
196
  end
197
197
 
198
198
  it 'returns empty array if nothing is listed in directory' do
199
- mock_api_server('{"result": {"entities": []}, "status": "Ok"}')
199
+ mock_api_server('{"result": {"folders": [], "files": []}, "status": "Ok"}')
200
200
  subject.list!.should be_empty
201
201
  end
202
202
 
@@ -2,17 +2,18 @@
2
2
  "status": "Ok",
3
3
  "result":
4
4
  {
5
- "entities":
5
+ "folders":
6
6
  [
7
7
  {
8
8
  "id": 1,
9
- "dir": true,
10
9
  "created_on": 1330450135,
11
10
  "modified_on": 1330450135
12
- },
11
+ }
12
+ ],
13
+ "files":
14
+ [
13
15
  {
14
16
  "id": 2,
15
- "dir": false,
16
17
  "created_on": 1330450135,
17
18
  "modified_on": 1330450135
18
19
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
16
- requirement: &8528280 !ruby/object:Gem::Requirement
16
+ requirement: &3414420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.6'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *8528280
24
+ version_requirements: *3414420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &8543080 !ruby/object:Gem::Requirement
27
+ requirement: &3428980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.7'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *8543080
35
+ version_requirements: *3428980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: ruby-hmac
38
- requirement: &8541540 !ruby/object:Gem::Requirement
38
+ requirement: &3427940 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *8541540
46
+ version_requirements: *3427940
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &8539740 !ruby/object:Gem::Requirement
49
+ requirement: &3426480 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.9'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *8539740
57
+ version_requirements: *3426480
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &8538840 !ruby/object:Gem::Requirement
60
+ requirement: &3425060 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.9'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *8538840
68
+ version_requirements: *3425060
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &8537820 !ruby/object:Gem::Requirement
71
+ requirement: &3424140 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0.6'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *8537820
79
+ version_requirements: *3424140
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: yard
82
- requirement: &8536500 !ruby/object:Gem::Requirement
82
+ requirement: &3422980 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0.8'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *8536500
90
+ version_requirements: *3422980
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: webmock
93
- requirement: &8549020 !ruby/object:Gem::Requirement
93
+ requirement: &3435360 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '1.8'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *8549020
101
+ version_requirements: *3435360
102
102
  description: Ruby SDK for GroupDocs REST API
103
103
  email: p0deje@gmail.com
104
104
  executables: []
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  version: '0'
254
254
  segments:
255
255
  - 0
256
- hash: 4127866239273526889
256
+ hash: -3645027829218934806
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  none: false
259
259
  requirements:
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  version: '0'
263
263
  segments:
264
264
  - 0
265
- hash: 4127866239273526889
265
+ hash: -3645027829218934806
266
266
  requirements: []
267
267
  rubyforge_project:
268
268
  rubygems_version: 1.8.10