boxes 2.5.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +2 -0
- data/.rubocop.yml +640 -0
- data/.ruby-version +1 -1
- data/.travis.yml +0 -2
- data/CHANGELOG.md +21 -0
- data/Rakefile +17 -22
- data/boxes.gemspec +3 -4
- data/lib/boxes/command.rb +5 -5
- data/lib/boxes/testing.rb +6 -0
- data/lib/boxes/testing/command.rb +23 -0
- data/lib/boxes/testing/matchers.rb +16 -0
- data/lib/boxes/testing/matchers/base_matcher.rb +21 -0
- data/lib/boxes/testing/matchers/have_exit_status_matcher.rb +19 -0
- data/lib/boxes/testing/matchers/write_to_stdout_matcher.rb +23 -0
- data/lib/boxes/version.rb +1 -2
- data/scripts/postinstall.sh +2 -2
- data/scripts/ruby.sh +7 -7
- data/scripts/vmtools.sh +1 -0
- data/spec/acceptance/user_builds_box_spec.rb +51 -0
- data/spec/acceptance/user_cleans_the_env_spec.rb +15 -0
- data/spec/acceptance/user_shows_the_env_spec.rb +49 -0
- data/spec/acceptance/user_views_env_help_spec.rb +18 -0
- data/spec/acceptance/user_views_help_spec.rb +39 -0
- data/spec/acceptance/user_views_version_spec.rb +10 -0
- data/spec/acceptance_helper.rb +15 -0
- data/spec/boxes/subprocess_spec.rb +4 -1
- data/spec/boxes/testing/command_spec.rb +28 -0
- data/spec/boxes/testing/matchers/have_exit_status_matcher_spec.rb +33 -0
- data/spec/boxes/testing/matchers/write_to_stdout_matcher_spec.rb +33 -0
- data/spec/support/env.rb +5 -0
- data/spec/support/subprocess_command.sh +7 -0
- data/spec/support/tmp.rb +17 -0
- data/spec/tmp/.gitkeep +0 -0
- data/templates/debian/jessie64.erb +2 -2
- data/templates/debian/preseed.cfg +5 -1
- data/templates/debian/stretch64.erb +60 -0
- data/templates/ubuntu/trusty64.erb +2 -2
- data/templates/ubuntu/xenial64.erb +2 -2
- metadata +45 -33
- data/features/boxes.feature +0 -8
- data/features/build.feature +0 -16
- data/features/env.feature +0 -18
- data/features/support/env.rb +0 -1
- data/spec/support/subprocess_command.rb +0 -7
- data/templates/ubuntu/wily64.erb +0 -64
data/features/boxes.feature
DELETED
data/features/build.feature
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
Feature: We can build boxes
|
2
|
-
|
3
|
-
Scenario: It will error without a name
|
4
|
-
When I run `boxes build --template=ubuntu/trusty64 --provider=vmware`
|
5
|
-
Then the output should contain "[!] A name is required!"
|
6
|
-
And the exit status should be 1
|
7
|
-
|
8
|
-
Scenario: It will error without a provider
|
9
|
-
When I run `boxes build --name=trusty64-standard --template=ubuntu/trusty64`
|
10
|
-
Then the output should contain "[!] A provider is required!"
|
11
|
-
And the exit status should be 1
|
12
|
-
|
13
|
-
Scenario: It will error without a template
|
14
|
-
When I run `boxes build --name=trusty64-standard --provider=vmware`
|
15
|
-
Then the output should contain "[!] A template is required!"
|
16
|
-
And the exit status should be 1
|
data/features/env.feature
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Feature: We can manage the boxes environment
|
2
|
-
|
3
|
-
Scenario: It shows the environment by default
|
4
|
-
When I run `boxes env`
|
5
|
-
Then the output should contain "Configuration:"
|
6
|
-
Then the output should contain "Environment Variables:"
|
7
|
-
And the exit status should be 0
|
8
|
-
|
9
|
-
Scenario: It has a show command
|
10
|
-
When I run `boxes env show`
|
11
|
-
Then the output should contain "Configuration:"
|
12
|
-
Then the output should contain "Environment Variables:"
|
13
|
-
And the exit status should be 0
|
14
|
-
|
15
|
-
Scenario: It can clean the environment
|
16
|
-
When I run `boxes env clean`
|
17
|
-
Then the directory named "~/.boxes/env" does not exist
|
18
|
-
And the exit status should be 0
|
data/features/support/env.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'aruba/cucumber'
|
data/templates/ubuntu/wily64.erb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"provisioners": [
|
3
|
-
{
|
4
|
-
"type": "shell",
|
5
|
-
"scripts": [
|
6
|
-
"scripts/postinstall.sh",
|
7
|
-
"scripts/vmtools.sh",
|
8
|
-
<%- @scripts.each do |script| -%>
|
9
|
-
"scripts/<%= script %>",
|
10
|
-
<%- end -%>
|
11
|
-
"scripts/purge.sh"
|
12
|
-
],
|
13
|
-
"execute_command": "echo 'vagrant' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'"
|
14
|
-
}
|
15
|
-
],
|
16
|
-
|
17
|
-
"builders": [
|
18
|
-
{
|
19
|
-
"name": "<%= @name %>",
|
20
|
-
"type": "<%= @provider %>-iso",
|
21
|
-
<%- if @provider == "vmware" -%>
|
22
|
-
"guest_os_type": "ubuntu-64",
|
23
|
-
"tools_upload_flavor": "linux",
|
24
|
-
<%- else -%>
|
25
|
-
"guest_os_type": "Ubuntu_64",
|
26
|
-
<%- end -%>
|
27
|
-
"headless": true,
|
28
|
-
|
29
|
-
"iso_url": "http://releases.ubuntu.com/wily/ubuntu-15.10-server-amd64.iso",
|
30
|
-
"iso_checksum": "86aa35a986eba6e5ad30e3d486d57efe6803ae7ea4859b0216953e9e62871131",
|
31
|
-
"iso_checksum_type": "sha256",
|
32
|
-
|
33
|
-
"ssh_username": "vagrant",
|
34
|
-
"ssh_password": "vagrant",
|
35
|
-
"ssh_timeout": "15m",
|
36
|
-
|
37
|
-
"http_directory": "templates/ubuntu",
|
38
|
-
|
39
|
-
"boot_command": [
|
40
|
-
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
41
|
-
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
42
|
-
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
43
|
-
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
44
|
-
"/install/vmlinuz noapic ",
|
45
|
-
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
|
46
|
-
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
47
|
-
"hostname={{ .Name }} ",
|
48
|
-
"fb=false debconf/frontend=noninteractive ",
|
49
|
-
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
50
|
-
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
51
|
-
"grub-installer/bootdev=/dev/sda ",
|
52
|
-
"initrd=/install/initrd.gz -- <enter>"
|
53
|
-
],
|
54
|
-
|
55
|
-
"shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'"
|
56
|
-
}
|
57
|
-
],
|
58
|
-
|
59
|
-
"post-processors": [
|
60
|
-
{
|
61
|
-
"type": "vagrant"
|
62
|
-
}
|
63
|
-
]
|
64
|
-
}
|