[DOC] Updates the signature for configuration properties as functions by xcambar · Pull Request #491 · ember-cli-deploy/ember-cli-deploy · GitHub
Skip to content

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

Open
xcambar wants to merge 1 commit into
ember-cli-deploy:masterfrom
xcambar:configuration_typo
Open

[DOC] Updates the signature for configuration properties as functions#491
xcambar wants to merge 1 commit into
ember-cli-deploy:masterfrom
xcambar:configuration_typo

Conversation

@xcambar

@xcambar xcambar commented Sep 13, 2017

Copy link
Copy Markdown

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]

@lukemelia lukemelia left a comment

Copy link
Copy Markdown
Contributor

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

xcambar commented Sep 13, 2017

Copy link
Copy Markdown
Author

@xcambar

xcambar commented Sep 13, 2017

Copy link
Copy Markdown
Author

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

@achambers

Copy link
Copy Markdown
Member

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.

3 participants