-
Notifications
You must be signed in to change notification settings - Fork 8
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
add support for replacing with string #10
Conversation
index.js
Outdated
strings[key] = startMarker + fs.readFileSync(contentFilePath) + endMarker; | ||
} else if(content.string && typeof content.string === 'string') { | ||
strings[key] = content.string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are missing the markers here. change line to:
strings[key] = startMarker + content.string + endMarker;
This causes the following failure: https://travis-ci.org/ramybenaroya/ember-index/jobs/345734590#L986
tests/dummy/config/environment.js
Outdated
}, { | ||
key: 'coloring-script', | ||
file: '_emberIndexContent/coloring-script.txt', | ||
includeInOutput: false, | ||
includeInIndexHtml: true | ||
}], | ||
},], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comma here
tests/unit/addon-tree-test-node.js
Outdated
|
||
contentFor = addon.contentFor('ember-index-4'); | ||
|
||
expect(contentFor).to.be.equal(addon._startMarkerPrefix + '-3' + '<!-- content from string -->' + addon._endMarkerPrefix + '-3'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a typo( -3
instead of -4
). change the line to:
expect(contentFor).to.be.equal(addon._startMarkerPrefix + '-4' + '<!-- content from string -->' + addon._endMarkerPrefix + '-4');
Thank you for this PR. The tests are currently failing. Please check my requests for changes so it will pass. |
Done. Tests are failing for default and beta scenarios (they just hang forever). I guess it's because addon's ember-cli needs to be updated? |
Thanks. I'll rerun the master build and check that. |
This adds the support for replacing the marker with a simple string instead of a file content as requested here #9