yellow-brick-road 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/README.rst +42 -20
  2. data/lib/generators/templates/yellow_brick_road.rb.erb +19 -0
  3. data/lib/generators/yellow_brick_road/install_generator.rb +14 -0
  4. data/lib/yellow-brick-road/config.rb +41 -8
  5. data/lib/yellow-brick-road/directive_processor.rb +6 -5
  6. data/lib/yellow-brick-road/engine.rb +2 -3
  7. data/lib/yellow-brick-road/soy_processor.rb +1 -1
  8. data/lib/yellow-brick-road/version.rb +1 -1
  9. data/test/dummy/app/assets/javascripts/closure-deps.js +1 -1
  10. data/test/dummy/config/initializers/yellow_brick_road.rb +18 -1
  11. data/test/dummy/log/development.log +2208 -0
  12. data/test/dummy/tmp/cache/assets/C33/E00/sprockets%2F50c54266987e056bca666f8951752841 +2556 -0
  13. data/test/dummy/tmp/cache/assets/C48/990/sprockets%2F182c7921a46c3b8603c7f5595a111407 +823 -0
  14. data/test/dummy/tmp/cache/assets/C53/B40/sprockets%2F48cf0c035092dc945559526a279061c6 +204 -0
  15. data/test/dummy/tmp/cache/assets/C60/DB0/sprockets%2F3f00684578f2a3246581db667309ed89 +187 -0
  16. data/test/dummy/tmp/cache/assets/C60/E40/sprockets%2F3c5422f721521f492a5f02ca00b70009 +457 -0
  17. data/test/dummy/tmp/cache/assets/C73/DE0/sprockets%2F21f1f4574326846114a3c106873cebc3 +0 -0
  18. data/test/dummy/tmp/cache/assets/C7E/9F0/sprockets%2F89862076204c62c4593ac20de32da909 +4 -4
  19. data/test/dummy/tmp/cache/assets/C80/6F0/sprockets%2F56459a0713f8610d7d261f8be93073a2 +115 -0
  20. data/test/dummy/tmp/cache/assets/C8D/E10/sprockets%2F34b84bc4732937f885707002eda3896e +511 -0
  21. data/test/dummy/tmp/cache/assets/C93/CB0/sprockets%2F539b403b24833ca478a6f5877f37687c +239 -0
  22. data/test/dummy/tmp/cache/assets/C9A/C70/sprockets%2F10933dc6d342f604514713510b9ef0ab +806 -0
  23. data/test/dummy/tmp/cache/assets/CA0/7C0/sprockets%2Ff591bc0af8f085501241305c04907d3e +590 -0
  24. data/test/dummy/tmp/cache/assets/CA1/4A0/sprockets%2F5a9ad311e7d225b530b597041714b1e9 +2539 -0
  25. data/test/dummy/tmp/cache/assets/CA7/310/sprockets%2F45664cf816315200b574e029fde6f10a +0 -0
  26. data/test/dummy/tmp/cache/assets/CA7/A80/sprockets%2F1f32590957635a5a4f35442bc22f4ca4 +0 -0
  27. data/test/dummy/tmp/cache/assets/CAE/1D0/sprockets%2F2e62c7733d38a817a1532a744c6287bd +72 -0
  28. data/test/dummy/tmp/cache/assets/CB2/3C0/sprockets%2F9c35c290501a896b82c31448a39f3d5d +142 -0
  29. data/test/dummy/tmp/cache/assets/CB3/F20/sprockets%2F558b00e493fb501f7d95761e7eb40273 +2539 -0
  30. data/test/dummy/tmp/cache/assets/CBE/550/sprockets%2Fd680cac830e0b3408ba910f0b0421147 +2 -2
  31. data/test/dummy/tmp/cache/assets/CCD/480/sprockets%2Ffe7e11511634a2d03e1a20980b4593cf +0 -0
  32. data/test/dummy/tmp/cache/assets/CD0/080/sprockets%2Ffd5cbb87741244521d013d11c55573fa +204 -0
  33. data/test/dummy/tmp/cache/assets/CD2/020/sprockets%2Ff97740ba22118a2c91e992aac041843b +811 -0
  34. data/test/dummy/tmp/cache/assets/CD8/D90/sprockets%2F55dd841661d646f0024261a08ecf8ec0 +823 -0
  35. data/test/dummy/tmp/cache/assets/CE3/0D0/sprockets%2F301f97a178fd839a81bd663a6e22b616 +811 -0
  36. data/test/dummy/tmp/cache/assets/CE4/330/sprockets%2Fbd23466639af99164ab8e1c93721f14b +127 -0
  37. data/test/dummy/tmp/cache/assets/CE6/8A0/sprockets%2F3c0e7c5fa31563c8e820d6771e09918d +103 -0
  38. data/test/dummy/tmp/cache/assets/CEB/120/sprockets%2F857a0dde6829f7a27b93a840e1c60469 +522 -0
  39. data/test/dummy/tmp/cache/assets/CEE/CF0/sprockets%2F376f94b987d8156056c4e1d38ec06bf0 +0 -0
  40. data/test/dummy/tmp/cache/assets/CF2/C10/sprockets%2Fc64ef8a9dd0a1c3101d662750105c11a +806 -0
  41. data/test/dummy/tmp/cache/assets/CF3/CD0/sprockets%2F4bb42a5a6b504190f10d20b1c5f93d54 +1529 -0
  42. data/test/dummy/tmp/cache/assets/CF6/890/sprockets%2F36007a87f140155b5a04f2ca6b262dcc +494 -0
  43. data/test/dummy/tmp/cache/assets/CF6/9D0/sprockets%2F34b7199e9d33994c8ec7a442d60ca985 +173 -0
  44. data/test/dummy/tmp/cache/assets/CFA/A90/sprockets%2F901ba405a6d6747f6412ed4d0e0ac620 +256 -0
  45. data/test/dummy/tmp/cache/assets/CFC/E70/sprockets%2F8ee639668b5f0e629fbe0d62d1394689 +173 -0
  46. data/test/dummy/tmp/cache/assets/D04/1B0/sprockets%2F418f2b3b6b08b320f6db268a0991c54c +0 -0
  47. data/test/dummy/tmp/cache/assets/D05/920/sprockets%2F909507434dcc270db4853e4c147f0aac +5 -4
  48. data/test/dummy/tmp/cache/assets/D07/DB0/sprockets%2F0c17d7dac64290e385c91eb6f1570b31 +511 -0
  49. data/test/dummy/tmp/cache/assets/D07/EE0/sprockets%2F4999982b09e0b786894fce44f5d783cc +1371 -0
  50. data/test/dummy/tmp/cache/assets/D09/380/sprockets%2F14383e18fa2faac6b561a29d8e132863 +0 -0
  51. data/test/dummy/tmp/cache/assets/D0D/200/sprockets%2F545a7e34cce1d4272d83d58fd4215d42 +1277 -0
  52. data/test/dummy/tmp/cache/assets/D0E/870/sprockets%2F84996444f4f1f3fdc0248131cfb1a3b6 +794 -0
  53. data/test/dummy/tmp/cache/assets/D15/F60/sprockets%2Fa28394e3f80365b5bc86794dd46daa22 +0 -0
  54. data/test/dummy/tmp/cache/assets/D18/950/sprockets%2Fcf650d67c5d431ffdb38552e562299b2 +474 -0
  55. data/test/dummy/tmp/cache/assets/D18/E10/sprockets%2Fec7c58f640556b401fcd66528352dc9d +474 -0
  56. data/test/dummy/tmp/cache/assets/D20/660/sprockets%2F0d2875475ced01df962f3d758cda7792 +103 -0
  57. data/test/dummy/tmp/cache/assets/D22/AB0/sprockets%2F0b08e7f81651aaf739a93d61ae99779c +283 -0
  58. data/test/dummy/tmp/cache/assets/D2E/B20/sprockets%2Feed5412a17a52b1a335925e2af1f75d3 +0 -0
  59. data/test/dummy/tmp/cache/assets/D36/700/sprockets%2Fd219bf9db2eacc105bb294755093a437 +505 -0
  60. data/test/dummy/tmp/cache/assets/D3B/A10/sprockets%2Fcf38b51682d84a04da7b8a7313de52c6 +207 -0
  61. data/test/dummy/tmp/cache/assets/D3C/0E0/sprockets%2Fe9d7aba138d602c4a6ac701bc9615977 +505 -0
  62. data/test/dummy/tmp/cache/assets/D3E/FF0/sprockets%2F6bd8ccd3e02f397c20f349d5c0960e51 +0 -0
  63. data/test/dummy/tmp/cache/assets/D41/B30/sprockets%2Fba1b93913dd01d83ac9a96df334456f8 +0 -0
  64. data/test/dummy/tmp/cache/assets/D41/DA0/sprockets%2Fe8d00810698a9fcee032022fefd084f7 +0 -0
  65. data/test/dummy/tmp/cache/assets/D44/CF0/sprockets%2Ffa31a45f04884493c909c5a67fcbdf23 +1371 -0
  66. data/test/dummy/tmp/cache/assets/D47/BE0/sprockets%2F0b5ebdf6dec160a264698e7f745061e8 +142 -0
  67. data/test/dummy/tmp/cache/assets/D4C/F30/sprockets%2Ff90155c10f59a3fe44959ac09bf817fe +2556 -0
  68. data/test/dummy/tmp/cache/assets/D4E/7C0/sprockets%2Ff01b58512d01eda23fd5cb23a2b28b60 +1529 -0
  69. data/test/dummy/tmp/cache/assets/D4E/860/sprockets%2F86eed0c77c47d0970345bbabb58d8939 +1277 -0
  70. data/test/dummy/tmp/cache/assets/D4E/C30/sprockets%2F52420c10c73ca310d026565eafdadb4e +1545 -0
  71. data/test/dummy/tmp/cache/assets/D4E/F60/sprockets%2F9893a3c5aeb1a9e77469f4751b4d3c3f +115 -0
  72. data/test/dummy/tmp/cache/assets/D4F/E60/sprockets%2F17ee65de1f78c3dd5c165a9867e810b6 +165 -0
  73. data/test/dummy/tmp/cache/assets/D57/0D0/sprockets%2Fa29e6e8106d9d5ed1e2889126cfbf877 +300 -0
  74. data/test/dummy/tmp/cache/assets/D5C/650/sprockets%2Fe1c381da3cc213a639e956ae3315a2bd +607 -0
  75. data/test/dummy/tmp/cache/assets/D61/860/sprockets%2Fbf032a3b4aad2c2e25704e65c966cf45 +794 -0
  76. data/test/dummy/tmp/cache/assets/D63/B20/sprockets%2F31fc70ce66bb80fb9421be34eb3b0287 +0 -0
  77. data/test/dummy/tmp/cache/assets/D64/D60/sprockets%2Fa544ea03bf0a45948a053ba76ec2a79f +239 -0
  78. data/test/dummy/tmp/cache/assets/D6B/F90/sprockets%2F66636712ecb1fcc777dccf7643a0e1b1 +127 -0
  79. data/test/dummy/tmp/cache/assets/D6E/AD0/sprockets%2Fc91cdc6a72c729d7a64119198b3d2eab +0 -0
  80. data/test/dummy/tmp/cache/assets/D6F/140/sprockets%2F9ddc51f4388dd5243a28dba1ce47572b +53 -0
  81. data/test/dummy/tmp/cache/assets/D72/800/sprockets%2F92baa375d54e16fe0a5c7f079a1ce992 +165 -0
  82. data/test/dummy/tmp/cache/assets/D74/220/sprockets%2F3f888bda53179cb945eab35fbd31a708 +53 -0
  83. data/test/dummy/tmp/cache/assets/D78/5F0/sprockets%2F638ed6af667d4fc5147f72ff34aa2d33 +0 -0
  84. data/test/dummy/tmp/cache/assets/D7D/640/sprockets%2F95a7c5580f957c31e1ab9d0773ed5fde +607 -0
  85. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +6 -5
  86. data/test/dummy/tmp/cache/assets/D89/020/sprockets%2Fa06df6166e70324e712e54b1cafca0ae +187 -0
  87. data/test/dummy/tmp/cache/assets/D8A/9F0/sprockets%2Fc06547ca33ee3d03be14ce045ae1c9e2 +207 -0
  88. data/test/dummy/tmp/cache/assets/D9E/B80/sprockets%2F9561df1d45c7ff4aa8ac3e2df0c99121 +0 -0
  89. data/test/dummy/tmp/cache/assets/DA3/F30/sprockets%2Fe015d6ccdfcf022e47c83d7906f728ae +457 -0
  90. data/test/dummy/tmp/cache/assets/DAE/190/sprockets%2F433c7b21968be8d1f9bfdbdf7a637c57 +0 -0
  91. data/test/dummy/tmp/cache/assets/DB3/600/sprockets%2F9b70ae73f15ba693886eeef4eb5d6c75 +0 -0
  92. data/test/dummy/tmp/cache/assets/DB4/510/sprockets%2F29cdae8e29c88fd9ddbd4831419560fe +1260 -0
  93. data/test/dummy/tmp/cache/assets/DC1/4A0/sprockets%2F0b63dfcf163f2faeb612724eb4545bcc +1354 -0
  94. data/test/dummy/tmp/cache/assets/DC4/C10/sprockets%2Fcf48f4cbad3db33146eab4c577c1d209 +300 -0
  95. data/test/dummy/tmp/cache/assets/DC4/CA0/sprockets%2Fd0da8a60ea4dc16b9fd3e2a50d88633c +0 -0
  96. data/test/dummy/tmp/cache/assets/DC7/8C0/sprockets%2F1ad68dcc9ef598d3811ba2ac5c0ea182 +1354 -0
  97. data/test/dummy/tmp/cache/assets/DC7/C00/sprockets%2Fba755ff3a81c3192f0e45a4f7c0c7dcb +0 -0
  98. data/test/dummy/tmp/cache/assets/DCA/760/sprockets%2F717c4cea10bf601090ffdfe4e668e4cb +283 -0
  99. data/test/dummy/tmp/cache/assets/DCA/DE0/sprockets%2F51dcced9ec2b3cd4b1cc2949f860c361 +590 -0
  100. data/test/dummy/tmp/cache/assets/DD7/E70/sprockets%2F2595d8c8d1d5f4deb096247fb3bfc7ab +256 -0
  101. data/test/dummy/tmp/cache/assets/DE1/9D0/sprockets%2F8befd77af580ee16ec42ec95b1766ff3 +1545 -0
  102. data/test/dummy/tmp/cache/assets/E00/D80/sprockets%2F9debc27161f7bccf2d84a36b8c36c4bf +522 -0
  103. data/test/dummy/tmp/cache/assets/E00/E60/sprockets%2Fac159b94b0a6d621e4f6cde9b4de87bb +0 -0
  104. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  105. data/test/dummy/tmp/cache/assets/E1B/D00/sprockets%2F886dff4afe55f9d3f8abe434f2689add +72 -0
  106. data/test/dummy/tmp/cache/assets/E1B/F20/sprockets%2Fa4bbc04eb83ebf94fd8134c3abd220dd +494 -0
  107. data/test/dummy/tmp/cache/assets/E71/0C0/sprockets%2F5ffdc0daa0a1f9638c787897ceefcdee +1260 -0
  108. metadata +186 -10
  109. data/test/dummy/tmp/pids/server.pid +0 -1
@@ -0,0 +1,115 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325549268.1907132: @value{ I" length:EFi�I" digest;
2
+ F"%9c6d1a6f816598cba384e9b4b4405319I" source;
3
+ FI"�// Copyright 2011 The Closure Library Authors. All Rights Reserved.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 (the "License");
6
+ // you may not use this file except in compliance with the License.
7
+ // You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing, software
12
+ // distributed under the License is distributed on an "AS-IS" BASIS,
13
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ // See the License for the specific language governing permissions and
15
+ // limitations under the License.
16
+
17
+ /**
18
+ * @fileoverview Provides utility methods to render soy template.
19
+ */
20
+
21
+
22
+ goog.provide('goog.soy');
23
+
24
+ goog.require('goog.dom');
25
+ goog.require('goog.dom.NodeType');
26
+ goog.require('goog.dom.TagName');
27
+
28
+
29
+
30
+ /**
31
+ * Renders a Soy template and then set the output string as
32
+ * the innerHTML of an element. It is recommended to use this helper function
33
+ * instead of directly setting innerHTML in your hand-written code, so that it
34
+ * will be easier to audit the code for cross-site scripting vulnerabilities.
35
+ *
36
+ * @param {Element} element The element whose content we are rendering into.
37
+ * @param {Function} template The Soy template defining the element's content.
38
+ * @param {Object=} opt_templateData The data for the template.
39
+ * @param {Object=} opt_injectedData The injected data for the template.
40
+ */
41
+ goog.soy.renderElement = function(element, template, opt_templateData,
42
+ opt_injectedData) {
43
+ element.innerHTML = template(
44
+ opt_templateData || goog.soy.defaultTemplateData_, undefined,
45
+ opt_injectedData);
46
+ };
47
+
48
+
49
+ /**
50
+ * Renders a Soy template into a single node or a document
51
+ * fragment. If the rendered HTML string represents a single node, then that
52
+ * node is returned (note that this is *not* a fragment, despite them name of
53
+ * the method). Otherwise a document fragment is returned containing the
54
+ * rendered nodes.
55
+ *
56
+ * @param {Function} template The Soy template defining the element's content.
57
+ * @param {Object=} opt_templateData The data for the template.
58
+ * @param {Object=} opt_injectedData The injected data for the template.
59
+ * @param {goog.dom.DomHelper=} opt_domHelper The DOM helper used to
60
+ * create DOM nodes; defaults to {@code goog.dom.getDomHelper}.
61
+ * @return {!Node} The resulting node or document fragment.
62
+ */
63
+ goog.soy.renderAsFragment = function(template, opt_templateData,
64
+ opt_injectedData, opt_domHelper) {
65
+ var dom = opt_domHelper || goog.dom.getDomHelper();
66
+ return dom.htmlToDocumentFragment(
67
+ template(opt_templateData || goog.soy.defaultTemplateData_,
68
+ undefined, opt_injectedData));
69
+ };
70
+
71
+
72
+ /**
73
+ * Renders a Soy template into a single node. If the rendered
74
+ * HTML string represents a single node, then that node is returned. Otherwise,
75
+ * a DIV element is returned containing the rendered nodes.
76
+ *
77
+ * @param {Function} template The Soy template defining the element's content.
78
+ * @param {Object=} opt_templateData The data for the template.
79
+ * @param {Object=} opt_injectedData The injected data for the template.
80
+ * @param {goog.dom.DomHelper=} opt_domHelper The DOM helper used to
81
+ * create DOM nodes; defaults to {@code goog.dom.getDomHelper}.
82
+ * @return {!Element} Rendered template contents, wrapped in a parent DIV
83
+ * element if necessary.
84
+ */
85
+ goog.soy.renderAsElement = function(template, opt_templateData,
86
+ opt_injectedData, opt_domHelper) {
87
+ var dom = opt_domHelper || goog.dom.getDomHelper();
88
+ var wrapper = dom.createElement(goog.dom.TagName.DIV);
89
+ wrapper.innerHTML = template(
90
+ opt_templateData || goog.soy.defaultTemplateData_,
91
+ undefined, opt_injectedData);
92
+
93
+ // If the template renders as a single element, return it.
94
+ if (wrapper.childNodes.length == 1) {
95
+ var firstChild = wrapper.firstChild;
96
+ if (firstChild.nodeType == goog.dom.NodeType.ELEMENT) {
97
+ return /** @type {!Element} */ (firstChild);
98
+ }
99
+ }
100
+
101
+ // Otherwise, return the wrapper DIV.
102
+ return wrapper;
103
+ };
104
+
105
+
106
+ /**
107
+ * Immutable object that is passed into templates that are rendered
108
+ * without any data.
109
+ * @type {Object}
110
+ * @private
111
+ */
112
+ goog.soy.defaultTemplateData_ = {};
113
+ ;
114
+ FI"
115
+ F"%4018ec46ca3c64c26a895d08baf43677
@@ -0,0 +1,165 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325538162.223237: @value{ I" length:EFi�I" digest;
2
+ F"%4677892072a8f5cb3a0f4b57b8396468I" source;
3
+ FI"�// Copyright 2008 The Closure Library Authors. All Rights Reserved.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 (the "License");
6
+ // you may not use this file except in compliance with the License.
7
+ // You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing, software
12
+ // distributed under the License is distributed on an "AS-IS" BASIS,
13
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ // See the License for the specific language governing permissions and
15
+ // limitations under the License.
16
+
17
+ /**
18
+ * @fileoverview Provides inversion and inversion map functionality for storing
19
+ * integer ranges and corresponding values.
20
+ *
21
+ */
22
+
23
+
24
+ goog.provide('goog.structs.InversionMap');
25
+
26
+ goog.require('goog.array');
27
+
28
+
29
+
30
+ /**
31
+ * Maps ranges to values using goog.structs.Inversion.
32
+ * @param {Array.<number>} rangeArray An array of monotonically
33
+ * increasing integer values, with at least one instance.
34
+ * @param {Array.<*>} valueArray An array of corresponding values.
35
+ * Length must be the same as rangeArray.
36
+ * @param {boolean=} opt_delta If true, saves only delta from previous value.
37
+ * @constructor
38
+ */
39
+ goog.structs.InversionMap = function(rangeArray, valueArray, opt_delta) {
40
+ if (rangeArray.length != valueArray.length) {
41
+ // rangeArray and valueArray has to match in number of entries.
42
+ return null;
43
+ }
44
+ this.storeInversion_(rangeArray, opt_delta);
45
+
46
+ /**
47
+ * @type {Array}
48
+ * @protected
49
+ */
50
+ this.values = valueArray;
51
+ };
52
+
53
+
54
+ /**
55
+ * @type {Array}
56
+ * @protected
57
+ */
58
+ goog.structs.InversionMap.prototype.rangeArray;
59
+
60
+
61
+ /**
62
+ * Stores the integers as ranges (half-open).
63
+ * If delta is true, the integers are delta from the previous value and
64
+ * will be restored to the absolute value.
65
+ * When used as a set, even indices are IN, and odd are OUT.
66
+ * @param {Array.<number?>} rangeArray An array of monotonically
67
+ * increasing integer values, with at least one instance.
68
+ * @param {boolean=} opt_delta If true, saves only delta from previous value.
69
+ * @private
70
+ */
71
+ goog.structs.InversionMap.prototype.storeInversion_ = function(rangeArray,
72
+ opt_delta) {
73
+ this.rangeArray = rangeArray;
74
+
75
+ for (var i = 1; i < rangeArray.length; i++) {
76
+ if (rangeArray[i] == null) {
77
+ rangeArray[i] = rangeArray[i - 1] + 1;
78
+ } else if (opt_delta) {
79
+ rangeArray[i] += rangeArray[i - 1];
80
+ }
81
+ }
82
+ };
83
+
84
+
85
+ /**
86
+ * Splices a range -> value map into this inversion map.
87
+ * @param {Array.<number>} rangeArray An array of monotonically
88
+ * increasing integer values, with at least one instance.
89
+ * @param {Array.<*>} valueArray An array of corresponding values.
90
+ * Length must be the same as rangeArray.
91
+ * @param {boolean=} opt_delta If true, saves only delta from previous value.
92
+ */
93
+ goog.structs.InversionMap.prototype.spliceInversion = function(
94
+ rangeArray, valueArray, opt_delta) {
95
+ // By building another inversion map, we build the arrays that we need
96
+ // to splice in.
97
+ var otherMap = new goog.structs.InversionMap(
98
+ rangeArray, valueArray, opt_delta);
99
+
100
+ // Figure out where to splice those arrays.
101
+ var startRange = otherMap.rangeArray[0];
102
+ var endRange =
103
+ (/** @type {number} */ goog.array.peek(otherMap.rangeArray));
104
+ var startSplice = this.getLeast(startRange);
105
+ var endSplice = this.getLeast(endRange);
106
+
107
+ // The inversion map works by storing the start points of ranges...
108
+ if (startRange != this.rangeArray[startSplice]) {
109
+ // ...if we're splicing in a start point that isn't already here,
110
+ // then we need to insert it after the insertion point.
111
+ startSplice++;
112
+ } // otherwise we overwrite the insertion point.
113
+
114
+ var spliceLength = endSplice - startSplice + 1;
115
+ goog.partial(goog.array.splice, this.rangeArray, startSplice,
116
+ spliceLength).apply(null, otherMap.rangeArray);
117
+ goog.partial(goog.array.splice, this.values, startSplice,
118
+ spliceLength).apply(null, otherMap.values);
119
+ };
120
+
121
+
122
+ /**
123
+ * Gets the value corresponding to a number from the inversion map.
124
+ * @param {number} intKey The number for which value needs to be retrieved
125
+ * from inversion map.
126
+ * @return {*} Value retrieved from inversion map; null if not found.
127
+ */
128
+ goog.structs.InversionMap.prototype.at = function(intKey) {
129
+ var index = this.getLeast(intKey);
130
+ if (index < 0) {
131
+ return null;
132
+ }
133
+ return this.values[index];
134
+ };
135
+
136
+
137
+ /**
138
+ * Gets the largest index such that rangeArray[index] <= intKey from the
139
+ * inversion map.
140
+ * @param {number} intKey The probe for which rangeArray is searched.
141
+ * @return {number} Largest index such that rangeArray[index] <= intKey.
142
+ * @protected
143
+ */
144
+ goog.structs.InversionMap.prototype.getLeast = function(intKey) {
145
+ var arr = this.rangeArray;
146
+ var low = 0;
147
+ var high = arr.length;
148
+ while (high - low > 8) {
149
+ var mid = (high + low) >> 1;
150
+ if (arr[mid] <= intKey) {
151
+ low = mid;
152
+ } else {
153
+ high = mid;
154
+ }
155
+ }
156
+ for (; low < high; ++low) {
157
+ if (intKey < arr[low]) {
158
+ break;
159
+ }
160
+ }
161
+ return low - 1;
162
+ };
163
+ ;
164
+ FI"
165
+ F"%8dabf7e362fb0f31709545caa97f8e90
@@ -0,0 +1,300 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325549267.806633: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%8fdaa672a24ca9cfc9d99b6dfeb27be4I"logical_path;
5
+ FI"$closure/goog/asserts/asserts.js;
6
+ TI"
7
+ F"�/Users/ali/.rvm/gems/ruby-1.9.3-p0/bundler/gems/closure-library-wrapper-b30bab11ab83/vendor/closure-library/closure/goog/asserts/asserts.jsI"content_type;
8
+ FI"application/javascript;
9
+ FI"
10
+ mtime;
11
+ FI"2012-01-03T00:06:51+00:00;
12
+ FI" body;
13
+ FI"A)// Copyright 2008 The Closure Library Authors. All Rights Reserved.
14
+ //
15
+ // Licensed under the Apache License, Version 2.0 (the "License");
16
+ // you may not use this file except in compliance with the License.
17
+ // You may obtain a copy of the License at
18
+ //
19
+ // http://www.apache.org/licenses/LICENSE-2.0
20
+ //
21
+ // Unless required by applicable law or agreed to in writing, software
22
+ // distributed under the License is distributed on an "AS-IS" BASIS,
23
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
+ // See the License for the specific language governing permissions and
25
+ // limitations under the License.
26
+
27
+ /**
28
+ * @fileoverview Utilities to check the preconditions, postconditions and
29
+ * invariants runtime.
30
+ *
31
+ * Methods in this package should be given special treatment by the compiler
32
+ * for type-inference. For example, <code>goog.asserts.assert(foo)</code>
33
+ * will restrict <code>foo</code> to a truthy value.
34
+ *
35
+ * The compiler has an option to disable asserts. So code like:
36
+ * <code>
37
+ * var x = goog.asserts.assert(foo()); goog.asserts.assert(bar());
38
+ * </code>
39
+ * will be transformed into:
40
+ * <code>
41
+ * var x = foo();
42
+ * </code>
43
+ * The compiler will leave in foo() (because its return value is used),
44
+ * but it will remove bar() because it assumes it does not have side-effects.
45
+ *
46
+ */
47
+
48
+
49
+ goog.provide('goog.asserts');
50
+ goog.provide('goog.asserts.AssertionError');
51
+
52
+ goog.require('goog.debug.Error');
53
+ goog.require('goog.string');
54
+
55
+
56
+ /**
57
+ * @define {boolean} Whether to strip out asserts or to leave them in.
58
+ */
59
+ goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
60
+
61
+
62
+
63
+ /**
64
+ * Error object for failed assertions.
65
+ * @param {string} messagePattern The pattern that was used to form message.
66
+ * @param {!Array.<*>} messageArgs The items to substitute into the pattern.
67
+ * @constructor
68
+ * @extends {goog.debug.Error}
69
+ */
70
+ goog.asserts.AssertionError = function(messagePattern, messageArgs) {
71
+ messageArgs.unshift(messagePattern);
72
+ goog.debug.Error.call(this, goog.string.subs.apply(null, messageArgs));
73
+ // Remove the messagePattern afterwards to avoid permenantly modifying the
74
+ // passed in array.
75
+ messageArgs.shift();
76
+
77
+ /**
78
+ * The message pattern used to format the error message. Error handlers can
79
+ * use this to uniquely identify the assertion.
80
+ * @type {string}
81
+ */
82
+ this.messagePattern = messagePattern;
83
+ };
84
+ goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
85
+
86
+
87
+ /** @override */
88
+ goog.asserts.AssertionError.prototype.name = 'AssertionError';
89
+
90
+
91
+ /**
92
+ * Throws an exception with the given message and "Assertion failed" prefixed
93
+ * onto it.
94
+ * @param {string} defaultMessage The message to use if givenMessage is empty.
95
+ * @param {Array.<*>} defaultArgs The substitution arguments for defaultMessage.
96
+ * @param {string|undefined} givenMessage Message supplied by the caller.
97
+ * @param {Array.<*>} givenArgs The substitution arguments for givenMessage.
98
+ * @throws {goog.asserts.AssertionError} When the value is not a number.
99
+ * @private
100
+ */
101
+ goog.asserts.doAssertFailure_ =
102
+ function(defaultMessage, defaultArgs, givenMessage, givenArgs) {
103
+ var message = 'Assertion failed';
104
+ if (givenMessage) {
105
+ message += ': ' + givenMessage;
106
+ var args = givenArgs;
107
+ } else if (defaultMessage) {
108
+ message += ': ' + defaultMessage;
109
+ args = defaultArgs;
110
+ }
111
+ // The '' + works around an Opera 10 bug in the unit tests. Without it,
112
+ // a stack trace is added to var message above. With this, a stack trace is
113
+ // not added until this line (it causes the extra garbage to be added after
114
+ // the assertion message instead of in the middle of it).
115
+ throw new goog.asserts.AssertionError('' + message, args || []);
116
+ };
117
+
118
+
119
+ /**
120
+ * Checks if the condition evaluates to true if goog.asserts.ENABLE_ASSERTS is
121
+ * true.
122
+ * @param {*} condition The condition to check.
123
+ * @param {string=} opt_message Error message in case of failure.
124
+ * @param {...*} var_args The items to substitute into the failure message.
125
+ * @return {*} The value of the condition.
126
+ * @throws {goog.asserts.AssertionError} When the condition evaluates to false.
127
+ */
128
+ goog.asserts.assert = function(condition, opt_message, var_args) {
129
+ if (goog.asserts.ENABLE_ASSERTS && !condition) {
130
+ goog.asserts.doAssertFailure_('', null, opt_message,
131
+ Array.prototype.slice.call(arguments, 2));
132
+ }
133
+ return condition;
134
+ };
135
+
136
+
137
+ /**
138
+ * Fails if goog.asserts.ENABLE_ASSERTS is true. This function is useful in case
139
+ * when we want to add a check in the unreachable area like switch-case
140
+ * statement:
141
+ *
142
+ * <pre>
143
+ * switch(type) {
144
+ * case FOO: doSomething(); break;
145
+ * case BAR: doSomethingElse(); break;
146
+ * default: goog.assert.fail('Unrecognized type: ' + type);
147
+ * // We have only 2 types - "default:" section is unreachable code.
148
+ * }
149
+ * </pre>
150
+ *
151
+ * @param {string=} opt_message Error message in case of failure.
152
+ * @param {...*} var_args The items to substitute into the failure message.
153
+ * @throws {goog.asserts.AssertionError} Failure.
154
+ */
155
+ goog.asserts.fail = function(opt_message, var_args) {
156
+ if (goog.asserts.ENABLE_ASSERTS) {
157
+ throw new goog.asserts.AssertionError(
158
+ 'Failure' + (opt_message ? ': ' + opt_message : ''),
159
+ Array.prototype.slice.call(arguments, 1));
160
+ }
161
+ };
162
+
163
+
164
+ /**
165
+ * Checks if the value is a number if goog.asserts.ENABLE_ASSERTS is true.
166
+ * @param {*} value The value to check.
167
+ * @param {string=} opt_message Error message in case of failure.
168
+ * @param {...*} var_args The items to substitute into the failure message.
169
+ * @return {number} The value, guaranteed to be a number when asserts enabled.
170
+ * @throws {goog.asserts.AssertionError} When the value is not a number.
171
+ */
172
+ goog.asserts.assertNumber = function(value, opt_message, var_args) {
173
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isNumber(value)) {
174
+ goog.asserts.doAssertFailure_('Expected number but got %s: %s.',
175
+ [goog.typeOf(value), value], opt_message,
176
+ Array.prototype.slice.call(arguments, 2));
177
+ }
178
+ return /** @type {number} */ (value);
179
+ };
180
+
181
+
182
+ /**
183
+ * Checks if the value is a string if goog.asserts.ENABLE_ASSERTS is true.
184
+ * @param {*} value The value to check.
185
+ * @param {string=} opt_message Error message in case of failure.
186
+ * @param {...*} var_args The items to substitute into the failure message.
187
+ * @return {string} The value, guaranteed to be a string when asserts enabled.
188
+ * @throws {goog.asserts.AssertionError} When the value is not a string.
189
+ */
190
+ goog.asserts.assertString = function(value, opt_message, var_args) {
191
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isString(value)) {
192
+ goog.asserts.doAssertFailure_('Expected string but got %s: %s.',
193
+ [goog.typeOf(value), value], opt_message,
194
+ Array.prototype.slice.call(arguments, 2));
195
+ }
196
+ return /** @type {string} */ (value);
197
+ };
198
+
199
+
200
+ /**
201
+ * Checks if the value is a function if goog.asserts.ENABLE_ASSERTS is true.
202
+ * @param {*} value The value to check.
203
+ * @param {string=} opt_message Error message in case of failure.
204
+ * @param {...*} var_args The items to substitute into the failure message.
205
+ * @return {!Function} The value, guaranteed to be a function when asserts
206
+ * enabled.
207
+ * @throws {goog.asserts.AssertionError} When the value is not a function.
208
+ */
209
+ goog.asserts.assertFunction = function(value, opt_message, var_args) {
210
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isFunction(value)) {
211
+ goog.asserts.doAssertFailure_('Expected function but got %s: %s.',
212
+ [goog.typeOf(value), value], opt_message,
213
+ Array.prototype.slice.call(arguments, 2));
214
+ }
215
+ return /** @type {!Function} */ (value);
216
+ };
217
+
218
+
219
+ /**
220
+ * Checks if the value is an Object if goog.asserts.ENABLE_ASSERTS is true.
221
+ * @param {*} value The value to check.
222
+ * @param {string=} opt_message Error message in case of failure.
223
+ * @param {...*} var_args The items to substitute into the failure message.
224
+ * @return {!Object} The value, guaranteed to be a non-null object.
225
+ * @throws {goog.asserts.AssertionError} When the value is not an object.
226
+ */
227
+ goog.asserts.assertObject = function(value, opt_message, var_args) {
228
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isObject(value)) {
229
+ goog.asserts.doAssertFailure_('Expected object but got %s: %s.',
230
+ [goog.typeOf(value), value],
231
+ opt_message, Array.prototype.slice.call(arguments, 2));
232
+ }
233
+ return /** @type {!Object} */ (value);
234
+ };
235
+
236
+
237
+ /**
238
+ * Checks if the value is an Array if goog.asserts.ENABLE_ASSERTS is true.
239
+ * @param {*} value The value to check.
240
+ * @param {string=} opt_message Error message in case of failure.
241
+ * @param {...*} var_args The items to substitute into the failure message.
242
+ * @return {!Array} The value, guaranteed to be a non-null array.
243
+ * @throws {goog.asserts.AssertionError} When the value is not an array.
244
+ */
245
+ goog.asserts.assertArray = function(value, opt_message, var_args) {
246
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isArray(value)) {
247
+ goog.asserts.doAssertFailure_('Expected array but got %s: %s.',
248
+ [goog.typeOf(value), value], opt_message,
249
+ Array.prototype.slice.call(arguments, 2));
250
+ }
251
+ return /** @type {!Array} */ (value);
252
+ };
253
+
254
+
255
+ /**
256
+ * Checks if the value is a boolean if goog.asserts.ENABLE_ASSERTS is true.
257
+ * @param {*} value The value to check.
258
+ * @param {string=} opt_message Error message in case of failure.
259
+ * @param {...*} var_args The items to substitute into the failure message.
260
+ * @return {boolean} The value, guaranteed to be a boolean when asserts are
261
+ * enabled.
262
+ * @throws {goog.asserts.AssertionError} When the value is not a boolean.
263
+ */
264
+ goog.asserts.assertBoolean = function(value, opt_message, var_args) {
265
+ if (goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(value)) {
266
+ goog.asserts.doAssertFailure_('Expected boolean but got %s: %s.',
267
+ [goog.typeOf(value), value], opt_message,
268
+ Array.prototype.slice.call(arguments, 2));
269
+ }
270
+ return /** @type {boolean} */ (value);
271
+ };
272
+
273
+
274
+ /**
275
+ * Checks if the value is an instance of the user-defined type if
276
+ * goog.asserts.ENABLE_ASSERTS is true.
277
+ * @param {*} value The value to check.
278
+ * @param {!Function} type A user-defined constructor.
279
+ * @param {string=} opt_message Error message in case of failure.
280
+ * @param {...*} var_args The items to substitute into the failure message.
281
+ * @throws {goog.asserts.AssertionError} When the value is not an instance of
282
+ * type.
283
+ */
284
+ goog.asserts.assertInstanceof = function(value, type, opt_message, var_args) {
285
+ if (goog.asserts.ENABLE_ASSERTS && !(value instanceof type)) {
286
+ goog.asserts.doAssertFailure_('instanceof check failed.', null,
287
+ opt_message, Array.prototype.slice.call(arguments, 3));
288
+ }
289
+ };
290
+
291
+ ;
292
+ FI"asset_paths;
293
+ F["�/Users/ali/.rvm/gems/ruby-1.9.3-p0/bundler/gems/closure-library-wrapper-b30bab11ab83/vendor/closure-library/closure/goog/asserts/asserts.jsI"dependency_paths;
294
+ F[{I" path;
295
+ F"�/Users/ali/.rvm/gems/ruby-1.9.3-p0/bundler/gems/closure-library-wrapper-b30bab11ab83/vendor/closure-library/closure/goog/asserts/asserts.jsI"
296
+ mtime;
297
+ FIu: Time
298
+ T: offsetiI"hexdigest;
299
+ F"%c09bdc53388154b1db8b4425178cb6f0I"
300
+ F"%46dde6621c301f4928e3b34efee9e3b5