groovy:000> import org.openqa.selenium.*
===> org.openqa.selenium.firefox.*, org.openqa.selenium.*
groovy:000> import org.openqa.selenium.firefox.*
===> org.openqa.selenium.*, org.openqa.selenium.firefox.*
groovy:000> driver = new FirefoxDriver() as WebDriver
===> FirefoxDriver: firefox on MAC (1b117b7b-c930-f642-8273-206cb455eedb)
groovy:000> driver.get('http://google.com')
===> null
groovy:000> searchBox = driver.findElement(By.id('lst-ib'))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:grab 'com.github.groovy-wslite:groovy-wslite:1.1.3' | |
client = new SOAPClient('http://www.holidaywebservice.com/Holidays/US/Dates/USHolidayDates.asmx') | |
import wslite.soap.SOAPClient | |
// RESULT: wslite.soap.SOAPClient | |
client = new SOAPClient('http://www.holidaywebservice.com/Holidays/US/Dates/USHolidayDates.asmx') | |
// RESULT: wslite.soap.SOAPClient@2baa8d82 | |
response = client.send(SOAPAction: 'http://www.27seconds.com/Holidays/US/Dates/GetMothersDay') { | |
body { | |
GetMothersDay('xmlns':'http://www.27seconds.com/Holidays/US/Dates/') { year(2016) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab( 'com.github.groovy-wslite:groovy-wslite:0.8.0' ) | |
import wslite.soap.* | |
import wslite.http.auth.* | |
import groovy.xml.XmlUtil | |
def client = new SOAPClient( 'https://test.anis.ch/HTDB.WebService/AnimalImportService.asmx' ) | |
client.authorization = new HTTPBasicAuthorization( "613731", "test" ) | |
// Trust the ssl for this site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groovy:000> base = 'https://slack.com/api/' | |
===> https://slack.com/api/ | |
groovy:000> "${base}api.test?token=${token}".toURL().text | |
===> {"ok":true,"args":{"token":"xoxp-29736524550-29773811473-41484563842-0e0ceb60c8"}} | |
groovy:000> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
if ( args.size() < 1 ) { | |
scriptFile = getClass().protectionDomain.codeSource.location.path.split('/').last() | |
System.out.println("usage: ${scriptFile} [dependency]+*") | |
System.exit(0) | |
} | |
args.each { | |
println "downloading ${it}" | |
new Dependency(it)?.download() |
The purpose here is to see if we can flesh out 50 minutes of a MinneBar session to improve the lives of both Devs and Ops, not quite comfortable with Git tree manipulation.
Come to think of it— whatever we decide to do with MinneBar11 this year— this talk could help folk. Let's do make a project of fleshing it.
irb(main):012:0> require 'irb/completion'
=> true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd "$(dirname "$0")/.." | |
export JEE_ENV=development | |
./gradlew test integrationTest $@ |