boxr 1.11.1 → 1.12.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: 81bc808dde71fc65c270c2a145ee55c5dd6ac48ef964e9156512dbc04bb6ddf7
4
- data.tar.gz: cc3d5e5140ef46fc95ff138d1fa79534e0bae12dc14e04bc54d212236cfc0ab9
3
+ metadata.gz: ea6beef48a3f1750503479d50b7137a76116aebb082e97f9a113035f92a1a2b0
4
+ data.tar.gz: 3eff1d92c504b5eff76536fd56a9c56a31568f07eb45826dc89c0ff8eff4045a
5
5
  SHA512:
6
- metadata.gz: 8f9bbc5f449301705e0919f122f9d55819ea7be821f2e081ee5d5f913db4d4cddf31d50f98cb831f4a9bbb2b59687a39ccbbecd71ac5d489d33d81760ea43b2e
7
- data.tar.gz: 2181831ee3b4732c7ad4152aad85b51ef8f7dd951f25ab1cc6059b031f8653e6554961e3159585fe1ef1d72f125f0afe2d916f1acf4f0c26b7d69aaf2b5c0701
6
+ metadata.gz: f09f47c81f9ba9768c5c0686d681233250f30cd7b996f9d1cc80662538a86a710d3badc29a3f4c12c926079c13a08793f4e0dd92d52564f53deb8df5fb0e35f8
7
+ data.tar.gz: 1872bd67769b70101fcf1a56874a7b1f84fd238e5a5cda5da5179029e8f366dac09075a15f6ed0ef8e3e1b22754812c1a3bcd063f58c3b5d453abdcd88578e1f
data/lib/boxr/metadata.rb CHANGED
@@ -29,6 +29,13 @@ module Boxr
29
29
  metadata
30
30
  end
31
31
 
32
+ def all_folder_metadata(folder)
33
+ folder_id = ensure_id(folder)
34
+ uri = "#{FOLDER_METADATA_URI}/#{folder_id}/metadata"
35
+ all_metadata, response = get(uri)
36
+ all_metadata
37
+ end
38
+
32
39
  def all_metadata(file)
33
40
  file_id = ensure_id(file)
34
41
  uri = "#{FILE_METADATA_URI}/#{file_id}/metadata"
data/lib/boxr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "1.11.1"
2
+ VERSION = "1.12.0"
3
3
  end
@@ -20,6 +20,12 @@ describe 'file metadata operations' do
20
20
  metadata = BOX_CLIENT.metadata(test_file)
21
21
  expect(metadata.a).to eq("hello")
22
22
 
23
+ puts "get all metadata"
24
+ metadata = BOX_CLIENT.all_metadata(test_file)
25
+ metadata_entry = metadata['entries'].first
26
+ expect(metadata_entry['a']).to eq("hello")
27
+ expect(metadata_entry['b']).to eq("friend")
28
+
23
29
  puts "delete metadata"
24
30
  result = BOX_CLIENT.delete_metadata(test_file)
25
31
  expect(result).to eq({})
@@ -47,6 +53,12 @@ describe 'file metadata operations' do
47
53
  metadata = BOX_CLIENT.folder_metadata(new_folder, "enterprise", "test")
48
54
  expect(metadata.a).to eq("hello")
49
55
 
56
+ puts "get all folder metadata"
57
+ metadata = BOX_CLIENT.all_folder_metadata(new_folder)
58
+ metadata_entry = metadata['entries'].first
59
+ expect(metadata_entry['a']).to eq("hello")
60
+ expect(metadata_entry['b']).to eq("friend")
61
+
50
62
  puts "delete folder metadata"
51
63
  result = BOX_CLIENT.delete_folder_metadata(new_folder, "enterprise", "test")
52
64
  expect(result).to eq({})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.1
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Burnette