fastly/fastly-ruby — pull request #29 by ezkl (2014-06-05 01:06:52+00:00)
Title: Add VCL#set_main!

The Fastly API allows customers to upload multiple customer VCLs. The
primary ("main") VCL must be designated as such. This causes quite a bit
of confusion, particularly if the user has experience with our UI.

This is a bandaid, but it:
* exposes VCL's `main` attribute (boolean)
* adds a new method (`VCL#set_main!`) for designating `main`

Example Usage:
```ruby
vcl_name = 'new_vcl'
vcl_content = File.read("./#{vcl_name}.vcl")
version.upload_vcl(vcl_name, File.read(vcl_content))
version.vcl(vcl_name).main # => false
version.vcl(vcl_name).set_main!
version.vcl(vcl_name).main # => true
```

cc: @ctdk