Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Commit

Permalink
1.4.2 - updating help docs for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chauncey committed Jul 23, 2013
1 parent 95cf888 commit 795c1dd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/main/clojure/jarvis/plugins/flows.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[clj-flowdock.api.flow :as flow]
[clojure.string :as s]))

(defn ^{:description "list-flows - Prints all flows that I am listening to."
(defn ^{:description "Prints all flows that I am listening to."
:command "list-flows"
:author "Jonathan Chauncey"
:plugin true}
Expand Down
4 changes: 2 additions & 2 deletions src/main/clojure/jarvis/plugins/help.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
([message content-vec plugins]
(let [plugin-meta (map meta plugins)
sorted-plugin-meta (sort-by :command plugin-meta)
help-text (map #(str "\t" (:command %) ":\t" (:description %)) sorted-plugin-meta)]
help-text (map #(str "\t" (:command %) ":" (:description %)) sorted-plugin-meta)]
(str
"\n\tAll known plugins - \n"
(s/join "\n" help-text)
"\n\t~leave can be used to have me leave a flow. I will need to be invited back through the flowdock api to join again."
"\n\t~<command> can be used also in private-messages with me."
"\n\t~~<command> @<name> will private message the people listed the results of the executed command."
"\n\tFor more details see https://github.com/RallySoftware/jarvis"))))
"\n\tFor more details see https://github.com/RallySoftware/jarvis-core"))))
2 changes: 1 addition & 1 deletion src/main/clojure/jarvis/plugins/join.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

(declare join-flows join-flow)

(defn ^{:description "join <flow-display-name> - Join the flow that is specified."
(defn ^{:description "<flow-display-name> - Join the flow that is specified."
:command "join"
:author "Jonathan Chauncey, Matt Farrar"
:plugin true}
Expand Down
18 changes: 9 additions & 9 deletions src/test/clojure/jarvis/plugins/help_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
"happy")

(deftest help
(is (= (str "\n\tAll known plugins - \n"
"\tbar:\tfoo"
(is (= (str "\n\tAll known plugins - "
"\n\tbar:foo"
"\n\t~leave can be used to have me leave a flow. I will need to be invited back through the flowdock api to join again."
"\n\t~<command> can be used also in private-messages with me."
"\n\t~~<command> @<name> will private message the people listed the results of the executed command."
"\n\tFor more details see https://github.com/RallySoftware/jarvis")
(help/help (test-util/message "~help") [#'test-plugin])))
(is (= (str "\n\tAll known plugins - \n"
"\tbar:\tfoo\n"
"\tdawg:\tyo"
"\n\tFor more details see https://github.com/RallySoftware/jarvis-core")
(help/help (test-util/message "~help") ["help"] [#'test-plugin])))
(is (= (str "\n\tAll known plugins - "
"\n\tbar:foo"
"\n\tdawg:yo"
"\n\t~leave can be used to have me leave a flow. I will need to be invited back through the flowdock api to join again."
"\n\t~<command> can be used also in private-messages with me."
"\n\t~~<command> @<name> will private message the people listed the results of the executed command."
"\n\tFor more details see https://github.com/RallySoftware/jarvis")
(help/help (test-util/message "~help") [#'test-plugin #'yo-plugin]))))
"\n\tFor more details see https://github.com/RallySoftware/jarvis-core")
(help/help (test-util/message "~help") ["help"] [#'test-plugin #'yo-plugin]))))

0 comments on commit 795c1dd

Please sign in to comment.