From ca5127cd06c6e5ff00d5453cd549c7b35b504f21 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 25 May 2019 22:24:19 -0600 Subject: [PATCH] v1.1.2: consistently use bucketRegion, not regionName --- README.md | 6 +++--- clean.js | 6 +++--- package.json | 2 +- test.js | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4362da9..8b13fca 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ You will need a s3 bucket and the corresponding credentials. let store = require('greenlock-storage-s3').create({ accessKeyId: accessKeyId // Replace with your accessKeyId , secretAccessKey: secretAccessKey // Replace with your secretAccessKey - , bucketRegion: regionName // Replace with your regionName + , bucketRegion: bucketRegion // Replace with your bucketRegion , bucketName: bucketName // Replace with your bucketName , configDir: 'acme/' // Recommended , accountsDir: 'accounts/' // Recommended @@ -51,11 +51,11 @@ To run the tests yourself, create a `.env` file with the following // .env file AWS_ACCESS_KEY_ID=abc // Replace with your accessKeyId AWS_SECRET_ACCESS_KEY=abc // Replace with your secretAccessKey -AWS_BUCKET_REGION=abc // Replace with your regionName +AWS_BUCKET_REGION=abc // Replace with your bucketRegion AWS_BUCKET_NAME=abc // Replace with your bucketName ``` -Run the following command: +Run the following command: ```console $ npm run clean && npm run test && npm run clean ``` diff --git a/clean.js b/clean.js index 11f6337..6c2c172 100644 --- a/clean.js +++ b/clean.js @@ -4,13 +4,13 @@ require("dotenv").config(); let accessKeyId = process.env.AWS_ACCESS_KEY_ID , secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY - , regionName = process.env.AWS_BUCKET_REGION + , bucketRegion = process.env.AWS_BUCKET_REGION , bucketName = process.env.AWS_BUCKET_NAME; var AWS = require("aws-sdk"); AWS.config.setPromisesDependency(Promise); AWS.config.update({ - region: regionName + region: bucketRegion , credentials: new AWS.Credentials({ accessKeyId , secretAccessKey @@ -43,4 +43,4 @@ s3.listObjects({ Bucket: bucketName }).promise().then((data) => { }).catch((err) => { console.error(err.message); throw err; -}); \ No newline at end of file +}); diff --git a/package.json b/package.json index 6f92c20..15cadc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock-storage-s3", - "version": "1.1.0", + "version": "1.1.2", "description": "S3 backed storage strategy for greenlock-express.js (and greenlock.js)", "main": "index.js", "scripts": { diff --git a/test.js b/test.js index 002041f..3608ed2 100644 --- a/test.js +++ b/test.js @@ -4,7 +4,7 @@ require("dotenv").config(); let accessKeyId = process.env.AWS_ACCESS_KEY_ID , secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY - , regionName = process.env.AWS_BUCKET_REGION + , bucketRegion = process.env.AWS_BUCKET_REGION , bucketName = process.env.AWS_BUCKET_NAME; let tester = require("greenlock-store-test"); @@ -12,7 +12,7 @@ let tester = require("greenlock-store-test"); let store = require("./index").create({ accessKeyId , secretAccessKey - , regionName + , bucketRegion , bucketName , configDir: "acme/" , accountsDir: "accounts/" @@ -25,4 +25,4 @@ tester.test(store).then(() => { }).catch((err) => { console.error(err.message); throw err; -}); \ No newline at end of file +});