Commit e7652729 authored by Dan Allen's avatar Dan Allen

merge !44

resolves #56 rename location property for content source to url
parents 0f91447d 78e8f2d9
Pipeline #14764943 passed with stages
in 3 minutes and 45 seconds
......@@ -17,7 +17,7 @@ const localCachePath = path.resolve('.git-cache')
module.exports = async (playbook) => {
const componentVersions = playbook.content.sources.map(async (repo) => {
const { repository, isLocalRepo, isBare, url } = await openOrCloneRepository(repo.location)
const { repository, isLocalRepo, isBare, url } = await openOrCloneRepository(repo.url)
const branches = await repository.getReferences(git.Reference.TYPE.OID)
const repoComponentVersions = _(branches)
......@@ -195,7 +195,7 @@ function getGitEntries (tree, onEntry) {
}
async function loadLocalFiles (repo) {
const basePath = path.join(repo.location, repo.startPath || '.')
const basePath = path.join(repo.url, repo.startPath || '.')
const vfileStream = vfs.src('**/*.*', {
base: basePath,
cwd: basePath,
......
......@@ -17,12 +17,12 @@ class FixtureRepo {
async initRepo ({ repoName, name, title, version, nav, startPath }) {
this.startPath = startPath
this.repoPath = path.join(reposBasePath, repoName || name || 'default-repo')
this.location = this.repoPath
this.url = this.repoPath
if (this.isRemote) {
this.location = 'file://' + this.location
this.url = 'file://' + this.url
}
if (this.isBare) {
this.location = this.location + '/.git'
this.url = this.url + '/.git'
}
this.repository = await git.Repository.init(this.repoPath, 0)
await this.copyAll(['README.adoc'])
......
......@@ -197,7 +197,7 @@ describe('classifyContent()', () => {
expect(files[1].src).to.include({ component: 'the-other-component', version: 'v4.5.6' })
})
it('should throw when two identical files are found in different locations', () => {
it('should throw when two identical files are found in different sources', () => {
const aggregate = [
{
name: 'the-component',
......
......@@ -111,7 +111,7 @@ The playbook object (`playbook`) produced by this component should be a well-def
This model should allow the playbook properties to be referenced using path navigation (e.g., `playbook.content.sources`).
This model should be easy to reproduce by another means, such as an alternate implementation of the playbook builder component.
Each section of configuration (site, content, ui) should be represented by a dedicated model type whose properties (name, location, and type) can be easily converted into API documentation (for example, using a tool like https://github.com/documentationjs/documentation[documentationjs]).
Each section of configuration (site, content, ui) should be represented by a dedicated model type whose properties (name, url, and type) can be easily converted into API documentation (for example, using a tool like https://github.com/documentationjs/documentation[documentationjs]).
== Consequences
......
......@@ -64,7 +64,7 @@ module.exports = {
},
},
ui: {
location: {
url: {
doc: 'The repository that hosts the UI.',
format: String,
default: undefined,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment