Skip to content

Commit

Permalink
add comments to the Rakefile to make it understandable
Browse files Browse the repository at this point in the history
  • Loading branch information
dustymabe committed Jul 21, 2016
1 parent 3a2558d commit 1aabefe
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ $ gem install bundler && bundle install
$ bundle exec rake -T
# Run Cucumber tests
$ bundle exec rake features
$ bundle exec rake featuretests
# Build the gem (gets generated in the 'pkg' directory
$ bundle exec rake build
Expand Down
33 changes: 28 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
# A Rakefile is like a Makefile for ruby

# bundler/gem_tasks provides functionality like:
# bundle exec rake build
# bundle exec rake install
# bundle exec rake release
#
require 'bundler/gem_tasks'
require 'rake/clean'

# cucumber/rake/task provides us with an easy way to call cucumber
require 'cucumber/rake/task'

CLOBBER.include('pkg')
# rake/clean provides CLEAN/CLOBBER
# http://www.virtuouscode.com/2014/04/28/rake-part-6-clean-and-clobber/
# CLEAN - list to let rake know what files can be cleaned up after build
# CLOBBER - list to let rake know what files are final products of the build
#
require 'rake/clean'


# Add the build dir to the list of items to clean up
CLEAN.include('build')

# We want to keep the build artifacts in the pkg dir
CLOBBER.include('pkg')

# Define a Rake::Task that will do initialization for us
# See http://www.ultrasaurus.com/2009/12/creating-a-custom-rake-task/
task :init do
FileUtils.mkdir_p 'build'
end

# Cucumber acceptance test task
Cucumber::Rake::Task.new(:features)
task :features => :init
# Create new Cucumber::Rake::Task that will run Cucumber tests
Cucumber::Rake::Task.new(:featuretests)

# Define Rake::Task dependency - run :init before :featuretests
task :featuretests => :init

2 changes: 1 addition & 1 deletion test/libvirt/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ and then:
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
gem install bundler
bundle install
bundle exec rake features
bundle exec rake featuretests
2 changes: 1 addition & 1 deletion test/virtualbox/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ and then:
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
gem install bundler
bundle install
bundle exec rake features
bundle exec rake featuretests

0 comments on commit 1aabefe

Please sign in to comment.