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,173 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325549268.219309: @value{ I" length:EFiI" digest;
2
+ F"%6c9c6de4d95a1566338ea1406209605aI" source;
3
+ FI"// Copyright 2006 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 Utility for fast string concatenation.
19
+ */
20
+
21
+
22
+ goog.provide('goog.string.StringBuffer');
23
+
24
+ goog.require('goog.userAgent.jscript');
25
+
26
+
27
+
28
+ /**
29
+ * Utility class to facilitate much faster string concatenation in IE,
30
+ * using Array.join() rather than the '+' operator. For other browsers
31
+ * we simply use the '+' operator.
32
+ *
33
+ * @param {Object|number|string|boolean=} opt_a1 Optional first initial item
34
+ * to append.
35
+ * @param {...Object|number|string|boolean} var_args Other initial items to
36
+ * append, e.g., new goog.string.StringBuffer('foo', 'bar').
37
+ * @constructor
38
+ */
39
+ goog.string.StringBuffer = function(opt_a1, var_args) {
40
+ /**
41
+ * Internal buffer for the string to be concatenated.
42
+ * @type {string|Array}
43
+ * @private
44
+ */
45
+ this.buffer_ = goog.userAgent.jscript.HAS_JSCRIPT ? [] : '';
46
+
47
+ if (opt_a1 != null) {
48
+ this.append.apply(this, arguments);
49
+ }
50
+ };
51
+
52
+
53
+ /**
54
+ * Sets the contents of the string buffer object, replacing what's currently
55
+ * there.
56
+ *
57
+ * @param {string} s String to set.
58
+ */
59
+ goog.string.StringBuffer.prototype.set = function(s) {
60
+ this.clear();
61
+ this.append(s);
62
+ };
63
+
64
+
65
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
66
+ /**
67
+ * Length of internal buffer (faster than calling buffer_.length).
68
+ * Only used if buffer_ is an array.
69
+ * @type {number}
70
+ * @private
71
+ */
72
+ goog.string.StringBuffer.prototype.bufferLength_ = 0;
73
+
74
+ /**
75
+ * Appends one or more items to the buffer.
76
+ *
77
+ * Calling this with null, undefined, or empty arguments is an error.
78
+ *
79
+ * @param {Object|number|string|boolean} a1 Required first string.
80
+ * @param {Object|number|string|boolean=} opt_a2 Optional second string.
81
+ * @param {...Object|number|string|boolean} var_args Other items to append,
82
+ * e.g., sb.append('foo', 'bar', 'baz').
83
+ * @return {goog.string.StringBuffer} This same StringBuffer object.
84
+ */
85
+ goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
86
+ // IE version.
87
+
88
+ if (opt_a2 == null) { // second argument is undefined (null == undefined)
89
+ // Array assignment is 2x faster than Array push. Also, use a1
90
+ // directly to avoid arguments instantiation, another 2x improvement.
91
+ this.buffer_[this.bufferLength_++] = a1;
92
+ } else {
93
+ this.buffer_.push.apply(/** @type {Array} */ (this.buffer_), arguments);
94
+ this.bufferLength_ = this.buffer_.length;
95
+ }
96
+ return this;
97
+ };
98
+ } else {
99
+
100
+ /**
101
+ * Appends one or more items to the buffer.
102
+ *
103
+ * Calling this with null, undefined, or empty arguments is an error.
104
+ *
105
+ * @param {Object|number|string|boolean} a1 Required first string.
106
+ * @param {Object|number|string|boolean=} opt_a2 Optional second string.
107
+ * @param {...Object|number|string|boolean} var_args Other items to append,
108
+ * e.g., sb.append('foo', 'bar', 'baz').
109
+ * @return {goog.string.StringBuffer} This same StringBuffer object.
110
+ * @suppress {duplicate}
111
+ */
112
+ goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
113
+ // W3 version.
114
+
115
+ // Use a1 directly to avoid arguments instantiation for single-arg case.
116
+ this.buffer_ += a1;
117
+ if (opt_a2 != null) { // second argument is undefined (null == undefined)
118
+ for (var i = 1; i < arguments.length; i++) {
119
+ this.buffer_ += arguments[i];
120
+ }
121
+ }
122
+ return this;
123
+ };
124
+ }
125
+
126
+
127
+ /**
128
+ * Clears the internal buffer.
129
+ */
130
+ goog.string.StringBuffer.prototype.clear = function() {
131
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
132
+ this.buffer_.length = 0; // Reuse the array to avoid creating new object.
133
+ this.bufferLength_ = 0;
134
+ } else {
135
+ this.buffer_ = '';
136
+ }
137
+ };
138
+
139
+
140
+ /**
141
+ * Returns the length of the current contents of the buffer. In IE, this is
142
+ * O(n) where n = number of appends, so to avoid quadratic behavior, do not call
143
+ * this after every append.
144
+ *
145
+ * @return {number} the length of the current contents of the buffer.
146
+ */
147
+ goog.string.StringBuffer.prototype.getLength = function() {
148
+ return this.toString().length;
149
+ };
150
+
151
+
152
+ /**
153
+ * Returns the concatenated string.
154
+ *
155
+ * @return {string} The concatenated string.
156
+ */
157
+ goog.string.StringBuffer.prototype.toString = function() {
158
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
159
+ var str = this.buffer_.join('');
160
+ // Given a string with the entire contents, simplify the StringBuffer by
161
+ // setting its contents to only be this string, rather than many fragments.
162
+ this.clear();
163
+ if (str) {
164
+ this.append(str);
165
+ }
166
+ return str;
167
+ } else {
168
+ return /** @type {string} */ (this.buffer_);
169
+ }
170
+ };
171
+ ;
172
+ FI"
173
+ F"%823b8d430427543b670a3eb589ceb8e1
@@ -0,0 +1,256 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325549267.947605: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%63b9d027b59e7be971ed4a60289d3001I"logical_path;
5
+ FI" closure/goog/dom/classes.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/dom/classes.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"%// Copyright 2006 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 for adding, removing and setting classes.
29
+ *
30
+ */
31
+
32
+
33
+
34
+ goog.provide('goog.dom.classes');
35
+
36
+ goog.require('goog.array');
37
+
38
+
39
+ /**
40
+ * Sets the entire class name of an element.
41
+ * @param {Node} element DOM node to set class of.
42
+ * @param {string} className Class name(s) to apply to element.
43
+ */
44
+ goog.dom.classes.set = function(element, className) {
45
+ element.className = className;
46
+ };
47
+
48
+
49
+ /**
50
+ * Gets an array of class names on an element
51
+ * @param {Node} element DOM node to get class of.
52
+ * @return {Array} Class names on {@code element}.
53
+ */
54
+ goog.dom.classes.get = function(element) {
55
+ var className = element.className;
56
+ // Some types of elements don't have a className in IE (e.g. iframes).
57
+ // Furthermore, in Firefox, className is not a string when the element is
58
+ // an SVG element.
59
+ return className && typeof className.split == 'function' ?
60
+ className.split(/\s+/) : [];
61
+ };
62
+
63
+
64
+ /**
65
+ * Adds a class or classes to an element. Does not add multiples of class names.
66
+ * @param {Node} element DOM node to add class to.
67
+ * @param {...string} var_args Class names to add.
68
+ * @return {boolean} Whether class was added (or all classes were added).
69
+ */
70
+ goog.dom.classes.add = function(element, var_args) {
71
+ var classes = goog.dom.classes.get(element);
72
+ var args = goog.array.slice(arguments, 1);
73
+
74
+ var b = goog.dom.classes.add_(classes, args);
75
+ element.className = classes.join(' ');
76
+
77
+ return b;
78
+ };
79
+
80
+
81
+ /**
82
+ * Removes a class or classes from an element.
83
+ * @param {Node} element DOM node to remove class from.
84
+ * @param {...string} var_args Class name(s) to remove.
85
+ * @return {boolean} Whether all classes in {@code var_args} were found and
86
+ * removed.
87
+ */
88
+ goog.dom.classes.remove = function(element, var_args) {
89
+ var classes = goog.dom.classes.get(element);
90
+ var args = goog.array.slice(arguments, 1);
91
+
92
+ var b = goog.dom.classes.remove_(classes, args);
93
+ element.className = classes.join(' ');
94
+
95
+ return b;
96
+ };
97
+
98
+
99
+ /**
100
+ * Helper method for {@link goog.dom.classes.add} and
101
+ * {@link goog.dom.classes.addRemove}. Adds one or more classes to the supplied
102
+ * classes array.
103
+ * @param {Array.<string>} classes All class names for the element, will be
104
+ * updated to have the classes supplied in {@code args} added.
105
+ * @param {Array.<string>} args Class names to add.
106
+ * @return {boolean} Whether all classes in were added.
107
+ * @private
108
+ */
109
+ goog.dom.classes.add_ = function(classes, args) {
110
+ var rv = 0;
111
+ for (var i = 0; i < args.length; i++) {
112
+ if (!goog.array.contains(classes, args[i])) {
113
+ classes.push(args[i]);
114
+ rv++;
115
+ }
116
+ }
117
+ return rv == args.length;
118
+ };
119
+
120
+
121
+ /**
122
+ * Helper method for {@link goog.dom.classes.remove} and
123
+ * {@link goog.dom.classes.addRemove}. Removes one or more classes from the
124
+ * supplied classes array.
125
+ * @param {Array.<string>} classes All class names for the element, will be
126
+ * updated to have the classes supplied in {@code args} removed.
127
+ * @param {Array.<string>} args Class names to remove.
128
+ * @return {boolean} Whether all classes in were found and removed.
129
+ * @private
130
+ */
131
+ goog.dom.classes.remove_ = function(classes, args) {
132
+ var rv = 0;
133
+ for (var i = 0; i < classes.length; i++) {
134
+ if (goog.array.contains(args, classes[i])) {
135
+ goog.array.splice(classes, i--, 1);
136
+ rv++;
137
+ }
138
+ }
139
+ return rv == args.length;
140
+ };
141
+
142
+
143
+ /**
144
+ * Switches a class on an element from one to another without disturbing other
145
+ * classes. If the fromClass isn't removed, the toClass won't be added.
146
+ * @param {Node} element DOM node to swap classes on.
147
+ * @param {string} fromClass Class to remove.
148
+ * @param {string} toClass Class to add.
149
+ * @return {boolean} Whether classes were switched.
150
+ */
151
+ goog.dom.classes.swap = function(element, fromClass, toClass) {
152
+ var classes = goog.dom.classes.get(element);
153
+
154
+ var removed = false;
155
+ for (var i = 0; i < classes.length; i++) {
156
+ if (classes[i] == fromClass) {
157
+ goog.array.splice(classes, i--, 1);
158
+ removed = true;
159
+ }
160
+ }
161
+
162
+ if (removed) {
163
+ classes.push(toClass);
164
+ element.className = classes.join(' ');
165
+ }
166
+
167
+ return removed;
168
+ };
169
+
170
+
171
+ /**
172
+ * Adds zero or more classes to an element and removes zero or more as a single
173
+ * operation. Unlike calling {@link goog.dom.classes.add} and
174
+ * {@link goog.dom.classes.remove} separately, this is more efficient as it only
175
+ * parses the class property once.
176
+ *
177
+ * If a class is in both the remove and add lists, it will be added. Thus,
178
+ * you can use this instead of {@link goog.dom.classes.swap} when you have
179
+ * more than two class names that you want to swap.
180
+ *
181
+ * @param {Node} element DOM node to swap classes on.
182
+ * @param {string|Array.<string>|null} classesToRemove Class or classes to
183
+ * remove, if null no classes are removed.
184
+ * @param {string|Array.<string>|null} classesToAdd Class or classes to add, if
185
+ * null no classes are added.
186
+ */
187
+ goog.dom.classes.addRemove = function(element, classesToRemove, classesToAdd) {
188
+ var classes = goog.dom.classes.get(element);
189
+ if (goog.isString(classesToRemove)) {
190
+ goog.array.remove(classes, classesToRemove);
191
+ } else if (goog.isArray(classesToRemove)) {
192
+ goog.dom.classes.remove_(classes, classesToRemove);
193
+ }
194
+
195
+ if (goog.isString(classesToAdd) &&
196
+ !goog.array.contains(classes, classesToAdd)) {
197
+ classes.push(classesToAdd);
198
+ } else if (goog.isArray(classesToAdd)) {
199
+ goog.dom.classes.add_(classes, classesToAdd);
200
+ }
201
+
202
+ element.className = classes.join(' ');
203
+ };
204
+
205
+
206
+ /**
207
+ * Returns true if an element has a class.
208
+ * @param {Node} element DOM node to test.
209
+ * @param {string} className Class name to test for.
210
+ * @return {boolean} Whether element has the class.
211
+ */
212
+ goog.dom.classes.has = function(element, className) {
213
+ return goog.array.contains(goog.dom.classes.get(element), className);
214
+ };
215
+
216
+
217
+ /**
218
+ * Adds or removes a class depending on the enabled argument.
219
+ * @param {Node} element DOM node to add or remove the class on.
220
+ * @param {string} className Class name to add or remove.
221
+ * @param {boolean} enabled Whether to add or remove the class (true adds,
222
+ * false removes).
223
+ */
224
+ goog.dom.classes.enable = function(element, className, enabled) {
225
+ if (enabled) {
226
+ goog.dom.classes.add(element, className);
227
+ } else {
228
+ goog.dom.classes.remove(element, className);
229
+ }
230
+ };
231
+
232
+
233
+ /**
234
+ * Removes a class if an element has it, and adds it the element doesn't have
235
+ * it. Won't affect other classes on the node.
236
+ * @param {Node} element DOM node to toggle class on.
237
+ * @param {string} className Class to toggle.
238
+ * @return {boolean} True if class was added, false if it was removed
239
+ * (in other words, whether element has the class after this function has
240
+ * been called).
241
+ */
242
+ goog.dom.classes.toggle = function(element, className) {
243
+ var add = !goog.dom.classes.has(element, className);
244
+ goog.dom.classes.enable(element, className, add);
245
+ return add;
246
+ };
247
+ ;
248
+ FI"asset_paths;
249
+ F["�/Users/ali/.rvm/gems/ruby-1.9.3-p0/bundler/gems/closure-library-wrapper-b30bab11ab83/vendor/closure-library/closure/goog/dom/classes.jsI"dependency_paths;
250
+ F[{I" path;
251
+ F"�/Users/ali/.rvm/gems/ruby-1.9.3-p0/bundler/gems/closure-library-wrapper-b30bab11ab83/vendor/closure-library/closure/goog/dom/classes.jsI"
252
+ mtime;
253
+ FIu: Time
254
+ T: offsetiI"hexdigest;
255
+ F"%afe16d90ef6698eeee0daf89e1735ef6I"
256
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,173 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325538162.4182222: @value{ I" length:EFiI" digest;
2
+ F"%6c9c6de4d95a1566338ea1406209605aI" source;
3
+ FI"// Copyright 2006 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 Utility for fast string concatenation.
19
+ */
20
+
21
+
22
+ goog.provide('goog.string.StringBuffer');
23
+
24
+ goog.require('goog.userAgent.jscript');
25
+
26
+
27
+
28
+ /**
29
+ * Utility class to facilitate much faster string concatenation in IE,
30
+ * using Array.join() rather than the '+' operator. For other browsers
31
+ * we simply use the '+' operator.
32
+ *
33
+ * @param {Object|number|string|boolean=} opt_a1 Optional first initial item
34
+ * to append.
35
+ * @param {...Object|number|string|boolean} var_args Other initial items to
36
+ * append, e.g., new goog.string.StringBuffer('foo', 'bar').
37
+ * @constructor
38
+ */
39
+ goog.string.StringBuffer = function(opt_a1, var_args) {
40
+ /**
41
+ * Internal buffer for the string to be concatenated.
42
+ * @type {string|Array}
43
+ * @private
44
+ */
45
+ this.buffer_ = goog.userAgent.jscript.HAS_JSCRIPT ? [] : '';
46
+
47
+ if (opt_a1 != null) {
48
+ this.append.apply(this, arguments);
49
+ }
50
+ };
51
+
52
+
53
+ /**
54
+ * Sets the contents of the string buffer object, replacing what's currently
55
+ * there.
56
+ *
57
+ * @param {string} s String to set.
58
+ */
59
+ goog.string.StringBuffer.prototype.set = function(s) {
60
+ this.clear();
61
+ this.append(s);
62
+ };
63
+
64
+
65
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
66
+ /**
67
+ * Length of internal buffer (faster than calling buffer_.length).
68
+ * Only used if buffer_ is an array.
69
+ * @type {number}
70
+ * @private
71
+ */
72
+ goog.string.StringBuffer.prototype.bufferLength_ = 0;
73
+
74
+ /**
75
+ * Appends one or more items to the buffer.
76
+ *
77
+ * Calling this with null, undefined, or empty arguments is an error.
78
+ *
79
+ * @param {Object|number|string|boolean} a1 Required first string.
80
+ * @param {Object|number|string|boolean=} opt_a2 Optional second string.
81
+ * @param {...Object|number|string|boolean} var_args Other items to append,
82
+ * e.g., sb.append('foo', 'bar', 'baz').
83
+ * @return {goog.string.StringBuffer} This same StringBuffer object.
84
+ */
85
+ goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
86
+ // IE version.
87
+
88
+ if (opt_a2 == null) { // second argument is undefined (null == undefined)
89
+ // Array assignment is 2x faster than Array push. Also, use a1
90
+ // directly to avoid arguments instantiation, another 2x improvement.
91
+ this.buffer_[this.bufferLength_++] = a1;
92
+ } else {
93
+ this.buffer_.push.apply(/** @type {Array} */ (this.buffer_), arguments);
94
+ this.bufferLength_ = this.buffer_.length;
95
+ }
96
+ return this;
97
+ };
98
+ } else {
99
+
100
+ /**
101
+ * Appends one or more items to the buffer.
102
+ *
103
+ * Calling this with null, undefined, or empty arguments is an error.
104
+ *
105
+ * @param {Object|number|string|boolean} a1 Required first string.
106
+ * @param {Object|number|string|boolean=} opt_a2 Optional second string.
107
+ * @param {...Object|number|string|boolean} var_args Other items to append,
108
+ * e.g., sb.append('foo', 'bar', 'baz').
109
+ * @return {goog.string.StringBuffer} This same StringBuffer object.
110
+ * @suppress {duplicate}
111
+ */
112
+ goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
113
+ // W3 version.
114
+
115
+ // Use a1 directly to avoid arguments instantiation for single-arg case.
116
+ this.buffer_ += a1;
117
+ if (opt_a2 != null) { // second argument is undefined (null == undefined)
118
+ for (var i = 1; i < arguments.length; i++) {
119
+ this.buffer_ += arguments[i];
120
+ }
121
+ }
122
+ return this;
123
+ };
124
+ }
125
+
126
+
127
+ /**
128
+ * Clears the internal buffer.
129
+ */
130
+ goog.string.StringBuffer.prototype.clear = function() {
131
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
132
+ this.buffer_.length = 0; // Reuse the array to avoid creating new object.
133
+ this.bufferLength_ = 0;
134
+ } else {
135
+ this.buffer_ = '';
136
+ }
137
+ };
138
+
139
+
140
+ /**
141
+ * Returns the length of the current contents of the buffer. In IE, this is
142
+ * O(n) where n = number of appends, so to avoid quadratic behavior, do not call
143
+ * this after every append.
144
+ *
145
+ * @return {number} the length of the current contents of the buffer.
146
+ */
147
+ goog.string.StringBuffer.prototype.getLength = function() {
148
+ return this.toString().length;
149
+ };
150
+
151
+
152
+ /**
153
+ * Returns the concatenated string.
154
+ *
155
+ * @return {string} The concatenated string.
156
+ */
157
+ goog.string.StringBuffer.prototype.toString = function() {
158
+ if (goog.userAgent.jscript.HAS_JSCRIPT) {
159
+ var str = this.buffer_.join('');
160
+ // Given a string with the entire contents, simplify the StringBuffer by
161
+ // setting its contents to only be this string, rather than many fragments.
162
+ this.clear();
163
+ if (str) {
164
+ this.append(str);
165
+ }
166
+ return str;
167
+ } else {
168
+ return /** @type {string} */ (this.buffer_);
169
+ }
170
+ };
171
+ ;
172
+ FI"
173
+ F"%86edd9edee449acc435e63971d4584a9