Skip to content

Commit

Permalink
added presentation stub
Browse files Browse the repository at this point in the history
  • Loading branch information
ollin committed Feb 9, 2017
1 parent 966192c commit ff30aed
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 1 deletion.
64 changes: 63 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
= CDC Workshop Repository

image:https://badges.gitter.im/cdc-workshop/Lobby.svg[link="https://gitter.im/cdc-workshop/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
image:https://badges.gitter.im/cdc-workshop/Lobby.svg[link="https://gitter.im/cdc-workshop/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]

== Idea

There is an address service which delivers addresses. This is the producer.
At the moment there is one Consumer which is an invoice service which can
produce invoices.

== Working with the code

To develop, run and build a JDK 8 is required. The build system is
https://gradle.org/[gradle].
The services are implemented with https://projects.spring.io/spring-boot/[spring boot].

=== Test the code

_cd_ into the directory of your checkout.

To test all services:

[listing]
----
$ ./gradlew test # for linux
----

[listing]
----
$ ./gradlew.bat test # for windows
----

=== Run address-service

[listing]
----
$ ./gradlew :address-service:bootRun
----

TIP: `ctrl^c` ends the running spring boot server


=== Run invoice-service

[listing]
----
$ ./gradlew :invoice-service:bootRun
----

== Working with the presentation

To generate the presentation:

[listing]
----
$ ./gradlew asciidoctor
----

afterwards you can present with a browser (here we are using firefox):

[listing]
----
$ firefox ./presentation/build/asciidoc/html5/presentation.html &
----

99 changes: 99 additions & 0 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
buildscript {
dependencies {
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:1.0-beta1'
classpath 'commons-httpclient:commons-httpclient:3.1'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
}
}

plugins {
id 'org.asciidoctor.convert' version '1.5.3'
id 'com.github.jruby-gradle.base' version '1.2.1'
}

apply plugin: 'com.github.jruby-gradle.base'
apply plugin: 'org.ysb33r.vfs'
apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'

version = '2.0'

ext {
deckjsVersion = 'master'
asciidoctorBackendVersion = 'master'
downloadDir = new File(buildDir,'download')
templateDir = new File(downloadDir,'templates')
deckjsDir = new File(downloadDir,'deck.js')
}

repositories {
jcenter()
}

dependencies {
gems 'rubygems:haml:4.0.6'
}

task download {
doLast {
mkdir downloadDir
vfs {
cp "zip:https://github.com/asciidoctor/asciidoctor-deck.js/archive/${asciidoctorBackendVersion}.zip!asciidoctor-deck.js-${asciidoctorBackendVersion}/templates",
templateDir, recursive: true, overwrite: true
cp "zip:https://github.com/imakewebthings/deck.js/archive/${deckjsVersion}.zip!deck.js-${deckjsVersion}",
deckjsDir, recursive: true, overwrite: true
}
}
}

download {
description "Download extra deckjs resources"
outputs.dir templateDir
outputs.dir deckjsDir
}

asciidoctorj {
version = '1.5.4'
}

asciidoctor {
dependsOn jrubyPrepare

sources {
include 'presentation.adoc'
}

resources {
from (sourceDir) {
include 'images/**'
}
from (downloadDir) {
include 'deck.js/**'
}
}

backends 'html5', 'pdf'

attributes \
'build-gradle': file('build.gradle'),
'encoding': 'utf-8',
'sourcedir': project.sourceSets.main.java.srcDirs[0],
'endpoint-url': '',
'source-highlighter': 'coderay',
'imagesdir': './images',
'toc': 'left',
'icons': 'font',
'setanchors': '',
'idprefix': '',
'idseparator': '-',
'docinfo1': '',
'deckjs_theme': 'neon',
'deckjs_transition': 'fade'



options template_dirs : [new File(templateDir,'haml').absolutePath ]

dependsOn download
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions presentation/src/docs/asciidoc/presentation.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
= Consumer Driven Contracts - a workshop
dada <dada@dada.com>
2017
:author: dada
ifndef::imagesdir[:imagesdir: images]
:menu:
:goto:
:scale:
:help:
:toc:
:status:
:blank:
:figure-caption!:

== Introduction

Important:

* consumer
* code first
* ...

image::question_mark.jpg[question mark,,,, link="https://martinfowler.com/articles/consumerDrivenContracts.html"]

So, let's start.

== The end

dada
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ rootProject.name = 'cdc-workshop'

include("address-service")
include("invoice-service")
include("presentation")

0 comments on commit ff30aed

Please sign in to comment.