Skip to content

Commit

Permalink
[INTERNAL] Rename GLOB -> glob
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Mar 18, 2019
1 parent 5bd91ac commit dc882d7
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 75 deletions.
18 changes: 9 additions & 9 deletions lib/AbstractReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ class AbstractReader {
}

/**
* Locates resources by matching GLOB patterns.
* Locates resources by matching glob patterns.
*
* @example
* byGlob("**‏/*.{html,htm}");
* byGlob("**‏/.library");
* byGlob("/pony/*");
*
* @public
* @param {string|string[]} virPattern GLOB pattern as string or array of glob patterns for
* @param {string|string[]} virPattern glob pattern as string or array of glob patterns for
* virtual directory structure
* @param {Object} [options] GLOB options
* @param {Object} [options] glob options
* @param {boolean} [options.nodir=true] Do not match directories
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand Down Expand Up @@ -71,13 +71,13 @@ class AbstractReader {
}

/**
* Locates resources by GLOB.
* Locates resources by one or more glob patterns.
*
* @abstract
* @protected
* @param {string|string[]} virPattern GLOB pattern as string or an array of
* @param {string|string[]} virPattern glob pattern as string or an array of
* glob patterns for virtual directory structure
* @param {Object} options GLOB options
* @param {Object} options glob options
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand All @@ -86,12 +86,12 @@ class AbstractReader {
}

/**
* Locate resources by GLOB
* Locate resources by matching a single glob pattern.
*
* @abstract
* @protected
* @param {string} pattern GLOB pattern
* @param {Object} options GLOB options
* @param {string} pattern glob pattern
* @param {Object} options glob options
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/DuplexCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ class DuplexCollection extends AbstractReaderWriter {
}

/**
* Locates resources by GLOB.
* Locates resources by glob.
*
* @private
* @param {string|string[]} virPattern GLOB pattern as string or an array of
* @param {string|string[]} virPattern glob pattern as string or an array of
* glob patterns for virtual directory structure
* @param {Object} options GLOB options
* @param {Object} options glob options
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving with a list of resources
*/
Expand All @@ -46,11 +46,11 @@ class DuplexCollection extends AbstractReaderWriter {
}

/**
* Locates resources by GLOB from source reader only.
* Locates resources by glob from source reader only.
* For found resources that are also available in the writer, the writer resource will be returned.
*
* @param {string} virPattern GLOB pattern for virtual directory structure
* @param {Object} [options] GLOB options
* @param {string} virPattern glob pattern for virtual directory structure
* @param {Object} [options] glob options
* @param {boolean} [options.nodir=true] Do not match directories
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/ReaderCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class ReaderCollection extends AbstractReader {
}

/**
* Locates resources by GLOB.
* Locates resources by glob.
*
* @private
* @param {string|string[]} pattern GLOB pattern as string or an array of
* @param {string|string[]} pattern glob pattern as string or an array of
* glob patterns for virtual directory structure
* @param {Object} options GLOB options
* @param {Object} options glob options
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/ReaderCollectionPrioritized.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class ReaderCollectionPrioritized extends AbstractReader {
}

/**
* Locates resources by GLOB.
* Locates resources by glob.
*
* @private
* @param {string|string[]} pattern GLOB pattern as string or an array of
* @param {string|string[]} pattern glob pattern as string or an array of
* glob patterns for virtual directory structure
* @param {Object} options GLOB options
* @param {Object} options glob options
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/adapters/AbstractAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class AbstractAdapter extends AbstractReaderWriter {
}

/**
* Locates resources by GLOB.
* Locates resources by glob.
*
* @abstract
* @private
* @param {string|string[]} virPattern GLOB pattern as string or an array of
* @param {string|string[]} virPattern glob pattern as string or an array of
* glob patterns for virtual directory structure
* @param {Object} [options={}] GLOB options
* @param {Object} [options={}] glob options
* @param {boolean} [options.nodir=true] Do not match directories
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
Expand Down Expand Up @@ -74,11 +74,11 @@ class AbstractAdapter extends AbstractReaderWriter {
}

/**
* Normalizes virtual GLOB patterns.
* Normalizes virtual glob patterns.
*
* @private
* @param {string} virPattern GLOB pattern for virtual directory structure
* @returns {Promise<string[]>} Promise resolving to list of normalized GLOB patterns
* @param {string} virPattern glob pattern for virtual directory structure
* @returns {Promise<string[]>} Promise resolving to list of normalized glob patterns
*/
_normalizePattern(virPattern) {
return Promise.resolve().then(() => {
Expand Down
6 changes: 3 additions & 3 deletions lib/adapters/FileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class FileSystem extends AbstractAdapter {
}

/**
* Locate resources by GLOB.
* Locate resources by glob.
*
* @private
* @param {Array} patterns Array of GLOB patterns
* @param {Object} [options={}] GLOB options
* @param {Array} patterns Array of glob patterns
* @param {Object} [options={}] glob options
* @param {boolean} [options.nodir=true] Do not match directories
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
Expand Down
6 changes: 3 additions & 3 deletions lib/adapters/Memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class Memory extends AbstractAdapter {
}

/**
* Locate resources by GLOB.
* Locate resources by glob.
*
* @private
* @param {Array} patterns array of GLOB patterns
* @param {Object} [options={}] GLOB options
* @param {Array} patterns array of glob patterns
* @param {Object} [options={}] glob options
* @param {boolean} [options.nodir=true] Do not match directories
* @param {module:@ui5/fs.tracing.Trace} trace Trace instance
* @returns {Promise<module:@ui5/fs.Resource[]>} Promise resolving to list of resources
Expand Down
2 changes: 1 addition & 1 deletion lib/tracing/Trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Trace {
report += `[Trace: ${this._name}\n`;
report += ` ${time} elapsed time \n`;
if (this._globCalls) {
report += ` ${this._globCalls} GLOB executions\n`;
report += ` ${this._globCalls} glob executions\n`;
}
if (this._pathCalls) {
report += ` ${this._pathCalls} path stats\n`;
Expand Down
2 changes: 1 addition & 1 deletion lib/tracing/traceSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function report() {
report += ` ${time} elapsed time \n`;
report += ` ${traceData.traceCalls} trace calls \n`;
if (traceData.globCalls) {
report += ` ${traceData.globCalls} GLOB executions\n`;
report += ` ${traceData.globCalls} glob executions\n`;
}
if (traceData.pathCalls) {
report += ` ${traceData.pathCalls} path stats\n`;
Expand Down
16 changes: 8 additions & 8 deletions test/lib/adapters/FileSystem_read.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {test} = require("ava");
const {resourceFactory} = require("../../../");

test("GLOB resources from application.a w/ virtual base path prefix", async (t) => {
test("glob resources from application.a w/ virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -12,7 +12,7 @@ test("GLOB resources from application.a w/ virtual base path prefix", async (t)
});
});

test("GLOB resources from application.a w/o virtual base path prefix", async (t) => {
test("glob resources from application.a w/o virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -23,7 +23,7 @@ test("GLOB resources from application.a w/o virtual base path prefix", async (t)
});
});

test("GLOB resources from application.a w/ virtual base path prefix", async (t) => {
test("glob resources from application.a w/ virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -33,7 +33,7 @@ test("GLOB resources from application.a w/ virtual base path prefix", async (t)
t.deepEqual(resources.length, 1, "Found exactly one resource");
});

test("GLOB resources from application.a w/o virtual base path prefix", async (t) => {
test("glob resources from application.a w/o virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -43,7 +43,7 @@ test("GLOB resources from application.a w/o virtual base path prefix", async (t)
t.deepEqual(resources.length, 1, "Found exactly one resource");
});

test("GLOB virtual directory w/o virtual base path prefix", async (t) => {
test("glob virtual directory w/o virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -53,7 +53,7 @@ test("GLOB virtual directory w/o virtual base path prefix", async (t) => {
t.deepEqual(resources.length, 1, "Found exactly one resource");
});

test("GLOB virtual directory w/ virtual base path prefix", async (t) => {
test("glob virtual directory w/ virtual base path prefix", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/one/two/"
Expand All @@ -63,7 +63,7 @@ test("GLOB virtual directory w/ virtual base path prefix", async (t) => {
t.deepEqual(resources.length, 1, "Found exactly one resource");
});

test("GLOB virtual directory w/o virtual base path prefix and nodir: true", async (t) => {
test("glob virtual directory w/o virtual base path prefix and nodir: true", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/"
Expand All @@ -73,7 +73,7 @@ test("GLOB virtual directory w/o virtual base path prefix and nodir: true", asyn
t.deepEqual(resources.length, 0, "Found no resources");
});

test("GLOB virtual directory w/ virtual base path prefix and nodir: true", async (t) => {
test("glob virtual directory w/ virtual base path prefix and nodir: true", async (t) => {
const readerWriter = resourceFactory.createAdapter({
fsBasePath: "./test/fixtures/application.a/webapp",
virBasePath: "/app/one/two/"
Expand Down
Loading

0 comments on commit dc882d7

Please sign in to comment.