polymer-rails 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  * Code distributed by Google as part of the polymer project is also
8
8
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
9
  */
10
- // @version 0.7.3
10
+ // @version 0.7.5
11
11
  window.WebComponents = window.WebComponents || {};
12
12
 
13
13
  (function(scope) {
@@ -920,19 +920,19 @@ window.HTMLImports = window.HTMLImports || {
920
920
  var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
921
921
  var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
922
922
  var wrap = function(node) {
923
- return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
923
+ return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
924
924
  };
925
925
  var rootDocument = wrap(document);
926
926
  var currentScriptDescriptor = {
927
927
  get: function() {
928
- var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
928
+ var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
929
929
  return wrap(script);
930
930
  },
931
931
  configurable: true
932
932
  };
933
933
  Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
934
934
  Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
935
- var isIE = /Trident|Edge/.test(navigator.userAgent);
935
+ var isIE = /Trident/.test(navigator.userAgent);
936
936
  function whenReady(callback, doc) {
937
937
  doc = doc || rootDocument;
938
938
  whenDocumentReady(function() {
@@ -1041,8 +1041,8 @@ window.HTMLImports = window.HTMLImports || {
1041
1041
  })();
1042
1042
  }
1043
1043
  whenReady(function(detail) {
1044
- HTMLImports.ready = true;
1045
- HTMLImports.readyTime = new Date().getTime();
1044
+ window.HTMLImports.ready = true;
1045
+ window.HTMLImports.readyTime = new Date().getTime();
1046
1046
  var evt = rootDocument.createEvent("CustomEvent");
1047
1047
  evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
1048
1048
  rootDocument.dispatchEvent(evt);
@@ -1316,8 +1316,8 @@ window.HTMLImports.addModule(function(scope) {
1316
1316
  }
1317
1317
  },
1318
1318
  parseImport: function(elt) {
1319
- if (HTMLImports.__importsParsingHook) {
1320
- HTMLImports.__importsParsingHook(elt);
1319
+ if (window.HTMLImports.__importsParsingHook) {
1320
+ window.HTMLImports.__importsParsingHook(elt);
1321
1321
  }
1322
1322
  if (elt.import) {
1323
1323
  elt.import.__importParsed = true;
@@ -1629,6 +1629,13 @@ window.HTMLImports.addModule(function(scope) {
1629
1629
  params = params || {};
1630
1630
  var e = document.createEvent("CustomEvent");
1631
1631
  e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
1632
+ e.preventDefault = function() {
1633
+ Object.defineProperty(this, "defaultPrevented", {
1634
+ get: function() {
1635
+ return true;
1636
+ }
1637
+ });
1638
+ };
1632
1639
  return e;
1633
1640
  };
1634
1641
  window.CustomEvent.prototype = window.Event.prototype;
@@ -1636,7 +1643,7 @@ window.HTMLImports.addModule(function(scope) {
1636
1643
  initializeModules();
1637
1644
  var rootDocument = scope.rootDocument;
1638
1645
  function bootstrap() {
1639
- HTMLImports.importer.bootDocument(rootDocument);
1646
+ window.HTMLImports.importer.bootDocument(rootDocument);
1640
1647
  }
1641
1648
  if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
1642
1649
  bootstrap();
@@ -1663,11 +1670,11 @@ window.CustomElements = window.CustomElements || {
1663
1670
  scope.addModule = addModule;
1664
1671
  scope.initializeModules = initializeModules;
1665
1672
  scope.hasNative = Boolean(document.registerElement);
1666
- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
1673
+ scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
1667
1674
  })(window.CustomElements);
1668
1675
 
1669
1676
  window.CustomElements.addModule(function(scope) {
1670
- var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
1677
+ var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
1671
1678
  function forSubtree(node, cb) {
1672
1679
  findAllElements(node, function(e) {
1673
1680
  if (cb(e)) {
@@ -1704,7 +1711,7 @@ window.CustomElements.addModule(function(scope) {
1704
1711
  _forDocumentTree(doc, cb, []);
1705
1712
  }
1706
1713
  function _forDocumentTree(doc, cb, processingDocuments) {
1707
- doc = wrap(doc);
1714
+ doc = window.wrap(doc);
1708
1715
  if (processingDocuments.indexOf(doc) >= 0) {
1709
1716
  return;
1710
1717
  }
@@ -1866,9 +1873,9 @@ window.CustomElements.addModule(function(scope) {
1866
1873
  flags.dom && console.groupEnd();
1867
1874
  }
1868
1875
  function takeRecords(node) {
1869
- node = wrap(node);
1876
+ node = window.wrap(node);
1870
1877
  if (!node) {
1871
- node = wrap(document);
1878
+ node = window.wrap(document);
1872
1879
  }
1873
1880
  while (node.parentNode) {
1874
1881
  node = node.parentNode;
@@ -1892,7 +1899,7 @@ window.CustomElements.addModule(function(scope) {
1892
1899
  inRoot.__observer = observer;
1893
1900
  }
1894
1901
  function upgradeDocument(doc) {
1895
- doc = wrap(doc);
1902
+ doc = window.wrap(doc);
1896
1903
  flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
1897
1904
  addedNode(doc);
1898
1905
  observe(doc);
@@ -1905,7 +1912,7 @@ window.CustomElements.addModule(function(scope) {
1905
1912
  if (originalCreateShadowRoot) {
1906
1913
  Element.prototype.createShadowRoot = function() {
1907
1914
  var root = originalCreateShadowRoot.call(this);
1908
- CustomElements.watchShadow(this);
1915
+ window.CustomElements.watchShadow(this);
1909
1916
  return root;
1910
1917
  };
1911
1918
  }
@@ -2211,8 +2218,8 @@ window.CustomElements.addModule(function(scope) {
2211
2218
  var upgradeDocumentTree = scope.upgradeDocumentTree;
2212
2219
  if (!window.wrap) {
2213
2220
  if (window.ShadowDOMPolyfill) {
2214
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
2215
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
2221
+ window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
2222
+ window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
2216
2223
  } else {
2217
2224
  window.wrap = window.unwrap = function(node) {
2218
2225
  return node;
@@ -2220,17 +2227,17 @@ window.CustomElements.addModule(function(scope) {
2220
2227
  }
2221
2228
  }
2222
2229
  function bootstrap() {
2223
- upgradeDocumentTree(wrap(document));
2230
+ upgradeDocumentTree(window.wrap(document));
2224
2231
  if (window.HTMLImports) {
2225
- HTMLImports.__importsParsingHook = function(elt) {
2232
+ window.HTMLImports.__importsParsingHook = function(elt) {
2226
2233
  upgradeDocumentTree(wrap(elt.import));
2227
2234
  };
2228
2235
  }
2229
- CustomElements.ready = true;
2236
+ window.CustomElements.ready = true;
2230
2237
  setTimeout(function() {
2231
- CustomElements.readyTime = Date.now();
2238
+ window.CustomElements.readyTime = Date.now();
2232
2239
  if (window.HTMLImports) {
2233
- CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
2240
+ window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
2234
2241
  }
2235
2242
  document.dispatchEvent(new CustomEvent("WebComponentsReady", {
2236
2243
  bubbles: true
@@ -2242,6 +2249,13 @@ window.CustomElements.addModule(function(scope) {
2242
2249
  params = params || {};
2243
2250
  var e = document.createEvent("CustomEvent");
2244
2251
  e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
2252
+ e.preventDefault = function() {
2253
+ Object.defineProperty(this, "defaultPrevented", {
2254
+ get: function() {
2255
+ return true;
2256
+ }
2257
+ });
2258
+ };
2245
2259
  return e;
2246
2260
  };
2247
2261
  window.CustomEvent.prototype = window.Event.prototype;
@@ -2251,7 +2265,7 @@ window.CustomElements.addModule(function(scope) {
2251
2265
  } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
2252
2266
  bootstrap();
2253
2267
  } else {
2254
- var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
2268
+ var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
2255
2269
  window.addEventListener(loadEvent, bootstrap);
2256
2270
  }
2257
2271
  scope.isIE11OrOlder = isIE11OrOlder;
@@ -2277,7 +2291,7 @@ if (typeof HTMLTemplateElement === "undefined") {
2277
2291
  HTMLTemplateElement.decorate(t);
2278
2292
  }
2279
2293
  };
2280
- addEventListener("DOMContentLoaded", function() {
2294
+ window.addEventListener("DOMContentLoaded", function() {
2281
2295
  HTMLTemplateElement.bootstrap(document);
2282
2296
  });
2283
2297
  var createElement = document.createElement;
@@ -7,7 +7,7 @@
7
7
  * Code distributed by Google as part of the polymer project is also
8
8
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
9
  */
10
- // @version 0.7.3
10
+ // @version 0.7.5
11
11
  window.WebComponents = window.WebComponents || {};
12
12
 
13
13
  (function(scope) {
@@ -5689,19 +5689,19 @@ window.HTMLImports = window.HTMLImports || {
5689
5689
  var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
5690
5690
  var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
5691
5691
  var wrap = function(node) {
5692
- return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
5692
+ return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
5693
5693
  };
5694
5694
  var rootDocument = wrap(document);
5695
5695
  var currentScriptDescriptor = {
5696
5696
  get: function() {
5697
- var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
5697
+ var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
5698
5698
  return wrap(script);
5699
5699
  },
5700
5700
  configurable: true
5701
5701
  };
5702
5702
  Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
5703
5703
  Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
5704
- var isIE = /Trident|Edge/.test(navigator.userAgent);
5704
+ var isIE = /Trident/.test(navigator.userAgent);
5705
5705
  function whenReady(callback, doc) {
5706
5706
  doc = doc || rootDocument;
5707
5707
  whenDocumentReady(function() {
@@ -5810,8 +5810,8 @@ window.HTMLImports = window.HTMLImports || {
5810
5810
  })();
5811
5811
  }
5812
5812
  whenReady(function(detail) {
5813
- HTMLImports.ready = true;
5814
- HTMLImports.readyTime = new Date().getTime();
5813
+ window.HTMLImports.ready = true;
5814
+ window.HTMLImports.readyTime = new Date().getTime();
5815
5815
  var evt = rootDocument.createEvent("CustomEvent");
5816
5816
  evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
5817
5817
  rootDocument.dispatchEvent(evt);
@@ -6085,8 +6085,8 @@ window.HTMLImports.addModule(function(scope) {
6085
6085
  }
6086
6086
  },
6087
6087
  parseImport: function(elt) {
6088
- if (HTMLImports.__importsParsingHook) {
6089
- HTMLImports.__importsParsingHook(elt);
6088
+ if (window.HTMLImports.__importsParsingHook) {
6089
+ window.HTMLImports.__importsParsingHook(elt);
6090
6090
  }
6091
6091
  if (elt.import) {
6092
6092
  elt.import.__importParsed = true;
@@ -6398,6 +6398,13 @@ window.HTMLImports.addModule(function(scope) {
6398
6398
  params = params || {};
6399
6399
  var e = document.createEvent("CustomEvent");
6400
6400
  e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
6401
+ e.preventDefault = function() {
6402
+ Object.defineProperty(this, "defaultPrevented", {
6403
+ get: function() {
6404
+ return true;
6405
+ }
6406
+ });
6407
+ };
6401
6408
  return e;
6402
6409
  };
6403
6410
  window.CustomEvent.prototype = window.Event.prototype;
@@ -6405,7 +6412,7 @@ window.HTMLImports.addModule(function(scope) {
6405
6412
  initializeModules();
6406
6413
  var rootDocument = scope.rootDocument;
6407
6414
  function bootstrap() {
6408
- HTMLImports.importer.bootDocument(rootDocument);
6415
+ window.HTMLImports.importer.bootDocument(rootDocument);
6409
6416
  }
6410
6417
  if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
6411
6418
  bootstrap();
@@ -6432,11 +6439,11 @@ window.CustomElements = window.CustomElements || {
6432
6439
  scope.addModule = addModule;
6433
6440
  scope.initializeModules = initializeModules;
6434
6441
  scope.hasNative = Boolean(document.registerElement);
6435
- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
6442
+ scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
6436
6443
  })(window.CustomElements);
6437
6444
 
6438
6445
  window.CustomElements.addModule(function(scope) {
6439
- var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
6446
+ var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
6440
6447
  function forSubtree(node, cb) {
6441
6448
  findAllElements(node, function(e) {
6442
6449
  if (cb(e)) {
@@ -6473,7 +6480,7 @@ window.CustomElements.addModule(function(scope) {
6473
6480
  _forDocumentTree(doc, cb, []);
6474
6481
  }
6475
6482
  function _forDocumentTree(doc, cb, processingDocuments) {
6476
- doc = wrap(doc);
6483
+ doc = window.wrap(doc);
6477
6484
  if (processingDocuments.indexOf(doc) >= 0) {
6478
6485
  return;
6479
6486
  }
@@ -6635,9 +6642,9 @@ window.CustomElements.addModule(function(scope) {
6635
6642
  flags.dom && console.groupEnd();
6636
6643
  }
6637
6644
  function takeRecords(node) {
6638
- node = wrap(node);
6645
+ node = window.wrap(node);
6639
6646
  if (!node) {
6640
- node = wrap(document);
6647
+ node = window.wrap(document);
6641
6648
  }
6642
6649
  while (node.parentNode) {
6643
6650
  node = node.parentNode;
@@ -6661,7 +6668,7 @@ window.CustomElements.addModule(function(scope) {
6661
6668
  inRoot.__observer = observer;
6662
6669
  }
6663
6670
  function upgradeDocument(doc) {
6664
- doc = wrap(doc);
6671
+ doc = window.wrap(doc);
6665
6672
  flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
6666
6673
  addedNode(doc);
6667
6674
  observe(doc);
@@ -6674,7 +6681,7 @@ window.CustomElements.addModule(function(scope) {
6674
6681
  if (originalCreateShadowRoot) {
6675
6682
  Element.prototype.createShadowRoot = function() {
6676
6683
  var root = originalCreateShadowRoot.call(this);
6677
- CustomElements.watchShadow(this);
6684
+ window.CustomElements.watchShadow(this);
6678
6685
  return root;
6679
6686
  };
6680
6687
  }
@@ -6980,8 +6987,8 @@ window.CustomElements.addModule(function(scope) {
6980
6987
  var upgradeDocumentTree = scope.upgradeDocumentTree;
6981
6988
  if (!window.wrap) {
6982
6989
  if (window.ShadowDOMPolyfill) {
6983
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
6984
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
6990
+ window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
6991
+ window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
6985
6992
  } else {
6986
6993
  window.wrap = window.unwrap = function(node) {
6987
6994
  return node;
@@ -6989,17 +6996,17 @@ window.CustomElements.addModule(function(scope) {
6989
6996
  }
6990
6997
  }
6991
6998
  function bootstrap() {
6992
- upgradeDocumentTree(wrap(document));
6999
+ upgradeDocumentTree(window.wrap(document));
6993
7000
  if (window.HTMLImports) {
6994
- HTMLImports.__importsParsingHook = function(elt) {
7001
+ window.HTMLImports.__importsParsingHook = function(elt) {
6995
7002
  upgradeDocumentTree(wrap(elt.import));
6996
7003
  };
6997
7004
  }
6998
- CustomElements.ready = true;
7005
+ window.CustomElements.ready = true;
6999
7006
  setTimeout(function() {
7000
- CustomElements.readyTime = Date.now();
7007
+ window.CustomElements.readyTime = Date.now();
7001
7008
  if (window.HTMLImports) {
7002
- CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
7009
+ window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
7003
7010
  }
7004
7011
  document.dispatchEvent(new CustomEvent("WebComponentsReady", {
7005
7012
  bubbles: true
@@ -7011,6 +7018,13 @@ window.CustomElements.addModule(function(scope) {
7011
7018
  params = params || {};
7012
7019
  var e = document.createEvent("CustomEvent");
7013
7020
  e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
7021
+ e.preventDefault = function() {
7022
+ Object.defineProperty(this, "defaultPrevented", {
7023
+ get: function() {
7024
+ return true;
7025
+ }
7026
+ });
7027
+ };
7014
7028
  return e;
7015
7029
  };
7016
7030
  window.CustomEvent.prototype = window.Event.prototype;
@@ -7020,7 +7034,7 @@ window.CustomElements.addModule(function(scope) {
7020
7034
  } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
7021
7035
  bootstrap();
7022
7036
  } else {
7023
- var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
7037
+ var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
7024
7038
  window.addEventListener(loadEvent, bootstrap);
7025
7039
  }
7026
7040
  scope.isIE11OrOlder = isIE11OrOlder;
@@ -7096,7 +7110,7 @@ window.CustomElements.addModule(function(scope) {
7096
7110
  if (HTMLImports.useNative) {
7097
7111
  installPolymerWarning();
7098
7112
  } else {
7099
- addEventListener("DOMContentLoaded", installPolymerWarning);
7113
+ window.addEventListener("DOMContentLoaded", installPolymerWarning);
7100
7114
  }
7101
7115
  })(window.WebComponents);
7102
7116
 
@@ -1,3 +1,3 @@
1
- Polymer('<%= component_name %>', {
2
-
1
+ Polymer({
2
+ is: "<%= component_name %>"
3
3
  });
@@ -1,5 +1,5 @@
1
1
  module Polymer
2
2
  module Rails
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polymer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Chaplinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-06 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails