fog-brightbox 1.8.0 → 1.8.2

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: 2fd48abde8380eb206f3b30abcb6000a8bec7c066d1913649efdde89719f0a79
4
- data.tar.gz: b75f15aabc38798dcb1a8bcb13eb3e0b66e9ee9fe93beb91e462808d822f9fb7
3
+ metadata.gz: 0c80e2f7ee5d97338f7480cce0ff7b89a61c3a3936c6f529426531ee3f36f23e
4
+ data.tar.gz: 590350febe6e70d8bdf60f83e437ec1dcb2f4fadc11702a68a2ab5ac649a0169
5
5
  SHA512:
6
- metadata.gz: 6ea1059b94824d5ae37fda327001f94704a544fd29bfa7825627599cef850653fdcb55c18d493352af9bb1afd6864faf89c2d824da4baccd9fcdbd0d020096e4
7
- data.tar.gz: 464af05ddefa022497cce27fb7535eaac5f9db282e32037e922780f0ab05f96eb1f72ccad07f9ad5860c5a2e62228a5a05c676ee83e666507d1a62191e7f3580
6
+ metadata.gz: 36c668927a19ca0422e9b37496c8d300a84ffe4717d1bb8a03d0b7107b0d8c5411021a75622f27bc1d3d9a0982937a21036074ae216650340b7c5ee546428445
7
+ data.tar.gz: 8a57c010618a6e4f926fb26b696eea8a46562e65fd506ba050ac8a4d5868d3c5f8d035595cc0b2dab72dc9f37135ba9a285f7a446d56a3ec634376a7f063442a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
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
+
8
+ ### 1.8.1 / 2022-12-05
9
+
10
+ Bug fixes:
11
+
12
+ * Remove outdated check for required arguments in `Image.create` model which
13
+ prevented using newer arguments in the latest API version
14
+
1
15
  ### 1.8.0 / 2022-08-31
2
16
 
3
17
  Changes:
@@ -14,13 +14,16 @@ module Fog
14
14
 
15
15
  attribute :arch
16
16
  attribute :disk_size, type: :integer
17
+ attribute :http_url
17
18
  attribute :licence_name
18
19
  attribute :min_ram, type: :integer
20
+ attribute :server
19
21
  attribute :source
20
22
  attribute :source_trigger
21
23
  attribute :source_type
22
24
  attribute :username
23
25
  attribute :virtual_size, type: :integer
26
+ attribute :volume
24
27
 
25
28
  # Boolean flags
26
29
  attribute :compatibility_mode, type: :boolean
@@ -40,13 +43,16 @@ module Fog
40
43
 
41
44
  def save
42
45
  raise Fog::Errors::Error.new("Resaving an existing object may create a duplicate") if persisted?
43
- requires :source, :arch
46
+
44
47
  options = {
45
- :source => source,
46
48
  :arch => arch,
49
+ :description => description,
50
+ :http_url => http_url,
47
51
  :name => name,
52
+ :server => server,
53
+ :source => source,
48
54
  :username => username,
49
- :description => description
55
+ :volume => volume
50
56
  }.delete_if { |_k, v| v.nil? || v == "" }
51
57
  data = service.create_image(options)
52
58
  merge_attributes(data)
@@ -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.0"
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.0
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