Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.1: consistently use bucketRegion, not regionName #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You will need a s3 bucket and the corresponding credentials.
let challenge = require('greenlock-challenge-s3').create({
accessKeyId: accessKeyId // Replace with your accessKeyId
, secretAccessKey: secretAccessKey // Replace with your secretAccessKey
, regionName: regionName // Replace with your regionName
, bucketRegion: bucketRegion // Replace with your bucketRegion
, bucketName: bucketName // Replace with your bucketName
, directory: 'acme-challenge/' // Recommended
, debug: true // Debug
Expand Down Expand Up @@ -52,11 +52,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
```
Expand Down
6 changes: 3 additions & 3 deletions clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: accessKeyId
, secretAccessKey: secretAccessKey
Expand Down Expand Up @@ -43,4 +43,4 @@ s3.listObjects({ Bucket: bucketName }).promise().then((data) => {
}).catch((err) => {
console.error(err.message);
throw err;
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "greenlock-challenge-s3",
"version": "1.1.0",
"version": "1.1.1",
"description": "S3 backed challenge strategy for greenlock-express.js (and greenlock.js)",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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-challenge-test");

let challenger = require("./index").create({
accessKeyId
, secretAccessKey
, regionName
, bucketRegion
, bucketName
, directory: "acme-challenge/"
, debug: true
Expand Down