The Vagrant-Cloud and Vagrant provider (e.g. virtualbox, vmware_desktop
etc.) must be determined differently depending on the builder or
post-processor supplying the artifact.
Adds a wrapper function that:
* Uses the original method of determining the provider when the artifact
is provided by either the Vagrant builder or Vagrant post-processor
* Uses a new (currently empty) function when the artifact is provided
via the Artifice post-processor
* stoped using url to pass the auth token and put it in the headers
* added newRequest method to VagrantCloudClient that sets json and auth headesr
* made VagrantCloudClient method pointers to avoid copies
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.
`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
Fixes the following vet reports:
post-processor/vagrant-cloud/client.go:81: arg resp for printf verb %s of wrong type: *net/http.Response
post-processor/vagrant-cloud/client.go:99: arg resp for printf verb %s of wrong type: *net/http.Response
post-processor/vagrant-cloud/client.go:131: arg resp for printf verb %s of wrong type: *net/http.Response
post-processor/vagrant-cloud/client.go:156: arg resp for printf verb %s of wrong type: *net/http.Response
post-processor/vagrant-cloud/client.go:175: arg resp for printf verb %s of wrong type: *net/http.Response
A few weeks ago ... the version.number changed from an integer to a
semver based string.
I guess version.number and version.version are equals now. So
version.version can be used.
This commit should fix#1735
In order that something consuming an artifact can have access to extra
builder specific data add the State method which allows the caller to
ask for arbitary values by name.