wingman_rails 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,8 @@
58
58
  exports.localStorage = localStorage;
59
59
  }
60
60
 
61
+ exports.Object = require('./wingman/shared/object');
62
+
61
63
  exports.request = require('./wingman/request');
62
64
 
63
65
  exports.Template = require('./wingman/template');
@@ -82,7 +84,7 @@
82
84
 
83
85
  }).call(this);
84
86
  }, "wingman/application": function(exports, require, module) {(function() {
85
- var Application, Events, Fleck, Navigator, Wingman, WingmanObject,
87
+ var Application, Events, Fleck, Navigator, Wingman,
86
88
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
87
89
  __hasProp = Object.prototype.hasOwnProperty,
88
90
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
@@ -91,8 +93,6 @@
91
93
 
92
94
  Events = require('./shared/events');
93
95
 
94
- WingmanObject = require('./shared/object');
95
-
96
96
  Navigator = require('./shared/navigator');
97
97
 
98
98
  Fleck = require('fleck');
@@ -192,17 +192,15 @@
192
192
 
193
193
  return Application;
194
194
 
195
- })(WingmanObject);
195
+ })(Wingman.Object);
196
196
 
197
197
  }).call(this);
198
198
  }, "wingman/controller": function(exports, require, module) {(function() {
199
- var Navigator, Wingman, WingmanObject,
199
+ var Navigator, Wingman,
200
200
  __hasProp = Object.prototype.hasOwnProperty,
201
201
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; },
202
202
  __slice = Array.prototype.slice;
203
203
 
204
- WingmanObject = require('./shared/object');
205
-
206
204
  Wingman = require('../wingman');
207
205
 
208
206
  Navigator = require('./shared/navigator');
@@ -247,19 +245,17 @@
247
245
 
248
246
  return _Class;
249
247
 
250
- })(WingmanObject);
248
+ })(Wingman.Object);
251
249
 
252
250
  }).call(this);
253
251
  }, "wingman/model": function(exports, require, module) {(function() {
254
- var Fleck, HasManyAssociation, Model, StorageAdapter, Wingman, WingmanObject,
252
+ var Fleck, HasManyAssociation, Model, StorageAdapter, Wingman,
255
253
  __hasProp = Object.prototype.hasOwnProperty,
256
254
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; },
257
255
  __slice = Array.prototype.slice;
258
256
 
259
257
  Wingman = require('../wingman');
260
258
 
261
- WingmanObject = require('./shared/object');
262
-
263
259
  StorageAdapter = require('./model/storage_adapter');
264
260
 
265
261
  HasManyAssociation = require('./model/has_many_association');
@@ -442,7 +438,7 @@
442
438
 
443
439
  return Model;
444
440
 
445
- })(WingmanObject);
441
+ })(Wingman.Object);
446
442
 
447
443
  }).call(this);
448
444
  }, "wingman/model/has_many_association": function(exports, require, module) {(function() {
@@ -1232,7 +1228,7 @@
1232
1228
 
1233
1229
  }).call(this);
1234
1230
  }, "wingman/store/collection": function(exports, require, module) {(function() {
1235
- var Events, Module, Scope, Store,
1231
+ var Collection, Events, Module, Scope,
1236
1232
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
1237
1233
  __hasProp = Object.prototype.hasOwnProperty,
1238
1234
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
@@ -1243,17 +1239,17 @@
1243
1239
 
1244
1240
  Scope = require('./scope');
1245
1241
 
1246
- module.exports = Store = (function(_super) {
1242
+ module.exports = Collection = (function(_super) {
1247
1243
 
1248
- __extends(Store, _super);
1244
+ __extends(Collection, _super);
1249
1245
 
1250
- Store.include(Events);
1246
+ Collection.include(Events);
1251
1247
 
1252
- function Store() {
1248
+ function Collection() {
1253
1249
  this.remove = __bind(this.remove, this); this.models = {};
1254
1250
  }
1255
1251
 
1256
- Store.prototype.add = function(model) {
1252
+ Collection.prototype.add = function(model) {
1257
1253
  if (!model.get('id')) throw new Error('Model must have ID to be stored.');
1258
1254
  if (this.exists(model)) {
1259
1255
  return this.update(this.models[model.get('id')], model);
@@ -1262,13 +1258,13 @@
1262
1258
  }
1263
1259
  };
1264
1260
 
1265
- Store.prototype.insert = function(model) {
1261
+ Collection.prototype.insert = function(model) {
1266
1262
  this.models[model.get('id')] = model;
1267
1263
  this.trigger('add', model);
1268
1264
  return model.bind('flush', this.remove);
1269
1265
  };
1270
1266
 
1271
- Store.prototype.update = function(model, model2) {
1267
+ Collection.prototype.update = function(model, model2) {
1272
1268
  var key, value, _ref, _results;
1273
1269
  _ref = model2.toJSON();
1274
1270
  _results = [];
@@ -1283,25 +1279,25 @@
1283
1279
  return _results;
1284
1280
  };
1285
1281
 
1286
- Store.prototype.find = function(id) {
1282
+ Collection.prototype.find = function(id) {
1287
1283
  return this.models[id];
1288
1284
  };
1289
1285
 
1290
- Store.prototype.count = function() {
1286
+ Collection.prototype.count = function() {
1291
1287
  return Object.keys(this.models).length;
1292
1288
  };
1293
1289
 
1294
- Store.prototype.remove = function(model) {
1290
+ Collection.prototype.remove = function(model) {
1295
1291
  delete this.models[model.get('id')];
1296
1292
  model.unbind(this.remove);
1297
1293
  return this.trigger('remove', model);
1298
1294
  };
1299
1295
 
1300
- Store.prototype.exists = function(model) {
1296
+ Collection.prototype.exists = function(model) {
1301
1297
  return !!this.models[model.get('id')];
1302
1298
  };
1303
1299
 
1304
- Store.prototype.forEach = function(callback) {
1300
+ Collection.prototype.forEach = function(callback) {
1305
1301
  var key, value, _ref, _results;
1306
1302
  _ref = this.models;
1307
1303
  _results = [];
@@ -1312,17 +1308,17 @@
1312
1308
  return _results;
1313
1309
  };
1314
1310
 
1315
- Store.prototype.scoped = function(params) {
1311
+ Collection.prototype.scoped = function(params) {
1316
1312
  return new Scope(this, params);
1317
1313
  };
1318
1314
 
1319
- Store.prototype.flush = function() {
1315
+ Collection.prototype.flush = function() {
1320
1316
  return this.forEach(function(model) {
1321
1317
  return model.flush();
1322
1318
  });
1323
1319
  };
1324
1320
 
1325
- return Store;
1321
+ return Collection;
1326
1322
 
1327
1323
  })(Module);
1328
1324
 
@@ -2157,15 +2153,13 @@
2157
2153
 
2158
2154
  }).call(this);
2159
2155
  }, "wingman/view": function(exports, require, module) {(function() {
2160
- var Elementary, Fleck, STYLE_NAMES, View, Wingman, WingmanObject,
2156
+ var Elementary, Fleck, STYLE_NAMES, View, Wingman,
2161
2157
  __hasProp = Object.prototype.hasOwnProperty,
2162
2158
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; },
2163
2159
  __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
2164
2160
 
2165
2161
  Wingman = require('../wingman');
2166
2162
 
2167
- WingmanObject = require('./shared/object');
2168
-
2169
2163
  Elementary = require('./shared/elementary');
2170
2164
 
2171
2165
  Fleck = require('fleck');
@@ -2402,7 +2396,7 @@
2402
2396
 
2403
2397
  return View;
2404
2398
 
2405
- })(WingmanObject);
2399
+ })(Wingman.Object);
2406
2400
 
2407
2401
  }).call(this);
2408
2402
  }, "strscan": function(exports, require, module) {(function() {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wingman_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-20 00:00:00.000000000 Z
12
+ date: 2012-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70146552251740 !ruby/object:Gem::Requirement
16
+ requirement: &70265883248260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: '5.0'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70146552251740
27
+ version_requirements: *70265883248260
28
28
  description: This gem provides Wingman for your Rails 3 application.
29
29
  email:
30
30
  - rasmusrnielsen@gmail.com