// Send a Twitter update when a release is made.  Cool!

import groovyx.net.http.HTTPBuilder

import static groovyx.net.http.Method.*
import static groovyx.net.http.ContentType.*

def http = new HTTPBuilder('http://twitter.com/statuses/')

http.auth.basic pom.properties.twitter_user, pom.properties.twitter_passwd

def msg = "HTTPBuilder v${pom.version} has been released!"

println "Tweeting release for v${pom.version}..."

http.request( POST, XML ) { req ->
	url.path = 'update.xml'
	send URLENC, [status:msg, source:'httpbuilder']
	
	// twitter doesn't like the Expect: 100 header...
	req.params.setBooleanParameter 'http.protocol.expect-continue', false
	
	 response.success = { resp, xml ->
		println "Tweet response status: ${resp.statusLine}"
		assert resp.statusLine.statusCode == 200
	}
}

// Send a Twitter update when a release is made.  Cool!

import groovyx.net.http.HTTPBuilder

import static groovyx.net.http.Method.*
import static groovyx.net.http.ContentType.*

def http = new HTTPBuilder('http://twitter.com/statuses/')

http.auth.basic pom.properties.'twitter.user', 
				pom.properties.'twitter.passwd'

def msg = "HTTPBuilder v${pom.version} has been released!"

println "Tweeting release for v${pom.version}..."

http.request( POST, XML ) { req ->
	uri.path = 'update.xml'
	send URLENC, [status:msg, source:'httpbuilder']
	
	// twitter doesn't like the Expect: 100 header...
	req.params.setBooleanParameter 'http.protocol.expect-continue', false
	
	 response.success = { resp, xml ->
		println "Tweet response status: ${resp.statusLine}"
		assert resp.statusLine.statusCode == 200
	}
}

Fix for GMOD-61 and twitter credentials.
Fix for GMOD-61 and twitter credentials. 

git-svn-id: c771e6b5c05ab968a5a6d22a86aeb76f40bf2d1c@643 f908d50e-8e36-0410-ac0a-93754bd5008d
