brightbox-cli 3.1.0 → 3.2.0

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: c00fe9b9159d0df304bc91413fe0110a76efda76cf0685af77a5cf49506b43fa
4
- data.tar.gz: a6484bd3ac805cad060686e19434f0a962c28fad1c2676df2c745f1d940abd0f
3
+ metadata.gz: d5c03039c9263c4872064938223b825be9550d1c08e2a77d438b68f1fd7b42cc
4
+ data.tar.gz: 85f994952c28133cf8ad08c70d16228b165373f94a90916a0a83fe365e14672d
5
5
  SHA512:
6
- metadata.gz: fc691b5fabc3fb9191ec9e8518161d30ed2c8d88b2a291f83482f174be65aee5d1fe304dc2437e8fafc94cb5df5b18e9967d871704c6c24546d30b2b212bff61
7
- data.tar.gz: ef35d51c5ff89422276886fbcd5a31c71131997433a06701e79bbc2c7f448ec203e5ada7887fa57370f1697aee79c89f11d155adc784e334e47ad6351ece5c32
6
+ metadata.gz: 013e062376468560718cfbf25c2e2221db7e0808bcadc6413b6cbf5532b966917de0e2c40d2ffd1a859f8fd78267c28b86166e5638d2869cfe22e9c315bd8a4b
7
+ data.tar.gz: f81c26c3a3705e6caa3399e1598e4c8ad399f175a0be4d26c2383ccfab8a8cfc75c2ebde0135aa9cee2f4cd220df2119a4d3a880b4c585b3dfc113384cfe57e6
@@ -0,0 +1,36 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ strategy:
22
+ matrix:
23
+ ruby: ["2.4", "2.5", "2.6", "2.7"]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - name: Set up Ruby ${{ matrix.ruby }}
28
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
29
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ - name: Install dependencies
34
+ run: bundle install
35
+ - name: Run tests
36
+ run: bundle exec rake
@@ -6,5 +6,3 @@ rvm:
6
6
  - 2.1
7
7
  - 2.2
8
8
  - 2.3
9
- - 2.4
10
- - 2.6
@@ -1,3 +1,16 @@
1
+ ### v3.2.0 / 2020-11-26
2
+
3
+ [Full Changelog](https://github.com/brightbox/brightbox-cli/compare/v3.1.0...v3.2.0)
4
+
5
+ Changes:
6
+
7
+ * Add `--disk-encrypted` option to server creation to allow enabling encryption
8
+ at rest during a build.
9
+ * Setup GitHub Actions for Ruby 2.4+ builds to reduce the delays of testing
10
+ using Travis.
11
+ * Reduce number of Travis builds due to incredibly slow start up times. We are
12
+ approaching an hour to get a build taking less than a minute starting.
13
+
1
14
  ### v3.1.0 / 2020-11-17
2
15
 
3
16
  [Full Changelog](https://github.com/brightbox/brightbox-cli/compare/v3.0.1...v3.1.0)
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brightbox-cli (3.1.0)
4
+ brightbox-cli (3.2.0)
5
5
  dry-inflector (< 0.2)
6
- fog-brightbox (>= 1.2.0)
6
+ fog-brightbox (>= 1.3.0)
7
7
  fog-core (< 2.0)
8
8
  gli (~> 2.12.0)
9
9
  highline (~> 1.6.0)
@@ -23,7 +23,7 @@ GEM
23
23
  diff-lcs (1.4.3)
24
24
  dry-inflector (0.1.2)
25
25
  excon (0.78.0)
26
- fog-brightbox (1.2.0)
26
+ fog-brightbox (1.3.0)
27
27
  dry-inflector
28
28
  fog-core (>= 1.45, < 3.0)
29
29
  fog-json
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
22
22
  s.require_paths = ["lib"]
23
23
 
24
- s.add_dependency "fog-brightbox", ">= 1.2.0"
24
+ s.add_dependency "fog-brightbox", ">= 1.3.0"
25
25
  s.add_dependency "fog-core", "< 2.0"
26
26
  s.add_dependency "gli", "~> 2.12.0"
27
27
  s.add_dependency "i18n", "~> 0.6.0"
@@ -29,6 +29,10 @@ module Brightbox
29
29
  c.default_value true
30
30
  c.switch [:e, :base64], :negatable => true
31
31
 
32
+ c.desc "Enable encryption at rest for disk"
33
+ c.default_value false
34
+ c.switch ["disk-encrypted"], :negatable => false
35
+
32
36
  c.desc "Server groups to place server in - comma delimited list"
33
37
  c.flag [:g, "server-groups"]
34
38
 
@@ -116,6 +120,7 @@ module Brightbox
116
120
  }
117
121
 
118
122
  params[:cloud_ip] = options[:"cloud-ip"] if options.key?(:"cloud-ip")
123
+ params[:disk_encrypted] = options[:"disk-encrypted"] if options.key?(:"disk-encrypted")
119
124
 
120
125
  servers = Server.create_servers options[:i], params
121
126
  render_table(servers, global_options)
@@ -49,6 +49,7 @@ module Brightbox
49
49
  :ram,
50
50
  :cores,
51
51
  :disk,
52
+ :disk_encrypted,
52
53
  :compatibility_mode,
53
54
  :image,
54
55
  :image_name,
@@ -1,3 +1,3 @@
1
1
  module Brightbox
2
- VERSION = "3.1.0" unless defined?(Brightbox::VERSION)
2
+ VERSION = "3.2.0" unless defined?(Brightbox::VERSION)
3
3
  end
@@ -7,6 +7,10 @@ describe "brightbox servers" do
7
7
  let(:stdout) { output.stdout }
8
8
  let(:stderr) { output.stderr }
9
9
 
10
+ let(:image) { double(:id => "img-12345", :name => "Linux") }
11
+ let(:type) { double(:id => "typ-12345", :handle => "nano") }
12
+ let(:zone) { double(:handle => "gb1-a") }
13
+
10
14
  before do
11
15
  config = config_from_contents(USER_APP_CONFIG_CONTENTS)
12
16
  cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
@@ -27,10 +31,6 @@ describe "brightbox servers" do
27
31
  context "with --cloud-ip with nominated IP argument" do
28
32
  let(:argv) { %w(servers create --cloud-ip cip-12345 img-12345) }
29
33
 
30
- let(:image) { double(:id => "img-12345", :name => "Linux") }
31
- let(:type) { double(:id => "typ-12345", :handle => "nano") }
32
- let(:zone) { double(:handle => "gb1-a") }
33
-
34
34
  before do
35
35
  expect(Brightbox::Image).to receive(:find).with("img-12345").and_return(image)
36
36
  expect(Brightbox::Type).to receive(:find_by_handle).and_return(type)
@@ -50,10 +50,6 @@ describe "brightbox servers" do
50
50
  context "with --cloud-ip true argument" do
51
51
  let(:argv) { %w(servers create --cloud-ip true img-12345) }
52
52
 
53
- let(:image) { double(:id => "img-12345", :name => "Linux") }
54
- let(:type) { double(:id => "typ-12345", :handle => "nano") }
55
- let(:zone) { double(:handle => "gb1-a") }
56
-
57
53
  before do
58
54
  expect(Brightbox::Image).to receive(:find).with("img-12345").and_return(image)
59
55
  expect(Brightbox::Type).to receive(:find_by_handle).and_return(type)
@@ -70,6 +66,26 @@ describe "brightbox servers" do
70
66
  end
71
67
  end
72
68
 
69
+ context "with --disk-encrypted switch" do
70
+ let(:argv) { %w(servers create --disk-encrypted img-12345) }
71
+
72
+ before do
73
+ expect(Brightbox::Image).to receive(:find).with("img-12345").and_return(image)
74
+ expect(Brightbox::Type).to receive(:find_by_handle).and_return(type)
75
+ end
76
+
77
+ it "requests new server with encryption at rest enabled" do
78
+ stub_request(:post, "http://api.brightbox.dev/1.0/servers?account_id=acc-12345")
79
+ .with(:headers => { "Content-Type" => "application/json" },
80
+ :body => hash_including(:disk_encrypted => true))
81
+ .and_return(:status => 202, :body => sample_response)
82
+
83
+ expect(stderr).to match("Creating a nano")
84
+ expect(stderr).not_to match("ERROR")
85
+ expect(stdout).to match("srv-12345")
86
+ end
87
+ end
88
+
73
89
  def sample_response
74
90
  '{
75
91
  "id": "srv-12345",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightbox-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Leach
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0
26
+ version: 1.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fog-core
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +241,7 @@ executables:
241
241
  extensions: []
242
242
  extra_rdoc_files: []
243
243
  files:
244
+ - ".github/workflows/ruby.yml"
244
245
  - ".gitignore"
245
246
  - ".travis.yml"
246
247
  - CHANGELOG.md