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

Review this whole doggone thing #7

Closed
wants to merge 9 commits into from

Conversation

toolness
Copy link

Aw yeah it worked!

First I made master-review-target with:

git checkout --orphan master-review-target
git rm --cached -r .
touch .placeholder
git add .placeholder
git commit -m "Add .placeholder."
git push -u origin HEAD

Then I made master-review with:

git checkout master
git checkout -b master-review
git rebase master-review-target
git push -u origin HEAD

Then I made this PR.

node_js:
- "6"
services:
- docker
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOICE

const dockerConf = nunjucks.render(NGINX_TEMPLATE_FILE, dockerContext);
const prodConf = nunjucks.render(NGINX_TEMPLATE_FILE, defaultContext);

return { dockerConf, prodConf };
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice, I like this tactic.

- before-you-ship
- guides
- from: first-thing
to: other-thing
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er this is the real, "production" pages.yml right? Should the first-thing/other-thing entry actually be in here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this isn't "real" yet, ref #6.

docker-compose build

clean:
rm out/*.conf
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a pretty simple makefile--have you considered just making them npm script entries? The main downside of make (IMO) is that it actually requires either the XCode command line tools or brew to use--it doesn't come with OS X by default like, say, python does. So you could get rid of the extra dependency by just integrating these into package.json and using npm as your task runner.

It'd also make it easier to run this on Windows but gosh I dunno why anyone would want to do that... 😁

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good suggestion. It will reduce tooling and I'm not even using the dependency capabilities of make.

}
return c;
});
return configs;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed these are plopped right into the regexps in the generated nginx.conf file without any escaping, etc. Do you think this should be documented, or do you think the from and to keys should be validated to e.g. ensure that they conform to a fairly restricted set of characters?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very concerned about this since the integration test will fail if anything weird goes in there. Or am I missing a potential problem that wouldn't be caught there?


const lib = require('../../lib');

const HOST = process.env.TARGET_HOST || 'http://localhost:8080';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this TARGET_HOST env var would also be useful for folks running dinghy or docker-machine or other uncommon docker setups; maybe it's worth documenting in the readme?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 #8

"eslint": "3.16.1",
"eslint-config-airbnb-base": "^11.1.1",
"eslint-plugin-import": "2.2.0",
"faucet": "^0.0.1",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why anyone would ever use Windows, but faucet doesn't seem to work on it. It's ok though, those folks can just run the test files directly and parse the raw TAP output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blurf...looks like a known issue tape-testing/faucet#14

I'm just using it because the default tape output is atrocious. I'll look into another formatter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ref #9

@toolness
Copy link
Author

@jseppi this looks great! I made a few comments above but they are pretty low-priority.

@jseppi
Copy link
Contributor

jseppi commented Mar 24, 2017

Thanks, @toolness!

@jseppi
Copy link
Contributor

jseppi commented Mar 24, 2017

I've addressed all the comments now, so I'm going to close this out. Thanks again!

@jseppi jseppi closed this Mar 24, 2017
@jseppi jseppi deleted the master-review branch March 24, 2017 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants