Permalink
Browse files

Test in Node.js v0.12, io.js, and Rhino 1.7R5

  • Loading branch information...
mathiasbynens committed Feb 24, 2015
1 parent a92c60a commit 49ec8ca0746ca30ec7e2d2bfc7b1acd2b82cb77c
Showing with 20 additions and 28 deletions.
  1. +5 −3 .travis.yml
  2. +0 −3 Gruntfile.js
  3. +1 −1 LICENSE-MIT.txt
  4. +6 −6 README.md
  5. +1 −1 bacon.js
  6. +1 −1 bin/bacon
  7. +2 −2 man/bacon.1
  8. +4 −11 package.json
@@ -1,18 +1,20 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "iojs"
before_script:
- "npm install -g grunt-cli"
# Narwhal uses a hardcoded path to openjdk v6, so use that version
- "sudo apt-get update -qq"
- "sudo apt-get install -qq openjdk-6-jre"
- "PACKAGE=rhino1_7R3; wget http://ftp.mozilla.org/pub/mozilla.org/js/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=rhino1_7R3; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
- "PACKAGE=rhino1_7R5; wget https://github.com/mozilla/rhino/releases/download/Rhino1_7R5_RELEASE/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=rhino1_7R5; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
- "PACKAGE=ringojs-0.9; wget http://ringojs.org/downloads/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=ringojs-0.9; sudo ln -s /opt/$PACKAGE/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo"
- "PACKAGE=v0.3.2; wget https://github.com/280north/narwhal/archive/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=narwhal-0.3.2; sudo ln -s /opt/$PACKAGE/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal"
# If the enviroment stores rt.jar in a different directory, find it and symlink the directory
- "PREFIX=/usr/lib/jvm; if [ ! -d $PREFIX/java-6-openjdk ]; then for d in $PREFIX/java-6-openjdk-*; do if [ -e $d/jre/lib/rt.jar ]; then sudo ln -s $d $PREFIX/java-6-openjdk; break; fi; done; fi"
script:
"grunt ci"
- "grunt ci"
@@ -16,9 +16,6 @@ module.exports = function(grunt) {
'test-phantomjs': {
'command': 'echo "Testing in PhantomJS..."; phantomjs "tests/tests.js"'
},
// Rhino 1.7R4 has a bug that makes it impossible to test in.
// https://bugzilla.mozilla.org/show_bug.cgi?id=775566
// To test, use Rhino 1.7R3, or wait (heh) for the 1.7R5 release.
'test-rhino': {
'command': 'echo "Testing in Rhino..."; rhino -opt -1 "tests.js"',
'options': {
@@ -1,4 +1,4 @@
Copyright Mathias Bynens <http://mathiasbynens.be/>
Copyright Mathias Bynens <https://mathiasbynens.be/>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -1,6 +1,6 @@
# bacon-cipher [![Build status](https://travis-ci.org/mathiasbynens/bacon-cipher.svg?branch=master)](https://travis-ci.org/mathiasbynens/bacon-cipher) [![Dependency status](https://gemnasium.com/mathiasbynens/bacon-cipher.svg)](https://gemnasium.com/mathiasbynens/bacon-cipher)

_bacon-cipher_ is a JavaScript implementation of [Bacon’s cipher, a.k.a. the Baconian cipher](http://en.wikipedia.org/wiki/Bacon's_cipher). It can be used to encode plaintext to Bacon-ciphertext, or the other way around (i.e. decoding). [Here’s an online demo.](http://mothereff.in/bacon)
_bacon-cipher_ is a JavaScript implementation of [Bacon’s cipher, a.k.a. the Baconian cipher](http://en.wikipedia.org/wiki/Bacon's_cipher). It can be used to encode plaintext to Bacon-ciphertext, or the other way around (i.e. decoding). [Here’s an online demo.](https://mothereff.in/bacon)

By default it uses the most common Bacon cipher alphabet, i.e. `ABCDEFGHIKLMNOPQRSTUWXYZ` (24 letters). This boils down to the following translations:

@@ -15,7 +15,7 @@ f AABAB m ABABB s BAAAB z BABBB

## Installation

Via [npm](http://npmjs.org/):
Via [npm](https://www.npmjs.com/):

```bash
npm install bacon-cipher
@@ -39,7 +39,7 @@ In a browser:
<script src="bacon.js"></script>
```

In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
In [Narwhal](http://narwhaljs.org/), [Node.js](https://nodejs.org/), and [RingoJS](http://ringojs.org/):

```js
var bacon = require('bacon-cipher');
@@ -154,7 +154,7 @@ $ bacon --encode < foo.txt > foo-bacon.txt
Or do the same with an online text file:

```bash
$ curl -sL 'http://mths.be/brh' | bacon --encode > bacon.txt
$ curl -sL 'https://mths.be/brh' | bacon --encode > bacon.txt
```

Or, the opposite — read a local file containing Bacon ciphertext, decode it back to plain text, and save the result to a new file:
@@ -185,8 +185,8 @@ This project inspired Joseph Werle to create [a C implementation of the Baconian

| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](http://mathiasbynens.be/) |
| [Mathias Bynens](https://mathiasbynens.be/) |

## License

_bacon_ is available under the [MIT](http://mths.be/mit) license.
_bacon_ is available under the [MIT](https://mths.be/mit) license.
@@ -1,4 +1,4 @@
/*! http://mths.be/bacon v0.1.0 by @mathias | MIT license */
/*! https://mths.be/bacon v0.1.0 by @mathias | MIT license */
;(function(root) {

// Detect free variables `exports`
@@ -17,7 +17,7 @@

if (/^(?:-h|--help|undefined)$/.test(option)) {
log(
'bacon-cipher v%s - http://mths.be/bacon',
'bacon-cipher v%s - https://mths.be/bacon',
bacon.version
);
log([
@@ -61,6 +61,6 @@ Print the encoded version of the string that gets piped in.
.Sh BUGS
bacon's bug tracker is located at <https://github.com/mathiasbynens/bacon-cipher/issues>.
.Sh AUTHOR
Mathias Bynens <http://mathiasbynens.be/>
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<http://mths.be/bacon>
<https://mths.be/bacon>
@@ -2,7 +2,7 @@
"name": "bacon-cipher",
"version": "0.1.0",
"description": "A robust JavaScript implementation of Bacon’s cipher, a.k.a. the Baconian cipher.",
"homepage": "http://mths.be/bacon",
"homepage": "https://mths.be/bacon",
"main": "bacon.js",
"bin": {
"bacon": "bin/bacon"
@@ -22,23 +22,16 @@
"decode",
"decrypt"
],
"licenses": [
{
"type": "MIT",
"url": "http://mths.be/mit"
}
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "http://mathiasbynens.be/"
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/bacon-cipher.git"
},
"bugs": {
"url": "https://github.com/mathiasbynens/bacon-cipher/issues"
},
"bugs": "https://github.com/mathiasbynens/bacon-cipher/issues",
"files": [
"LICENSE-MIT.txt",
"bacon.js",

0 comments on commit 49ec8ca

Please sign in to comment.