ngmin-rails 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f538885bb7509f88be8328e0c517786dd8873a8
4
- data.tar.gz: d7d510dc0666a2e7b6a556ffc992dbdb36a59164
3
+ metadata.gz: 8ee3f4af81682c497f3c5453e862ce80015943e7
4
+ data.tar.gz: 0e092f6227d7a6b5566203d6a3b58d1c564dad7b
5
5
  SHA512:
6
- metadata.gz: 7f7182b95d3504f90e9b06fc6cbd27f2e7ef796d0ab3bd42a15020700e60875f072ed4d660097ba0e5b3f01305083945482d5526efd82ce856247d435a3cb8cd
7
- data.tar.gz: 0c6d1b5781f756c0856a288c3de3710a5f2537b9911b9efb688abcfb69a2adbe31dcabfe3776dd0a8deb80365394f74bfcf7f66e8ca1de1e9fff3fbdba21c980
6
+ metadata.gz: 092380b00be257fed6f85fe14da31e92ad7e101c7e674b2edae5af88301ade9fb000b0fb743e0b8d114423a4f186eb1c9d5dfc78cfe3327f98f286d06f7d676b
7
+ data.tar.gz: f6cb10e02217d87b55bf7d66fcaf80edc26aa1b73c0db615ee21b5e78ba8c8fed398eecd9b487f5cb0c0829efb18d312d318939c81bcc5db356e4b9f31b4428b
data/Rakefile CHANGED
@@ -26,7 +26,9 @@ end
26
26
  File.open('lib/ngmin/rails/version.rb', 'w') { |f| f.write text }
27
27
  end
28
28
 
29
- desc "Build a new version of ngmin-browserified.js"
30
- task :build do
31
- install_ngmin && generate_ngmin && update_version
29
+ namespace :ngmin do
30
+ desc "Build a new version of ngmin-browserified.js"
31
+ task :build do
32
+ install_ngmin && generate_ngmin && update_version
33
+ end
32
34
  end
@@ -1,5 +1,5 @@
1
1
  module Ngmin
2
2
  module Rails
3
- VERSION = "0.3.7"
3
+ VERSION = "0.3.8"
4
4
  end
5
5
  end
@@ -927,7 +927,7 @@ parseStatement: true, parseSourceElement: true */
927
927
  str += '\f';
928
928
  break;
929
929
  case 'v':
930
- str += '\v';
930
+ str += '\x0B';
931
931
  break;
932
932
 
933
933
  default:
@@ -1429,16 +1429,24 @@ parseStatement: true, parseSourceElement: true */
1429
1429
  expect('(');
1430
1430
  token = lookahead();
1431
1431
  if (token.type !== Token.Identifier) {
1432
- throwUnexpected(lex());
1432
+ expect(')');
1433
+ throwErrorTolerant(token, Messages.UnexpectedToken, token.value);
1434
+ return {
1435
+ type: Syntax.Property,
1436
+ key: key,
1437
+ value: parsePropertyFunction([]),
1438
+ kind: 'set'
1439
+ };
1440
+ } else {
1441
+ param = [ parseVariableIdentifier() ];
1442
+ expect(')');
1443
+ return {
1444
+ type: Syntax.Property,
1445
+ key: key,
1446
+ value: parsePropertyFunction(param, token),
1447
+ kind: 'set'
1448
+ };
1433
1449
  }
1434
- param = [ parseVariableIdentifier() ];
1435
- expect(')');
1436
- return {
1437
- type: Syntax.Property,
1438
- key: key,
1439
- value: parsePropertyFunction(param, token),
1440
- kind: 'set'
1441
- };
1442
1450
  } else {
1443
1451
  expect(':');
1444
1452
  return {
@@ -1785,7 +1793,8 @@ parseStatement: true, parseSourceElement: true */
1785
1793
  expr = {
1786
1794
  type: Syntax.UnaryExpression,
1787
1795
  operator: lex().value,
1788
- argument: parseUnaryExpression()
1796
+ argument: parseUnaryExpression(),
1797
+ prefix: true
1789
1798
  };
1790
1799
  return expr;
1791
1800
  }
@@ -1794,7 +1803,8 @@ parseStatement: true, parseSourceElement: true */
1794
1803
  expr = {
1795
1804
  type: Syntax.UnaryExpression,
1796
1805
  operator: lex().value,
1797
- argument: parseUnaryExpression()
1806
+ argument: parseUnaryExpression(),
1807
+ prefix: true
1798
1808
  };
1799
1809
  if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
1800
1810
  throwErrorTolerant({}, Messages.StrictDelete);
@@ -2135,13 +2145,13 @@ parseStatement: true, parseSourceElement: true */
2135
2145
  function parseVariableDeclarationList(kind) {
2136
2146
  var list = [];
2137
2147
 
2138
- while (index < length) {
2148
+ do {
2139
2149
  list.push(parseVariableDeclaration(kind));
2140
2150
  if (!match(',')) {
2141
2151
  break;
2142
2152
  }
2143
2153
  lex();
2144
- }
2154
+ } while (index < length);
2145
2155
 
2146
2156
  return list;
2147
2157
  }
@@ -2681,13 +2691,16 @@ parseStatement: true, parseSourceElement: true */
2681
2691
  expectKeyword('catch');
2682
2692
 
2683
2693
  expect('(');
2684
- if (!match(')')) {
2685
- param = parseExpression();
2686
- // 12.14.1
2687
- if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
2688
- throwErrorTolerant({}, Messages.StrictCatchVariable);
2689
- }
2694
+ if (match(')')) {
2695
+ throwUnexpected(lookahead());
2696
+ }
2697
+
2698
+ param = parseVariableIdentifier();
2699
+ // 12.14.1
2700
+ if (strict && isRestrictedWord(param.name)) {
2701
+ throwErrorTolerant({}, Messages.StrictCatchVariable);
2690
2702
  }
2703
+
2691
2704
  expect(')');
2692
2705
 
2693
2706
  return {
@@ -3896,7 +3909,7 @@ parseStatement: true, parseSourceElement: true */
3896
3909
  }
3897
3910
 
3898
3911
  // Sync with package.json.
3899
- exports.version = '1.0.2';
3912
+ exports.version = '1.0.3';
3900
3913
 
3901
3914
  exports.parse = parse;
3902
3915
 
@@ -4136,6 +4149,26 @@ module.exports = [
4136
4149
  ]
4137
4150
  },
4138
4151
 
4152
+ {
4153
+ "type": "CallExpression",
4154
+ "callee": {
4155
+ "type": "MemberExpression",
4156
+ "object": {
4157
+ "ngModule": true
4158
+ },
4159
+ "property": {
4160
+ "type": "Identifier",
4161
+ "name": "provider"
4162
+ }
4163
+ },
4164
+ "arguments": [
4165
+ {},
4166
+ {
4167
+ "type": "ObjectExpression"
4168
+ }
4169
+ ]
4170
+ },
4171
+
4139
4172
  {
4140
4173
  "type": "CallExpression",
4141
4174
  "callee": {
@@ -4186,7 +4219,7 @@ module.exports = {
4186
4219
  // return an AST chunk representing an annotation array
4187
4220
  var annotateInjectable = module.exports = function (originalFn) {
4188
4221
  // if there's nothing to inject, don't annotate
4189
- if (originalFn.params.length === 0) {
4222
+ if (!originalFn.params || originalFn.params.length === 0) {
4190
4223
  return originalFn;
4191
4224
  }
4192
4225
 
@@ -6629,7 +6662,7 @@ var markASTModules = module.exports = function (syntax) {
6629
6662
  return changed;
6630
6663
  };
6631
6664
 
6632
- },{"../signatures/module":9,"./deep-apply":6,"../signatures/simple":8,"../signatures/decl":10,"../signatures/assign":11,"clone":16}],13:[function(require,module,exports){
6665
+ },{"./deep-apply":6,"../signatures/module":9,"../signatures/simple":8,"../signatures/decl":10,"../signatures/assign":11,"clone":16}],13:[function(require,module,exports){
6633
6666
  /*
6634
6667
  * Checks each property of the standard recursively against the candidate,
6635
6668
  * ignoring additional properties of the candidate.
@@ -11216,7 +11249,9 @@ SlowBuffer.prototype.writeDoubleBE = Buffer.prototype.writeDoubleBE;
11216
11249
  ;;module.exports=require("buffer-browserify")
11217
11250
 
11218
11251
  },{}],16:[function(require,module,exports){
11219
- (function(Buffer){var util = require('util');
11252
+ (function(Buffer){"use strict";
11253
+
11254
+ var util = require('util');
11220
11255
 
11221
11256
  module.exports = clone;
11222
11257
 
@@ -11240,60 +11275,61 @@ function clone(parent, circular) {
11240
11275
 
11241
11276
  var useBuffer = typeof Buffer != 'undefined';
11242
11277
 
11243
- var i;
11244
- if (circular) {
11245
- var circularParent = {};
11246
- var circularResolved = {};
11247
- var circularReplace = [];
11248
- function _clone(parent, context, child, cIndex) {
11249
- var i; // Use local context within this function
11250
- // Deep clone all properties of parent into child
11251
- if (typeof parent == 'object') {
11252
- if (parent == null)
11253
- return parent;
11254
- // Check for circular references
11255
- for(i in circularParent)
11256
- if (circularParent[i] === parent) {
11257
- // We found a circular reference
11258
- circularReplace.push({'resolveTo': i, 'child': child, 'i': cIndex});
11259
- return null; //Just return null for now...
11260
- // we will resolve circular references later
11261
- }
11262
-
11263
- // Add to list of all parent objects
11264
- circularParent[context] = parent;
11265
- // Now continue cloning...
11266
- if (util.isArray(parent)) {
11267
- child = [];
11268
- for(i in parent)
11269
- child[i] = _clone(parent[i], context + '[' + i + ']', child, i);
11270
- }
11271
- else if (util.isDate(parent))
11272
- child = new Date(parent.getTime());
11273
- else if (util.isRegExp(parent))
11274
- child = new RegExp(parent.source);
11275
- else if (useBuffer && Buffer.isBuffer(parent))
11276
- {
11277
- child = new Buffer(parent.length);
11278
- parent.copy(child);
11279
- }
11280
- else {
11281
- child = {};
11278
+ var circularParent = {};
11279
+ var circularResolved = {};
11280
+ var circularReplace = [];
11282
11281
 
11283
- // Also copy prototype over to new cloned object
11284
- child.__proto__ = parent.__proto__;
11285
- for(i in parent)
11286
- child[i] = _clone(parent[i], context + '[' + i + ']', child, i);
11287
- }
11282
+ function _clone(parent, context, child, cIndex) {
11283
+ var i; // Use local context within this function
11284
+ // Deep clone all properties of parent into child
11285
+ if (typeof parent == 'object') {
11286
+ if (parent == null)
11287
+ return parent;
11288
+ // Check for circular references
11289
+ for(i in circularParent)
11290
+ if (circularParent[i] === parent) {
11291
+ // We found a circular reference
11292
+ circularReplace.push({'resolveTo': i, 'child': child, 'i': cIndex});
11293
+ return null; //Just return null for now...
11294
+ // we will resolve circular references later
11295
+ }
11296
+
11297
+ // Add to list of all parent objects
11298
+ circularParent[context] = parent;
11299
+ // Now continue cloning...
11300
+ if (util.isArray(parent)) {
11301
+ child = [];
11302
+ for(i in parent)
11303
+ child[i] = _clone(parent[i], context + '[' + i + ']', child, i);
11304
+ }
11305
+ else if (util.isDate(parent))
11306
+ child = new Date(parent.getTime());
11307
+ else if (util.isRegExp(parent))
11308
+ child = new RegExp(parent.source);
11309
+ else if (useBuffer && Buffer.isBuffer(parent))
11310
+ {
11311
+ child = new Buffer(parent.length);
11312
+ parent.copy(child);
11313
+ }
11314
+ else {
11315
+ child = {};
11288
11316
 
11289
- // Add to list of all cloned objects
11290
- circularResolved[context] = child;
11317
+ // Also copy prototype over to new cloned object
11318
+ child.__proto__ = parent.__proto__;
11319
+ for(i in parent)
11320
+ child[i] = _clone(parent[i], context + '[' + i + ']', child, i);
11291
11321
  }
11292
- else
11293
- child = parent; //Just a simple shallow copy will do
11294
- return child;
11322
+
11323
+ // Add to list of all cloned objects
11324
+ circularResolved[context] = child;
11295
11325
  }
11326
+ else
11327
+ child = parent; //Just a simple shallow copy will do
11328
+ return child;
11329
+ }
11296
11330
 
11331
+ var i;
11332
+ if (circular) {
11297
11333
  var cloned = _clone(parent, '*');
11298
11334
 
11299
11335
  // Now this object has been cloned. Let's check to see if there are any
@@ -11305,8 +11341,7 @@ function clone(parent, circular) {
11305
11341
  }
11306
11342
  }
11307
11343
  return cloned;
11308
- }
11309
- else {
11344
+ } else {
11310
11345
  // Deep clone all properties of parent into child
11311
11346
  var child;
11312
11347
  if (typeof parent == 'object') {
@@ -11589,6 +11624,8 @@ EventEmitter.prototype.listeners = function(type) {
11589
11624
 
11590
11625
  })(require("__browserify_process"))
11591
11626
  },{"__browserify_process":24}],20:[function(require,module,exports){
11627
+ "use strict";
11628
+
11592
11629
  /**
11593
11630
  * Simple flat clone using prototype, accepts only objects, usefull for property
11594
11631
  * override on FLAT configuration object (no nested props).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngmin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Morrison
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-11 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails