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

Use Hoek to assign defaults to options passed to inject. Fixes #22 #23

Closed
wants to merge 2 commits into from

Conversation

@savardc
Copy link
Contributor

savardc commented Dec 11, 2014

No description provided.

@@ -13,7 +13,9 @@
"engines": {
"node": ">=0.10.30"
},
"dependencies": {},
"dependencies": {
"hoek": "^2.10.0"

This comment has been minimized.

Copy link
@hueniverse

This comment has been minimized.

Copy link
@savardc

savardc Dec 12, 2014

Author Contributor

I wasn’t sure of the policy for dependencies so I used the same as what’s in hapi. Maybe I’m misunderstanding semver but it looks ok?

On Dec 12, 2014, at 2:04 , Eran Hammer notifications@github.com wrote:

In package.json #23 (diff):

@@ -13,7 +13,9 @@
"engines": {
"node": ">=0.10.30"
},

  • "dependencies": {},
  • "dependencies": {
  • "hoek": "^2.10.0"
    why ^?


Reply to this email directly or view it on GitHub https://github.com/hapijs/shot/pull/23/files#r21730785.

This comment has been minimized.

Copy link
@hueniverse

hueniverse Dec 16, 2014

Member

Just keep it 2.x.x


var req = new internals.Request(options);
var defaults = { method: 'GET' };
var req = new internals.Request(Hoek.applyToDefaults(defaults, (typeof options === 'string' ? { url: options } : options)));

This comment has been minimized.

Copy link
@hueniverse

hueniverse Dec 12, 2014

Member

Better to perform the hoek call on a separate line.

This comment has been minimized.

Copy link
@savardc

savardc Dec 12, 2014

Author Contributor

In the same statement or using a new var?

This comment has been minimized.

Copy link
@hueniverse

hueniverse Dec 16, 2014

Member

new var. Easier to read.

@chrisdickinson

This comment has been minimized.

Copy link
Contributor

chrisdickinson commented Feb 19, 2015

Thanks for the PR – I merged @arb's version, which is available on npm as of v1.4.1.

@hueniverse hueniverse added the bug label Feb 19, 2015
@hueniverse hueniverse added this to the 1.4.1 milestone Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.