vagrant-hypconfigmgmt 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -1
- data/README.md +29 -1
- data/lib/vagrant-hypconfigmgmt/command.rb +2 -2
- data/lib/vagrant-hypconfigmgmt/version.rb +1 -1
- data/pkg/vagrant-hypconfigmgmt-0.0.10.gem +0 -0
- data/spec/unit/command/ensure_vagrant_box_type_configured_spec.rb +78 -1
- data/spec/unit/command/get_options_string_spec.rb +1 -1
- data/spec/unit/command/get_php_version_spec.rb +15 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c35cc85aba9ab8744a0dbace26f2199da883ac4
|
4
|
+
data.tar.gz: 5a49e3025dbc978c7eb1a3320636c8bdb422d603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa29726ac01bcea9f248f33c17c02d9c28b319b9ef8fe6351e637119d8f804b6494f4e2b534a0a695c4b08500efea0014bdd5df9070a05aa22bb39a47370234
|
7
|
+
data.tar.gz: defae1c4cb0200e59d178bf8ee3118d354e3d5dff3b7335f48a33066df604331812ce64595ad596f32a5519feb0f8a53c2cfb9018a796aa4600a4d070cac51c5
|
data/Makefile
CHANGED
data/README.md
CHANGED
@@ -11,5 +11,33 @@ Create the gemfile (package)
|
|
11
11
|
```
|
12
12
|
$ make
|
13
13
|
rake build
|
14
|
-
vagrant-hypconfigmgmt 0.0.
|
14
|
+
vagrant-hypconfigmgmt 0.0.11 built to pkg/vagrant-hypconfigmgmt-0.0.11.gem.
|
15
15
|
```
|
16
|
+
|
17
|
+
Installing a locally developed hypconfigmgmt
|
18
|
+
============================================
|
19
|
+
|
20
|
+
1. Bump the version to one later than the latest version
|
21
|
+
|
22
|
+
Edit `Vagrantfile` and update `VAGRANT_HYPCONFIGMGMT_VERSION`
|
23
|
+
|
24
|
+
Edit `vagrant/plugins/vagrant-hypconfigmgmt/README.md` and update the version there.
|
25
|
+
|
26
|
+
Edit `vagrant/plugins/vagrant-hypconfigmgmt/lib/vagrant-hypconfigmgmt/version.rb` and update `VERSION`.
|
27
|
+
|
28
|
+
2. Navigate to `vagrant/plugins/vagrant-hypconfigmgmt` and run `make && make install`
|
29
|
+
|
30
|
+
|
31
|
+
Deploying a new vagrant-hypconfigmgmt
|
32
|
+
=====================================
|
33
|
+
|
34
|
+
1. Only for Byte staff members.
|
35
|
+
|
36
|
+
2. Do the above, except the `make install` is not necessary
|
37
|
+
|
38
|
+
3. Remove the previous latest gem from `vagrant/plugins/vagrant-hypconfigmgmt/pkg` so only your new version remains.
|
39
|
+
|
40
|
+
4. Commit into your branch, make a PR, merge after review.
|
41
|
+
|
42
|
+
5. Publish the new gem with `gem push vagrant-hypconfigmgmt-0.0.<YOURVERSION>.gem`, see http://guides.rubygems.org/publishing/ for details. Credentials are in the usual place.
|
43
|
+
|
@@ -5,7 +5,7 @@ DEFAULT_MAGENTO_VERSION = 2
|
|
5
5
|
AVAILABLE_MAGENTO_VERSIONS = [1, 2]
|
6
6
|
|
7
7
|
DEFAULT_PHP_VERSION = 7.0
|
8
|
-
AVAILABLE_PHP_VERSIONS = [5.5, 5.6, 7.0, 7.1]
|
8
|
+
AVAILABLE_PHP_VERSIONS = [5.5, 5.6, 7.0, 7.1, 7.2]
|
9
9
|
|
10
10
|
DEFAULT_VARNISH_STATE = false
|
11
11
|
AVAILABLE_VARNISH_STATES = [true, false]
|
@@ -292,7 +292,7 @@ HEREDOC
|
|
292
292
|
settings['vagrant']['box'] = 'hypernode_xenial'
|
293
293
|
settings['vagrant']['box_url'] = 'http://vagrant.hypernode.com/customer/xenial/catalog.json'
|
294
294
|
else
|
295
|
-
if [5.6, 7.1].include? settings['php']['version']
|
295
|
+
if [5.6, 7.1, 7.2].include? settings['php']['version']
|
296
296
|
env[:ui].warning("The Precise Hypernodes don't have PHP#{settings['php']['version']}. Falling back to 5.5. Use the Xenial version of this box if you want PHP#{settings['php']['version']}")
|
297
297
|
settings['php']['version'] = 5.5
|
298
298
|
end
|
Binary file
|
@@ -218,6 +218,32 @@ describe VagrantHypconfigmgmt::Command do
|
|
218
218
|
end
|
219
219
|
|
220
220
|
|
221
|
+
context "when php 7.2 is configured but no ubuntu version specified" do
|
222
|
+
let(:retrieved_settings) { { "php" => { "version" => 7.2 }, "vagrant" => Hash.new } }
|
223
|
+
it "sets the box name and box url to the right values for PHP 7.2" do
|
224
|
+
expected_settings = {
|
225
|
+
"ubuntu_version" => "precise",
|
226
|
+
"php" => {
|
227
|
+
"version" => 5.5
|
228
|
+
},
|
229
|
+
"vagrant" => {
|
230
|
+
# Falling back to php5.5, Precise Hypernodes have no PHP7.2
|
231
|
+
"box" => "hypernode_php5",
|
232
|
+
"box_url" => "http://vagrant.hypernode.com/customer/php5/catalog.json"
|
233
|
+
}
|
234
|
+
}
|
235
|
+
# check if settings are retrieved from disk and pretend they return a configuration for php 5.5
|
236
|
+
expect(subject).to receive(:retrieve_settings).once.with(no_args).and_return(retrieved_settings)
|
237
|
+
# check if the ubuntu version is gotten and pretend it returns precise
|
238
|
+
expect(subject).to receive(:get_ubuntu_version).once.with(env).and_return('precise')
|
239
|
+
# check if the settings that are written back to disk contain the right box (name) and box_url
|
240
|
+
expect(subject).to receive(:update_settings).once.with(expected_settings)
|
241
|
+
# check if the user is warned about falling back to 5.5
|
242
|
+
expect(ui).to receive(:warning).once.with(/.*Falling back to 5.5*/)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
|
221
247
|
context "when php 5.6 is configured and precise ubuntu version specified" do
|
222
248
|
let(:retrieved_settings) { { "php" => { "version" => 5.6 }, "vagrant" => Hash.new, "ubuntu_version" => "precise" } }
|
223
249
|
it "sets the box name and box url to the right values for PHP 5.5" do
|
@@ -244,7 +270,7 @@ describe VagrantHypconfigmgmt::Command do
|
|
244
270
|
end
|
245
271
|
|
246
272
|
|
247
|
-
context "when php
|
273
|
+
context "when php 7.1 is configured and precise ubuntu version specified" do
|
248
274
|
let(:retrieved_settings) { { "php" => { "version" => 7.1 }, "vagrant" => Hash.new, "ubuntu_version" => "precise" } }
|
249
275
|
it "sets the box name and box url to the right values for PHP 5.5" do
|
250
276
|
expected_settings = {
|
@@ -270,6 +296,32 @@ describe VagrantHypconfigmgmt::Command do
|
|
270
296
|
end
|
271
297
|
|
272
298
|
|
299
|
+
context "when php 7.2 is configured and precise ubuntu version specified" do
|
300
|
+
let(:retrieved_settings) { { "php" => { "version" => 7.2 }, "vagrant" => Hash.new, "ubuntu_version" => "precise" } }
|
301
|
+
it "sets the box name and box url to the right values for PHP 5.5" do
|
302
|
+
expected_settings = {
|
303
|
+
"ubuntu_version" => "precise",
|
304
|
+
"php" => {
|
305
|
+
# Falling back to php5.5, Precise Hypernodes have no PHP7.2
|
306
|
+
"version" => 5.5
|
307
|
+
},
|
308
|
+
"vagrant" => {
|
309
|
+
"box" => "hypernode_php5",
|
310
|
+
"box_url" => "http://vagrant.hypernode.com/customer/php5/catalog.json"
|
311
|
+
}
|
312
|
+
}
|
313
|
+
# check if settings are retrieved from disk and pretend they return a configuration for php 5.5
|
314
|
+
expect(subject).to receive(:retrieve_settings).once.with(no_args).and_return(retrieved_settings)
|
315
|
+
# check if the ubuntu version is not gotten because we already have it specified in the settings
|
316
|
+
expect(subject).to receive(:get_ubuntu_version).never
|
317
|
+
# check if the settings that are written back to disk contain the right box (name) and box_url
|
318
|
+
expect(subject).to receive(:update_settings).once.with(expected_settings)
|
319
|
+
# check if the user is warned about falling back to 5.5
|
320
|
+
expect(ui).to receive(:warning).once.with(/.*Falling back to 5.5*/)
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
|
273
325
|
context "when php 5.6 is configured and xenial ubuntu version specified" do
|
274
326
|
let(:retrieved_settings) { { "php" => { "version" => 5.6 }, "vagrant" => Hash.new, "ubuntu_version" => "xenial" } }
|
275
327
|
it "sets the box name and box url to the right values for PHP 5.6" do
|
@@ -320,6 +372,31 @@ describe VagrantHypconfigmgmt::Command do
|
|
320
372
|
end
|
321
373
|
|
322
374
|
|
375
|
+
context "when php 7.2 is configured and xenial ubuntu version specified" do
|
376
|
+
let(:retrieved_settings) { { "php" => { "version" => 7.2 }, "vagrant" => Hash.new, "ubuntu_version" => "xenial" } }
|
377
|
+
it "sets the box name and box url to the right values for PHP 7.2" do
|
378
|
+
expected_settings = {
|
379
|
+
"ubuntu_version" => "xenial",
|
380
|
+
"php" => {
|
381
|
+
"version" => 7.2
|
382
|
+
},
|
383
|
+
"vagrant" => {
|
384
|
+
"box" => "hypernode_xenial",
|
385
|
+
"box_url" => "http://vagrant.hypernode.com/customer/xenial/catalog.json"
|
386
|
+
}
|
387
|
+
}
|
388
|
+
# check if settings are retrieved from disk and pretend they return a configuration for php 7.2
|
389
|
+
expect(subject).to receive(:retrieve_settings).once.with(no_args).and_return(retrieved_settings)
|
390
|
+
# check if the ubuntu version is not gotten because we already have it specified in the settings
|
391
|
+
expect(subject).to receive(:get_ubuntu_version).never
|
392
|
+
# check if the settings that are written back to disk contain the right box (name) and box_url
|
393
|
+
expect(subject).to receive(:update_settings).once.with(expected_settings)
|
394
|
+
# check that the user is not warned about falling back because we do have 5.6 on Xenial
|
395
|
+
expect(ui).to receive(:warning).never
|
396
|
+
end
|
397
|
+
end
|
398
|
+
|
399
|
+
|
323
400
|
context "when an unknown php version is configured" do
|
324
401
|
let(:retrieved_settings) { { "php" => { "version" => 1.0 }, "vagrant" => Hash.new } }
|
325
402
|
it "does not set the box name and box url" do
|
@@ -34,7 +34,7 @@ describe VagrantHypconfigmgmt::Command do
|
|
34
34
|
|
35
35
|
context "when the options are floats" do
|
36
36
|
it "it casts the floats to strings and returns them separated by 'or'" do
|
37
|
-
expect( subject.get_options_string([5.5, 5.6, 7.0, 7.1]) ).to eq("5.5 or 5.6 or 7.0 or 7.1")
|
37
|
+
expect( subject.get_options_string([5.5, 5.6, 7.0, 7.1]) ).to eq("5.5 or 5.6 or 7.0 or 7.1 or 7.2")
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -81,6 +81,21 @@ describe VagrantHypconfigmgmt::Command do
|
|
81
81
|
expect( subject.get_php_version(env) ).to eq(7.1)
|
82
82
|
end
|
83
83
|
end
|
84
|
+
|
85
|
+
|
86
|
+
context "when PHP 7.2 is configured" do
|
87
|
+
it "it notifies the user that PHP 7.2 will be used and returns the value" do
|
88
|
+
# check if the setting is prompted for and pretend it returns a "PHP 7.2" answer
|
89
|
+
expect(subject).to receive(:get_setting).with(
|
90
|
+
env, AVAILABLE_PHP_VERSIONS, DEFAULT_PHP_VERSION,
|
91
|
+
"Is this a PHP #{subject.get_options_string(AVAILABLE_PHP_VERSIONS)} Hypernode? [default #{DEFAULT_PHP_VERSION}]: "
|
92
|
+
).and_return("7.2")
|
93
|
+
# check if the user is notified about the PHP version
|
94
|
+
expect(ui).to receive(:info).once.with(/.*PHP 7.2*/)
|
95
|
+
# check if the function returns float 7.2 if a PHP 7.2 Vagrant is to be used
|
96
|
+
expect( subject.get_php_version(env) ).to eq(7.2)
|
97
|
+
end
|
98
|
+
end
|
84
99
|
end
|
85
100
|
end
|
86
101
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hypconfigmgmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick van de Loo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/vagrant-hypconfigmgmt/command.rb
|
99
99
|
- lib/vagrant-hypconfigmgmt/config.rb
|
100
100
|
- lib/vagrant-hypconfigmgmt/version.rb
|
101
|
+
- pkg/vagrant-hypconfigmgmt-0.0.10.gem
|
101
102
|
- pkg/vagrant-hypconfigmgmt-0.0.9.gem
|
102
103
|
- spec/spec_helper.rb
|
103
104
|
- spec/unit/command/call_spec.rb
|