Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 85F11200C08 for ; Wed, 11 Jan 2017 07:53:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8338E160B4E; Wed, 11 Jan 2017 06:53:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F125160B2E for ; Wed, 11 Jan 2017 07:53:37 +0100 (CET) Received: (qmail 319 invoked by uid 500); 11 Jan 2017 06:53:37 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 305 invoked by uid 99); 11 Jan 2017 06:53:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2017 06:53:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F2809DFDC6; Wed, 11 Jan 2017 06:53:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: garren@apache.org To: commits@couchdb.apache.org Date: Wed, 11 Jan 2017 06:53:36 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] fauxton commit: updated refs/heads/master to 14b0901 archived-at: Wed, 11 Jan 2017 06:53:40 -0000 Repository: couchdb-fauxton Updated Branches: refs/heads/master a766d3466 -> 14b0901df http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx b/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx index bf2baad..9577ab3 100644 --- a/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx +++ b/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx @@ -12,7 +12,6 @@ import FauxtonAPI from "../../../../core/api"; import Views from "../mango.components.react"; -import Stores from "../mango.stores"; import MangoActions from "../mango.actions"; import ActionTypes from "../mango.actiontypes"; import Resources from "../../resources"; @@ -21,7 +20,6 @@ import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/mango/tests/mango.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/mango/tests/mango.storesSpec.js b/app/addons/documents/mango/tests/mango.storesSpec.js index 34a843c..941794c 100644 --- a/app/addons/documents/mango/tests/mango.storesSpec.js +++ b/app/addons/documents/mango/tests/mango.storesSpec.js @@ -12,7 +12,6 @@ import FauxtonAPI from "../../../../core/api"; import Stores from "../mango.stores"; -import ActionTypes from "../mango.actiontypes"; import Resources from "../../resources"; import testUtils from "../../../../../test/mocha/testUtils"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/mangolayout.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/mangolayout.js b/app/addons/documents/mangolayout.js index 87aeecf..09c226d 100644 --- a/app/addons/documents/mangolayout.js +++ b/app/addons/documents/mangolayout.js @@ -12,7 +12,6 @@ import React from 'react'; import app from "../../app"; -import FauxtonAPI from "../../core/api"; import ReactPagination from "./pagination/pagination.react"; import ReactHeader from "./header/header.react"; import {Breadcrumbs} from '../components/header-breadcrumbs'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/pagination/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/pagination/actions.js b/app/addons/documents/pagination/actions.js index 02735de..3827465 100644 --- a/app/addons/documents/pagination/actions.js +++ b/app/addons/documents/pagination/actions.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; import IndexResultsActions from "../index-results/actions"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/pagination/pagination.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/pagination/pagination.react.jsx b/app/addons/documents/pagination/pagination.react.jsx index 2b8e5de..883bc3f 100644 --- a/app/addons/documents/pagination/pagination.react.jsx +++ b/app/addons/documents/pagination/pagination.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import React from "react"; import Actions from "./actions"; import IndexResultsStore from "../index-results/stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/queryoptions/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/queryoptions/actions.js b/app/addons/documents/queryoptions/actions.js index e89f6e5..c06da84 100644 --- a/app/addons/documents/queryoptions/actions.js +++ b/app/addons/documents/queryoptions/actions.js @@ -13,8 +13,6 @@ import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; -import Stores from "./stores"; -const store = Stores.queryOptionsStore; export default { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/queryoptions/queryoptions.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/queryoptions/queryoptions.react.jsx b/app/addons/documents/queryoptions/queryoptions.react.jsx index f0a1987..553373a 100644 --- a/app/addons/documents/queryoptions/queryoptions.react.jsx +++ b/app/addons/documents/queryoptions/queryoptions.react.jsx @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from '../../../app'; - import FauxtonAPI from '../../../core/api'; import React from 'react'; import ReactDOM from 'react-dom'; @@ -173,8 +171,7 @@ var KeySearchFields = React.createClass({
+ placeholder='Enter either a single key ["123"] or an array of keys ["123", "456"]. A key value is the first parameter emitted in a map function. For example emit("123", 1) the key is "123".'>
@@ -267,7 +264,7 @@ var QueryButtons = React.createClass({ onCancel: React.PropTypes.func.isRequired }, - hideTray: function (e) { + hideTray: function () { this.props.onCancel(); }, @@ -370,7 +367,7 @@ var QueryTray = React.createClass({ Actions.toggleQueryBarVisibility(false); }, - toggleIncludeDocs: function (e) { + toggleIncludeDocs: function () { Actions.toggleIncludeDocs(); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/queryoptions/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/queryoptions/stores.js b/app/addons/documents/queryoptions/stores.js index 3246f3f..e56d058 100644 --- a/app/addons/documents/queryoptions/stores.js +++ b/app/addons/documents/queryoptions/stores.js @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from '../../../app'; - import FauxtonAPI from '../../../core/api'; import ActionTypes from './actiontypes'; const Stores = {}; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx b/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx index 8860fab..e0e8b3b 100644 --- a/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx +++ b/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx @@ -11,9 +11,6 @@ // the License. import FauxtonAPI from "../../../../core/api"; import Views from "../queryoptions.react"; -import Stores from "../stores"; -import Actions from "../actions"; -import Documents from "../../resources"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; @@ -25,7 +22,7 @@ var assert = utils.assert; var restore = utils.restore; describe('Query Options', function () { - var container, El; + var container; beforeEach(function () { container = document.createElement('div'); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/queryoptions/tests/queryoptions.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/queryoptions/tests/queryoptions.storesSpec.js b/app/addons/documents/queryoptions/tests/queryoptions.storesSpec.js index 47c4401..cb9de3c 100644 --- a/app/addons/documents/queryoptions/tests/queryoptions.storesSpec.js +++ b/app/addons/documents/queryoptions/tests/queryoptions.storesSpec.js @@ -12,12 +12,10 @@ import FauxtonAPI from "../../../../core/api"; import Stores from "../stores"; -import ActionTypes from "../actiontypes"; import testUtils from "../../../../../test/mocha/testUtils"; var assert = testUtils.assert; var dispatchToken; var store; -var opts; describe('QueryOptions Store', () => { beforeEach(() => { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js index 1714915..eeb3a15 100644 --- a/app/addons/documents/resources.js +++ b/app/addons/documents/resources.js @@ -152,7 +152,7 @@ Documents.MangoIndexCollection = PagingCollection.extend({ return res.indexes; }, - urlRef: function (context, params) { + urlRef: function (context) { var database = this.database.safeID(), query = ''; @@ -223,9 +223,7 @@ Documents.MangoDocumentCollection = PagingCollection.extend({ } }, - _iterate: function (offset, opts) { - var options = _.defaults((opts || {}), {fetch: true}); - + _iterate: function (offset) { this.paging.params = this.calculateParams(this.paging.params, offset, this.paging.pageSize); return this.fetch(); @@ -414,12 +412,7 @@ Documents.BulkDeleteDocCollection = FauxtonAPI.Collection.extend({ }, removeDocuments: function (ids) { - var reloadDesignDocs = false; _.each(ids, function (id) { - if (/_design/.test(id)) { - reloadDesignDocs = true; - } - this.remove(this.get(id)); }, this); @@ -540,8 +533,7 @@ Documents.IndexCollection = PagingCollection.extend({ }); }, - parse: function (resp) { - var rows = resp.rows; + parse: function () { this.endTime = new Date().getTime(); this.requestDuration = (this.endTime - this.startTime); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/rev-browser/rev-browser.actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/rev-browser/rev-browser.actions.js b/app/addons/documents/rev-browser/rev-browser.actions.js index 794fa7b..5e31dd7 100644 --- a/app/addons/documents/rev-browser/rev-browser.actions.js +++ b/app/addons/documents/rev-browser/rev-browser.actions.js @@ -12,7 +12,6 @@ /* global FormData */ -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./rev-browser.actiontypes"; import getTree from "visualizeRevTree/lib/getTree"; @@ -128,7 +127,7 @@ function selectRevAsWinner (databaseName, docId, paths, revToWin) { showConfirmModal(false, null); FauxtonAPI.navigate(FauxtonAPI.urls('allDocs', 'app', databaseName, '')); }, - error: (resp) => { + error: () => { FauxtonAPI.addNotification({ msg: 'Failed to delete clean up conflicts!', type: 'error', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/rev-browser/rev-browser.components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/rev-browser/rev-browser.components.react.jsx b/app/addons/documents/rev-browser/rev-browser.components.react.jsx index d49a6cc..7913b44 100644 --- a/app/addons/documents/rev-browser/rev-browser.components.react.jsx +++ b/app/addons/documents/rev-browser/rev-browser.components.react.jsx @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. - -import FauxtonAPI from "../../../core/api"; import app from "../../../app"; import React from "react"; import ReactDOM from "react-dom"; @@ -78,7 +76,7 @@ class DiffyController extends React.Component { } render () { - const {tree, ours, theirs, dropdownData, conflictingRevs, isDiffViewEnabled} = this.state; + const {tree, ours, theirs, conflictingRevs, isDiffViewEnabled} = this.state; if (!tree) { return null; @@ -276,7 +274,7 @@ class RevisionBrowserControls extends React.Component { } render () { - const {tree, conflictingRevs} = this.props; + const {tree} = this.props; const cellStyle = {paddingRight: '30px'}; return ( @@ -414,7 +412,7 @@ ConfirmModal.propTypes = { onConfirm: React.PropTypes.func.isRequired, }; -const BackForwardControls = ({onClick, forward, backward}) => { +const BackForwardControls = ({onClick, forward}) => { const icon = forward ? 'fonticon-right-open' : 'fonticon-left-open'; const style = {height: '20px', width: '11px', marginTop: '7px'}; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/rev-browser/tests/rev-browser.actionsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/rev-browser/tests/rev-browser.actionsSpec.js b/app/addons/documents/rev-browser/tests/rev-browser.actionsSpec.js index b0678ce..6cec10b 100644 --- a/app/addons/documents/rev-browser/tests/rev-browser.actionsSpec.js +++ b/app/addons/documents/rev-browser/tests/rev-browser.actionsSpec.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../../core/api"; import RevActions from "../rev-browser.actions"; import fixtures from "./fixtures"; import utils from "../../../../../test/mocha/testUtils"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/routes-doc-editor.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js index 5ecf605..01d9df8 100644 --- a/app/addons/documents/routes-doc-editor.js +++ b/app/addons/documents/routes-doc-editor.js @@ -11,9 +11,7 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; -import Helpers from "./helpers"; import Documents from "./resources"; import Databases from "../databases/base"; import Actions from "./doc-editor/actions"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/routes-documents.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js index d8cb677..583cfda 100644 --- a/app/addons/documents/routes-documents.js +++ b/app/addons/documents/routes-documents.js @@ -20,7 +20,6 @@ import Databases from '../databases/base'; import Resources from './resources'; import IndexResultStores from './index-results/stores'; import IndexResultsActions from './index-results/actions'; -import ReactActions from './header/header.actions'; import SidebarActions from './sidebar/actions'; import DesignDocInfoActions from './designdocinfo/actions'; import ComponentsActions from '../components/actions'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/routes-index-editor.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/routes-index-editor.js b/app/addons/documents/routes-index-editor.js index 9ef44bb..d204bb5 100644 --- a/app/addons/documents/routes-index-editor.js +++ b/app/addons/documents/routes-index-editor.js @@ -11,16 +11,13 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; -import Helpers from "./helpers"; import BaseRoute from "./shared-routes"; import Documents from "./resources"; import ActionsIndexEditor from "./index-editor/actions"; import Databases from "../databases/base"; import IndexResultsStores from "./index-results/stores"; import IndexResultsActions from "./index-results/actions"; -import ReactHeaderActions from "./header/header.actions"; import SidebarActions from "./sidebar/actions"; import {DocsTabsSidebarLayout, ViewsTabsSidebarLayout} from './layouts'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/routes-mango.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/routes-mango.js b/app/addons/documents/routes-mango.js index 15642c8..16b8db6 100644 --- a/app/addons/documents/routes-mango.js +++ b/app/addons/documents/routes-mango.js @@ -13,17 +13,12 @@ import React from 'react'; import app from "../../app"; import FauxtonAPI from "../../core/api"; -import Helpers from "./helpers"; -import BaseRoute from "./shared-routes"; import Databases from "../databases/resources"; import Resources from "./resources"; import IndexResultsActions from "./index-results/actions"; import IndexResultStores from "./index-results/stores"; -import ReactHeader from "./header/header.react"; import Documents from "./shared-resources"; -import ReactActions from "./header/header.actions"; import MangoActions from "./mango/mango.actions"; -import MangoStores from "./mango/mango.stores"; import SidebarActions from "./sidebar/actions"; import {MangoLayout} from './mangolayout'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/shared-resources.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js index ebd0176..9bc1465 100644 --- a/app/addons/documents/shared-resources.js +++ b/app/addons/documents/shared-resources.js @@ -58,7 +58,7 @@ Documents.Doc = FauxtonAPI.Model.extend({ return this.database ? this.database : this.collection.database; }, - validate: function (attrs, options) { + validate: function (attrs) { if (this.id && this.id !== attrs._id && this.get('_rev')) { return "Cannot change a documents id."; } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/shared-routes.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/shared-routes.js b/app/addons/documents/shared-routes.js index 956d502..01e3500 100644 --- a/app/addons/documents/shared-routes.js +++ b/app/addons/documents/shared-routes.js @@ -13,13 +13,10 @@ import app from "../../app"; import FauxtonAPI from "../../core/api"; import Documents from "./shared-resources"; -import Databases from "../databases/base"; import PaginationActions from "./pagination/actions"; import IndexResultStores from "./index-results/stores"; import SidebarActions from "./sidebar/actions"; import QueryActions from './queryoptions/actions'; -import HeaderDocsLeft from './components/header-docs-left'; - // The Documents section is built up a lot of different route object which share code. This contains // base functionality that can be used across routes / addons @@ -46,7 +43,7 @@ var BaseRoute = FauxtonAPI.RouteObject.extend({ var promise = this.designDocs.fetch({reset: true}), hasReduceFunction; - promise.then((resp) => { + promise.then(() => { var design = _.findWhere(this.designDocs.models, {id: '_design/' + ddoc}); !_.isUndefined(hasReduceFunction = design.attributes.doc.views[viewName].reduce); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/sidebar/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/sidebar/actions.js b/app/addons/documents/sidebar/actions.js index 573c807..f865129 100644 --- a/app/addons/documents/sidebar/actions.js +++ b/app/addons/documents/sidebar/actions.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; import Stores from "./stores.react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx b/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx index 5d1617b..68f6ade 100644 --- a/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx +++ b/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx @@ -9,13 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import utils from "../../../../../test/mocha/testUtils"; import Components from "../sidebar.react"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; var DesignDoc = Components.DesignDoc; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/sidebar/tests/sidebar.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/sidebar/tests/sidebar.storesSpec.js b/app/addons/documents/sidebar/tests/sidebar.storesSpec.js index 8edb848..e55eade 100644 --- a/app/addons/documents/sidebar/tests/sidebar.storesSpec.js +++ b/app/addons/documents/sidebar/tests/sidebar.storesSpec.js @@ -12,7 +12,6 @@ import FauxtonAPI from "../../../../core/api"; import Stores from "../stores.react"; -import ActionTypes from "../actiontypes"; import testUtils from "../../../../../test/mocha/testUtils"; var assert = testUtils.assert; var dispatchToken; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/document-test-helper.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/document-test-helper.js b/app/addons/documents/tests/document-test-helper.js index 6822639..bb03781 100644 --- a/app/addons/documents/tests/document-test-helper.js +++ b/app/addons/documents/tests/document-test-helper.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import Documents from "../resources"; var opts = { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/helpersSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/helpersSpec.js b/app/addons/documents/tests/helpersSpec.js index bbb6952..6c1d11f 100644 --- a/app/addons/documents/tests/helpersSpec.js +++ b/app/addons/documents/tests/helpersSpec.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import Helpers from "../helpers"; import testUtils from "../../../../test/mocha/testUtils"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/nightwatch/createsDocumentWithoutId.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/createsDocumentWithoutId.js b/app/addons/documents/tests/nightwatch/createsDocumentWithoutId.js index 4f0bfd9..88ac793 100644 --- a/app/addons/documents/tests/nightwatch/createsDocumentWithoutId.js +++ b/app/addons/documents/tests/nightwatch/createsDocumentWithoutId.js @@ -17,7 +17,6 @@ module.exports = { /*jshint multistr: true */ var waitTime = client.globals.maxWaitTime, newDatabaseName = client.globals.testDatabaseName, - newDocumentName = 'create_doc_document', baseUrl = client.globals.test_settings.launch_url; client http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js index 17a2488..e986306 100644 --- a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js +++ b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js @@ -17,14 +17,14 @@ module.exports = { before: function (client, done) { var nano = helpers.getNanoInstance(client.globals.test_settings.db_url); - nano.db.create('_replicator', function (err, body, header) { + nano.db.create('_replicator', function () { done(); }); }, after: function (client, done) { var nano = helpers.getNanoInstance(client.globals.test_settings.db_url); - nano.db.destroy('_replicator', function (err, body, header) { + nano.db.destroy('_replicator', function () { done(); }); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/nightwatch/fixRegressionTableView.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/fixRegressionTableView.js b/app/addons/documents/tests/nightwatch/fixRegressionTableView.js index b697b20..8c3e4ce 100644 --- a/app/addons/documents/tests/nightwatch/fixRegressionTableView.js +++ b/app/addons/documents/tests/nightwatch/fixRegressionTableView.js @@ -15,8 +15,7 @@ module.exports = { 'Does not crash the table view': function (client) { - var waitTime = client.globals.maxWaitTime, - newDatabaseName = client.globals.testDatabaseName, + var newDatabaseName = client.globals.testDatabaseName, newDocumentName1 = 'bulktest1', newDocumentName2 = 'bulktest2', baseUrl = client.globals.test_settings.launch_url; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/nightwatch/viewCreate.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/viewCreate.js b/app/addons/documents/tests/nightwatch/viewCreate.js index c142d99..2597b5d 100644 --- a/app/addons/documents/tests/nightwatch/viewCreate.js +++ b/app/addons/documents/tests/nightwatch/viewCreate.js @@ -16,7 +16,6 @@ module.exports = { 'creates design docs with js hint errors': function (client) { const waitTime = client.globals.maxWaitTime; - const baseUrl = client.globals.test_settings.launch_url; /*jshint multistr: true */ openDifferentDropdownsAndClick(client) @@ -40,7 +39,6 @@ module.exports = { 'Creates a Design Doc using the dropdown at "all documents"': function (client) { var waitTime = client.globals.maxWaitTime; - var baseUrl = client.globals.test_settings.launch_url; /*jshint multistr: true */ openDifferentDropdownsAndClick(client) @@ -64,7 +62,6 @@ module.exports = { 'Creates a Design Doc and does not crash after navigating': function (client) { var waitTime = client.globals.maxWaitTime; - var baseUrl = client.globals.test_settings.launch_url; /*jshint multistr: true */ openDifferentDropdownsAndClick(client) @@ -90,7 +87,6 @@ module.exports = { 'Creates a Design Doc using the dropdown at "the upper dropdown in the header"': function (client) { var waitTime = client.globals.maxWaitTime; - var baseUrl = client.globals.test_settings.launch_url; /*jshint multistr: true */ openDifferentDropdownsAndClick(client) http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/nightwatch/viewCreateBadView.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/viewCreateBadView.js b/app/addons/documents/tests/nightwatch/viewCreateBadView.js index 3057c6d..0cc2a6b 100644 --- a/app/addons/documents/tests/nightwatch/viewCreateBadView.js +++ b/app/addons/documents/tests/nightwatch/viewCreateBadView.js @@ -45,8 +45,7 @@ module.exports = { }, 'Visit url of broken view displays error': function (client) { - var waitTime = client.globals.maxWaitTime, - newDatabaseName = client.globals.testDatabaseName, + var newDatabaseName = client.globals.testDatabaseName, baseUrl = client.globals.test_settings.launch_url; client http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/resourcesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/resourcesSpec.js b/app/addons/documents/tests/resourcesSpec.js index 524a760..48db6f8 100644 --- a/app/addons/documents/tests/resourcesSpec.js +++ b/app/addons/documents/tests/resourcesSpec.js @@ -280,8 +280,7 @@ describe('QueryParams', function () { key:'[\"a\",\"b\"]' }; var clone = _.clone(params); - var result = Models.QueryParams.parse(params); - + Models.QueryParams.parse(params); assert.deepEqual(params, clone); }); }); @@ -318,7 +317,7 @@ describe('QueryParams', function () { it('does not modify input', function () { var params = {'key': ['a', 'b']}; var clone = _.clone(params); - var result = Models.QueryParams.stringify(params); + Models.QueryParams.stringify(params); assert.deepEqual(params, clone); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/tests/routeSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/routeSpec.js b/app/addons/documents/tests/routeSpec.js deleted file mode 100644 index 57bf9aa..0000000 --- a/app/addons/documents/tests/routeSpec.js +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -import FauxtonAPI from "../../../core/api"; -import Base from "../base"; -import Documents from "../routes"; -import HeaderActions from "../header/header.actions"; -import IndexResultsActions from "../index-results/actions"; -import testUtils from "../../../../test/mocha/testUtils"; -var assert = testUtils.assert; -var DocumentRoute = Documents.RouteObjects[2]; - -//commenting out for now. This test adds little value and is breaking the routeObjectSpecs -describe('Documents Route', function () { - - /*it('the all-documents-list has a right header', function () { - var routeObj = new DocumentRoute(null, null, ['test']); - - routeObj.allDocs('newdatabase', null); - assert.equal(typeof routeObj.rightHeader, 'object'); - - });*/ - -}); - -// until there is consensus on how to encode json responses -// https://issues.apache.org/jira/browse/COUCHDB-2748 -// taking out this test for https://github.com/apache/couchdb-fauxton/pull/489 - -//describe('Fauxton Urls', function () { -// it('document app encodes document id', function () { -// var id = "\foo"; -// var url = FauxtonAPI.urls('document', 'app', 'fake-db', id); -// assert.deepEqual("/database/fake-db/%0Coo", url); -// }); -//}); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/appwrapper.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/appwrapper.js b/app/addons/fauxton/appwrapper.js index b2cd9fc..124c5e9 100644 --- a/app/addons/fauxton/appwrapper.js +++ b/app/addons/fauxton/appwrapper.js @@ -11,8 +11,6 @@ // the License. import React from 'react'; -import FauxtonAPI from '../../core/api'; -import ComponentActions from '../components/actions'; import {NotificationController} from "./notifications/notifications.react"; import {NavBar} from './navigation/components.react'; import NavbarActions from './navigation/actions'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/base.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js index 0509717..fa83b97 100644 --- a/app/addons/fauxton/base.js +++ b/app/addons/fauxton/base.js @@ -12,14 +12,7 @@ import app from "../../app"; import FauxtonAPI from "../../core/api"; -import React from "react"; -import NotificationComponents from "./notifications/notifications.react"; -import Actions from "./notifications/actions"; -import NavbarReactComponents from "./navigation/components.react"; import NavigationActions from "./navigation/actions"; -import ReactComponents from "../components/react-components.react"; -import ComponentActions from "../components/actions"; -import {Breadcrumbs} from '../components/header-breadcrumbs'; import "./assets/less/fauxton.less"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx index dc85481..8bc71c9 100644 --- a/app/addons/fauxton/components.react.jsx +++ b/app/addons/fauxton/components.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/navigation/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/navigation/actions.js b/app/addons/fauxton/navigation/actions.js index 4870d1d..3548157 100644 --- a/app/addons/fauxton/navigation/actions.js +++ b/app/addons/fauxton/navigation/actions.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/navigation/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/navigation/components.react.jsx b/app/addons/fauxton/navigation/components.react.jsx index 6e61015..e734568 100644 --- a/app/addons/fauxton/navigation/components.react.jsx +++ b/app/addons/fauxton/navigation/components.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx b/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx index fc8d349..ba37364 100644 --- a/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx +++ b/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx @@ -11,13 +11,11 @@ // the License. import FauxtonAPI from "../../../../core/api"; import Views from "../components.react"; -import Actions from "../actions"; import Auth from "../../../../core/auth"; import BaseAuth from "../../../auth/base"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; -import TestUtils from "react-addons-test-utils"; import sinon from "sinon"; import {mount} from 'enzyme'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/notifications/notifications.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/notifications/notifications.react.jsx b/app/addons/fauxton/notifications/notifications.react.jsx index 37f5848..adb20c2 100644 --- a/app/addons/fauxton/notifications/notifications.react.jsx +++ b/app/addons/fauxton/notifications/notifications.react.jsx @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; -import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import Actions from "./actions"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/notifications/tests/actionsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/notifications/tests/actionsSpec.js b/app/addons/fauxton/notifications/tests/actionsSpec.js index 8d61628..3f9540c 100644 --- a/app/addons/fauxton/notifications/tests/actionsSpec.js +++ b/app/addons/fauxton/notifications/tests/actionsSpec.js @@ -9,14 +9,12 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../../core/api"; import Views from "../notifications.react"; import Stores from "../stores"; import Actions from "../actions"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; -import moment from "moment"; import TestUtils from "react-addons-test-utils"; import "sinon"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx b/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx index 13d5c40..9db2a92 100644 --- a/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx +++ b/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx @@ -12,7 +12,6 @@ import FauxtonAPI from "../../../../core/api"; import Views from "../notifications.react"; import Stores from "../stores"; -import Actions from "../actions"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/notifications/tests/storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/notifications/tests/storesSpec.js b/app/addons/fauxton/notifications/tests/storesSpec.js index 57d4afc..47d35de 100644 --- a/app/addons/fauxton/notifications/tests/storesSpec.js +++ b/app/addons/fauxton/notifications/tests/storesSpec.js @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../../app"; -import FauxtonAPI from "../../../../core/api"; import utils from "../../../../../test/mocha/testUtils"; import Stores from "../stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/fauxton/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/tests/componentsSpec.react.jsx b/app/addons/fauxton/tests/componentsSpec.react.jsx index c33555d..6f23e38 100644 --- a/app/addons/fauxton/tests/componentsSpec.react.jsx +++ b/app/addons/fauxton/tests/componentsSpec.react.jsx @@ -9,14 +9,12 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import Views from "../components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; import sinon from "sinon"; -import { mount } from 'enzyme'; var assert = utils.assert; describe('Pagination', function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/actions.js b/app/addons/permissions/actions.js index 0a49cc0..8da6a4b 100644 --- a/app/addons/permissions/actions.js +++ b/app/addons/permissions/actions.js @@ -11,8 +11,6 @@ // the License. import FauxtonAPI from "../../core/api"; -import ActionTypes from "./actiontypes"; -import Promise from 'bluebird'; import 'whatwg-fetch'; import { isValueAlreadySet, addValueToPermissions } from './helpers'; @@ -29,7 +27,6 @@ export const receivedPermissions = json => { }; }; - export const fetchPermissions = url => dispatch => { return fetch(url, { headers: { 'Accept': 'application/json' }}) .then(res => res.json()) @@ -59,7 +56,7 @@ export const deletePermissionFromObject = (p, section, type, value) => { }; export const updatePermission = (url, permissions, section, type, value) => dispatch => { - const res = setPermissionOnObject(permissions, section, type, value); + setPermissionOnObject(permissions, section, type, value); updatePermissionUnsafe(url, permissions, dispatch) .catch((err) => { @@ -71,7 +68,7 @@ export const updatePermission = (url, permissions, section, type, value) => disp }; export const deletePermission = (url, permissions, section, type, value) => dispatch => { - const res = deletePermissionFromObject(permissions, section, type, value); + deletePermissionFromObject(permissions, section, type, value); updatePermissionUnsafe(url, permissions, dispatch) .catch((err) => { @@ -99,7 +96,7 @@ export const updatePermissionUnsafe = (url, p, dispatch) => { } return json; }) - .then((json) => { + .then(() => { FauxtonAPI.addNotification({ msg: 'Database permissions has been updated.' }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/base.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/base.js b/app/addons/permissions/base.js index 5123112..0efe12b 100644 --- a/app/addons/permissions/base.js +++ b/app/addons/permissions/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Permissions from "./routes"; import reducer from './reducers'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/components/PermissionsItem.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/components/PermissionsItem.js b/app/addons/permissions/components/PermissionsItem.js index 6c03456..c723219 100644 --- a/app/addons/permissions/components/PermissionsItem.js +++ b/app/addons/permissions/components/PermissionsItem.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; const PermissionsItem = ({removeItem, section, type, value}) => { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/components/PermissionsScreen.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/components/PermissionsScreen.js b/app/addons/permissions/components/PermissionsScreen.js index 12bf0ad..82ff1b5 100644 --- a/app/addons/permissions/components/PermissionsScreen.js +++ b/app/addons/permissions/components/PermissionsScreen.js @@ -11,7 +11,7 @@ // the License. import FauxtonAPI from '../../../core/api'; -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; import PermissionsSection from './PermissionsSection'; import { updatePermission, deletePermission } from '../actions'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/components/PermissionsSection.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/components/PermissionsSection.js b/app/addons/permissions/components/PermissionsSection.js index 95eb9bf..3813f5a 100644 --- a/app/addons/permissions/components/PermissionsSection.js +++ b/app/addons/permissions/components/PermissionsSection.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. -import React, { Component, PropTypes } from 'react'; +import React from 'react'; import FauxtonAPI from '../../../core/api'; import app from '../../../app'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/layout.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/layout.js b/app/addons/permissions/layout.js index 84bd27c..ed0c3a9 100644 --- a/app/addons/permissions/layout.js +++ b/app/addons/permissions/layout.js @@ -11,7 +11,6 @@ // the License. import React from 'react'; -import FauxtonAPI from "../../core/api"; import {TabsSidebarHeader} from '../documents/layouts'; import PermissionsContainer from './container/PermissionsContainer'; import SidebarComponents from "../documents/sidebar/sidebar.react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/permissions/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/permissions/routes.js b/app/addons/permissions/routes.js index 5025daa..404a16f 100644 --- a/app/addons/permissions/routes.js +++ b/app/addons/permissions/routes.js @@ -14,7 +14,6 @@ import app from "../../app"; import FauxtonAPI from "../../core/api"; import Databases from "../databases/base"; -import Actions from "./actions"; import BaseRoute from "../documents/shared-routes"; import Layout from './layout'; import React from 'react'; @@ -26,7 +25,7 @@ const PermissionsRouteObject = BaseRoute.extend({ 'database/:database/permissions': 'permissions' }, - initialize: function (route, options) { + initialize: function () { const docOptions = app.getParams(); docOptions.include_docs = true; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/actions.js b/app/addons/replication/actions.js index b40dabb..cdf5bfb 100644 --- a/app/addons/replication/actions.js +++ b/app/addons/replication/actions.js @@ -231,16 +231,6 @@ const hideConflictModal = () => { }); }; -const updateUsernameAndPassword = (username, password) => { - FauxtonAPI.dispatch({ - type: ActionTypes.REPLICATION_USERNAME_PASSWORD, - options: { - username, - password - } - }); -}; - const changeActivitySort = (sort) => { FauxtonAPI.dispatch({ type: ActionTypes.REPLICATION_CHANGE_ACTIVITY_SORT, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/api.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/api.js b/app/addons/replication/api.js index 26dd4fd..4e969cb 100644 --- a/app/addons/replication/api.js +++ b/app/addons/replication/api.js @@ -203,7 +203,7 @@ export const checkReplicationDocID = (docId) => { url: `/_replicator/${docId}`, contentType: 'application/json; charset=utf-8', dataType: 'json', - }).then((res) => { + }).then(() => { promise.resolve(true); }, function (xhr) { if (xhr.statusText === "Object Not Found") { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/base.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js index cdb5b6b..d9ad42a 100644 --- a/app/addons/replication/base.js +++ b/app/addons/replication/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from '../../app'; import FauxtonAPI from '../../core/api'; import replication from './route'; import './assets/less/replication.less'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/components/activity.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/components/activity.js b/app/addons/replication/components/activity.js index be8fe24..e50f1b8 100644 --- a/app/addons/replication/components/activity.js +++ b/app/addons/replication/components/activity.js @@ -12,7 +12,6 @@ import React from 'react'; import {Table} from "react-bootstrap"; import moment from 'moment'; -import app from '../../../app'; import {DeleteModal, ErrorModal} from './modals'; const formatUrl = (url) => { @@ -257,7 +256,7 @@ class ReplicationTable extends React.Component { } onSort (column) { - return (e) => { + return () => { this.props.changeSort({ descending: column === this.props.column ? !this.props.descending : true, column http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/components/modals.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/components/modals.js b/app/addons/replication/components/modals.js index c02f31b..b51616e 100644 --- a/app/addons/replication/components/modals.js +++ b/app/addons/replication/components/modals.js @@ -66,7 +66,7 @@ DeleteModal.propTypes = { multipleDocs: React.PropTypes.number.isRequired }; -export const ErrorModal = ({visible, onClose, errorMsg, onClick}) => { +export const ErrorModal = ({visible, onClose, errorMsg}) => { if (!visible) { return null; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/components/newreplication.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/components/newreplication.js b/app/addons/replication/components/newreplication.js index e274fa7..1ad7680 100644 --- a/app/addons/replication/components/newreplication.js +++ b/app/addons/replication/components/newreplication.js @@ -86,7 +86,6 @@ export default class NewReplicationController extends React.Component { remoteTarget, remoteSource, replicationTarget, - replicationSource, localTarget, localSource, databases http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/components/options.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/components/options.js b/app/addons/replication/components/options.js index acb2501..2eaabcb 100644 --- a/app/addons/replication/components/options.js +++ b/app/addons/replication/components/options.js @@ -12,7 +12,6 @@ import React from 'react'; import Constants from '../constants'; import Components from '../../components/react-components.react'; -import ReactSelect from 'react-select'; const { StyledSelect } = Components; @@ -52,7 +51,7 @@ const ReplicationDoc = ({value, onChange}) =>
onChange('')} /> + onClick={() => onChange('')} /> { }); it('does not add doc id if it does not exists', () => { - const docId = 'docId'; - assert.deepEqual( addDocIdAndRev(null, null, {}), {}); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/tests/newreplicationSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/tests/newreplicationSpec.js b/app/addons/replication/tests/newreplicationSpec.js index 81246b9..fe3cf9e 100644 --- a/app/addons/replication/tests/newreplicationSpec.js +++ b/app/addons/replication/tests/newreplicationSpec.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. import React from "react"; -import TestUtils from "react-addons-test-utils"; import utils from "../../../../test/mocha/testUtils"; import FauxtonAPI from '../../../core/api'; import { mount } from 'enzyme'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/tests/nightwatch/replication.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/tests/nightwatch/replication.js b/app/addons/replication/tests/nightwatch/replication.js index 33f58e1..ba852d5 100644 --- a/app/addons/replication/tests/nightwatch/replication.js +++ b/app/addons/replication/tests/nightwatch/replication.js @@ -24,7 +24,7 @@ const destroyDBsAndCreateReplicator = (client, done) => { nano.db.destroy(newDatabaseName1, () => { nano.db.destroy(newDatabaseName2, () => { nano.db.destroy(replicatedDBName, () => { - nano.db.create('_replicator', function (err, body, header) { + nano.db.create('_replicator', function () { done(); }); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/replication/tests/nightwatch/replicationactivity.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/tests/nightwatch/replicationactivity.js b/app/addons/replication/tests/nightwatch/replicationactivity.js index 22bfbee..1c85479 100644 --- a/app/addons/replication/tests/nightwatch/replicationactivity.js +++ b/app/addons/replication/tests/nightwatch/replicationactivity.js @@ -16,7 +16,6 @@ module.exports = { 'Can view doc': client => { const waitTime = client.globals.maxWaitTime; const baseUrl = client.globals.test_settings.launch_url; - const password = client.globals.test_settings.password; const replicatorDoc = { _id: 'existing-doc-id-view-doc', @@ -41,7 +40,6 @@ module.exports = { 'Can edit doc': client => { const waitTime = client.globals.maxWaitTime; const baseUrl = client.globals.test_settings.launch_url; - const password = client.globals.test_settings.password; const replicatorDoc = { _id: 'existing-doc-id-edit-doc', @@ -66,7 +64,6 @@ module.exports = { 'Can filter docs': client => { const waitTime = client.globals.maxWaitTime; const baseUrl = client.globals.test_settings.launch_url; - const password = client.globals.test_settings.password; const replicatorDoc1 = { _id: 'existing-doc-id-filter1', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/setup/base.js ---------------------------------------------------------------------- diff --git a/app/addons/setup/base.js b/app/addons/setup/base.js index 918532a..789e52b 100644 --- a/app/addons/setup/base.js +++ b/app/addons/setup/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Setup from "./route"; import "./assets/less/setup.less"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/setup/setup.actions.js ---------------------------------------------------------------------- diff --git a/app/addons/setup/setup.actions.js b/app/addons/setup/setup.actions.js index bdafc32..79d9ef9 100644 --- a/app/addons/setup/setup.actions.js +++ b/app/addons/setup/setup.actions.js @@ -10,12 +10,9 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../core/api"; -import ConfigResources from "../config/resources"; import SetupResources from "./resources"; import ActionTypes from "./setup.actiontypes"; -import ClusterStores from "../cluster/cluster.stores"; import SetupStores from "./setup.stores"; -var nodesStore = ClusterStores.nodesStore; var setupStore = SetupStores.setupStore; export default { @@ -44,7 +41,7 @@ export default { action: 'finish_cluster' }) }) - .success(function (res) { + .success(function () { FauxtonAPI.addNotification({ msg: message, type: 'success', @@ -65,8 +62,6 @@ export default { }, setupSingleNode: function () { - var nodes = nodesStore.getNodes(); - var isAdminParty = setupStore.getIsAdminParty(); var username = setupStore.getUsername(); var password = setupStore.getPassword(); @@ -140,15 +135,6 @@ export default { delete additionalNodeData.remote_current_password; } - function dontGiveUp (f, u, p) { - return f(u, p).then( - undefined, - function (err) { - return dontGiveUp(f, u, p); - } - ); - } - var additionalNode = new SetupResources.Model(additionalNodeData); additionalNode.on('invalid', function (model, error) { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/setup/tests/setupSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/setup/tests/setupSpec.js b/app/addons/setup/tests/setupSpec.js index 522e67d..0e0b2d1 100644 --- a/app/addons/setup/tests/setupSpec.js +++ b/app/addons/setup/tests/setupSpec.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import Resources from "../resources"; import testUtils from "../../../../test/mocha/testUtils"; var assert = testUtils.assert, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/actions.js b/app/addons/verifyinstall/actions.js index 7cf5228..c8acc55 100644 --- a/app/addons/verifyinstall/actions.js +++ b/app/addons/verifyinstall/actions.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Constants from "./constants"; import VerifyInstall from "./resources"; @@ -27,7 +26,7 @@ var testPassed = function (test) { }; var testFailed = function (test) { - return function (xhr, error) { + return function (xhr) { if (!xhr) { return; } FauxtonAPI.dispatch({ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/base.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/base.js b/app/addons/verifyinstall/base.js index b9d9aac..1949575 100644 --- a/app/addons/verifyinstall/base.js +++ b/app/addons/verifyinstall/base.js @@ -10,10 +10,10 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import VerifyInstall from "./routes"; import "./assets/less/verifyinstall.less"; + VerifyInstall.initialize = function () { FauxtonAPI.addHeaderLink({ title: 'Verify', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/components.react.jsx b/app/addons/verifyinstall/components.react.jsx index 2b6bd54..366a6df 100644 --- a/app/addons/verifyinstall/components.react.jsx +++ b/app/addons/verifyinstall/components.react.jsx @@ -10,18 +10,14 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; -import FauxtonAPI from "../../core/api"; import React from "react"; import Constants from "./constants"; -import VerifyInstall from "./resources"; import Actions from "./actions"; import Stores from "./stores"; -var store = Stores.verifyInstallStore; +const store = Stores.verifyInstallStore; - -var VerifyInstallController = React.createClass({ +const VerifyInstallController = React.createClass({ getInitialState: function () { return this.getStoreState(); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js index 8a432c1..2025245 100644 --- a/app/addons/verifyinstall/resources.js +++ b/app/addons/verifyinstall/resources.js @@ -55,7 +55,7 @@ Verifyinstall.testProcess = { db.fetch() .then(function () { return db.destroy(); - }, function (xhr) { + }, function () { deferred.resolve(); }) .then(function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/routes.js b/app/addons/verifyinstall/routes.js index 73bfae2..8c8c703 100644 --- a/app/addons/verifyinstall/routes.js +++ b/app/addons/verifyinstall/routes.js @@ -11,7 +11,6 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; import VerifyInstall from "./resources"; import Actions from "./actions"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/tests/actionsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/tests/actionsSpec.js b/app/addons/verifyinstall/tests/actionsSpec.js index 5560d78..22da53e 100644 --- a/app/addons/verifyinstall/tests/actionsSpec.js +++ b/app/addons/verifyinstall/tests/actionsSpec.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import testUtils from "../../../../test/mocha/testUtils"; import Stores from "../stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/tests/componentsSpec.react.jsx b/app/addons/verifyinstall/tests/componentsSpec.react.jsx index 4067bd4..b38e7cc 100644 --- a/app/addons/verifyinstall/tests/componentsSpec.react.jsx +++ b/app/addons/verifyinstall/tests/componentsSpec.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/verifyinstall/tests/verifyinstall.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/tests/verifyinstall.storesSpec.js b/app/addons/verifyinstall/tests/verifyinstall.storesSpec.js index eeddf7d..23e29f6 100644 --- a/app/addons/verifyinstall/tests/verifyinstall.storesSpec.js +++ b/app/addons/verifyinstall/tests/verifyinstall.storesSpec.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import testUtils from "../../../../test/mocha/testUtils"; import Stores from "../stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/app.js ---------------------------------------------------------------------- diff --git a/app/app.js b/app/app.js index 939418c..5b594eb 100644 --- a/app/app.js +++ b/app/app.js @@ -9,12 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. - import app from "./initialize"; import $ from "jquery"; +window.$ = $; import _ from "lodash"; -import Backbone from "backbone"; -import Bootstrap from "bootstrap"; +import "bootstrap"; import Helpers from "./helpers"; import Utils from "./core/utils"; import FauxtonAPI from "./core/api"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/core/auth.js ---------------------------------------------------------------------- diff --git a/app/core/auth.js b/app/core/auth.js index 5af442b..e296c39 100644 --- a/app/core/auth.js +++ b/app/core/auth.js @@ -27,10 +27,9 @@ _.extend(Auth.prototype, Backbone.Events, { authDeniedCb: function () {}, initialize: function () { - var that = this; }, - authHandlerCb : function (roles) { + authHandlerCb : function () { var deferred = $.Deferred(); deferred.resolve(); return deferred; @@ -52,7 +51,7 @@ _.extend(Auth.prototype, Backbone.Events, { throw new Error("Fauxton.session is not configured."); } - return FauxtonAPI.session.fetchUser().then(function (user) { + return FauxtonAPI.session.fetchUser().then(function () { return FauxtonAPI.when(that.authHandlerCb(FauxtonAPI.session, requiredRoles)); }); } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/core/routeObject.js ---------------------------------------------------------------------- diff --git a/app/core/routeObject.js b/app/core/routeObject.js index 59f0670..96382df 100644 --- a/app/core/routeObject.js +++ b/app/core/routeObject.js @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "./base"; -import React from "react"; import ReactDOM from "react-dom"; import Backbone from "backbone"; import _ from "lodash"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/core/tests/couchdbSessionSpec.js ---------------------------------------------------------------------- diff --git a/app/core/tests/couchdbSessionSpec.js b/app/core/tests/couchdbSessionSpec.js index 7155037..7203b36 100644 --- a/app/core/tests/couchdbSessionSpec.js +++ b/app/core/tests/couchdbSessionSpec.js @@ -9,11 +9,9 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../api"; import testUtils from "../../../test/mocha/testUtils"; import sinon from "sinon"; -var assert = testUtils.assert; describe('CouchDBSession', function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/core/tests/utilsSpec.js ---------------------------------------------------------------------- diff --git a/app/core/tests/utilsSpec.js b/app/core/tests/utilsSpec.js index 326e8ab..ddc6b46 100644 --- a/app/core/tests/utilsSpec.js +++ b/app/core/tests/utilsSpec.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../api"; import testUtils from "../../../test/mocha/testUtils"; import utils from "../utils"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/core/utils.js ---------------------------------------------------------------------- diff --git a/app/core/utils.js b/app/core/utils.js index 014e233..584444f 100644 --- a/app/core/utils.js +++ b/app/core/utils.js @@ -21,9 +21,7 @@ import $ from "jquery"; import _ from "lodash"; -var onWindowResize = {}; - -var utils = { +const utils = { // Thanks to: http://stackoverflow.com/a/2880929 getParams: function (queryString) { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/helpers.js ---------------------------------------------------------------------- diff --git a/app/helpers.js b/app/helpers.js index 9310ffc..2991bcf 100644 --- a/app/helpers.js +++ b/app/helpers.js @@ -19,7 +19,6 @@ import constants from "./constants"; import utils from "./core/utils"; -import d3 from "d3"; import moment from "moment"; import _ from 'lodash'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/bin/remove-test-dbs.js ---------------------------------------------------------------------- diff --git a/bin/remove-test-dbs.js b/bin/remove-test-dbs.js index 92a7491..ac7a8dc 100755 --- a/bin/remove-test-dbs.js +++ b/bin/remove-test-dbs.js @@ -31,7 +31,7 @@ nano.db.list((err, body) => { }).map(db => { return (cb) => { console.log('removing', db); - nano.db.destroy(db, (err, resp) => { + nano.db.destroy(db, (err) => { if (err) { cb(err); return; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/couchapp.js ---------------------------------------------------------------------- diff --git a/couchapp.js b/couchapp.js index 22ecc96..7aad7e1 100644 --- a/couchapp.js +++ b/couchapp.js @@ -27,7 +27,7 @@ ddoc = { views: {}, shows: {}, lists: {}, - validate_doc_update: function (newDoc, oldDoc, userCtx) { + validate_doc_update: function () { /*if (newDoc._deleted === true && userCtx.roles.indexOf('_admin') === -1) { throw "Only admin can delete documents on this database."; }*/ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/devserver.js ---------------------------------------------------------------------- diff --git a/devserver.js b/devserver.js index 96f3ebd..4e2f881 100644 --- a/devserver.js +++ b/devserver.js @@ -1,7 +1,5 @@ var spawn = require('child_process').spawn; -var path = require("path"); var fs = require("fs"); -var _ = require('lodash'); var webpack = require('webpack'); var WebpackDev = require('webpack-dev-server'); var config = require('./webpack.config.dev.js'); @@ -66,12 +64,6 @@ function getCspHeaders () { }; var runWebpackServer = function () { - var fileTypes = ['.js', '.css', '.png', '.swf', '.eot', '.woff', '.svg', '.ttf', '.swf']; - function isFile (url) { - return _.contains(fileTypes, path.extname(url)); - } - - var options = { contentBase: __dirname + '/dist/debug', publicPath: '/', @@ -96,17 +88,17 @@ var runWebpackServer = function () { target: settings.proxy.target }); - proxy.on('proxyRes', function (proxyRes, req, res) { + proxy.on('proxyRes', function (proxyRes) { if (proxyRes.headers['set-cookie']) { proxyRes.headers['set-cookie'][0] = proxyRes.headers["set-cookie"][0].replace('Secure', ''); } }); - proxy.on('error', function (e) { + proxy.on('error', function () { // don't explode on cancelled requests }); - server.app.all('*', function (req, res, next) { + server.app.all('*', function (req, res) { proxy.web(req, res); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/index.js ---------------------------------------------------------------------- diff --git a/index.js b/index.js index 5ad25fe..c50506f 100644 --- a/index.js +++ b/index.js @@ -69,13 +69,13 @@ module.exports = function (options) { proxy.web(req, res); }).listen(port, '0.0.0.0'); - proxy.on('error', function (e) { + proxy.on('error', () => { // don't explode on cancelled requests }); //Remove Secure on the cookie if the proxy is communicating to a CouchDB instance // via https. - proxy.on('proxyRes', function (proxyRes, req, res) { + proxy.on('proxyRes', function (proxyRes) { if (proxyRes.headers['set-cookie']) { proxyRes.headers['set-cookie'][0] = proxyRes.headers["set-cookie"][0].replace('Secure', ''); } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/jest-setup.js ---------------------------------------------------------------------- diff --git a/jest-setup.js b/jest-setup.js index 0eca991..6d567f6 100644 --- a/jest-setup.js +++ b/jest-setup.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. -const jest = require('jest'); +require('jest'); window.$ = window.jQuery = require('jquery'); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/tasks/fauxton.js ---------------------------------------------------------------------- diff --git a/tasks/fauxton.js b/tasks/fauxton.js index abfaf9d..d929e89 100644 --- a/tasks/fauxton.js +++ b/tasks/fauxton.js @@ -23,7 +23,7 @@ module.exports = function (grunt) { grunt.file.write(data.dest, tmpl(data.variables)); }); - grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function (version) { + grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function () { grunt.log.writeln('Fetching external dependencies'); var done = this.async(), @@ -58,7 +58,7 @@ module.exports = function (grunt) { var localDeps = _.filter(settings.deps, function (dep) { return !! dep.path; }); grunt.log.writeln(localDeps.length + ' local dependencies'); - var local = fetch(localDeps, function (dep, destination) { + fetch(localDeps, function (dep, destination) { // TODO: Windows var command = 'cp -r ' + dep.path + '/ ' + destination + '/'; grunt.log.writeln(command); @@ -112,7 +112,6 @@ module.exports = function (grunt) { grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function () { var data = this.data, - configInfo, _ = grunt.util._, configTemplateSrc = data.template; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/tasks/helper.js ---------------------------------------------------------------------- diff --git a/tasks/helper.js b/tasks/helper.js index 696e1c0..70d4e12 100644 --- a/tasks/helper.js +++ b/tasks/helper.js @@ -17,8 +17,7 @@ exports.devServerPort = 8000; exports.couch = 'http://couch:5984/'; exports.init = function (grunt) { - var _ = grunt.util._, - platform = process.platform; + var _ = grunt.util._; return { readSettingsFile: function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/test/dev.js ---------------------------------------------------------------------- diff --git a/test/dev.js b/test/dev.js index 1ed718b..8fdf4c5 100644 --- a/test/dev.js +++ b/test/dev.js @@ -13,7 +13,7 @@ // This will search for files ending in .test.js and require them // so that they are added to the webpack bundle -var context = require.context('../app/addons/warehouse/tests', true, /warehouse.edit.component[Ss]pec/); +var context = require.context('../app/addons/documents/index-results/tests', true, /index-results.stores[Ss]pec/); console.log('Testing files', context.keys()); context.keys().forEach(context); module.exports = context; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/webpack.config.dev.js ---------------------------------------------------------------------- diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 05f7b92..ac734db 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -9,8 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -var webpack = require('webpack'); -var path = require('path'); +const webpack = require('webpack'); module.exports = { entry: [ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/webpack.config.test-dev.js ---------------------------------------------------------------------- diff --git a/webpack.config.test-dev.js b/webpack.config.test-dev.js index c49102b..e24fbd1 100644 --- a/webpack.config.test-dev.js +++ b/webpack.config.test-dev.js @@ -9,8 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -var webpack = require('webpack'); -var path = require('path'); +const webpack = require('webpack'); module.exports = { entry: [ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/webpack.config.test.js ---------------------------------------------------------------------- diff --git a/webpack.config.test.js b/webpack.config.test.js index 5a96b8c..54a60bb 100644 --- a/webpack.config.test.js +++ b/webpack.config.test.js @@ -9,8 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -var webpack = require('webpack'); -var path = require('path'); +const webpack = require('webpack'); module.exports = { entry: [