Skip to content

Commit

Permalink
Improving docs
Browse files Browse the repository at this point in the history
  • Loading branch information
barkanido committed Jan 9, 2019
1 parent e18ad42 commit 05abc47
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/codox
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Contributing Guidelines

**Do** follow [the seven rules of a great Git commit message][1].

**Do** follow [the Clojure Style Guide][2].

**Do** include tests for your change when appropriate.

**Do** ensure that the CI checks pass.

**Do** squash the commits in your PR to remove corrections
irrelevant to the code history, once the PR has been reviewed.

**Do** feel free to pester the project maintainers about the PR if it
hasn't been responded to. Sometimes notifications can be missed.

**Don't** overuse vertical whitespace; avoid multiple sequential blank
lines.

**Don't** include more than one feature or fix in a single PR.

**Don't** include changes unrelated to the purpose of the PR. This
includes changing the project version number, adding lines to the
`.gitignore` file, or changing the indentation or formatting.

**Don't** open a new PR if changes are requested. Just push to the
same branch and the PR will be updated.

[1]: https://chris.beams.io/posts/git-commit/#seven-rules
[2]: https://github.com/bbatsov/clojure-style-guide
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ An opinionated Clojure library wrapping Aerospike Java Client.

![](https://clojars.org/aerospike-clj/latest-version.svg)

# Docs:
[Generated docs](https://appsflyer.github.io/aerospike-clj/)

# Requirements:
- Java 8
- Clojure 1.8
Expand Down
7 changes: 5 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
:dependencies [[com.aerospike/aerospike-client "4.2.3"]
[manifold "0.1.8"]
[com.taoensso/timbre "4.10.0"]]
:plugins [[lein-codox "0.10.5"]]
:codox {:output-path "codox"
:source-uri "http://github.com/AppsFlyer/aerospike-clj/blob/{version}/{filepath}#L{line}"
:metadata {:doc/format :markdown}}
:profiles {:dev {:dependencies [[org.clojure/clojure "1.10.0"]
[criterium "0.4.4"]
[cheshire "5.8.1"]]
:global-vars {*warn-on-reflection* true}
:plugins [[lein-codox "0.10.5"]]}})
:global-vars {*warn-on-reflection* true}}})
8 changes: 5 additions & 3 deletions src/aerospike_clj/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@

(defn init-simple-aerospike-client
"hosts should be a seq of known hosts to bootstrap from
supported config: {username: string password: string event-loops: com.aerospike.client.async.NioEventLoops
max-commands-in-process: int max-commands-in-queue: int enable-logging: true (default)}"
supported config:
```clojure
{username: string password: string event-loops: com.aerospike.client.async.NioEventLoops
max-commands-in-process: int max-commands-in-queue: int enable-logging: true (default)}```"
([hosts aero-ns]
(init-simple-aerospike-client hosts aero-ns {:enable-logging true}))
([hosts aero-ns conf]
Expand All @@ -93,7 +95,7 @@
;; listeners
(defprotocol ClientEvents
"Continuation functions that are registered when an async DB operation is called.
The DB passed is IAerospikeClient.
The DB passed is an `IAerospikeClient` instance.
The value returned from those function will be the value of the returned deferred from the async operation."
(on-success [_ op-name op-result index op-start-time db]
"A continuation function. Registered on the operation future and called when operations succeeds.")
Expand Down
22 changes: 22 additions & 0 deletions update-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

echo "cleanup..."
rm -rf codox && mkdir codox
git clone [email protected]:AppsFlyer/aerospike-clj.git codox
cd codox
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
cd ..
echo "regenerate docs..."

lein codox

echo "commit changes"
cd codox
git add .
git commit -am "Update project documentation"
echo "push updated docs..."
git push -v -f -u origin gh-pages
cd ..
echo "done! see updated docs at: https://appsflyer.github.io/aerospike-clj/index.html"

0 comments on commit 05abc47

Please sign in to comment.