require '<%= recap_require %>'

# To connect to the vagrant VM we need to set up a few non-standard parameters, including the
# vagrant SSH port and private key

set :user, 'vagrant'

ssh_options[:port] = 2222
ssh_options[:keys] = ['<%= project.private_key_path %>']

server '127.0.0.1', :web

# Each project has its own location shared between the host machine and the VM

set :application, '<%= project.name %>'
set :repository, '/recap/share/<%= project.name %>'

# Finally, to ensure tests don't fail if deployments are made within a second of each other
# which they can do when automated like this, we use a finer-grained release tag

set(:release_tag) { Time.now.utc.strftime("%Y%m%d%H%M%S%L") }
set(:release_matcher) { /\A[0-9]{17}\Z/ }