boxr 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/boxr.gemspec +2 -2
- data/lib/boxr/users.rb +20 -8
- data/lib/boxr/version.rb +1 -1
- data/spec/boxr/collaborations_spec.rb +37 -0
- data/spec/boxr/comments_spec.rb +34 -0
- data/spec/boxr/files_spec.rb +123 -0
- data/spec/boxr/folders_spec.rb +72 -0
- data/spec/boxr/groups_spec.rb +65 -0
- data/spec/boxr/metadata_spec.rb +52 -0
- data/spec/boxr/search_spec.rb +12 -0
- data/spec/boxr/tasks_spec.rb +58 -0
- data/spec/boxr/users_spec.rb +52 -0
- data/spec/boxr/watermarking_spec.rb +33 -0
- data/spec/boxr/web_links_spec.rb +22 -0
- data/spec/boxr_spec.rb +3 -553
- data/spec/spec_helper.rb +30 -1
- metadata +31 -10
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,33 @@
|
|
1
1
|
require 'dotenv'; Dotenv.load
|
2
2
|
require 'simplecov'; SimpleCov.start
|
3
3
|
require 'boxr'
|
4
|
-
require 'awesome_print'
|
4
|
+
require 'awesome_print'
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.before(:each) do
|
8
|
+
puts "-----> Resetting Box Environment"
|
9
|
+
sleep BOX_SERVER_SLEEP
|
10
|
+
root_folders = BOX_CLIENT.root_folder_items.folders
|
11
|
+
test_folder = root_folders.find{|f| f.name == TEST_FOLDER_NAME}
|
12
|
+
if(test_folder)
|
13
|
+
BOX_CLIENT.delete_folder(test_folder, recursive: true)
|
14
|
+
end
|
15
|
+
new_folder = BOX_CLIENT.create_folder(TEST_FOLDER_NAME, Boxr::ROOT)
|
16
|
+
@test_folder = new_folder
|
17
|
+
|
18
|
+
all_users = BOX_CLIENT.all_users
|
19
|
+
test_users = all_users.select{|u| u.name == TEST_USER_NAME}
|
20
|
+
test_users.each do |u|
|
21
|
+
BOX_CLIENT.delete_user(u, force: true)
|
22
|
+
end
|
23
|
+
sleep BOX_SERVER_SLEEP
|
24
|
+
test_user = BOX_CLIENT.create_user(TEST_USER_NAME, login: TEST_USER_LOGIN)
|
25
|
+
@test_user = test_user
|
26
|
+
|
27
|
+
all_groups = BOX_CLIENT.groups
|
28
|
+
test_group = all_groups.find{|g| g.name == TEST_GROUP_NAME}
|
29
|
+
if(test_group)
|
30
|
+
BOX_CLIENT.delete_group(test_group)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Burnette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: awesome_print
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '1.8'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.8'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: lru_redux
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,14 +154,14 @@ dependencies:
|
|
154
154
|
name: jwt
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '1.4'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '1.4'
|
167
167
|
description: ''
|
@@ -209,6 +209,17 @@ files:
|
|
209
209
|
- lib/boxr/version.rb
|
210
210
|
- lib/boxr/watermarking.rb
|
211
211
|
- lib/boxr/web_links.rb
|
212
|
+
- spec/boxr/collaborations_spec.rb
|
213
|
+
- spec/boxr/comments_spec.rb
|
214
|
+
- spec/boxr/files_spec.rb
|
215
|
+
- spec/boxr/folders_spec.rb
|
216
|
+
- spec/boxr/groups_spec.rb
|
217
|
+
- spec/boxr/metadata_spec.rb
|
218
|
+
- spec/boxr/search_spec.rb
|
219
|
+
- spec/boxr/tasks_spec.rb
|
220
|
+
- spec/boxr/users_spec.rb
|
221
|
+
- spec/boxr/watermarking_spec.rb
|
222
|
+
- spec/boxr/web_links_spec.rb
|
212
223
|
- spec/boxr_spec.rb
|
213
224
|
- spec/spec_helper.rb
|
214
225
|
- spec/test_files/test file.txt
|
@@ -231,12 +242,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
242
|
- !ruby/object:Gem::Version
|
232
243
|
version: '0'
|
233
244
|
requirements: []
|
234
|
-
|
235
|
-
rubygems_version: 2.7.8
|
245
|
+
rubygems_version: 3.0.3
|
236
246
|
signing_key:
|
237
247
|
specification_version: 4
|
238
248
|
summary: A Ruby client library for the Box V2 Content API.
|
239
249
|
test_files:
|
250
|
+
- spec/boxr/collaborations_spec.rb
|
251
|
+
- spec/boxr/comments_spec.rb
|
252
|
+
- spec/boxr/files_spec.rb
|
253
|
+
- spec/boxr/folders_spec.rb
|
254
|
+
- spec/boxr/groups_spec.rb
|
255
|
+
- spec/boxr/metadata_spec.rb
|
256
|
+
- spec/boxr/search_spec.rb
|
257
|
+
- spec/boxr/tasks_spec.rb
|
258
|
+
- spec/boxr/users_spec.rb
|
259
|
+
- spec/boxr/watermarking_spec.rb
|
260
|
+
- spec/boxr/web_links_spec.rb
|
240
261
|
- spec/boxr_spec.rb
|
241
262
|
- spec/spec_helper.rb
|
242
263
|
- spec/test_files/test file.txt
|