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

[DOC] Updates the signature for configuration properties as functions #491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xcambar
Copy link

@xcambar xcambar commented Sep 13, 2017

What Changed & Why

The doc at http://ember-cli-deploy.com/docs/v1.0.x/configuration/#usage states that:

Individual config properties can be pure values or functions that receive the context object and return a value.

// config/deploy.js
module.export = function(deployTarget){
 var ENV = {
   redis: {
     revisionKey: function(context) {
       return context.deployment.tag;
     }
   }
 }
};

While the code says differently: https://github.com/ember-cli-deploy/ember-cli-deploy-plugin/blob/master/index.js#L68-L70

This PR amends the documentation to reflect the current behaviour.

PR Checklist

  • Add tests
  • Add documentation
  • Prefix documentation-only commits with [DOC]

Copy link
Contributor

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

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

In the code you're referring to: configuredValue.call(this.pluginConfig, this.context, _pluginHelper.call(this)), the first argument to call is what becomes this inside the function, not an argument to the function.

@xcambar
Copy link
Author

xcambar commented Sep 13, 2017

Oh no... I missed the .call.

So this is what coding during a paternity leave looks like 😂

@xcambar
Copy link
Author

xcambar commented Sep 13, 2017

I've amended to only edit the example.
Let's 🤞 that I didn't miss anything this time :)

@achambers
Copy link
Member

I'm not sure the proposed change is actually accurate. I need to refamiliarise myself with the code and come back to this with more context though.

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.

None yet

3 participants