Skip to content

Commit

Permalink
Merge pull request #321 from ardumont/0.7.8
Browse files Browse the repository at this point in the history
0.7.8
  • Loading branch information
ardumont committed Mar 1, 2016
2 parents 18696ff + 81a10ba commit 321a745
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
6 changes: 6 additions & 0 deletions TODO.org
Expand Up @@ -32,6 +32,12 @@
- [ ] #245 - Trying to sync a card: orgtrello-buffer/compute-marker: Wrong type argument: numberp, nil
- [ ] #248 - Installing from melpa (unstable) works, but then it errs on an undefined variable "error-messages"
- [ ] #263 - Colors broken in org trello
* DONE 0.7.8 [100%]
- [X] Fix cyrillic encoding problem - Close #318 #270
- [X] Update version
- [X] Sign tag release
- [X] Release notes

* DONE 0.7.7 [100%]
- [X] Rework packaging problem
- [X] Add issue/pr templates
Expand Down
2 changes: 1 addition & 1 deletion org-trello-pkg.el
@@ -1,4 +1,4 @@
(define-package "org-trello" "0.7.7" "Minor mode to synchronize org-mode buffer and trello board"
(define-package "org-trello" "0.7.8" "Minor mode to synchronize org-mode buffer and trello board"
'((request-deferred "0.2.0")
(deferred "0.4.0")
(s "1.11.0")
Expand Down
15 changes: 4 additions & 11 deletions org-trello-query.el
Expand Up @@ -33,19 +33,12 @@ Simply displays a success message in the minibuffer."
"Generate the list of http authentication parameters."
`((key . ,org-trello-consumer-key) (token . ,org-trello-access-token)))

(defun orgtrello-query--decode-as-utf-8 ()
"Permit to decode the buffer's response data as utf-8."
(let ((data (buffer-string)))
(erase-buffer)
(insert (decode-coding-string data 'utf-8))
(goto-char (point-min))
(orgtrello-log-msg orgtrello-log-debug "Decoded data to utf-8")))

(defun orgtrello-query--http-parse ()
"Parse the http response into an org-trello entity."
(orgtrello-query--decode-as-utf-8)
(->> (json-read)
orgtrello-data-parse-data))
(-> (buffer-string)
(decode-coding-string 'utf-8)
json-read-from-string
orgtrello-data-parse-data))

(defun orgtrello-query--get (server query-map &optional success-callback error-callback authentication-p)
"Execute the GET request to SERVER with QUERY-MAP with optional SUCCESS-CALLBACK, ERROR-CALLBACK and AUTHENTICATION-P."
Expand Down
4 changes: 2 additions & 2 deletions org-trello.el
Expand Up @@ -4,7 +4,7 @@

;; Author: Antoine R. Dumont <eniotna.t AT gmail.com>
;; Maintainer: Antoine R. Dumont <eniotna.t AT gmail.com>
;; Version: 0.7.7
;; Version: 0.7.8
;; Package-Requires: ((emacs "24") (dash "2.12.1") (dash-functional "2.12.1") (s "1.11.0") (deferred "0.4.0") (request-deferred "0.2.0"))
;; Keywords: org-mode trello sync org-trello
;; URL: https://github.com/org-trello/org-trello
Expand Down Expand Up @@ -112,7 +112,7 @@ Please consider upgrading Emacs." emacs-version)
(require 'json)
(require 'parse-time)

(defconst org-trello--version "0.7.7" "Current org-trello version installed.")
(defconst org-trello--version "0.7.8" "Current org-trello version installed.")



Expand Down
7 changes: 7 additions & 0 deletions release-notes.md
@@ -1,3 +1,10 @@
# 0.7.8

- [X] Fix cyrillic encoding problem - Close #318 #270
- [X] Update version
- [X] Sign tag release
- [X] Release notes

# 0.7.7

- [X] Rework packaging problem
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Expand Up @@ -23,7 +23,7 @@ git checkout master

git merge upstream/master

git tag $VERSION
git tag -a -s $VERSION

git push upstream --tag

Expand Down
14 changes: 8 additions & 6 deletions test/org-trello-query-test.el
Expand Up @@ -15,12 +15,14 @@
(orgtrello-query--authentication-params)))))

(ert-deftest test-orgtrello-query--http-parse ()
(should
(equal :result
(with-mock
(mock (json-read) => :json-output)
(mock (orgtrello-data-parse-data :json-output) => :result)
(orgtrello-query--http-parse)))))
(should (equal '("some-output with unicode bytes ἀ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ")
(with-mock
(mock (buffer-string) => "[\"some-output with unicode bytes ἀ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ\"]")
(orgtrello-query--http-parse))))
(should (equal '("bytes антикор") ;; i have no idea what this means so please, reader, don't take it personally
(with-mock
(mock (buffer-string) => "[\"bytes \320\260\320\275\321\202\320\270\320\272\320\276\321\200\"]")
(orgtrello-query--http-parse)))))

(ert-deftest test-orgtrello-query--get ()
;; not synced, default callbacks, etc... no authentication
Expand Down

0 comments on commit 321a745

Please sign in to comment.