Skip to content

Commit

Permalink
import entire Utils file
Browse files Browse the repository at this point in the history
  • Loading branch information
rawls238 committed Aug 19, 2015
1 parent 3b3880c commit 5457d19
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions dist/react-experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ return /******/ (function(modules) { // webpackBootstrap

var ExperimentEnrollment = _interopRequire(__webpack_require__(3));

var suppressAutoExposureLogging = __webpack_require__(5).suppressAutoExposureLogging;
var Utils = _interopRequire(__webpack_require__(5));

var Experiment = React.createClass({
displayName: "Experiment",
Expand Down Expand Up @@ -135,7 +135,7 @@ return /******/ (function(modules) { // webpackBootstrap
return;
}

experiment = suppressAutoExposureLogging(this.props.experimentClass);
experiment = Utils.suppressAutoExposureLogging(this.props.experimentClass);
this.setState({
exposedVariation: experiment.get(param)
});
Expand Down Expand Up @@ -220,7 +220,7 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";

module.exports = {
suppressExposureLogging: function suppressExposureLogging(experimentClass) {
suppressAutoExposureLogging: function suppressAutoExposureLogging(experimentClass) {
if (experimentClass.setAutoExposureLogging && typeof experimentClass.setAutoExposureLogging == "function") {
experimentClass.setAutoExposureLogging(false);
}
Expand All @@ -246,7 +246,7 @@ return /******/ (function(modules) { // webpackBootstrap

var ExperimentEnrollment = _interopRequire(__webpack_require__(3));

var suppressAutoExposureLogging = __webpack_require__(5).suppressAutoExposureLogging;
var Utils = _interopRequire(__webpack_require__(5));

var Namespace = React.createClass({
displayName: "Namespace",
Expand All @@ -268,7 +268,7 @@ return /******/ (function(modules) { // webpackBootstrap
},

enrollInNamespace: function enrollInNamespace(component, child) {
var experiment = suppressAutoExposureLogging(this.props.experimentClass);
var experiment = Utils.suppressAutoExposureLogging(this.props.experimentClass);
if (child.props.displayName === DEFAULT_EXPERIMENT_COMPONENT) {
component.defaultComponent = child;
} else if (child.props.isEnrolled) {
Expand Down
2 changes: 1 addition & 1 deletion dist/react-experiments.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/experiment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ExperimentEnrollment from './experimentEnrollment';
import {suppressAutoExposureLogging} from './utils';
import Utils from './utils';

export const Experiment = React.createClass({
getDefaultProps() {
Expand Down Expand Up @@ -39,7 +39,7 @@ export const Experiment = React.createClass({
return;
}

experiment = suppressAutoExposureLogging(this.props.experimentClass);
experiment = Utils.suppressAutoExposureLogging(this.props.experimentClass);
this.setState({
exposedVariation: experiment.get(param)
});
Expand Down
4 changes: 2 additions & 2 deletions src/namespace.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {DEFAULT_EXPERIMENT_COMPONENT} from './constants';
import ExperimentEnrollment from './experimentEnrollment';
import {suppressAutoExposureLogging} from './utils';
import Utils from './utils';

export const Namespace = React.createClass({
getEnrolledExperiment() {
Expand All @@ -19,7 +19,7 @@ export const Namespace = React.createClass({
},

enrollInNamespace(component, child) {
const experiment = suppressAutoExposureLogging(this.props.experimentClass);
const experiment = Utils.suppressAutoExposureLogging(this.props.experimentClass);
if (child.props.displayName === DEFAULT_EXPERIMENT_COMPONENT) {
component.defaultComponent = child;
} else if (child.props.isEnrolled) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
suppressExposureLogging(experimentClass) {
suppressAutoExposureLogging(experimentClass) {
if (experimentClass.setAutoExposureLogging && typeof(experimentClass.setAutoExposureLogging) == "function") {
experimentClass.setAutoExposureLogging(false);
}
Expand Down

0 comments on commit 5457d19

Please sign in to comment.