Skip to content

Commit

Permalink
Merge pull request #8 from blimmer/develop
Browse files Browse the repository at this point in the history
v0.2.0 RC
  • Loading branch information
Ben Limmer committed Jul 8, 2015
2 parents 641aff0 + d75bd40 commit 3eb5a28
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]

## 0.2.0 - 2015-07-08
### Changed
- [BREAKING CHANGE] Middleware arguments have been swapped to conform to the fetch APIs. See the [documentation](https://github.com/blimmer/node-ember-cli-deploy-redis/blob/v0.2.0/README.md#example) for info.

## 0.1.1 - 2015-06-02
### Changed
- Test objects exposed. See the [documentation](https://github.com/blimmer/node-ember-cli-deploy-redis/blob/v0.1.1/README.md#testing) for info.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ var express = require('express');
var app = express();

var nodeEmberCliDeployRedis = require('node-ember-cli-deploy-redis');
app.use('/*', nodeEmberCliDeployRedis({
app.use('/*', nodeEmberCliDeployRedis('myapp', {
host: 'redis.example.org',
port: 6929,
password: 'passw0rd!',
database: 0
}, 'myapp'));
}));
```

### Custom Fetch Method
Expand Down Expand Up @@ -61,11 +61,11 @@ app.get('/', function(req, res) {
Check out [location-aware-ember-server](https://github.com/blimmer/location-aware-ember-server) for a running example.

## Documentation
### `nodeEmberCliDeployRedis(connectionInfo, appName, options)` (middleware constructor)
* connectionInfo (required) - the configuration to connect to redis.
internally, this library uses [then-redis](https://github.com/mjackson/then-redis), so pass a configuration supported by then-redis. please see their README for more information.
### `nodeEmberCliDeployRedis(appName, connectionInfo, options)` (middleware constructor)
* appName (required) - the application name, specified for ember deploy
the keys in redis are prefaced with this name. For instance, if your redis keys are `my-app:current`, you'd pass `my-app`.
* connectionInfo (required) - the configuration to connect to redis.
internally, this library uses [then-redis](https://github.com/mjackson/then-redis), so pass a configuration supported by then-redis. please see their README for more information.
* options (optional) - a hash of params to override [the defaults](https://github.com/blimmer/node-ember-cli-deploy-redis/blob/develop/README.md#options)

### `fetchIndex(request, appName, connectionInfo, options)`
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var Bluebird = require('bluebird');
'use strict';

var Bluebird = require('bluebird');
var fetchIndex = require('./fetch');

module.exports = function (connectionInfo, appName, opts) {
module.exports = function (appName, connectionInfo, opts) {
return function(req, res) {
return new Bluebird(function (resolve, reject) {
fetchIndex(req, appName, connectionInfo, opts).then(function(indexHtml) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-ember-cli-deploy-redis",
"version": "0.1.1",
"version": "0.2.0",
"description": "An ExpressJS middleware to serve EmberJS apps deployed by ember-cli-deploy",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 3eb5a28

Please sign in to comment.