fog-brightbox 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +20 -3
- data/CHANGELOG.md +17 -0
- data/README.md +6 -0
- data/fog-brightbox.gemspec +5 -1
- data/lib/fog/brightbox/oauth2.rb +2 -0
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/brightbox/storage/authentication_request_spec.rb +11 -4
- data/spec/fog/compute/brightbox_spec.rb +6 -0
- data/tests/brightbox/models/compute/account_tests.rb +0 -10
- data/tests/brightbox/requests/compute/account_tests.rb +0 -14
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fdadbc0fea3aa4cedbd5f80c7cd921ff302304f18a10b4d00a95bfb62f8c01f
|
4
|
+
data.tar.gz: eb5f3540d35cee35994ffe5468c3b6bc6abd6668ca3aa8748f01aa6554e594bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 822ae83ee99e51772dc7d201f8ad0afe12276301b0c548284cb29dc6d64ce8a4204efc946011ab9f756a00d2d0dd0f044ee75538e262f723b94c71703ed9a755
|
7
|
+
data.tar.gz: 01c48ca96800eb5d830bde46306ec25adbc2bc60dad60fd7b667e7677e2b2843e28da151830cb901555b44ce3a609d83cc9fea5aa2c7c80270e78b5aa5452dd9
|
data/.github/workflows/ruby.yml
CHANGED
@@ -15,12 +15,11 @@ on:
|
|
15
15
|
|
16
16
|
jobs:
|
17
17
|
test:
|
18
|
-
|
19
18
|
runs-on: ubuntu-latest
|
20
19
|
strategy:
|
20
|
+
fail-fast: false
|
21
21
|
matrix:
|
22
|
-
ruby-version: ["2.
|
23
|
-
|
22
|
+
ruby-version: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "head"]
|
24
23
|
steps:
|
25
24
|
- uses: actions/checkout@v2
|
26
25
|
- name: Set up Ruby
|
@@ -32,3 +31,21 @@ jobs:
|
|
32
31
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
32
|
- name: Run tests
|
34
33
|
run: bundle exec rake
|
34
|
+
|
35
|
+
test-old:
|
36
|
+
runs-on: ubuntu-20.04
|
37
|
+
strategy:
|
38
|
+
fail-fast: false
|
39
|
+
matrix:
|
40
|
+
ruby-version: ["2.3"]
|
41
|
+
steps:
|
42
|
+
- uses: actions/checkout@v2
|
43
|
+
- name: Set up Ruby
|
44
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
45
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
46
|
+
uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
ruby-version: ${{ matrix.ruby-version }}
|
49
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
50
|
+
- name: Run tests
|
51
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
### 1.12.0 / 2024-12-10
|
2
|
+
|
3
|
+
Bug fixes:
|
4
|
+
|
5
|
+
* Declare `Excon[:omit_default_port]` to fix specs matching on headers
|
6
|
+
that vary based on the Ruby version and the discovered Excon version's
|
7
|
+
default behaviour
|
8
|
+
* Explicitly require `base64` in authentication code
|
9
|
+
* Require `base64` gem for Ruby 3.4 as it is no longer in stdlib
|
10
|
+
* Remove `rubocop` version dependency as it is a development tool
|
11
|
+
|
12
|
+
Changes:
|
13
|
+
|
14
|
+
* Soft deprecation of Ruby 2.1 and 2.2 due to upstream constraints
|
15
|
+
* Updated CI testing matrix for supported versions
|
16
|
+
* Remove specs related to legacy FTP image uploading
|
17
|
+
|
1
18
|
### 1.11.0 / 2023-01-26
|
2
19
|
|
3
20
|
Enhancements:
|
data/README.md
CHANGED
@@ -44,6 +44,12 @@ and its modules:
|
|
44
44
|
As required by the main `fog-core` library, support for Ruby 1.9 was dropped in
|
45
45
|
`v1.0.0` of this gem.
|
46
46
|
|
47
|
+
Upstream changes on dependencies have resulted in support failing for Ruby <2.3
|
48
|
+
from `v1.12.0` due to some libraries failing to declare usage of newer language
|
49
|
+
features in their own gemspec files.
|
50
|
+
|
51
|
+
As of 2024 `fog-core` is only testing for Ruby 3.0+ support.
|
52
|
+
|
47
53
|
## Contributing
|
48
54
|
|
49
55
|
1. Fork it ( https://github.com/fog/fog-brightbox/fork )
|
data/fog-brightbox.gemspec
CHANGED
@@ -22,6 +22,10 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.required_ruby_version = ">= 2.0"
|
24
24
|
|
25
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4")
|
26
|
+
spec.add_dependency "base64"
|
27
|
+
end
|
28
|
+
|
25
29
|
spec.add_dependency "fog-core", ">= 1.45", "< 3.0"
|
26
30
|
spec.add_dependency "fog-json"
|
27
31
|
spec.add_dependency "dry-inflector"
|
@@ -30,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
30
34
|
spec.add_development_dependency "minitest"
|
31
35
|
spec.add_development_dependency "pry"
|
32
36
|
spec.add_development_dependency "rake"
|
33
|
-
spec.add_development_dependency "rubocop"
|
37
|
+
spec.add_development_dependency "rubocop"
|
34
38
|
spec.add_development_dependency "shindo"
|
35
39
|
spec.add_development_dependency "webmock"
|
36
40
|
spec.add_development_dependency "yard"
|
data/lib/fog/brightbox/oauth2.rb
CHANGED
@@ -3,11 +3,18 @@ require "spec_helper"
|
|
3
3
|
describe Fog::Brightbox::Storage::AuthenticationRequest do
|
4
4
|
include StockStorageResponses
|
5
5
|
|
6
|
+
before do
|
7
|
+
# Excon v1.0 changes the behaviour and results in older versions of Ruby
|
8
|
+
# limited to v0.112.0 reporting failures since they can not match the Host
|
9
|
+
# header correctly.
|
10
|
+
Excon.defaults[:omit_default_port] = true
|
11
|
+
end
|
12
|
+
|
6
13
|
describe "when initialised with blank config" do
|
7
14
|
before do
|
8
15
|
stub_request(:get, "https://orbit.brightbox.com/v1")
|
9
16
|
.with(headers: {
|
10
|
-
"Host" => "orbit.brightbox.com
|
17
|
+
"Host" => "orbit.brightbox.com",
|
11
18
|
"X-Auth-User" => "",
|
12
19
|
"X-Auth-Key" => ""
|
13
20
|
}).to_return(bad_url_response)
|
@@ -25,7 +32,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
25
32
|
before do
|
26
33
|
stub_request(:get, "https://orbit.brightbox.com/v1")
|
27
34
|
.with(headers: {
|
28
|
-
"Host" => "orbit.brightbox.com
|
35
|
+
"Host" => "orbit.brightbox.com",
|
29
36
|
"X-Auth-User" => "cli-12345",
|
30
37
|
"X-Auth-Key" => "12345"
|
31
38
|
}).to_return(authorized_response)
|
@@ -46,7 +53,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
46
53
|
before do
|
47
54
|
stub_request(:get, "https://orbit.brightbox.com/v1")
|
48
55
|
.with(headers: {
|
49
|
-
"Host" => "orbit.brightbox.com
|
56
|
+
"Host" => "orbit.brightbox.com",
|
50
57
|
"X-Auth-User" => "user@example.test",
|
51
58
|
"X-Auth-Key" => "abcde"
|
52
59
|
}).to_return(authorized_response)
|
@@ -69,7 +76,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
69
76
|
before do
|
70
77
|
stub_request(:get, "https://orbit.brightbox.com/v1")
|
71
78
|
.with(headers: {
|
72
|
-
"Host" => "orbit.brightbox.com
|
79
|
+
"Host" => "orbit.brightbox.com",
|
73
80
|
"X-Auth-User" => "user@example.test",
|
74
81
|
"X-Auth-Key" => "abcde"
|
75
82
|
}).to_return(unauthorized_response)
|
@@ -14,10 +14,16 @@ describe Fog::Brightbox::Compute do
|
|
14
14
|
}
|
15
15
|
|
16
16
|
@credential_guard = Minitest::Mock.new
|
17
|
+
# Stub for older versions of fog-core
|
17
18
|
def @credential_guard.reject
|
18
19
|
{}
|
19
20
|
end
|
20
21
|
|
22
|
+
# Stub for newer versions of fog-core
|
23
|
+
def @credential_guard.select
|
24
|
+
{}
|
25
|
+
end
|
26
|
+
|
21
27
|
Fog.stub :credentials, @credential_guard do
|
22
28
|
@service = Fog::Brightbox::Compute.new(@arguments)
|
23
29
|
end
|
@@ -2,14 +2,4 @@ Shindo.tests("Fog::Compute[:brightbox] | Account model", ["brightbox"]) do
|
|
2
2
|
pending if Fog.mocking?
|
3
3
|
|
4
4
|
@account = Fog::Compute[:brightbox].account
|
5
|
-
|
6
|
-
tests("success") do
|
7
|
-
tests("#reset_ftp_password") do
|
8
|
-
pending if Fog.mocking?
|
9
|
-
test("original ftp password is blanked") { @account.library_ftp_password.nil? }
|
10
|
-
@new_password = @account.reset_ftp_password
|
11
|
-
test("new ftp password was not nil") { !@new_password.nil? }
|
12
|
-
test("new ftp password is set") { @account.library_ftp_password == @new_password }
|
13
|
-
end
|
14
|
-
end
|
15
5
|
end
|
@@ -34,20 +34,6 @@ Shindo.tests("Fog::Compute[:brightbox] | account requests", ["brightbox"]) do
|
|
34
34
|
result = Fog::Compute[:brightbox].update_account(@scoped_account_identifier, update_options)
|
35
35
|
data_matches_schema(Brightbox::Compute::Formats::Full::ACCOUNT, allow_extra_keys: true) { result }
|
36
36
|
end
|
37
|
-
|
38
|
-
tests("#reset_ftp_password_scoped_account") do
|
39
|
-
pending if Fog.mocking?
|
40
|
-
result = Fog::Compute[:brightbox].reset_ftp_password_scoped_account
|
41
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::ACCOUNT, allow_extra_keys: true) { result }
|
42
|
-
test("new ftp password is visible") { !result["library_ftp_password"].nil? }
|
43
|
-
end
|
44
|
-
|
45
|
-
tests("#reset_ftp_password_account(#{@scoped_account_identifier})") do
|
46
|
-
pending if Fog.mocking?
|
47
|
-
result = Fog::Compute[:brightbox].reset_ftp_password_account(@scoped_account_identifier)
|
48
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::ACCOUNT, allow_extra_keys: true) { result }
|
49
|
-
test("new ftp password is visible") { !result["library_ftp_password"].nil? }
|
50
|
-
end
|
51
37
|
end
|
52
38
|
|
53
39
|
tests("failure") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-brightbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Thornthwaite
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -118,16 +118,16 @@ dependencies:
|
|
118
118
|
name: rubocop
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0
|
123
|
+
version: '0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0
|
130
|
+
version: '0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: shindo
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -495,7 +495,7 @@ homepage: https://github.com/fog/fog-brightbox
|
|
495
495
|
licenses:
|
496
496
|
- MIT
|
497
497
|
metadata: {}
|
498
|
-
post_install_message:
|
498
|
+
post_install_message:
|
499
499
|
rdoc_options: []
|
500
500
|
require_paths:
|
501
501
|
- lib
|
@@ -510,8 +510,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
510
510
|
- !ruby/object:Gem::Version
|
511
511
|
version: '0'
|
512
512
|
requirements: []
|
513
|
-
rubygems_version: 3.
|
514
|
-
signing_key:
|
513
|
+
rubygems_version: 3.4.19
|
514
|
+
signing_key:
|
515
515
|
specification_version: 4
|
516
516
|
summary: This library can be used as a module for `fog` or as standalone provider
|
517
517
|
to use the Brightbox Cloud in applications
|