vagrantup 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/Gemfile +17 -0
- data/README.md +45 -0
- data/Rakefile +41 -0
- data/VERSION +1 -0
- data/bin/.gitignore +0 -0
- data/bin/vagrant +15 -0
- data/bin/vagrant-box +35 -0
- data/bin/vagrant-down +28 -0
- data/bin/vagrant-halt +29 -0
- data/bin/vagrant-init +28 -0
- data/bin/vagrant-package +30 -0
- data/bin/vagrant-reload +30 -0
- data/bin/vagrant-resume +28 -0
- data/bin/vagrant-ssh +28 -0
- data/bin/vagrant-suspend +28 -0
- data/bin/vagrant-up +30 -0
- data/config/default.rb +29 -0
- data/lib/vagrant.rb +14 -0
- data/lib/vagrant/actions/base.rb +93 -0
- data/lib/vagrant/actions/box/add.rb +22 -0
- data/lib/vagrant/actions/box/destroy.rb +14 -0
- data/lib/vagrant/actions/box/download.rb +63 -0
- data/lib/vagrant/actions/box/unpackage.rb +49 -0
- data/lib/vagrant/actions/runner.rb +128 -0
- data/lib/vagrant/actions/vm/destroy.rb +14 -0
- data/lib/vagrant/actions/vm/down.rb +12 -0
- data/lib/vagrant/actions/vm/export.rb +41 -0
- data/lib/vagrant/actions/vm/forward_ports.rb +32 -0
- data/lib/vagrant/actions/vm/halt.rb +14 -0
- data/lib/vagrant/actions/vm/import.rb +17 -0
- data/lib/vagrant/actions/vm/move_hard_drive.rb +53 -0
- data/lib/vagrant/actions/vm/package.rb +61 -0
- data/lib/vagrant/actions/vm/provision.rb +71 -0
- data/lib/vagrant/actions/vm/reload.rb +17 -0
- data/lib/vagrant/actions/vm/resume.rb +16 -0
- data/lib/vagrant/actions/vm/shared_folders.rb +69 -0
- data/lib/vagrant/actions/vm/start.rb +50 -0
- data/lib/vagrant/actions/vm/suspend.rb +16 -0
- data/lib/vagrant/actions/vm/up.rb +35 -0
- data/lib/vagrant/box.rb +129 -0
- data/lib/vagrant/busy.rb +73 -0
- data/lib/vagrant/commands.rb +174 -0
- data/lib/vagrant/config.rb +156 -0
- data/lib/vagrant/downloaders/base.rb +13 -0
- data/lib/vagrant/downloaders/file.rb +21 -0
- data/lib/vagrant/downloaders/http.rb +47 -0
- data/lib/vagrant/env.rb +140 -0
- data/lib/vagrant/ssh.rb +43 -0
- data/lib/vagrant/util.rb +45 -0
- data/lib/vagrant/vm.rb +57 -0
- data/script/vagrant-ssh-expect.sh +22 -0
- data/templates/Vagrantfile +8 -0
- data/test/test_helper.rb +91 -0
- data/test/vagrant/actions/base_test.rb +32 -0
- data/test/vagrant/actions/box/add_test.rb +37 -0
- data/test/vagrant/actions/box/destroy_test.rb +18 -0
- data/test/vagrant/actions/box/download_test.rb +118 -0
- data/test/vagrant/actions/box/unpackage_test.rb +101 -0
- data/test/vagrant/actions/runner_test.rb +236 -0
- data/test/vagrant/actions/vm/destroy_test.rb +24 -0
- data/test/vagrant/actions/vm/down_test.rb +32 -0
- data/test/vagrant/actions/vm/export_test.rb +88 -0
- data/test/vagrant/actions/vm/forward_ports_test.rb +50 -0
- data/test/vagrant/actions/vm/halt_test.rb +27 -0
- data/test/vagrant/actions/vm/import_test.rb +36 -0
- data/test/vagrant/actions/vm/move_hard_drive_test.rb +108 -0
- data/test/vagrant/actions/vm/package_test.rb +155 -0
- data/test/vagrant/actions/vm/provision_test.rb +103 -0
- data/test/vagrant/actions/vm/reload_test.rb +44 -0
- data/test/vagrant/actions/vm/resume_test.rb +27 -0
- data/test/vagrant/actions/vm/shared_folders_test.rb +117 -0
- data/test/vagrant/actions/vm/start_test.rb +55 -0
- data/test/vagrant/actions/vm/suspend_test.rb +27 -0
- data/test/vagrant/actions/vm/up_test.rb +76 -0
- data/test/vagrant/box_test.rb +92 -0
- data/test/vagrant/busy_test.rb +81 -0
- data/test/vagrant/commands_test.rb +252 -0
- data/test/vagrant/config_test.rb +123 -0
- data/test/vagrant/downloaders/base_test.rb +20 -0
- data/test/vagrant/downloaders/file_test.rb +32 -0
- data/test/vagrant/downloaders/http_test.rb +40 -0
- data/test/vagrant/env_test.rb +293 -0
- data/test/vagrant/ssh_test.rb +95 -0
- data/test/vagrant/util_test.rb +64 -0
- data/test/vagrant/vm_test.rb +96 -0
- metadata +263 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 74e5ef6c6f360e06f1c6ff6ab9b8f906745f23a6
|
4
|
+
data.tar.gz: f55a897b43459c928370a0914c1ff8e2245448f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1545a0dd45bc68242a624ea00f3af69dc6db6dbcd99c0e42d81d824a9d19fafd12f0ae332c206677d4435a82ad55e2fb3727594fe1264f06ebfc5eb25d69841b
|
7
|
+
data.tar.gz: 076ed7d2360bfd733ec2e5fbd8493659b46323bcb16ddb1ed35dc21dc630977c3f096038459c5a8ea7d28194aa2db9341ecb91a841eab99755a7a9b80ad170f3
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source :gemcutter
|
2
|
+
|
3
|
+
# Gems required for the lib to even run
|
4
|
+
gem "virtualbox", ">= 0.5.0"
|
5
|
+
gem "net-ssh", ">= 2.0.19"
|
6
|
+
gem "net-scp", ">= 1.0.2"
|
7
|
+
gem "git-style-binaries", ">= 0.1.10"
|
8
|
+
gem "json", ">= 1.2.0"
|
9
|
+
gem "tarruby", ">= 0.1.5"
|
10
|
+
|
11
|
+
# Gems required for testing only. To install run
|
12
|
+
# gem bundle test
|
13
|
+
group :test do
|
14
|
+
gem "contest", ">= 0.1.2"
|
15
|
+
gem "mocha"
|
16
|
+
gem "ruby-debug", ">= 0.10.3" if RUBY_VERSION < '1.9'
|
17
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Vagrant
|
2
|
+
|
3
|
+
* Website: [http://vagrantup.com](http://vagrantup.com)
|
4
|
+
* IRC: `#vagrant` on Freenode
|
5
|
+
* Mailng list: [Google Groups](http://groups.google.com/group/vagrant-up)
|
6
|
+
|
7
|
+
Vagrant is a tool for building and distributing virtualized development environments.
|
8
|
+
|
9
|
+
By providing automated creation and provisioning of virtual machines using [Sun’s VirtualBox](http://www.virtualbox.org),
|
10
|
+
Vagrant provides the tools to create and configure lightweight, reproducible, and portable
|
11
|
+
virtual environments. For more information, see the part of the getting started guide
|
12
|
+
on ”[Why Vagrant?](http://vagrantup.com/docs/getting-started/index.html)”
|
13
|
+
|
14
|
+
## Quick Start
|
15
|
+
|
16
|
+
First, make sure your development machine has [VirtualBox](http://www.virtualbox.org)
|
17
|
+
installed. The setup from that point forward is very easy, since Vagrant is simply
|
18
|
+
a rubygem.
|
19
|
+
|
20
|
+
sudo gem install vagrant
|
21
|
+
|
22
|
+
To build your first virtual environment:
|
23
|
+
|
24
|
+
vagrant init
|
25
|
+
vagrant box add base http://files.vagrantup.com/base.box
|
26
|
+
vagrant up
|
27
|
+
|
28
|
+
## Getting Started Guide and Video
|
29
|
+
|
30
|
+
To learn how to build a fully functional rails development environment, view the
|
31
|
+
[getting started guide](http://vagrantup.com/getting-started/index.html).
|
32
|
+
|
33
|
+
There is also a fairly short (12 minute) [getting started video](http://vimeo.com/9976342) which
|
34
|
+
explains how to build a fully functional LAMP development environment, which
|
35
|
+
covers a few parts of Vagrant in more detail than the website guide.
|
36
|
+
|
37
|
+
## Contributing to Vagrant
|
38
|
+
|
39
|
+
To hack on vagrant, you'll need [bundler](http://github.com/carlhuda/bundler) which can
|
40
|
+
be installed with a simple `sudo gem install bundler`. Afterwords, do the following:
|
41
|
+
|
42
|
+
bundle install
|
43
|
+
rake
|
44
|
+
|
45
|
+
This will run the test suite, which should come back all green! Then you're good to go!
|
data/Rakefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'rake/testtask'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'jeweler'
|
5
|
+
Jeweler::Tasks.new do |gemspec|
|
6
|
+
gemspec.name = "vagrant"
|
7
|
+
gemspec.summary = "Vagrant is a tool for building and distributing virtualized development environments."
|
8
|
+
gemspec.description = "Vagrant is a tool for building and distributing virtualized development environments."
|
9
|
+
gemspec.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
10
|
+
gemspec.homepage = "http://github.com/mitchellh/vagrant"
|
11
|
+
gemspec.authors = ["Mitchell Hashimoto", "John Bender"]
|
12
|
+
|
13
|
+
gemspec.add_dependency('virtualbox', '>= 0.5.0')
|
14
|
+
gemspec.add_dependency('net-ssh', '>= 2.0.19')
|
15
|
+
gemspec.add_dependency('net-scp', '>= 1.0.2')
|
16
|
+
gemspec.add_dependency('json', '>= 1.2.0')
|
17
|
+
gemspec.add_dependency('git-style-binaries', '>= 0.1.10')
|
18
|
+
gemspec.add_dependency('tarruby', '>= 0.1.5')
|
19
|
+
end
|
20
|
+
Jeweler::GemcutterTasks.new
|
21
|
+
rescue LoadError
|
22
|
+
puts "Jeweler not available. Install it with: gem install jeweler"
|
23
|
+
end
|
24
|
+
|
25
|
+
task :default => :test
|
26
|
+
|
27
|
+
Rake::TestTask.new do |t|
|
28
|
+
t.libs << "test"
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
30
|
+
end
|
31
|
+
|
32
|
+
begin
|
33
|
+
require 'yard'
|
34
|
+
YARD::Rake::YardocTask.new do |t|
|
35
|
+
t.options = ['--main', 'README.md', '--markup', 'markdown']
|
36
|
+
t.options += ['--title', 'Vagrant Developer Documentation']
|
37
|
+
end
|
38
|
+
rescue LoadError
|
39
|
+
puts "Yard not available. Install it with: gem install yard"
|
40
|
+
puts "if you wish to be able to generate developer documentation."
|
41
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/bin/.gitignore
ADDED
File without changes
|
data/bin/vagrant
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
GitStyleBinary.primary do
|
12
|
+
version "Somewhere between 0 and 0.1"
|
13
|
+
|
14
|
+
run { educate }
|
15
|
+
end
|
data/bin/vagrant-box
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "manage boxes"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage:
|
20
|
+
|
21
|
+
#{command.full_name} add name uri
|
22
|
+
#{command.full_name} remove name
|
23
|
+
|
24
|
+
Add and remove vagrant boxes.
|
25
|
+
|
26
|
+
EOS
|
27
|
+
|
28
|
+
run do |command|
|
29
|
+
begin
|
30
|
+
Vagrant::Commands.box(command.argv)
|
31
|
+
rescue ArgumentError
|
32
|
+
educate
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/bin/vagrant-down
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "destroys the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Destroys the vagrant environment.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
run do |command|
|
26
|
+
Vagrant::Commands.down
|
27
|
+
end
|
28
|
+
end
|
data/bin/vagrant-halt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "forcibly halts the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Forcibly halts the vagrant environment. This is the equivalent
|
22
|
+
of pulling the power on your computer.
|
23
|
+
|
24
|
+
EOS
|
25
|
+
|
26
|
+
run do |command|
|
27
|
+
Vagrant::Commands.halt
|
28
|
+
end
|
29
|
+
end
|
data/bin/vagrant-init
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "initializes directory for vagrant use"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Creates the initial files required for using vagrant.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
run do |command|
|
26
|
+
Vagrant::Commands.init
|
27
|
+
end
|
28
|
+
end
|
data/bin/vagrant-package
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "package the current vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Package the current vagrant environment into a box.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
opt :include, "files to include in the package", :type => :strings
|
26
|
+
|
27
|
+
run do |command|
|
28
|
+
Vagrant::Commands.package(command.argv[0], command.opts[:include])
|
29
|
+
end
|
30
|
+
end
|
data/bin/vagrant-reload
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "reload the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Reloads the vagrant environment. This forces a shutdown of the VM,
|
22
|
+
updates the metadata (forwarded ports, shared folders, etc.), restarts
|
23
|
+
the VM, and reruns the chef recipes.
|
24
|
+
|
25
|
+
EOS
|
26
|
+
|
27
|
+
run do |command|
|
28
|
+
Vagrant::Commands.reload
|
29
|
+
end
|
30
|
+
end
|
data/bin/vagrant-resume
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "resumes the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Resumes the vagrant environment.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
run do |command|
|
26
|
+
Vagrant::Commands.resume
|
27
|
+
end
|
28
|
+
end
|
data/bin/vagrant-ssh
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "opens an SSH connection into the VM"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Opens an SSH connection into the created VM.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
run do |command|
|
26
|
+
Vagrant::Commands.ssh
|
27
|
+
end
|
28
|
+
end
|
data/bin/vagrant-suspend
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "suspends the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Suspends the vagrant environment.
|
22
|
+
|
23
|
+
EOS
|
24
|
+
|
25
|
+
run do |command|
|
26
|
+
Vagrant::Commands.suspend
|
27
|
+
end
|
28
|
+
end
|
data/bin/vagrant-up
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
# Fallback on rubygems
|
6
|
+
require "rubygems"
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'git-style-binary/command'
|
10
|
+
|
11
|
+
# Get library
|
12
|
+
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
$:.unshift(libdir) unless $:.include?(libdir)
|
14
|
+
require 'vagrant'
|
15
|
+
|
16
|
+
GitStyleBinary.command do
|
17
|
+
short_desc "create the vagrant environment"
|
18
|
+
banner <<-EOS
|
19
|
+
Usage: #{command.full_name} #{all_options_string}
|
20
|
+
|
21
|
+
Create the vagrant environment if it doesn't exist,
|
22
|
+
otherwise start the vagrant environment if its not
|
23
|
+
already running.
|
24
|
+
|
25
|
+
EOS
|
26
|
+
|
27
|
+
run do |command|
|
28
|
+
Vagrant::Commands.up
|
29
|
+
end
|
30
|
+
end
|