heroku-certs
Advanced tools
Comparing version 1.1.17 to 1.1.18
@@ -58,4 +58,4 @@ 'use strict' | ||
let files = yield { | ||
crt: readFile(context.args.CRT), | ||
key: readFile(context.args.KEY) | ||
crt: readFile(context.args.CRT, 'utf-8'), | ||
key: readFile(context.args.KEY, 'utf-8') | ||
} | ||
@@ -62,0 +62,0 @@ |
@@ -16,4 +16,4 @@ 'use strict' | ||
let files = yield { | ||
crt: readFile(context.args.CRT), | ||
key: readFile(context.args.KEY) | ||
crt: readFile(context.args.CRT, 'utf-8'), | ||
key: readFile(context.args.KEY, 'utf-8') | ||
} | ||
@@ -20,0 +20,0 @@ |
{ | ||
"name": "heroku-certs", | ||
"version": "1.1.17", | ||
"version": "1.1.18", | ||
"description": "heroku ssl plugin", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -42,2 +42,8 @@ 'use strict' | ||
function mockFile (fs, file, content) { | ||
fs.readFile | ||
.withArgs(file, 'utf-8', sinon.match.func) | ||
.callsArgWithAsync(2, null, content) | ||
} | ||
describe('heroku certs:add', function () { | ||
@@ -62,8 +68,4 @@ beforeEach(function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -105,8 +107,4 @@ let mockSsl = nock('https://api.heroku.com', { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -159,8 +157,4 @@ let sslDoctor = nock('https://ssl-doctor.heroku.com', { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -203,8 +197,4 @@ let sslDoctor = nock('https://ssl-doctor.heroku.com', { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -247,8 +237,4 @@ let mockSsl = nock('https://api.heroku.com') | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -289,8 +275,4 @@ let mockSsl = nock('https://api.heroku.com') | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -334,8 +316,4 @@ let mock = nock('https://api.heroku.com') | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -376,8 +354,4 @@ let mock = nock('https://api.heroku.com') | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
}) | ||
@@ -1075,8 +1049,4 @@ | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -1111,8 +1081,4 @@ let mockSni = nock('https://api.heroku.com', { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -1119,0 +1085,0 @@ let mockSni = nock('https://api.heroku.com', { |
@@ -20,2 +20,8 @@ 'use strict' | ||
function mockFile (fs, file, content) { | ||
fs.readFile | ||
.withArgs(file, 'utf-8', sinon.match.func) | ||
.callsArgWithAsync(2, null, content) | ||
} | ||
describe('heroku certs:update', function () { | ||
@@ -42,8 +48,4 @@ beforeEach(function () { | ||
it('# requires confirmation', function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -60,8 +62,4 @@ var thrown = false | ||
it('# updates an endpoint when ssl doctor passes', function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -95,8 +93,4 @@ let sslDoctor = nock('https://ssl-doctor.heroku.com', { | ||
it('# propegates ssl doctor errors', function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -125,8 +119,4 @@ let sslDoctor = nock('https://ssl-doctor.heroku.com', { | ||
it('# bypasses ssl doctor', function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -150,8 +140,4 @@ let mock = nock('https://api.heroku.com') | ||
it('# displays warnings', function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -172,8 +158,4 @@ let mock = nock('https://api.heroku.com') | ||
beforeEach(function () { | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
}) | ||
@@ -245,8 +227,4 @@ | ||
fs.readFile | ||
.withArgs('pem_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'pem content') | ||
fs.readFile | ||
.withArgs('key_file', sinon.match.func) | ||
.callsArgWithAsync(1, null, 'key content') | ||
mockFile(fs, 'pem_file', 'pem content') | ||
mockFile(fs, 'key_file', 'key content') | ||
@@ -253,0 +231,0 @@ let mockPut = nock('https://api.heroku.com') |
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
142165
3349