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 python | |
# vim: set fileencoding=utf-8: | |
""" Process URL for intersphinx targets and emit html or text """ | |
def validuri(string): | |
return string | |
from sphinx.ext.intersphinx import read_inventory_v2 | |
from posixpath import join | |
import pprint |
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
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.1' | |
} | |
} |
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 | |
# You could go to http://www.oracle.com/technetwork/java/javase/downloads/index.html | |
# And pick the file you want to download, but it's an interactive thing that requires you to | |
# click some buttons and accept the agreement. Doing that on a headless machine is a bit tricky. | |
# This script will do it for you. | |
#Configure which version to download. | |
export JAVA_VERSION_MAJOR=8 | |
export JAVA_VERSION_MINOR=66 |
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
<!DOCTYPE html > | |
<html> | |
<!-- This was hacked together by hand after python-markdown output the bulk of it. | |
Maybe someday I'll put together a better script to aut-generate this from markdown source. --> | |
<head> | |
<!-- github-markdown, plus github pygments --> | |
<style type='text/css'> | |
/* <![CDATA[ */ | |
@font-face { | |
font-family: octicons-link; |
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
// GIVEN | |
const http = require('some-well-known-http-request-module'); | |
sandbox.stub(http, 'post').returns(EXPECTED_RESPONSE_BODY); | |
// WHEN | |
makeRestApiCall(EXPECTED_POST_DATA); | |
// THEN | |
expect(http.post).to.have.been.calledWith('expectedEndPoint', EXPECTED_POST_DATA); |
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
// GIVEN | |
const http = require('some-well-known-http-request-module'); | |
sandbox.stub(http, 'post').returns(EXPECTED_RESPONSE_BODY); | |
sandbox.stub(http, 'config'); | |
// WHEN | |
makeRestApiCall(EXPECTED_POST_DATA); | |
// THEN | |
expect(http.config).to.have.been.calledWith({ baseUrl: 'http://example.com/rest/api/' }); |
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
const http = require('some-well-known-http-request-module'); | |
function init() { | |
http.config({ | |
baseUrl: 'http://example.com/rest/api/' | |
}); | |
} | |
function makeRestApiCall(data) { | |
return http.post('expectedEndpoint', data); |
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
function makeRestApiCall(client, data) { | |
return client.post('http://example.com/rest/api/expectedEndpoint', data); | |
} |
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
// GIVEN | |
const mockClient = { | |
post: sandbox.stub().returns(EXPECTED_RESPONSE_BODY) | |
}; | |
// WHEN | |
makeRestApiCall(mockClient, EXPECTED_POST_DATA); | |
// THEN | |
expect(mockClient.post).to.have.been |
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
// GIVEN | |
const http = require('some-well-known-http-request-module'); | |
sandbox.stub(http, 'post').returns(EXPECTED_RESPONSE_BODY); | |
// WHEN | |
makeRestApiCall(EXPECTED_POST_DATA); | |
// THEN | |
expect(http.post).to.have.been | |
.calledWith('http://example.com/rest/api/expectedEndPoint', EXPECTED_POST_DATA); |
OlderNewer