Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making sure _initialize routine kicks off regardless of options. #181

Merged
merged 1 commit into from
Oct 26, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions grunt.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = function(grunt) {
"src/sync.js", "src/sync.js",
"src/builder.js", "src/builder.js",
"src/product.js", "src/product.js",
"src/derived.js",
"src/importer.js", "src/importer.js",
"src/importers/local.js", "src/importers/local.js",
"src/importers/remote.js", "src/importers/remote.js",
Expand All @@ -45,7 +44,8 @@ module.exports = function(grunt) {
"src/parsers/strict.js", "src/parsers/strict.js",
"src/parsers/object.js", "src/parsers/object.js",
"src/parsers/google_spreadsheet.js", "src/parsers/google_spreadsheet.js",
"src/parsers/delimited.js" "src/parsers/delimited.js",
"src/derived.js"
] ]
}, },


Expand Down
8 changes: 4 additions & 4 deletions src/constructor.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
*/ */
global.Miso = global.Miso || {}; global.Miso = global.Miso || {};
global.Miso.Dataset = function(options) { global.Miso.Dataset = function(options) {

options = options || {};

this.length = 0; this.length = 0;


this._columns = []; this._columns = [];
this._columnPositionByName = {}; this._columnPositionByName = {};
this._computedColumns = []; this._computedColumns = [];


if (typeof options !== "undefined") { this._initialize(options);
options = options || {};
this._initialize(options);
}
}; };
}(this)); }(this));
25 changes: 13 additions & 12 deletions test/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<script src="../src/view.js"></script> <script src="../src/view.js"></script>
<script src="../src/product.js"></script> <script src="../src/product.js"></script>
<script src="../src/dataset.js"></script> <script src="../src/dataset.js"></script>
<script src="../src/derived.js"></script>
<script src="../src/importer.js"></script> <script src="../src/importer.js"></script>
<script src="../src/importers/local.js"></script> <script src="../src/importers/local.js"></script>
<script src="../src/importers/remote.js"></script> <script src="../src/importers/remote.js"></script>
Expand All @@ -38,6 +37,7 @@
<script src="../src/parsers/object.js"></script> <script src="../src/parsers/object.js"></script>
<script src="../src/parsers/google_spreadsheet.js"></script> <script src="../src/parsers/google_spreadsheet.js"></script>
<script src="../src/parsers/delimited.js"></script> <script src="../src/parsers/delimited.js"></script>
<script src="../src/derived.js"></script>


<!-- Load data sets --> <!-- Load data sets -->
<script src="data/short_obj.js"></script> <script src="data/short_obj.js"></script>
Expand All @@ -54,17 +54,6 @@


<script src="unit/helpers.js"></script> <script src="unit/helpers.js"></script>


<!-- load test modules -->
<script src="unit/events.js"></script>
<script src="unit/types.js"></script>
<script src="unit/core.js"></script>
<script src="unit/dataset.js"></script>
<script src="unit/views.js"></script>
<script src="unit/importers.js"></script>
<script src="unit/products.js"></script>
<script src="unit/speed.js"></script>
<script src="unit/derived.js"></script>
<script src="unit/bugs.js"></script>


</head> </head>
<body> <body>
Expand All @@ -77,5 +66,17 @@ <h2 id="qunit-userAgent"></h2>
<br /> <br />
<h1 class="qunit-header">Speed Suite</h1> <h1 class="qunit-header">Speed Suite</h1>
</div> </div>

<!-- load test modules -->
<script src="unit/events.js"></script>
<script src="unit/types.js"></script>
<script src="unit/core.js"></script>
<script src="unit/dataset.js"></script>
<script src="unit/views.js"></script>
<script src="unit/importers.js"></script>
<script src="unit/products.js"></script>
<script src="unit/speed.js"></script>
<script src="unit/derived.js"></script>
<script src="unit/bugs.js"></script>
</body> </body>
</html> </html>