boxr 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1c90479b5424ad7460328707aa758fa10738a99db0e76ab2186625ad64e53d5
4
- data.tar.gz: 0b961dc8b412f39ea89f1de347b7dd3cce1aac242a7d44087942c60aa8b73f48
3
+ metadata.gz: 06a2fa3c34dacf915b7bb788e854bc9235d2eb0cd92c7ca59e480737553146c4
4
+ data.tar.gz: 7413454a658067aabe3ff90625e30a029335166ed50f7e05569cd2fe4e583e84
5
5
  SHA512:
6
- metadata.gz: ca107dd177c1b7c4acc6e55967a4d218e75e59290558d875c1a34e78023f92ca07581acd9c573840644152dae4c0f554e11b926023bc2c530900f235d122d72a
7
- data.tar.gz: a18e866940e903c941a2a0169acf59ea38a2038701afdd0874bf985b47f956d946c7f465ae3ad1b32bdef0be72676a76c51d88b6bbe37555ad9f5571912194be
6
+ metadata.gz: 74d6a804d79c88de453c3d348a69950b9a08f85da70ae258ad689daf50c3318dd7eb776763c371f600981a1a2ad2c10652811d2a031a6059b1426abb8fdb61ed
7
+ data.tar.gz: 3b525fa9e91ee3417247128fb733e6feecaaf328916bcb1cca51ded9f0a2ef9d288f7d33a8f6cabf54580c6505d4e4e9a914f495c115bd17b43a1785ba36d57b
data/README.md CHANGED
@@ -322,6 +322,8 @@ add_email_alias_for_user(user, email)
322
322
  remove_email_alias_for_user(user, email_alias)
323
323
 
324
324
  delete_user(user, notify: nil, force: nil)
325
+
326
+ move_users_folder(user, source_folder = 0, destination_user)
325
327
  ```
326
328
  #### [Groups](https://box-content.readme.io/reference#group-object)
327
329
  ```ruby
@@ -6,6 +6,16 @@ module Boxr
6
6
  groups = get_all_with_pagination(GROUPS_URI, query: query, offset: 0, limit: DEFAULT_LIMIT)
7
7
  end
8
8
 
9
+ def group_from_id(group_id, fields: [])
10
+ group_id = ensure_id(group_id)
11
+ uri = "#{GROUPS_URI}/#{group_id}"
12
+ query = build_fields_query(fields, GROUP_FIELDS_QUERY)
13
+
14
+ group, response = get(uri, query: query)
15
+ group
16
+ end
17
+ alias :group :group_from_id
18
+
9
19
  def create_group(name)
10
20
  attributes = {name: name}
11
21
  new_group, response = post(GROUPS_URI, attributes)
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "1.7.0"
2
+ VERSION = "1.8.0"
3
3
  end
@@ -12,6 +12,10 @@ describe 'group operations' do
12
12
  test_group = groups.find{|g| g.name == TEST_GROUP_NAME}
13
13
  expect(test_group).to_not be_nil
14
14
 
15
+ puts "get group info"
16
+ group_info = BOX_CLIENT.group(test_group)
17
+ expect(group_info.id).to eq(test_group.id)
18
+
15
19
  puts "update group"
16
20
  new_name = "Test Boxr Group Renamed"
17
21
  group = BOX_CLIENT.update_group(test_group, new_name)
@@ -1,5 +1,5 @@
1
1
  require 'dotenv'; Dotenv.load
2
- require 'simplecov'; SimpleCov.start
2
+ require 'simplecov'; SimpleCov.start { add_filter "_spec" }
3
3
  require 'boxr'
4
4
  require 'awesome_print'
5
5
 
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.7.0
4
+ version: 1.8.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-19 00:00:00.000000000 Z
11
+ date: 2019-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler