redis-sessions
Advanced tools
Comparing version 1.2.0 to 1.3.0
# CHANGELOG | ||
## 1.3.0 | ||
* Issue #33 Allow up to 128 charactes (from 64) and all UTF-8 characters as `id`. This lets you store for example emails as id. | ||
* Travis tests for Node 8 added. | ||
## 1.2.0 | ||
@@ -4,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.11.1 | ||
// Generated by CoffeeScript 1.12.6 | ||
@@ -556,3 +556,3 @@ /* | ||
app: /^([a-zA-Z0-9_-]){3,20}$/, | ||
id: /^([a-zA-Z0-9_-]){1,64}$/, | ||
id: /^(.*?){1,128}$/, | ||
ip: /^.{1,39}$/, | ||
@@ -559,0 +559,0 @@ token: /^([a-zA-Z0-9]){64}$/ |
{ | ||
"name": "redis-sessions", | ||
"description": "An advanced session store for Redis", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "P. Liess <smrchy+npm@gmail.com>", |
@@ -37,3 +37,3 @@ # Redis Sessions | ||
With Redis being run on the same machine the test script (run via `npm test`) on a 2011 iMac: | ||
With Redis running on the same machine as the test script (run via `npm test`) on a 2011 iMac: | ||
@@ -40,0 +40,0 @@ * Creates 1000 sessions in around 170ms. |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.11.1 | ||
// Generated by CoffeeScript 1.12.6 | ||
var RedisSessions, _, async, should; | ||
@@ -425,2 +425,38 @@ | ||
}); | ||
it('Create a session with utf8 (딸기 필드 영원히) chars for the id: should return a token', function(done) { | ||
rs.create({ | ||
app: app1, | ||
id: "딸기 필드 영원히", | ||
ip: "127.0.0.1", | ||
ttl: 30 | ||
}, function(err, resp) { | ||
should.not.exist(err); | ||
rs.get({ | ||
app: app1, | ||
token: resp.token | ||
}, function(err, resp2) { | ||
should.not.exist(err); | ||
resp2.id.should.equal("딸기 필드 영원히"); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
it('Create a session with email for the id: should return a token', function(done) { | ||
rs.create({ | ||
app: app1, | ||
id: "abcde1-284h1ah37@someDomain-with-dash.co.uk", | ||
ip: "127.0.0.1", | ||
ttl: 30 | ||
}, function(err, resp) { | ||
should.not.exist(err); | ||
rs.get({ | ||
app: app1, | ||
token: resp.token | ||
}, function(err, resp2) { | ||
should.not.exist(err); | ||
resp2.id.should.equal("abcde1-284h1ah37@someDomain-with-dash.co.uk"); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -455,3 +491,3 @@ describe('GET: Part 2', function() { | ||
}); | ||
it('Sessions of App should return 4 users', function(done) { | ||
it('Sessions of App should return 6 users', function(done) { | ||
rs.soapp({ | ||
@@ -464,3 +500,3 @@ app: app1, | ||
resp.should.have.keys('sessions'); | ||
resp.sessions.length.should.equal(4); | ||
resp.sessions.length.should.equal(6); | ||
done(); | ||
@@ -492,3 +528,3 @@ }); | ||
}); | ||
it('Activity for app1 should show 2 users still', function(done) { | ||
it('Activity for app1 should show 4 users still', function(done) { | ||
rs.activity({ | ||
@@ -501,3 +537,3 @@ app: app1, | ||
resp.should.have.keys('activity'); | ||
resp.activity.should.equal(2); | ||
resp.activity.should.equal(4); | ||
done(); | ||
@@ -504,0 +540,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95923
1457