Skip to content

Commit

Permalink
Merge pull request #23 from adobe/config-test-options
Browse files Browse the repository at this point in the history
Cleaned up user-facing configuration options.
  • Loading branch information
Aaronius authored May 10, 2019
2 parents f4b1905 + e596d05 commit 6526236
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
12 changes: 0 additions & 12 deletions sandbox/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@

<script>
alloy("configure", {
orgID: 12345,
propertyID: 9999999,
dataSet: "dataset1",
shouldStoreCollectedData: 1,
device: "Chrome-Mac",
collectionUrl: "https://edgegateway.azurewebsites.net",
// collectionUrl: "http://ex-edge.stable-stage.aam-npe.adobeinternal.net/v1",
destinationsEnabled: true,
debug: true
});
Expand All @@ -46,13 +40,7 @@

// For Testing multiple instances
organizationTwo("configure", {
orgID: 67890,
propertyID: 8888888,
dataSet: "dataset2",
shouldStoreCollectedData: 1,
device: "Chrome-Mac",
collectionUrl: "https://edgegateway.azurewebsites.net",
// collectionUrl: "http://ex-edge.stable-stage.aam-npe.adobeinternal.net/v1",
destinationsEnabled: true,
debug: true
});
Expand Down
5 changes: 0 additions & 5 deletions sandbox/src/OrgTwo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ export default function OrgTwo() {
<code>
{`
organizationTwo("configure", {
orgID: 67890,
propertyID: 8888888,
dataSet: "dataset2",
shouldStoreCollectedData: 1,
device: "Chrome-Mac",
collectionUrl: "https://edgegateway.azurewebsites.net",
destinationsEnabled: true,
debug: true
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/DataCollector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ governing permissions and limitations under the License.

import createRequest from "../../core/createRequest";
import createEvent from "../../core/createEvent";
import { required } from "../../core/createConfig";

const createDataCollector = ({ config }) => {
let lifecycle;
Expand Down Expand Up @@ -52,7 +51,8 @@ createDataCollector.namespace = "DataCollector";

createDataCollector.configValidators = {
collectionUrl: {
validate: required
defaultValue: "https://edgegateway.azurewebsites.net"
// defaultValue: "http://ex-edge.stable-stage.aam-npe.adobeinternal.net/v1"
},
device: {
defaultValue: "UNKNOWN-DEVICE"
Expand Down
5 changes: 3 additions & 2 deletions src/core/createInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import { isFunction, toError } from "../utils";
import createConfig, { required } from "./createConfig";

const configValidators = {
orgID: { validate: required },
propertyID: { validate: required },
dataSet: { validate: required }
// TODO: For debugging purposes only. Remove eventually.
shouldStoreCollectedData: { defaultValue: 1 },
device: { defaultValue: "Chrome-Mac" }
};

export default (namespace, initializeComponents, debugController) => {
Expand Down

0 comments on commit 6526236

Please sign in to comment.