README.md in vagrant-exec-0.2.0 vs README.md in vagrant-exec-0.2.1
- old
+ new
@@ -15,19 +15,21 @@
➜ vagrant exec pwd
/vagrant
```
Installation
--------
+------------
```shell
➜ vagrant plugin install vagrant-exec
```
Configuration
-------------
+### Custom folder
+
The root directory can be configured using Vagrantfile.
```ruby
Vagrant.configure('2') do |config|
config.vm.box = 'precise32'
@@ -36,34 +38,38 @@
```
```shell
➜ vagrant exec pwd
# is the same as
-➜ vagrant ssh -c "cd /custom && bundle exec pwd'
+➜ vagrant ssh -c "cd /custom && bundle exec pwd"
```
-You can also enable bundler to prepend each command with `bundle exec` (note, that it won't be done for commands like `bundle install`).
+### Bundler
+You can enable bundler to prepend each command with `bundle exec`. Note that it won't be done for commands starting with `bundle` (e.g. `bundle install`).
+
```ruby
Vagrant.configure('2') do |config|
config.vm.box = 'precise32'
config.exec.bundler = true
end
```
```shell
➜ vagrant exec pwd
# is the same as
-➜ vagrant ssh -c "cd /vagrant && bundle exec pwd'
+➜ vagrant ssh -c "cd /vagrant && bundle exec pwd"
➜ vagrant exec bundle install
# is the same as
-➜ vagrant ssh -c "cd /vagrant && bundle install'
+➜ vagrant ssh -c "cd /vagrant && bundle install"
```
-You can also add environment variables to be exported before.
+### Environment variables
+You can add environment variables to be exported before.
+
```ruby
Vagrant.configure('2') do |config|
config.vm.box = 'precise32'
config.exec.env['RAILS_ENV'] = 'test'
config.exec.env['RAILS_ROOT'] = '/vagrant'
@@ -71,19 +77,24 @@
```
```shell
➜ vagrant exec pwd
# is the same as
-➜ vagrant ssh -c "cd /vagrant && export RAILS_ENV=test && export RAILS_ROOT=/vagrant && pwd'
+➜ vagrant ssh -c "cd /vagrant && export RAILS_ENV=test && export RAILS_ROOT=/vagrant && pwd"
```
Acceptance tests
----------------
Before running features, you'll need to bootstrap box.
```shell
➜ bundle exec rake features:bootstrap
+```
+
+To run features, execute the following rake task.
+
+```shell
➜ bundle exec rake features:run
```
After you're done, remove Vagrant box.