lib/fastly/version.rb in fastly-1.01 vs lib/fastly/version.rb in fastly-1.1.0
- old
+ new
@@ -94,9 +94,16 @@
hash = fetcher.client.put(Fastly::Version.put_path(self)+"/clone")
return nil if hash.nil?
return Fastly::Version.new(hash, fetcher)
end
+ # Create an entirely new version, not cloned from the previous one.
+ def self.create_new(fetcher, opts)
+ hash = fetcher.client.post(Fastly::Version.post_path(opts))
+ return nil if hash.nil?
+ return Fastly::Version.new(hash, fetcher)
+ end
+
# Get the generated VCL object for this Version (which must have been activated first)
#
# Won't return the content of the VCL unless you pass in
# :include_content => true
# in the opts