fog-brightbox 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1061e46a1ab7bab3542b35bd9a37f966370f5ab44c98d9ce003c56aecabbea47
4
- data.tar.gz: '09abdac10bca6dbafddf1a7931d0243456caf605c62757e05353b9f8611bf9ab'
3
+ metadata.gz: 0c80e2f7ee5d97338f7480cce0ff7b89a61c3a3936c6f529426531ee3f36f23e
4
+ data.tar.gz: 590350febe6e70d8bdf60f83e437ec1dcb2f4fadc11702a68a2ab5ac649a0169
5
5
  SHA512:
6
- metadata.gz: b587653fc85f39d14e3a9a46bdbff8d83b79046f3fa9baf9de12258db58d3e03c68e22b8930c409c3c5fa2209fc04606fd2d9089737321aaf28bff1c66c3e79f
7
- data.tar.gz: eff1f83c2b30a808b6b569e73c321788838c2887a9844a129137789c0052fb260e613c71497bc73733d922381d8759615284407c13fc514b1c650adff255f326
6
+ metadata.gz: 36c668927a19ca0422e9b37496c8d300a84ffe4717d1bb8a03d0b7107b0d8c5411021a75622f27bc1d3d9a0982937a21036074ae216650340b7c5ee546428445
7
+ data.tar.gz: 8a57c010618a6e4f926fb26b696eea8a46562e65fd506ba050ac8a4d5868d3c5f8d035595cc0b2dab72dc9f37135ba9a285f7a446d56a3ec634376a7f063442a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 1.8.2 / 2022-12-06
2
+
3
+ Bug fixes:
4
+
5
+ * Fix issue in storage directory `#save` that prevented creating and updating
6
+ permissions/ACL on Orbit containers correctly
7
+
1
8
  ### 1.8.1 / 2022-12-05
2
9
 
3
10
  Bug fixes:
@@ -39,8 +39,8 @@ module Fog
39
39
  def save
40
40
  requires :key
41
41
  options = {
42
- "read_permissions" => read_permissions,
43
- "write_permissions" => write_permissions
42
+ read_permissions: read_permissions,
43
+ write_permissions: write_permissions
44
44
  }
45
45
  service.put_container(key, options)
46
46
  true
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Brightbox
3
- VERSION = "1.8.1"
3
+ VERSION = "1.8.2"
4
4
  end
5
5
  end
@@ -0,0 +1,50 @@
1
+ require "minitest/autorun"
2
+ require "fog/brightbox"
3
+ require "fog/brightbox/models/storage/directory"
4
+
5
+ describe Fog::Brightbox::Storage::Directory do
6
+ include StockStorageResponses
7
+
8
+ let(:config) { Fog::Brightbox::Config.new(settings) }
9
+ let(:service) { Fog::Brightbox::Storage.new(config) }
10
+
11
+ describe ".create" do
12
+ let(:settings) do
13
+ {
14
+ :brightbox_client_id => "cli-12345",
15
+ :brightbox_secret => "fdkls"
16
+ }
17
+ end
18
+ let(:read_permissions) { ".r:*" }
19
+ let(:write_permissions) { "*:*" }
20
+
21
+ before do
22
+ stub_request(:get, "https://orbit.brightbox.com/v1").
23
+ to_return(authorized_response)
24
+
25
+ stub_request(:put, "https://orbit.brightbox.com/v1/acc-12345/container-name").
26
+ to_return(status: 201)
27
+ end
28
+
29
+ it do
30
+ directory = service.directories.create(
31
+ service: service,
32
+ key: "container-name",
33
+ read_permissions: read_permissions,
34
+ write_permissions: write_permissions
35
+ )
36
+
37
+ assert directory.read_permissions, read_permissions
38
+ assert directory.write_permissions, write_permissions
39
+
40
+ assert_requested(
41
+ :put,
42
+ "https://orbit.brightbox.com/v1/acc-12345/container-name",
43
+ headers: {
44
+ "X-Container-Read" => read_permissions,
45
+ "X-Container-Write" => write_permissions
46
+ }
47
+ )
48
+ end
49
+ end
50
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-brightbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Thornthwaite
@@ -403,6 +403,7 @@ files:
403
403
  - spec/fog/brightbox/storage/config_spec.rb
404
404
  - spec/fog/brightbox/storage/connection_errors_spec.rb
405
405
  - spec/fog/brightbox/storage/connection_spec.rb
406
+ - spec/fog/brightbox/storage/directory_spec.rb
406
407
  - spec/fog/brightbox/storage/escape_spec.rb
407
408
  - spec/fog/brightbox/storage/files_spec.rb
408
409
  - spec/fog/brightbox/storage_spec.rb
@@ -516,6 +517,7 @@ test_files:
516
517
  - spec/fog/brightbox/storage/config_spec.rb
517
518
  - spec/fog/brightbox/storage/connection_errors_spec.rb
518
519
  - spec/fog/brightbox/storage/connection_spec.rb
520
+ - spec/fog/brightbox/storage/directory_spec.rb
519
521
  - spec/fog/brightbox/storage/escape_spec.rb
520
522
  - spec/fog/brightbox/storage/files_spec.rb
521
523
  - spec/fog/brightbox/storage_spec.rb