From 8dae3c733056a6b696513b8e41f42b593ec92e6c Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Wed, 16 Sep 2015 13:38:09 -0700 Subject: [PATCH] Rename the module to loopback-component-explorer --- CONTRIBUTING.md | 6 +++--- LICENSE | 2 +- README.md | 10 +++++----- index.js | 6 +++--- package.json | 8 ++++---- test/explorer.test.js | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f170f19..e98b936 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ ### Contributing ### -Thank you for your interest in `loopback-explorer`, an open source project +Thank you for your interest in `loopback-component-explorer`, an open source project administered by StrongLoop. -Contributing to `loopback-explorer` is easy. In a few simple steps: +Contributing to `loopback-component-explorer` is easy. In a few simple steps: * Ensure that your effort is aligned with the project's roadmap by talking to the maintainers, especially if you are going to spend a @@ -14,7 +14,7 @@ Contributing to `loopback-explorer` is easy. In a few simple steps: * Adhere to code style outlined in the [Google C++ Style Guide][] and [Google Javascript Style Guide][]. - * Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-explorer) + * Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-component-explorer) * Submit a pull request through Github. diff --git a/LICENSE b/LICENSE index f9648b7..08fb205 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Copyright (c) 2013-2014 StrongLoop, Inc. -loopback-explorer uses a 'dual license' model. Users may use loopback-explorer +loopback-component-explorer uses a 'dual license' model. Users may use loopback-explorer under the terms of the MIT license, or under the StrongLoop License. The text of both is included below. diff --git a/README.md b/README.md index de39f8b..2ba3f2f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# loopback-explorer +# loopback-component-explorer Browse and test your LoopBack app's APIs. @@ -34,7 +34,7 @@ To upgrade your application using loopback-explorer version 1.x, just replace `explorer()` with `explorer.routes()` in your server script: ```js -var explorer = require('loopback-explorer'); +var explorer = require('loopback-component-explorer'); // Module was loopback-explorer in v. 2.0.1 and earlier // v1.x - does not work anymore app.use('/explorer', explorer(app, options); @@ -43,11 +43,11 @@ app.use('/explorer', explorer.routes(app, options)); ``` In applications scaffolded by `slc loopback`, the idiomatic way is to register -loopback-explorer via `component-config.json`: +loopback-component-explorer in `server/component-config.json`: ```json { - "loopback-explorer": { + "loopback-component-explorer": { "mountPath": "/explorer" } } @@ -101,7 +101,7 @@ Options are passed to `explorer(app, options)`. > Default: `null` > A hard override for the outgoing protocol (`http` or `https`) that is designated in Swagger -> resource documents. By default, `loopback-explorer` will write the protocol that was used to retrieve +> resource documents. By default, `loopback-component-explorer` will write the protocol that was used to retrieve > the doc. This option is useful if, for instance, your API sits behind an SSL terminator > and thus needs to report its endpoints as `https`, even though incoming traffic is auto-detected > as `http`. diff --git a/index.js b/index.js index 5b1177d..177f89c 100644 --- a/index.js +++ b/index.js @@ -17,14 +17,14 @@ explorer.routes = routes; /** * Example usage: * - * var explorer = require('loopback-explorer'); + * var explorer = require('loopback-component-explorer'); * explorer(app, options); */ function explorer(loopbackApplication, options) { options = _defaults({}, options, { mountPath: '/explorer' }); loopbackApplication.use(options.mountPath, routes(loopbackApplication, options)); - loopbackApplication.set('loopback-explorer', options); + loopbackApplication.set('loopback-component-explorer', options); } function routes(loopbackApplication, options) { @@ -33,7 +33,7 @@ function routes(loopbackApplication, options) { loopback.version.split('.')[0] || 1; if (loopbackMajor < 2) { - throw new Error('loopback-explorer requires loopback 2.0 or newer'); + throw new Error('loopback-component-explorer requires loopback 2.0 or newer'); } options = _defaults({}, options, { diff --git a/package.json b/package.json index 8161be6..8a95c1c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "loopback-explorer", + "name": "loopback-component-explorer", "version": "2.0.1", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/strongloop/loopback-explorer.git" + "url": "git://github.com/strongloop/loopback-component-explorer.git" }, "keywords": [ "loopback", @@ -18,7 +18,7 @@ "author": "Ritchie Martori", "readmeFilename": "README.md", "bugs": { - "url": "https://github.com/strongloop/loopback-explorer/issues" + "url": "https://github.com/strongloop/loopback-component-explorer/issues" }, "devDependencies": { "loopback": "^2.19.1", @@ -28,7 +28,7 @@ }, "license": { "name": "Dual MIT/StrongLoop", - "url": "https://github.com/strongloop/loopback-explorer/blob/master/LICENSE" + "url": "https://github.com/strongloop/loopback-component-explorer/blob/master/LICENSE" }, "dependencies": { "cors": "^2.7.1", diff --git a/test/explorer.test.js b/test/explorer.test.js index 91ef0a4..6751d0a 100644 --- a/test/explorer.test.js +++ b/test/explorer.test.js @@ -12,8 +12,8 @@ describe('explorer', function() { describe('with default config', function() { beforeEach(givenLoopBackAppWithExplorer()); - it('should register "loopback-explorer" to the app', function() { - expect(this.app.get('loopback-explorer')) + it('should register "loopback-component-explorer" to the app', function() { + expect(this.app.get('loopback-component-explorer')) .to.have.property('mountPath', '/explorer'); }); @@ -55,8 +55,8 @@ describe('explorer', function() { describe('with custom explorer base', function() { beforeEach(givenLoopBackAppWithExplorer('/swagger')); - it('should register "loopback-explorer" to the app', function() { - expect(this.app.get('loopback-explorer')) + it('should register "loopback-component-explorer" to the app', function() { + expect(this.app.get('loopback-component-explorer')) .to.have.property('mountPath', '/swagger'); });