yellow-brick-road 0.1.1
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.
- data/README.rst +148 -0
- data/Rakefile +37 -0
- data/lib/tasks/yellow-brick-road_tasks.rake +4 -0
- data/lib/yellow-brick-road.rb +6 -0
- data/lib/yellow-brick-road/config.rb +15 -0
- data/lib/yellow-brick-road/directive_processor.rb +68 -0
- data/lib/yellow-brick-road/engine.rb +22 -0
- data/lib/yellow-brick-road/soy_processor.rb +56 -0
- data/lib/yellow-brick-road/utils.rb +38 -0
- data/lib/yellow-brick-road/version.rb +3 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +12 -0
- data/test/dummy/app/assets/javascripts/closure-deps.js +4 -0
- data/test/dummy/app/assets/javascripts/my-closure/simple.js.soy +14 -0
- data/test/dummy/app/assets/javascripts/my-closure/start.js +25 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +7 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/application/index.html.erb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +18 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +51 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/test/dummy/config/initializers/yellow_brick_road.rb +2 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/log/development.log +13924 -0
- data/test/dummy/log/test.log +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/BE0/120/sprockets%2F751842b8c6750008c7310d182600d173 +142 -0
- data/test/dummy/tmp/cache/assets/C19/950/sprockets%2F142437f1d8d9424007b4a882a5429333 +1372 -0
- data/test/dummy/tmp/cache/assets/C4B/D00/sprockets%2F400f22c081529179ce3d079457de3009 +806 -0
- data/test/dummy/tmp/cache/assets/C5A/EE0/sprockets%2Fb711429ed948c503b718d077037780f8 +0 -0
- data/test/dummy/tmp/cache/assets/C5B/A80/sprockets%2F508569b474262724c61a461f7777dab7 +1118 -0
- data/test/dummy/tmp/cache/assets/C6C/660/sprockets%2F2c298b3b02232a21527680685a3efc30 +9289 -0
- data/test/dummy/tmp/cache/assets/C72/8A0/sprockets%2F167b265129e30d87d253c406db305c60 +293 -0
- data/test/dummy/tmp/cache/assets/C7E/9F0/sprockets%2F89862076204c62c4593ac20de32da909 +9 -0
- data/test/dummy/tmp/cache/assets/C8B/5F0/sprockets%2Fc6a4470b5c21e285e829a99365839b24 +0 -0
- data/test/dummy/tmp/cache/assets/C92/D20/sprockets%2F2e618f7805f445889aec94885a500f03 +457 -0
- data/test/dummy/tmp/cache/assets/C98/FD0/sprockets%2Fb11442af041f96e87a43a1dc11231745 +283 -0
- data/test/dummy/tmp/cache/assets/CA3/520/sprockets%2F5379d7143c6c52b11b88dc0ab5436133 +277 -0
- data/test/dummy/tmp/cache/assets/CA5/450/sprockets%2F6bb727c9312a749134ad67323a317f0d +73 -0
- data/test/dummy/tmp/cache/assets/CA5/4F0/sprockets%2Feeb7de7771527700af194c0441d29101 +709 -0
- data/test/dummy/tmp/cache/assets/CA6/E90/sprockets%2F611f68180f43c4181f06ae5c5f8201e2 +1546 -0
- data/test/dummy/tmp/cache/assets/CA7/310/sprockets%2F45664cf816315200b574e029fde6f10a +0 -0
- data/test/dummy/tmp/cache/assets/CA9/9D0/sprockets%2F2672e32464cf7267c4ba3d028f54b153 +224 -0
- data/test/dummy/tmp/cache/assets/CAB/5A0/sprockets%2F7f50e0289f150c8636ac9253129bc13c +2556 -0
- data/test/dummy/tmp/cache/assets/CB5/7E0/sprockets%2F42ff6672683b2029233a800e7539eeee +474 -0
- data/test/dummy/tmp/cache/assets/CB6/DC0/sprockets%2F2f9882155bb2d4d3ab5d708951857c60 +494 -0
- data/test/dummy/tmp/cache/assets/CBB/680/sprockets%2F1dc336d96fb52df34b458185559922b5 +1018 -0
- data/test/dummy/tmp/cache/assets/CBC/640/sprockets%2F67d2e0d9e5129d237e575d2780c64b47 +1260 -0
- data/test/dummy/tmp/cache/assets/CBE/550/sprockets%2Fd680cac830e0b3408ba910f0b0421147 +25 -0
- data/test/dummy/tmp/cache/assets/CC7/790/sprockets%2F69941f32a12e4f99d4a57f65386d870d +608 -0
- data/test/dummy/tmp/cache/assets/CCB/F80/sprockets%2Fa865701ef2ec41155e524772c31a1a2b +1088 -0
- data/test/dummy/tmp/cache/assets/CCE/580/sprockets%2F879411ed27ed1c557d57853d8f579b56 +0 -0
- data/test/dummy/tmp/cache/assets/CD0/070/sprockets%2F6748fe8481965f260d9c56b7f9f508a2 +1530 -0
- data/test/dummy/tmp/cache/assets/CD4/750/sprockets%2Faf3505141ecb3169ce41ce519d136924 +0 -0
- data/test/dummy/tmp/cache/assets/CD6/A90/sprockets%2F3f55ac75b9fb8426312116bcb940a580 +2539 -0
- data/test/dummy/tmp/cache/assets/CD9/6C0/sprockets%2F5e2458bc52da90ba349a66035e3b6752 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/F50/sprockets%2F9008bf696500cfae1d61f045f209181e +256 -0
- data/test/dummy/tmp/cache/assets/CDB/B40/sprockets%2F53529a22c994570a0df4742c0bfe61f4 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/D10/sprockets%2F1e775b4ff06b4401c07503ce95a839b5 +75 -0
- data/test/dummy/tmp/cache/assets/CDE/CD0/sprockets%2F141066798b4acf07053f7e3a6cb4e555 +1613 -0
- data/test/dummy/tmp/cache/assets/CE1/760/sprockets%2F245fe11803630fe30d0cf8a869886ab5 +357 -0
- data/test/dummy/tmp/cache/assets/CE1/FA0/sprockets%2F863d1650ef066e4a2168bc57c7c0e096 +0 -0
- data/test/dummy/tmp/cache/assets/CE2/310/sprockets%2Fd38075d5592ecaf82e43526c03b467c4 +1545 -0
- data/test/dummy/tmp/cache/assets/CE2/420/sprockets%2F30f2e8f30477e80cf6416dfe27307c07 +204 -0
- data/test/dummy/tmp/cache/assets/CE2/D70/sprockets%2F467c44b63644e0f44dd06a585f36f1a6 +522 -0
- data/test/dummy/tmp/cache/assets/CE3/670/sprockets%2Fddd11860b444cd0f9996be0c46762318 +796 -0
- data/test/dummy/tmp/cache/assets/CE4/0B0/sprockets%2Ff11535d785c0d34349c64d673bd4b28f +1105 -0
- data/test/dummy/tmp/cache/assets/CE4/590/sprockets%2Fd68edcc87a4ae302794093081b45b819 +10 -0
- data/test/dummy/tmp/cache/assets/CE4/D60/sprockets%2F61772e4a60b616f74da91b838a2f4f82 +0 -0
- data/test/dummy/tmp/cache/assets/CE6/DD0/sprockets%2F2fe073024a2bf26bd98458388b57af37 +1355 -0
- data/test/dummy/tmp/cache/assets/CE7/160/sprockets%2Fba1f9939f031b4356ec1869d40fc2747 +1261 -0
- data/test/dummy/tmp/cache/assets/CE8/C70/sprockets%2Fc6c9ba3c677b5e2af8520395192c9445 +173 -0
- data/test/dummy/tmp/cache/assets/CEA/8B0/sprockets%2Ff77e549cb6d37604105f35d4e67d8c21 +511 -0
- data/test/dummy/tmp/cache/assets/CEA/AA0/sprockets%2F5f816982c86d2e6b72b2f5f65c51d070 +1529 -0
- data/test/dummy/tmp/cache/assets/CEA/C10/sprockets%2F9dcd541e67c299ab076a44a2183872f8 +0 -0
- data/test/dummy/tmp/cache/assets/CF1/5A0/sprockets%2F1a697695edf2bb7b49a2896904218bc7 +115 -0
- data/test/dummy/tmp/cache/assets/CF4/480/sprockets%2F5e99c77e93f4a522c84357e62b25e0f7 +43 -0
- data/test/dummy/tmp/cache/assets/CF7/460/sprockets%2Fd12ea9733fe3c92456f57f9145569b9c +0 -0
- data/test/dummy/tmp/cache/assets/CF7/470/sprockets%2F2897897a166ca3369fecb88f83f211b5 +435 -0
- data/test/dummy/tmp/cache/assets/CFA/760/sprockets%2Fa9024adba14091e0635c6874d1db4e22 +0 -0
- data/test/dummy/tmp/cache/assets/D01/F30/sprockets%2Fe639a15b6e0cca37d12443b408e1166f +25 -0
- data/test/dummy/tmp/cache/assets/D02/9F0/sprockets%2Fb99eae308897fe88cb9414b96824098b +0 -0
- data/test/dummy/tmp/cache/assets/D03/330/sprockets%2F1e003cdb3e7dcc9307e84090ad457127 +454 -0
- data/test/dummy/tmp/cache/assets/D03/8B0/sprockets%2Ff74632bddf2c0b2018ca7b736309380e +365 -0
- data/test/dummy/tmp/cache/assets/D05/0A0/sprockets%2Fe57658220260db13eb5577aef42cb61b +257 -0
- data/test/dummy/tmp/cache/assets/D05/920/sprockets%2F909507434dcc270db4853e4c147f0aac +31 -0
- data/test/dummy/tmp/cache/assets/D08/510/sprockets%2Fa567be6cb6d7310096f1739b25a5a3f0 +50 -0
- data/test/dummy/tmp/cache/assets/D08/9F0/sprockets%2F1d61d2c89ca50957066bacc5b69011f5 +1424 -0
- data/test/dummy/tmp/cache/assets/D0A/790/sprockets%2Feb16913e6504c9b0d3be431de39e4751 +300 -0
- data/test/dummy/tmp/cache/assets/D0C/C50/sprockets%2Fd6613bee8b40d50459af6b52a7084f34 +796 -0
- data/test/dummy/tmp/cache/assets/D0D/030/sprockets%2Fba3f13b4a444679e8bc2549226ec743b +21 -0
- data/test/dummy/tmp/cache/assets/D0D/350/sprockets%2F2670bce036d485e15d059c0f1e98f24a +207 -0
- data/test/dummy/tmp/cache/assets/D13/270/sprockets%2F497cb163e6317e3fc1565d832f406cfb +348 -0
- data/test/dummy/tmp/cache/assets/D13/380/sprockets%2F786d003c9c7fb759dd26c1030c087cf6 +813 -0
- data/test/dummy/tmp/cache/assets/D13/7C0/sprockets%2F528d22310a9ab8e6fba08d82844ce795 +0 -0
- data/test/dummy/tmp/cache/assets/D15/F60/sprockets%2Fa28394e3f80365b5bc86794dd46daa22 +0 -0
- data/test/dummy/tmp/cache/assets/D18/500/sprockets%2Fd22c2d97d1db2154f2f7592906e957ea +1001 -0
- data/test/dummy/tmp/cache/assets/D1B/C70/sprockets%2F1c04848b1e1d6e8e33b8581f8c8128ff +223 -0
- data/test/dummy/tmp/cache/assets/D1C/600/sprockets%2Fa0601f99147f59ddd6266e6aff077e14 +0 -0
- data/test/dummy/tmp/cache/assets/D1E/470/sprockets%2Fb3933e694547b78bf6fb15f44a4623fe +53 -0
- data/test/dummy/tmp/cache/assets/D1F/480/sprockets%2F545164168becf42b289efc8708f1db68 +1278 -0
- data/test/dummy/tmp/cache/assets/D21/630/sprockets%2F0a14114729c14637f2e8f122acabd1ab +823 -0
- data/test/dummy/tmp/cache/assets/D24/A90/sprockets%2F21c8a0d48c51b8585ba03bc112ecd153 +692 -0
- data/test/dummy/tmp/cache/assets/D25/D30/sprockets%2F3b937f4c16d2aa0a28fc02a0e922712b +1441 -0
- data/test/dummy/tmp/cache/assets/D25/F30/sprockets%2Fe251527c0c018f4b4ad44b2ad7064fb0 +2255 -0
- data/test/dummy/tmp/cache/assets/D26/DE0/sprockets%2F761ac1bdb0739cc56fa0c1224b137b09 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/C30/sprockets%2F978fe7268754f451c59b9ccb323ffa56 +0 -0
- data/test/dummy/tmp/cache/assets/D2B/0F0/sprockets%2Fbf223af03335cfc08a71e549e10c0e27 +2539 -0
- data/test/dummy/tmp/cache/assets/D2E/6D0/sprockets%2F9e7fda3affb389313cc50223f01c0324 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/110/sprockets%2F3730ffe2ed34c1219d580bd1615ea7b0 +2239 -0
- data/test/dummy/tmp/cache/assets/D2F/F10/sprockets%2F9cac242f0bf5ec00079ea3a463e26552 +153 -0
- data/test/dummy/tmp/cache/assets/D30/1D0/sprockets%2Fd690a26a0b0ae138c1c48d257a7674bc +589 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D36/940/sprockets%2Fb4ba462ac9f4aac561c36e60367c1378 +572 -0
- data/test/dummy/tmp/cache/assets/D37/090/sprockets%2F2f2e71ebbc240014ebf648f0917e854a +798 -0
- data/test/dummy/tmp/cache/assets/D3A/440/sprockets%2F6d332243647c841dea36ed822cdfc23e +165 -0
- data/test/dummy/tmp/cache/assets/D3B/5A0/sprockets%2F82e05cf8c88ba8cb1c87e50d51372a03 +0 -0
- data/test/dummy/tmp/cache/assets/D41/B30/sprockets%2Fba1b93913dd01d83ac9a96df334456f8 +0 -0
- data/test/dummy/tmp/cache/assets/D43/D90/sprockets%2F04f3a5926d5a7672456dc7afa73d0c7f +38 -0
- data/test/dummy/tmp/cache/assets/D45/1F0/sprockets%2F1bfa855d9c10ff2431a9a548958cc5e4 +83 -0
- data/test/dummy/tmp/cache/assets/D45/B10/sprockets%2F643f3d9b216e48df952b7f150a46a7ec +60 -0
- data/test/dummy/tmp/cache/assets/D46/040/sprockets%2F199546844e5939721a5afcbcce4ea43a +143 -0
- data/test/dummy/tmp/cache/assets/D49/320/sprockets%2Fd8123eb229e34c9f507f7b1876f1c4ee +506 -0
- data/test/dummy/tmp/cache/assets/D49/750/sprockets%2Ff41ef1c0832b7294fb15588ff5c783cb +0 -0
- data/test/dummy/tmp/cache/assets/D49/930/sprockets%2F1071926698fa55abc71e1b6fd966dfe1 +72 -0
- data/test/dummy/tmp/cache/assets/D49/D10/sprockets%2Fb67b8d7cc7579352a91694f9ae10cdb0 +127 -0
- data/test/dummy/tmp/cache/assets/D4A/160/sprockets%2Fcbd8988b5e18d153eff6230d72e9046a +516 -0
- data/test/dummy/tmp/cache/assets/D4A/2B0/sprockets%2Ffcdf002d38fd938bf7226b46b76706c8 +1101 -0
- data/test/dummy/tmp/cache/assets/D4E/2F0/sprockets%2F77cb87ae57f0d8c25cdaa74181a64997 +1441 -0
- data/test/dummy/tmp/cache/assets/D4F/060/sprockets%2Fa9e66b39ada7394a29bf44f3a682f665 +511 -0
- data/test/dummy/tmp/cache/assets/D50/BD0/sprockets%2F88650dd57ef64075462e6dae757dbe2c +0 -0
- data/test/dummy/tmp/cache/assets/D53/CA0/sprockets%2Fa85032e82709a043fbb2ec00e04f2bbd +0 -0
- data/test/dummy/tmp/cache/assets/D54/BF0/sprockets%2F91970514ff528e8d2bfd81f1ec83c9c8 +240 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +10 -0
- data/test/dummy/tmp/cache/assets/D56/500/sprockets%2F75ebadd035f1324b194034af92eac3a0 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/900/sprockets%2F5729f77d97fdee53b1942cf17f6f05e4 +474 -0
- data/test/dummy/tmp/cache/assets/D5A/D50/sprockets%2F81bace3db2c2f1241175ff3c5009d08c +0 -0
- data/test/dummy/tmp/cache/assets/D5B/C70/sprockets%2Fe64119a9db7017b7ab3b0da1b6076f0d +44 -0
- data/test/dummy/tmp/cache/assets/D5E/4D0/sprockets%2F756f25e4ad861a050cdc41bb8414e4ab +126 -0
- data/test/dummy/tmp/cache/assets/D5E/730/sprockets%2Fd30caf70b387c4604326bdda32aeb549 +0 -0
- data/test/dummy/tmp/cache/assets/D5E/AA0/sprockets%2F790dd07caaaacb30ceb0174664e90817 +136 -0
- data/test/dummy/tmp/cache/assets/D64/D30/sprockets%2Fe4bd8f60a3a446274c3cb2f5d16563ac +590 -0
- data/test/dummy/tmp/cache/assets/D66/400/sprockets%2Fecb7401d20daf25605a7afad3a793778 +0 -0
- data/test/dummy/tmp/cache/assets/D67/250/sprockets%2F8422eb26855ca9c953a3bf1aeade8004 +0 -0
- data/test/dummy/tmp/cache/assets/D69/900/sprockets%2F28ae64f52cb18f77b1a1bd9c51293da4 +0 -0
- data/test/dummy/tmp/cache/assets/D6A/870/sprockets%2F1ece6a51b42f9280f4cee9020c94b72e +197 -0
- data/test/dummy/tmp/cache/assets/D6B/DD0/sprockets%2F9a0abc735e27fc61dab019788518eba4 +164 -0
- data/test/dummy/tmp/cache/assets/D6E/CC0/sprockets%2F8b4fbcec2475e7203b8859baf8e310a3 +0 -0
- data/test/dummy/tmp/cache/assets/D72/470/sprockets%2Fbc0c6d850e7c769e83d58eb3e6061b2a +2556 -0
- data/test/dummy/tmp/cache/assets/D72/9D0/sprockets%2F9402daf6da6f7eed331a9d78216cb761 +0 -0
- data/test/dummy/tmp/cache/assets/D74/070/sprockets%2F91ae68f698a39bd7d0d11150fc46e4cd +418 -0
- data/test/dummy/tmp/cache/assets/D74/7F0/sprockets%2F22dad1069ea6a8f29ae757c44e18ec83 +0 -0
- data/test/dummy/tmp/cache/assets/D75/3C0/sprockets%2F44e2ae51b97853d8ecda7b264a267c7d +1630 -0
- data/test/dummy/tmp/cache/assets/D77/780/sprockets%2Ffa2abdfb0b62867c346f79187b8e42d5 +823 -0
- data/test/dummy/tmp/cache/assets/D79/850/sprockets%2F4d540586ed379fd9a70fa0b7ce4f5b27 +306 -0
- data/test/dummy/tmp/cache/assets/D7A/B60/sprockets%2F5925c92f48caff053d08853dc69e5bba +0 -0
- data/test/dummy/tmp/cache/assets/D81/C90/sprockets%2F19aca5c835efce74878c23e581e2a89e +2239 -0
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +11228 -0
- data/test/dummy/tmp/cache/assets/D8B/B10/sprockets%2Fbb7a2305a8f2832631863bbababb67be +301 -0
- data/test/dummy/tmp/cache/assets/D92/3B0/sprockets%2F93dc71f411faf72ec8ef0b5d217b51a0 +505 -0
- data/test/dummy/tmp/cache/assets/D92/EE0/sprockets%2Ffd051ea0abf6be6970754aa732e40c8b +289 -0
- data/test/dummy/tmp/cache/assets/D93/810/sprockets%2F7dc1ac5e1b83ba5144e34cf156d48a8a +471 -0
- data/test/dummy/tmp/cache/assets/D94/020/sprockets%2F35cb4ce22488fb5bdd260508ca47a3fb +239 -0
- data/test/dummy/tmp/cache/assets/D94/EC0/sprockets%2F8b900fba18f8e046f5f12e6d1f0ac15b +74 -0
- data/test/dummy/tmp/cache/assets/D95/470/sprockets%2F5be5d361a52575c433831b5e8cccbace +9273 -0
- data/test/dummy/tmp/cache/assets/D97/9D0/sprockets%2F524a2a94a88c1d392dabcba654e365fc +103 -0
- data/test/dummy/tmp/cache/assets/D9D/800/sprockets%2Ff8387220eb4dda9b29a37b5deb9f2a40 +54 -0
- data/test/dummy/tmp/cache/assets/D9E/DD0/sprockets%2Fb6b4ffad6485eda046b327a196e8c44a +0 -0
- data/test/dummy/tmp/cache/assets/DA1/0A0/sprockets%2F359c94aee6ba2e15fc9666aa4de311c8 +166 -0
- data/test/dummy/tmp/cache/assets/DA1/0D0/sprockets%2F798de3c28452e164a7fc1a3a6e8cdb4b +652 -0
- data/test/dummy/tmp/cache/assets/DA3/CB0/sprockets%2Fdfad6bb1857a8af91f98ba137c18504e +815 -0
- data/test/dummy/tmp/cache/assets/DA4/E10/sprockets%2Fbda7705734ace95f12a7d79df9c14af2 +1354 -0
- data/test/dummy/tmp/cache/assets/DA5/E30/sprockets%2F2e6707a119e94a784efbadca18d7e8d1 +129 -0
- data/test/dummy/tmp/cache/assets/DA6/4B0/sprockets%2F4f7a708b6aa2d42eb577493dea7cef55 +115 -0
- data/test/dummy/tmp/cache/assets/DA8/A10/sprockets%2F0ae5bbb4ca200e74db3b64d72c2be120 +0 -0
- data/test/dummy/tmp/cache/assets/DA9/3F0/sprockets%2Fdd0af9cfd65fb7d02fe778c8f6015361 +499 -0
- data/test/dummy/tmp/cache/assets/DA9/780/sprockets%2Fe3559a635e8f92dec7727a3db2ae7b4c +813 -0
- data/test/dummy/tmp/cache/assets/DAC/0E0/sprockets%2F04cef8243a9ef7321846debc977ea8db +607 -0
- data/test/dummy/tmp/cache/assets/DB1/260/sprockets%2Fb879ff7530bf8cc175e0c7e70dc4e79b +0 -0
- data/test/dummy/tmp/cache/assets/DB4/4C0/sprockets%2F30a76cbd98dedb56742cd8ecaf858757 +0 -0
- data/test/dummy/tmp/cache/assets/DBD/7E0/sprockets%2F236fb1ac5ed9f2e3fe32203acc3a842d +0 -0
- data/test/dummy/tmp/cache/assets/DC2/DF0/sprockets%2Fe233bcaba8beff15626c35cb5e0e0936 +845 -0
- data/test/dummy/tmp/cache/assets/DC4/600/sprockets%2F59c96aa6c1cbebc61bff6c050a5351d7 +225 -0
- data/test/dummy/tmp/cache/assets/DC5/030/sprockets%2Fcb2fe864a0177eec19017c43ce9aa4ad +187 -0
- data/test/dummy/tmp/cache/assets/DC8/A60/sprockets%2F9fcb9f5c3f679ce749ee4c3f93869ba6 +74 -0
- data/test/dummy/tmp/cache/assets/DCB/D40/sprockets%2Ffd5542bfb7660a8d8cac3a2e46fb01f8 +828 -0
- data/test/dummy/tmp/cache/assets/DCC/020/sprockets%2F0c129c5f2784c96fa1dc3da6c19c1efc +128 -0
- data/test/dummy/tmp/cache/assets/DCF/520/sprockets%2F975162fb97a3ec7033db5f2fdba4fcd3 +70 -0
- data/test/dummy/tmp/cache/assets/DD0/000/sprockets%2F0d5d631cce6f0b078bb29cf98b3d78bb +276 -0
- data/test/dummy/tmp/cache/assets/DD0/C90/sprockets%2F84eeca4ef8f5eb29b13f7e1ea3c71324 +591 -0
- data/test/dummy/tmp/cache/assets/DD6/710/sprockets%2F9e83f2ebbe3e349efca2de390e15d635 +204 -0
- data/test/dummy/tmp/cache/assets/DE1/830/sprockets%2Fd23d3cafef2e2a9055bc103dffc1a023 +208 -0
- data/test/dummy/tmp/cache/assets/DEB/470/sprockets%2Fae2de0fcbc2214b71d3f2a875d2bc8c3 +2255 -0
- data/test/dummy/tmp/cache/assets/DEE/690/sprockets%2F5d824bcadef29060cc13eed71af4b4d0 +550 -0
- data/test/dummy/tmp/cache/assets/DF0/5D0/sprockets%2F25a875eb0a5d4c49bcc3fa39ea0adb26 +567 -0
- data/test/dummy/tmp/cache/assets/DF3/E20/sprockets%2Fada770c49a5d6b38d1cc43ed4d51c1fc +0 -0
- data/test/dummy/tmp/cache/assets/DF5/C80/sprockets%2F03ad7d7b3a8feba9ed9be82ae2083b20 +340 -0
- data/test/dummy/tmp/cache/assets/DF6/560/sprockets%2Fafceb2b55eb108efe4446dfb02b519b8 +0 -0
- data/test/dummy/tmp/cache/assets/DFC/030/sprockets%2Fcbdd3679eaba219b4e1ff20677af1c6f +1371 -0
- data/test/dummy/tmp/cache/assets/E00/970/sprockets%2F8bc6dde8d05c382dd07cbcec70f54e09 +378 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E12/2F0/sprockets%2F5c45062ecfbe512dcba176ba6ddacc00 +523 -0
- data/test/dummy/tmp/cache/assets/E21/5D0/sprockets%2Fd4fe6d611bfb0e63c04de5dbfb128a8a +0 -0
- data/test/dummy/tmp/cache/assets/E22/770/sprockets%2F2ccebcabfbb9b59159e4b73b3b30a74d +208 -0
- data/test/dummy/tmp/cache/assets/E31/A90/sprockets%2F26b98bbbc15eee9b370c7dcde88d16aa +394 -0
- data/test/dummy/tmp/cache/assets/E31/E30/sprockets%2Ffbdafcc4e2f44bb9fc653bcf9625b750 +284 -0
- data/test/dummy/tmp/cache/assets/E37/1C0/sprockets%2Fa5eb45fc86dafe2bee4e4fa3f53c4785 +0 -0
- data/test/dummy/tmp/cache/assets/E4C/960/sprockets%2F13fd6e4bfdf031acb3dedca8d0f407b4 +1277 -0
- data/test/dummy/tmp/cache/assets/E88/330/sprockets%2Fe02d0adb5529ffafcea1b9e5ccf69a5b +669 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/dummy/tmp/simple.js.js +20 -0
- data/test/dummy/tmp/soy-1325274421.js +20 -0
- data/test/dummy/tmp/soy-1325286267.js +20 -0
- data/test/test_helper.rb +10 -0
- data/test/yellow-brick-road_test.rb +7 -0
- metadata +538 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325290852.11801:@value{ I"length:EFi�
|
|
2
|
+
I"digest;
|
|
3
|
+
F"%b7f2f9f2118221772fcf6fca3140bf0aI"source;
|
|
4
|
+
FI"�
|
|
5
|
+
// Copyright 2007 The Closure Library Authors. All Rights Reserved.
|
|
6
|
+
//
|
|
7
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
// you may not use this file except in compliance with the License.
|
|
9
|
+
// You may obtain a copy of the License at
|
|
10
|
+
//
|
|
11
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
//
|
|
13
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
// distributed under the License is distributed on an "AS-IS" BASIS,
|
|
15
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
// See the License for the specific language governing permissions and
|
|
17
|
+
// limitations under the License.
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @fileoverview Detection of JScript version.
|
|
21
|
+
*
|
|
22
|
+
* @author arv@google.com (Erik Arvidsson)
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
goog.provide('goog.userAgent.jscript');
|
|
28
|
+
|
|
29
|
+
goog.require('goog.string');
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @define {boolean} True if it is known at compile time that the runtime
|
|
34
|
+
* environment will not be using JScript.
|
|
35
|
+
*/
|
|
36
|
+
goog.userAgent.jscript.ASSUME_NO_JSCRIPT = false;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializer for goog.userAgent.jscript. Detects if the user agent is using
|
|
41
|
+
* Microsoft JScript and which version of it.
|
|
42
|
+
*
|
|
43
|
+
* This is a named function so that it can be stripped via the jscompiler
|
|
44
|
+
* option for stripping types.
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
goog.userAgent.jscript.init_ = function() {
|
|
48
|
+
var hasScriptEngine = 'ScriptEngine' in goog.global;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_ =
|
|
55
|
+
hasScriptEngine && goog.global['ScriptEngine']() == 'JScript';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
61
|
+
goog.userAgent.jscript.DETECTED_VERSION_ =
|
|
62
|
+
goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_ ?
|
|
63
|
+
(goog.global['ScriptEngineMajorVersion']() + '.' +
|
|
64
|
+
goog.global['ScriptEngineMinorVersion']() + '.' +
|
|
65
|
+
goog.global['ScriptEngineBuildVersion']()) :
|
|
66
|
+
'0';
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
if (!goog.userAgent.jscript.ASSUME_NO_JSCRIPT) {
|
|
70
|
+
goog.userAgent.jscript.init_();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Whether we detect that the user agent is using Microsoft JScript.
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
*/
|
|
78
|
+
goog.userAgent.jscript.HAS_JSCRIPT = goog.userAgent.jscript.ASSUME_NO_JSCRIPT ?
|
|
79
|
+
false : goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_;
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The installed version of JScript.
|
|
84
|
+
* @type {string}
|
|
85
|
+
*/
|
|
86
|
+
goog.userAgent.jscript.VERSION = goog.userAgent.jscript.ASSUME_NO_JSCRIPT ?
|
|
87
|
+
'0' : goog.userAgent.jscript.DETECTED_VERSION_;
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Whether the installed version of JScript is as new or newer than a given
|
|
92
|
+
* version.
|
|
93
|
+
* @param {string} version The version to check.
|
|
94
|
+
* @return {boolean} Whether the installed version of JScript is as new or
|
|
95
|
+
* newer than the given version.
|
|
96
|
+
*/
|
|
97
|
+
goog.userAgent.jscript.isVersion = function(version) {
|
|
98
|
+
return goog.string.compareVersions(goog.userAgent.jscript.VERSION,
|
|
99
|
+
version) >= 0;
|
|
100
|
+
};
|
|
101
|
+
;
|
|
102
|
+
FI"
|
|
103
|
+
F"%2bcb21a43ee3ca0bf8a115ba85d2f965
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325183043.238229:@value{ I"length:EFi(I"digest;
|
|
2
|
+
F"%1abb6029a574212c4c5a3809aaad075dI"source;
|
|
3
|
+
FI"(// Copyright 2009 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 a base class for custom Error objects such that the
|
|
19
|
+
* stack is correctly maintained.
|
|
20
|
+
*
|
|
21
|
+
* You should never need to throw goog.debug.Error(msg) directly, Error(msg) is
|
|
22
|
+
* sufficient.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
goog.provide('goog.debug.Error');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Base class for custom error objects.
|
|
34
|
+
* @param {*=} opt_msg The message associated with the error.
|
|
35
|
+
* @constructor
|
|
36
|
+
* @extends {Error}
|
|
37
|
+
*/
|
|
38
|
+
goog.debug.Error = function(opt_msg) {
|
|
39
|
+
|
|
40
|
+
// Ensure there is a stack trace.
|
|
41
|
+
this.stack = new Error().stack || '';
|
|
42
|
+
|
|
43
|
+
if (opt_msg) {
|
|
44
|
+
this.message = String(opt_msg);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
goog.inherits(goog.debug.Error, Error);
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/** @override */
|
|
51
|
+
goog.debug.Error.prototype.name = 'CustomError';
|
|
52
|
+
;
|
|
53
|
+
FI"
|
|
54
|
+
F"%74d1875bd089f44f7a414b0e26cadbb0
|
|
Binary file
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325441615.371352:@value{ I"length:EFi�I"digest;
|
|
2
|
+
F"%7baaa0bae88d7b2f7ed64e41e8b2e2abI"source;
|
|
3
|
+
FI"�// Copyright 2005 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 Listener object.
|
|
19
|
+
* @see ../demos/events.html
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Namespace for events
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
goog.provide('goog.events.Listener');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Simple class that stores information about a listener
|
|
33
|
+
* @constructor
|
|
34
|
+
*/
|
|
35
|
+
goog.events.Listener = function() {
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Counter used to create a unique key
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
goog.events.Listener.counter_ = 0;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Whether the listener is a function or an object that implements handleEvent.
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
goog.events.Listener.prototype.isFunctionListener_;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Call back function or an object with a handleEvent function.
|
|
57
|
+
* @type {Function|Object|null}
|
|
58
|
+
*/
|
|
59
|
+
goog.events.Listener.prototype.listener;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Proxy for callback that passes through {@link goog.events#HandleEvent_}
|
|
64
|
+
* @type {Function}
|
|
65
|
+
*/
|
|
66
|
+
goog.events.Listener.prototype.proxy;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Object or node that callback is listening to
|
|
71
|
+
* @type {Object|goog.events.EventTarget}
|
|
72
|
+
*/
|
|
73
|
+
goog.events.Listener.prototype.src;
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Type of event
|
|
78
|
+
* @type {string}
|
|
79
|
+
*/
|
|
80
|
+
goog.events.Listener.prototype.type;
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Whether the listener is being called in the capture or bubble phase
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
*/
|
|
87
|
+
goog.events.Listener.prototype.capture;
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Optional object whose context to execute the listener in
|
|
92
|
+
* @type {Object|undefined}
|
|
93
|
+
*/
|
|
94
|
+
goog.events.Listener.prototype.handler;
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The key of the listener.
|
|
99
|
+
* @type {number}
|
|
100
|
+
*/
|
|
101
|
+
goog.events.Listener.prototype.key = 0;
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Whether the listener has been removed.
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
*/
|
|
108
|
+
goog.events.Listener.prototype.removed = false;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Whether to remove the listener after it has been called.
|
|
113
|
+
* @type {boolean}
|
|
114
|
+
*/
|
|
115
|
+
goog.events.Listener.prototype.callOnce = false;
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Initializes the listener.
|
|
120
|
+
* @param {Function|Object} listener Callback function, or an object with a
|
|
121
|
+
* handleEvent function.
|
|
122
|
+
* @param {Function} proxy Wrapper for the listener that patches the event.
|
|
123
|
+
* @param {Object} src Source object for the event.
|
|
124
|
+
* @param {string} type Event type.
|
|
125
|
+
* @param {boolean} capture Whether in capture or bubble phase.
|
|
126
|
+
* @param {Object=} opt_handler Object in whose context to execute the callback.
|
|
127
|
+
*/
|
|
128
|
+
goog.events.Listener.prototype.init = function(listener, proxy, src, type,
|
|
129
|
+
capture, opt_handler) {
|
|
130
|
+
// we do the test of the listener here so that we do not need to
|
|
131
|
+
// continiously do this inside handleEvent
|
|
132
|
+
if (goog.isFunction(listener)) {
|
|
133
|
+
this.isFunctionListener_ = true;
|
|
134
|
+
} else if (listener && listener.handleEvent &&
|
|
135
|
+
goog.isFunction(listener.handleEvent)) {
|
|
136
|
+
this.isFunctionListener_ = false;
|
|
137
|
+
} else {
|
|
138
|
+
throw Error('Invalid listener argument');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
this.listener = listener;
|
|
142
|
+
this.proxy = proxy;
|
|
143
|
+
this.src = src;
|
|
144
|
+
this.type = type;
|
|
145
|
+
this.capture = !!capture;
|
|
146
|
+
this.handler = opt_handler;
|
|
147
|
+
this.callOnce = false;
|
|
148
|
+
this.key = ++goog.events.Listener.counter_;
|
|
149
|
+
this.removed = false;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Calls the internal listener
|
|
155
|
+
* @param {Object} eventObject Event object to be passed to listener.
|
|
156
|
+
* @return {boolean} The result of the internal listener call.
|
|
157
|
+
*/
|
|
158
|
+
goog.events.Listener.prototype.handleEvent = function(eventObject) {
|
|
159
|
+
if (this.isFunctionListener_) {
|
|
160
|
+
return this.listener.call(this.handler || this.src, eventObject);
|
|
161
|
+
}
|
|
162
|
+
return this.listener.handleEvent.call(this.listener, eventObject);
|
|
163
|
+
};
|
|
164
|
+
;
|
|
165
|
+
FI"
|
|
166
|
+
F"%c851e6b5e18bc0c92faa45bdd214357c
|
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325441614.837821:@value{ I"length:EFi�@I"digest;
|
|
2
|
+
F"%4dd1165476498fc1ab2d8db975e4a152I"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 Generic rich data access API.
|
|
19
|
+
*
|
|
20
|
+
* Abstraction for data sources that allows listening for changes at different
|
|
21
|
+
* levels of the data tree and updating the data via XHR requests
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
goog.provide('goog.ds.BaseDataNode');
|
|
28
|
+
goog.provide('goog.ds.BasicNodeList');
|
|
29
|
+
goog.provide('goog.ds.DataNode');
|
|
30
|
+
goog.provide('goog.ds.DataNodeList');
|
|
31
|
+
goog.provide('goog.ds.EmptyNodeList');
|
|
32
|
+
goog.provide('goog.ds.LoadState');
|
|
33
|
+
goog.provide('goog.ds.SortedNodeList');
|
|
34
|
+
goog.provide('goog.ds.Util');
|
|
35
|
+
goog.provide('goog.ds.logger');
|
|
36
|
+
|
|
37
|
+
goog.require('goog.array');
|
|
38
|
+
goog.require('goog.debug.Logger');
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Interface for node in rich data tree.
|
|
44
|
+
*
|
|
45
|
+
* Names that are reserved for system use and shouldn't be used for data node
|
|
46
|
+
* names: eval, toSource, toString, unwatch, valueOf, watch. Behavior is
|
|
47
|
+
* undefined if these names are used.
|
|
48
|
+
*
|
|
49
|
+
* @constructor
|
|
50
|
+
*/
|
|
51
|
+
goog.ds.DataNode = function() {};
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get the value of the node
|
|
56
|
+
* @return {Object} The value of the node, or null if no value.
|
|
57
|
+
*/
|
|
58
|
+
goog.ds.DataNode.prototype.get = goog.nullFunction;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Set the value of the node
|
|
63
|
+
* @param {Object} value The new value of the node.
|
|
64
|
+
*/
|
|
65
|
+
goog.ds.DataNode.prototype.set = goog.nullFunction;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Gets all of the child nodes of the current node.
|
|
70
|
+
* Should return an empty DataNode list if no child nodes.
|
|
71
|
+
* @param {string=} opt_selector String selector to choose child nodes.
|
|
72
|
+
* @return {goog.ds.DataNodeList} The child nodes.
|
|
73
|
+
*/
|
|
74
|
+
goog.ds.DataNode.prototype.getChildNodes = goog.nullFunction;
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Gets a named child node of the current node
|
|
79
|
+
* @param {string} name The node name.
|
|
80
|
+
* @param {boolean=} opt_canCreate Whether to create a child node if it does not
|
|
81
|
+
* exist.
|
|
82
|
+
* @return {goog.ds.DataNode} The child node, or null
|
|
83
|
+
* if no node of this name exists.
|
|
84
|
+
*/
|
|
85
|
+
goog.ds.DataNode.prototype.getChildNode = goog.nullFunction;
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Gets the value of a child node
|
|
90
|
+
* @param {string} name The node name.
|
|
91
|
+
* @return {Object} The value of the node, or null if no value or the child node
|
|
92
|
+
* doesn't exist.
|
|
93
|
+
*/
|
|
94
|
+
goog.ds.DataNode.prototype.getChildNodeValue = goog.nullFunction;
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Sets a named child node of the current node.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} name The node name.
|
|
101
|
+
* @param {Object} value The value to set, can be DataNode, object, property,
|
|
102
|
+
* or null. If value is null, removes the child node.
|
|
103
|
+
* @return {Object} The child node, if the node was set.
|
|
104
|
+
*/
|
|
105
|
+
goog.ds.DataNode.prototype.setChildNode = goog.nullFunction;
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Get the name of the node relative to the parent node
|
|
110
|
+
* @return {string} The name of the node.
|
|
111
|
+
*/
|
|
112
|
+
goog.ds.DataNode.prototype.getDataName = goog.nullFunction;
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Set the name of the node relative to the parent node
|
|
117
|
+
* @param {string} name The name of the node.
|
|
118
|
+
*/
|
|
119
|
+
goog.ds.DataNode.prototype.setDataName = goog.nullFunction;
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the a qualified data path to this node
|
|
124
|
+
* @return {string} The data path.
|
|
125
|
+
*/
|
|
126
|
+
goog.ds.DataNode.prototype.getDataPath = goog.nullFunction;
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Load or reload the backing data for this node
|
|
131
|
+
*/
|
|
132
|
+
goog.ds.DataNode.prototype.load = goog.nullFunction;
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Gets the state of the backing data for this node
|
|
137
|
+
* @return {goog.ds.LoadState} The state.
|
|
138
|
+
*/
|
|
139
|
+
goog.ds.DataNode.prototype.getLoadState = null;
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Whether the value of this node is a homogeneous list of data
|
|
144
|
+
* @return {boolean} True if a list.
|
|
145
|
+
*/
|
|
146
|
+
goog.ds.DataNode.prototype.isList = goog.nullFunction;
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Enum for load state of a DataNode.
|
|
151
|
+
* @enum {string}
|
|
152
|
+
*/
|
|
153
|
+
goog.ds.LoadState = {
|
|
154
|
+
LOADED: 'LOADED',
|
|
155
|
+
LOADING: 'LOADING',
|
|
156
|
+
FAILED: 'FAILED',
|
|
157
|
+
NOT_LOADED: 'NOT_LOADED'
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Base class for data node functionality, has default implementations for
|
|
164
|
+
* many of the functions.
|
|
165
|
+
*
|
|
166
|
+
* implements goog.ds.DataNode
|
|
167
|
+
* @constructor
|
|
168
|
+
*/
|
|
169
|
+
goog.ds.BaseDataNode = function() {};
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Set the value of the node
|
|
174
|
+
* @param {Object} value The new value of the node.
|
|
175
|
+
*/
|
|
176
|
+
goog.ds.BaseDataNode.prototype.set = goog.nullFunction;
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Gets all of the child nodes of the current node.
|
|
181
|
+
* Should return an empty DataNode list if no child nodes.
|
|
182
|
+
* @param {string=} opt_selector String selector to choose child nodes.
|
|
183
|
+
* @return {goog.ds.DataNodeList} The child nodes.
|
|
184
|
+
*/
|
|
185
|
+
goog.ds.BaseDataNode.prototype.getChildNodes = function(opt_selector) {
|
|
186
|
+
return new goog.ds.EmptyNodeList();
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Gets a named child node of the current node
|
|
192
|
+
* @param {string} name The node name.
|
|
193
|
+
* @param {boolean=} opt_canCreate Whether you can create the child node if
|
|
194
|
+
* it doesn't exist already.
|
|
195
|
+
* @return {goog.ds.DataNode} The child node, or null if no node of
|
|
196
|
+
* this name exists and opt_create is false.
|
|
197
|
+
*/
|
|
198
|
+
goog.ds.BaseDataNode.prototype.getChildNode = function(name, opt_canCreate) {
|
|
199
|
+
return null;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Gets the value of a child node
|
|
205
|
+
* @param {string} name The node name.
|
|
206
|
+
* @return {Object} The value of the node, or null if no value or the
|
|
207
|
+
* child node doesn't exist.
|
|
208
|
+
*/
|
|
209
|
+
goog.ds.BaseDataNode.prototype.getChildNodeValue = function(name) {
|
|
210
|
+
return null;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get the name of the node relative to the parent node
|
|
216
|
+
* @return {string} The name of the node.
|
|
217
|
+
*/
|
|
218
|
+
goog.ds.BaseDataNode.prototype.getDataName = goog.nullFunction;
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Gets the a qualified data path to this node
|
|
223
|
+
* @return {string} The data path.
|
|
224
|
+
*/
|
|
225
|
+
goog.ds.BaseDataNode.prototype.getDataPath = function() {
|
|
226
|
+
var parentPath = '';
|
|
227
|
+
var myName = this.getDataName();
|
|
228
|
+
if (this.getParent_ && this.getParent_()) {
|
|
229
|
+
parentPath = this.getParent_().getDataPath() +
|
|
230
|
+
(myName.indexOf(goog.ds.STR_ARRAY_START) != -1 ? '' :
|
|
231
|
+
goog.ds.STR_PATH_SEPARATOR);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return parentPath + myName;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Load or reload the backing data for this node
|
|
240
|
+
*/
|
|
241
|
+
goog.ds.BaseDataNode.prototype.load = goog.nullFunction;
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Gets the state of the backing data for this node
|
|
246
|
+
* @return {goog.ds.LoadState} The state.
|
|
247
|
+
*/
|
|
248
|
+
goog.ds.BaseDataNode.prototype.getLoadState = function() {
|
|
249
|
+
return goog.ds.LoadState.LOADED;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Gets the parent node. Subclasses implement this function
|
|
255
|
+
* @type {Function}
|
|
256
|
+
* @protected
|
|
257
|
+
* @suppress {underscore}
|
|
258
|
+
*/
|
|
259
|
+
goog.ds.BaseDataNode.prototype.getParent_ = null;
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Interface for node list in rich data tree.
|
|
264
|
+
*
|
|
265
|
+
* Has both map and list-style accessors
|
|
266
|
+
*
|
|
267
|
+
* @constructor
|
|
268
|
+
* @extends {goog.ds.DataNode}
|
|
269
|
+
*/
|
|
270
|
+
// TODO(arv): Use interfaces when available.
|
|
271
|
+
goog.ds.DataNodeList = function() {};
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Add a node to the node list.
|
|
276
|
+
* If the node has a dataName, uses this for the key in the map.
|
|
277
|
+
*
|
|
278
|
+
* @param {goog.ds.DataNode} node The node to add.
|
|
279
|
+
*/
|
|
280
|
+
goog.ds.DataNodeList.prototype.add = goog.nullFunction;
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Get a node by string key.
|
|
285
|
+
* Returns null if node doesn't exist.
|
|
286
|
+
*
|
|
287
|
+
* @param {string} key String lookup key.
|
|
288
|
+
* @return {goog.ds.DataNode} The node, or null if doesn't exist.
|
|
289
|
+
*/
|
|
290
|
+
goog.ds.DataNodeList.prototype.get = goog.nullFunction;
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Get a node by index
|
|
295
|
+
* Returns null if the index is out of range
|
|
296
|
+
*
|
|
297
|
+
* @param {number} index The index of the node.
|
|
298
|
+
* @return {goog.ds.DataNode} The node, or null if doesn't exist.
|
|
299
|
+
*/
|
|
300
|
+
goog.ds.DataNodeList.prototype.getByIndex = goog.nullFunction;
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Gets the size of the node list
|
|
305
|
+
*
|
|
306
|
+
* @return {number} The size of the list.
|
|
307
|
+
*/
|
|
308
|
+
goog.ds.DataNodeList.prototype.getCount = goog.nullFunction;
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Sets a node in the list of a given name
|
|
313
|
+
* @param {string} name Name of the node.
|
|
314
|
+
* @param {goog.ds.DataNode} node The node.
|
|
315
|
+
*/
|
|
316
|
+
goog.ds.DataNodeList.prototype.setNode = goog.nullFunction;
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Removes a node in the list of a given name
|
|
321
|
+
* @param {string} name Name of the node.
|
|
322
|
+
* @return {boolean} True if node existed and was deleted.
|
|
323
|
+
*/
|
|
324
|
+
goog.ds.DataNodeList.prototype.removeNode = goog.nullFunction;
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Simple node list implementation with underlying array and map
|
|
329
|
+
* implements goog.ds.DataNodeList.
|
|
330
|
+
*
|
|
331
|
+
* Names that are reserved for system use and shouldn't be used for data node
|
|
332
|
+
* names: eval, toSource, toString, unwatch, valueOf, watch. Behavior is
|
|
333
|
+
* undefined if these names are used.
|
|
334
|
+
*
|
|
335
|
+
* @param {Array.<goog.ds.DataNode>=} opt_nodes optional nodes to add to list.
|
|
336
|
+
* @constructor
|
|
337
|
+
* @extends {goog.ds.DataNodeList}
|
|
338
|
+
*/
|
|
339
|
+
// TODO(arv): Use interfaces when available.
|
|
340
|
+
goog.ds.BasicNodeList = function(opt_nodes) {
|
|
341
|
+
this.map_ = {};
|
|
342
|
+
this.list_ = [];
|
|
343
|
+
this.indexMap_ = {};
|
|
344
|
+
if (opt_nodes) {
|
|
345
|
+
for (var i = 0, node; node = opt_nodes[i]; i++) {
|
|
346
|
+
this.add(node);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Add a node to the node list.
|
|
354
|
+
* If the node has a dataName, uses this for the key in the map.
|
|
355
|
+
* TODO(user) Remove function as well
|
|
356
|
+
*
|
|
357
|
+
* @param {goog.ds.DataNode} node The node to add.
|
|
358
|
+
*/
|
|
359
|
+
goog.ds.BasicNodeList.prototype.add = function(node) {
|
|
360
|
+
this.list_.push(node);
|
|
361
|
+
var dataName = node.getDataName();
|
|
362
|
+
if (dataName) {
|
|
363
|
+
this.map_[dataName] = node;
|
|
364
|
+
this.indexMap_[dataName] = this.list_.length - 1;
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Get a node by string key.
|
|
371
|
+
* Returns null if node doesn't exist.
|
|
372
|
+
*
|
|
373
|
+
* @param {string} key String lookup key.
|
|
374
|
+
* @return {goog.ds.DataNode} The node, or null if doesn't exist.
|
|
375
|
+
*/
|
|
376
|
+
goog.ds.BasicNodeList.prototype.get = function(key) {
|
|
377
|
+
return this.map_[key] || null;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Get a node by index
|
|
383
|
+
* Returns null if the index is out of range
|
|
384
|
+
*
|
|
385
|
+
* @param {number} index The index of the node.
|
|
386
|
+
* @return {goog.ds.DataNode} The node, or null if doesn't exist.
|
|
387
|
+
*/
|
|
388
|
+
goog.ds.BasicNodeList.prototype.getByIndex = function(index) {
|
|
389
|
+
return this.list_[index] || null;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Gets the size of the node list
|
|
395
|
+
*
|
|
396
|
+
* @return {number} The size of the list.
|
|
397
|
+
*/
|
|
398
|
+
goog.ds.BasicNodeList.prototype.getCount = function() {
|
|
399
|
+
return this.list_.length;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Sets a node in the list of a given name
|
|
405
|
+
* @param {string} name Name of the node.
|
|
406
|
+
* @param {goog.ds.DataNode} node The node.
|
|
407
|
+
*/
|
|
408
|
+
goog.ds.BasicNodeList.prototype.setNode = function(name, node) {
|
|
409
|
+
if (node == null) {
|
|
410
|
+
this.removeNode(name);
|
|
411
|
+
} else {
|
|
412
|
+
var existingNode = this.indexMap_[name];
|
|
413
|
+
if (existingNode != null) {
|
|
414
|
+
this.map_[name] = node;
|
|
415
|
+
this.list_[existingNode] = node;
|
|
416
|
+
} else {
|
|
417
|
+
this.add(node);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Removes a node in the list of a given name
|
|
425
|
+
* @param {string} name Name of the node.
|
|
426
|
+
* @return {boolean} True if node existed and was deleted.
|
|
427
|
+
*/
|
|
428
|
+
goog.ds.BasicNodeList.prototype.removeNode = function(name) {
|
|
429
|
+
var existingNode = this.indexMap_[name];
|
|
430
|
+
if (existingNode != null) {
|
|
431
|
+
this.list_.splice(existingNode, 1);
|
|
432
|
+
delete this.map_[name];
|
|
433
|
+
delete this.indexMap_[name];
|
|
434
|
+
for (var index in this.indexMap_) {
|
|
435
|
+
if (this.indexMap_[index] > existingNode) {
|
|
436
|
+
this.indexMap_[index]--;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return existingNode != null;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Get the index of a named node
|
|
446
|
+
* @param {string} name The name of the node to get the index of.
|
|
447
|
+
* @return {number|undefined} The index.
|
|
448
|
+
*/
|
|
449
|
+
goog.ds.BasicNodeList.prototype.indexOf = function(name) {
|
|
450
|
+
return this.indexMap_[name];
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Immulatable empty node list
|
|
456
|
+
* @extends {goog.ds.BasicNodeList}
|
|
457
|
+
* @constructor
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
goog.ds.EmptyNodeList = function() {
|
|
461
|
+
goog.ds.BasicNodeList.call(this);
|
|
462
|
+
};
|
|
463
|
+
goog.inherits(goog.ds.EmptyNodeList, goog.ds.BasicNodeList);
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Add a node to the node list.
|
|
468
|
+
* If the node has a dataName, uses this for the key in the map.
|
|
469
|
+
*
|
|
470
|
+
* @param {goog.ds.DataNode} node The node to add.
|
|
471
|
+
*/
|
|
472
|
+
goog.ds.EmptyNodeList.prototype.add = function(node) {
|
|
473
|
+
throw Error('Can\'t add to EmptyNodeList');
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Node list implementation which maintains sort order during insertion and
|
|
480
|
+
* modification operations based on a comparison function.
|
|
481
|
+
*
|
|
482
|
+
* The SortedNodeList does not guarantee sort order will be maintained if
|
|
483
|
+
* the underlying data nodes are modified externally.
|
|
484
|
+
*
|
|
485
|
+
* Names that are reserved for system use and shouldn't be used for data node
|
|
486
|
+
* names: eval, toSource, toString, unwatch, valueOf, watch. Behavior is
|
|
487
|
+
* undefined if these names are used.
|
|
488
|
+
*
|
|
489
|
+
* @param {Function} compareFn Comparison function by which the
|
|
490
|
+
* node list is sorted. Should take 2 arguments to compare, and return a
|
|
491
|
+
* negative integer, zero, or a positive integer depending on whether the
|
|
492
|
+
* first argument is less than, equal to, or greater than the second.
|
|
493
|
+
* @param {Array.<goog.ds.DataNode>=} opt_nodes optional nodes to add to list;
|
|
494
|
+
* these are assumed to be in sorted order.
|
|
495
|
+
* @extends {goog.ds.BasicNodeList}
|
|
496
|
+
* @constructor
|
|
497
|
+
*/
|
|
498
|
+
goog.ds.SortedNodeList = function(compareFn, opt_nodes) {
|
|
499
|
+
this.compareFn_ = compareFn;
|
|
500
|
+
goog.ds.BasicNodeList.call(this, opt_nodes);
|
|
501
|
+
};
|
|
502
|
+
goog.inherits(goog.ds.SortedNodeList, goog.ds.BasicNodeList);
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Add a node to the node list, maintaining sort order.
|
|
507
|
+
* If the node has a dataName, uses this for the key in the map.
|
|
508
|
+
*
|
|
509
|
+
* @param {goog.ds.DataNode} node The node to add.
|
|
510
|
+
*/
|
|
511
|
+
goog.ds.SortedNodeList.prototype.add = function(node) {
|
|
512
|
+
if (!this.compareFn_) {
|
|
513
|
+
this.append(node);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
var searchLoc = goog.array.binarySearch(this.list_, node, this.compareFn_);
|
|
518
|
+
|
|
519
|
+
// if there is another node that is "equal" according to the comparison
|
|
520
|
+
// function, insert before that one; otherwise insert at the location
|
|
521
|
+
// goog.array.binarySearch indicated
|
|
522
|
+
if (searchLoc < 0) {
|
|
523
|
+
searchLoc = -(searchLoc + 1);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// update any indexes that are after the insertion point
|
|
527
|
+
for (var index in this.indexMap_) {
|
|
528
|
+
if (this.indexMap_[index] >= searchLoc) {
|
|
529
|
+
this.indexMap_[index]++;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
goog.array.insertAt(this.list_, node, searchLoc);
|
|
534
|
+
var dataName = node.getDataName();
|
|
535
|
+
if (dataName) {
|
|
536
|
+
this.map_[dataName] = node;
|
|
537
|
+
this.indexMap_[dataName] = searchLoc;
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Adds the given node to the end of the SortedNodeList. This should
|
|
544
|
+
* only be used when the caller can guarantee that the sort order will
|
|
545
|
+
* be maintained according to this SortedNodeList's compareFn (e.g.
|
|
546
|
+
* when initializing a new SortedNodeList from a list of nodes that has
|
|
547
|
+
* already been sorted).
|
|
548
|
+
* @param {goog.ds.DataNode} node The node to append.
|
|
549
|
+
*/
|
|
550
|
+
goog.ds.SortedNodeList.prototype.append = function(node) {
|
|
551
|
+
goog.ds.SortedNodeList.superClass_.add.call(this, node);
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Sets a node in the list of a given name, maintaining sort order.
|
|
557
|
+
* @param {string} name Name of the node.
|
|
558
|
+
* @param {goog.ds.DataNode} node The node.
|
|
559
|
+
*/
|
|
560
|
+
goog.ds.SortedNodeList.prototype.setNode = function(name, node) {
|
|
561
|
+
if (node == null) {
|
|
562
|
+
this.removeNode(name);
|
|
563
|
+
} else {
|
|
564
|
+
var existingNode = this.indexMap_[name];
|
|
565
|
+
if (existingNode != null) {
|
|
566
|
+
if (this.compareFn_) {
|
|
567
|
+
var compareResult = this.compareFn_(this.list_[existingNode], node);
|
|
568
|
+
if (compareResult == 0) {
|
|
569
|
+
// the new node can just replace the old one
|
|
570
|
+
this.map_[name] = node;
|
|
571
|
+
this.list_[existingNode] = node;
|
|
572
|
+
} else {
|
|
573
|
+
// remove the old node, then add the new one
|
|
574
|
+
this.removeNode(name);
|
|
575
|
+
this.add(node);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
} else {
|
|
579
|
+
this.add(node);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* The character denoting an attribute.
|
|
587
|
+
* @type {string}
|
|
588
|
+
* @private
|
|
589
|
+
*/
|
|
590
|
+
goog.ds.STR_ATTRIBUTE_START_ = '@';
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The character denoting all children.
|
|
595
|
+
* @type {string}
|
|
596
|
+
*/
|
|
597
|
+
goog.ds.STR_ALL_CHILDREN_SELECTOR = '*';
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* The wildcard character.
|
|
602
|
+
* @type {string}
|
|
603
|
+
*/
|
|
604
|
+
goog.ds.STR_WILDCARD = '*';
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* The character denoting path separation.
|
|
609
|
+
* @type {string}
|
|
610
|
+
*/
|
|
611
|
+
goog.ds.STR_PATH_SEPARATOR = '/';
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* The character denoting the start of an array.
|
|
616
|
+
* @type {string}
|
|
617
|
+
*/
|
|
618
|
+
goog.ds.STR_ARRAY_START = '[';
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Shared logger instance for data package
|
|
623
|
+
* @type {goog.debug.Logger}
|
|
624
|
+
*/
|
|
625
|
+
goog.ds.logger = goog.debug.Logger.getLogger('goog.ds');
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Create a data node that references another data node,
|
|
630
|
+
* useful for pointer-like functionality.
|
|
631
|
+
* All functions will return same values as the original node except for
|
|
632
|
+
* getDataName()
|
|
633
|
+
* @param {!goog.ds.DataNode} node The original node.
|
|
634
|
+
* @param {string} name The new name.
|
|
635
|
+
* @return {!goog.ds.DataNode} The new data node.
|
|
636
|
+
*/
|
|
637
|
+
goog.ds.Util.makeReferenceNode = function(node, name) {
|
|
638
|
+
/**
|
|
639
|
+
* @constructor
|
|
640
|
+
* @extends {goog.ds.DataNode}
|
|
641
|
+
*/
|
|
642
|
+
var nodeCreator = function() {};
|
|
643
|
+
nodeCreator.prototype = node;
|
|
644
|
+
var newNode = new nodeCreator();
|
|
645
|
+
newNode.getDataName = function() {
|
|
646
|
+
return name;
|
|
647
|
+
};
|
|
648
|
+
return newNode;
|
|
649
|
+
};
|
|
650
|
+
;
|
|
651
|
+
FI"
|
|
652
|
+
F"%17a0a4c0dc040c75b1463a7db892dc76
|