Skip to content

Commit

Permalink
Merge pull request #53 from clojusc/task/41/publish-api-reference
Browse files Browse the repository at this point in the history
Task/41/publish api reference
  • Loading branch information
oubiwann committed Nov 30, 2016
2 parents 9cf7d0a + c35f153 commit e603d64
Show file tree
Hide file tree
Showing 15 changed files with 873 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VERSION=0.2.0
PROJECT=friend-oauth2
ROOT_DIR = $(shell pwd)

include dev-resources/make/docs.mk
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* [Latest Release](#latest-release-)
* [Introduction](#introduction-)
* [Installation and Usage](#installation-and-usage-)
* [Documentation](#documentation-)
* [Contributing/Testing](#contributingtesting-)
* [License](#license-)

Expand Down Expand Up @@ -88,6 +89,12 @@ Check out the ring-app handlers in the examples for some other examples of
how authentication and authorization routes are set up per friend's config.


## Documentation [↟](#contents)

`friend-oauth2` API Reference docs:
* [API Reference](http://clojusc.github.io/friend-oauth2/current/)


## Contributing/Testing [↟](#contents)

Bug reports and pull requests are most welcome. There are outstanding issues
Expand All @@ -111,11 +118,11 @@ Distributed under the MIT License (http://dd.mit-license.org/)
[oauth2 site]: https://oauth.net/2/
[oauth2 rfc]: https://tools.ietf.org/html/rfc6749
[friend url]: https://github.com/cemerick/friend
[friend oauth2 examples]: https://github.com/ddellacosta/friend-oauth2-examples
[friend oauth2 examples]: https://github.com/clojusc/friend-oauth2-examples
[app.net's OAuth2]: https://github.com/appdotnet/api-spec/blob/master/auth.md
[Facebook's auth]: https://developers.facebook.com/docs/authentication/server-side/
[Github's OAuth2]: http://developer.github.com/v3/oauth/
[docs]: https://github.com/ddellacosta/friend-oauth2/wiki
[docs]: https://github.com/clojusc/friend-oauth2/wiki
[Dave Della Costa's version]: https://github.com/ddellacosta/friend-oauth2/
[0.1.3-transitional]: https://github.com/clojusc/friend-oauth2/releases/tag/0.1.3-transitional

Expand All @@ -125,7 +132,7 @@ Distributed under the MIT License (http://dd.mit-license.org/)
[deps-badge]: http://jarkeeper.com/clojusc/friend-oauth2/status.svg
[logo]: resources/images/friend-oauth-logo-x250.png
[logo-large]: resources/images/friend-oauth-logo-x1000.png
[tag-badge]: https://img.shields.io/github/tag/clojusc/friend-oauth2.svg?maxAge=2592000
[tag-badge]: https://img.shields.io/github/tag/clojusc/friend-oauth2.svg
[tag]: https://github.com/clojusc/friend-oauth2/tags
[clojure-v]: https://img.shields.io/badge/Clojure-1.5+-blue.svg
[project]: https://github.com/clojusc/friend-oauth2/blob/master/project.clj
Expand Down
50 changes: 50 additions & 0 deletions dev-resources/make/docs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
DOCS_DIR = $(ROOT_DIR)/docs
REPO = $(shell git config --get remote.origin.url)
DOCS_BUILD_DIR = $(DOCS_DIR)/build
DOCS_PROD_DIR = $(DOCS_DIR)/master
CURRENT = $(DOCS_PROD_DIR)/current
DOCS_GIT_HACK = $(DOCS_DIR)/.git
LOCAL_DOCS_HOST = localhost
LOCAL_DOCS_PORT = 5099

.PHONY: docs

$(DOCS_GIT_HACK):
-@ln -s $(ROOT_DIR)/.git $(DOCS_DIR)

clean-docs:
@echo "\nCleaning old docs build ..."
@rm -rf $(CURRENT)

pre-docs:
@echo "\nBuilding docs ...\n"

clojure-docs:
@lein with-profile +docs codox

local-docs: pre-docs clojure-docs

docs: clean-docs local-docs

devdocs: docs
@echo "\nRunning docs server on http://$(LOCAL_DOCS_HOST):$(LOCAL_DOCS_PORT)..."
@lein with-profile +docs simpleton $(LOCAL_DOCS_PORT) file :from $(CURRENT)

prod-docs: clean-docs $(DOCS_GIT_HACK) local-docs

setup-temp-repo: $(DOCS_GIT_HACK)
@echo "\nSetting up temporary git repos for gh-pages ...\n"
@rm -rf $(DOCS_PROD_DIR)/.git $(DOCS_PROD_DIR)/*/.git
@cd $(DOCS_PROD_DIR) && git init
@cd $(DOCS_PROD_DIR) && git add * > /dev/null
@cd $(DOCS_PROD_DIR) && git commit -a -m "Generated content." > /dev/null

teardown-temp-repo:
@echo "\nTearing down temporary gh-pages repos ..."
@rm $(DOCS_DIR)/.git
@rm -rf $(DOCS_PROD_DIR)/.git $(DOCS_PROD_DIR)/*/.git

publish-docs: prod-docs setup-temp-repo
@echo "\nPublishing docs ...\n"
@cd $(DOCS_PROD_DIR) && git push -f $(REPO) master:gh-pages
@make teardown-temp-repo
Loading

0 comments on commit e603d64

Please sign in to comment.