Skip to content

Instantly share code, notes, and snippets.

@thomasfl
Created January 10, 2012 14:48
Show Gist options
  • Select an option

  • Save thomasfl/1589434 to your computer and use it in GitHub Desktop.

Select an option

Save thomasfl/1589434 to your computer and use it in GitHub Desktop.
Vortex Utils Hello World script
require 'rubygems'
require 'net/dav'
require 'json'
require 'vortex_utils'
dav = Net::DAV.new('https://vortex-systest-dav.uio.no/test/', :osx_keychain => true)
article = {
"resourcetype" => "structured-article",
"properties" => {
"title" => "Hello world!",
"introduction" => "This is the introduction.",
"content" => "<p>And this is the main content.</p>"
}
}
dav.put_string('hello-world.html', article.to_json)
dav.vortex_publish!('hello-world.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment