]> code.delx.au - gnu-emacs-elpa/commitdiff
Use Cask and Coveralls.
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Tue, 31 Mar 2015 05:00:55 +0000 (22:00 -0700)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Tue, 31 Mar 2015 05:00:55 +0000 (22:00 -0700)
.gitignore
.travis.yml
Cask [new file with mode: 0644]
Makefile
README.md
scripts/dependencies [deleted file]
scripts/download-dependencies.el [deleted file]
test/test-helper.el [new file with mode: 0644]

index f0903181e21b870958459e2f203d632e41fc4e0f..d0147ab966076ba53aa824c063582e9d9878f259 100644 (file)
@@ -1,3 +1,3 @@
 *.elc
+.cask/
 /benchmark/logs/
-/libraries/
index 2dcc8a61923c5398bd627d56bc24d203c01fc4e4..a732f679e72f8685dc5264e8afb07be46b5896b8 100644 (file)
@@ -15,6 +15,8 @@ install:
         sudo apt-get update -qq &&
         sudo apt-get install -qq emacs24 emacs24-el;
     fi
+  - curl -fsSL https://raw.github.com/cask/cask/master/go | python
+  - export PATH="/home/travis/.cask/bin:$PATH"
   - npm install -g scopifier
 
 script:
diff --git a/Cask b/Cask
new file mode 100644 (file)
index 0000000..5bdf0cc
--- /dev/null
+++ b/Cask
@@ -0,0 +1,9 @@
+(source melpa)
+
+(package "context-coloring" "6.2.0" "Syntax highlighting, except not for syntax.")
+(package-file "context-coloring.el")
+
+(development
+ (depends-on "ert-async")
+ (depends-on "js2-mode")
+ (depends-on "undercover"))
index 3a6a0be002a1ce4590571b65447d5db532c042b8..87115a0f69c75251b435938c34717cfae547a756 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,37 +1,33 @@
+CASK = cask
 EMACS = emacs
-DEPENDENCIES = libraries/ert-async.el libraries/js2-mode.el
+DEPENDENCIES = .cask/
 
 all: uncompile compile test
 
 bench: ${DEPENDENCIES}
-       ${EMACS} -Q \
+       ${CASK} exec ${EMACS} -Q \
        -L . \
-       -L libraries \
        -l context-coloring \
-       -l benchmark/context-coloring-benchmark \
+       -l benchmark/context-coloring-benchmark.el \
        -f context-coloring-benchmark-run
 
 compile: ${DEPENDENCIES}
-       ${EMACS} -Q -batch \
+       ${CASK} exec ${EMACS} -Q -batch \
        -L . \
-       -L libraries \
-       -f batch-byte-compile *.el libraries/*.el
+       -f batch-byte-compile *.el
 
 uncompile:
-       rm -f *.elc libraries/*.elc
+       rm -f *.elc
 
 clean: uncompile
-       rm -f ${DEPENDENCIES}
+       rm -rf ${DEPENDENCIES}
 
 ${DEPENDENCIES}:
-       ${EMACS} -Q -batch \
-       -l scripts/download-dependencies.el \
-       -f download-dependencies
+       ${CASK}
 
 test: ${DEPENDENCIES}
-       ${EMACS} -Q -batch \
+       ${CASK} exec ${EMACS} -Q -batch \
        -L . \
-       -L libraries \
        -l ert \
        -l ert-async \
        -l context-coloring \
index 7eeacf7564ba8855a79619162d29843d05264fc3..eab100e47d104eee0c21ddeb9fc5e84e60f36def 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Context Coloring [![Build Status](https://travis-ci.org/jacksonrayhamilton/context-coloring.png?branch=develop)](https://travis-ci.org/jacksonrayhamilton/context-coloring)
+# Context Coloring [![Build Status](https://travis-ci.org/jacksonrayhamilton/context-coloring.png?branch=develop)](https://travis-ci.org/jacksonrayhamilton/context-coloring) [![Coverage Status](https://coveralls.io/repos/jacksonrayhamilton/context-coloring/badge.svg)](https://coveralls.io/r/jacksonrayhamilton/context-coloring)
 
 <p align="center">
   <img alt="Screenshot of JavaScript code highlighted by context." src="screenshot.png" title="Screenshot">
diff --git a/scripts/dependencies b/scripts/dependencies
deleted file mode 100644 (file)
index c2a9107..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-https://raw.githubusercontent.com/mooz/js2-mode/master/js2-mode.el
-https://raw.githubusercontent.com/rejeep/ert-async.el/master/ert-async.el
diff --git a/scripts/download-dependencies.el b/scripts/download-dependencies.el
deleted file mode 100644 (file)
index 2ab24e2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-;;; scripts/download-dependencies.el --- Get files for development. -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
-
-;; This file is part of GNU Emacs.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-;; Download dependencies for development.
-
-;; Dependencies don't need to be version-controlled. They are also
-;; bleeding-edge, which is good because that is what most MELPA users are using.
-
-;;; Code:
-
-(defconst download-dependencies-directory
-  (file-name-directory (or load-file-name buffer-file-name))
-  "This file's directory.")
-
-(defun download-dependencies-resolve-path (path)
-  "Resolve a path relative to this file's directory."
-  (expand-file-name path download-dependencies-directory))
-
-(defun download-dependencies-strip-headers ()
-  "Remove the http headers included in the output of
-`url-retrieve-synchronously'."
-  (goto-char 1)
-  (kill-paragraph 1) ; The headers are 1 paragraph.  I hope.
-  (kill-line))       ; A line separates the headers from the file's content.
-
-(defun download-dependencies-get-dependencies ()
-  "Read the `dependencies' file as a list of URLs."
-  (with-temp-buffer
-    (insert-file-contents (download-dependencies-resolve-path "./dependencies"))
-    (split-string (buffer-substring-no-properties (point-min) (point-max)))))
-
-(defun download-dependencies ()
-  "Download dependencies for development."
-  (let ((files (download-dependencies-get-dependencies)))
-    (make-directory (download-dependencies-resolve-path "../libraries") t)
-    (dolist (file files)
-      (let* ((basename (file-name-nondirectory file))
-             (destination (download-dependencies-resolve-path
-                           (concat "../libraries/" basename))))
-        (unless (file-exists-p destination)
-          (with-current-buffer (url-retrieve-synchronously file)
-            (download-dependencies-strip-headers)
-            (write-file destination)))))))
-
-;;; download-dependencies.el ends here
diff --git a/test/test-helper.el b/test/test-helper.el
new file mode 100644 (file)
index 0000000..1c97075
--- /dev/null
@@ -0,0 +1,3 @@
+(require 'undercover)
+(undercover "context-coloring.el")
+(require 'context-coloring)