pollypost 0.0.2

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.
Files changed (1132) hide show
  1. data/.gitignore +15 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +674 -0
  4. data/README.md +165 -0
  5. data/Rakefile +9 -0
  6. data/assets/fonts/font-awesome-custom/fontawesome-custom.eot +0 -0
  7. data/assets/fonts/font-awesome-custom/fontawesome-custom.svg +15 -0
  8. data/assets/fonts/font-awesome-custom/fontawesome-custom.ttf +0 -0
  9. data/assets/fonts/font-awesome-custom/fontawesome-custom.woff +0 -0
  10. data/assets/javascripts/app.js +35 -0
  11. data/assets/javascripts/application.js +8 -0
  12. data/assets/javascripts/dom-tweaking.js +36 -0
  13. data/assets/javascripts/main.js +36 -0
  14. data/assets/javascripts/models/page_content.js +39 -0
  15. data/assets/javascripts/templates/bar_edit_mode.html +14 -0
  16. data/assets/javascripts/templates/bar_view_mode.html +13 -0
  17. data/assets/javascripts/templates/duplicate_page.html +20 -0
  18. data/assets/javascripts/templates/html_editor.html +18 -0
  19. data/assets/javascripts/templates/loading.html +9 -0
  20. data/assets/javascripts/templates/new_page.html +23 -0
  21. data/assets/javascripts/templates/settings.html +15 -0
  22. data/assets/javascripts/views/bar_edit_mode.js +117 -0
  23. data/assets/javascripts/views/bar_view_mode.js +40 -0
  24. data/assets/javascripts/views/duplicate_page.js +76 -0
  25. data/assets/javascripts/views/editier_bar.js +171 -0
  26. data/assets/javascripts/views/html_editor.js +116 -0
  27. data/assets/javascripts/views/loading.js +31 -0
  28. data/assets/javascripts/views/new_page.js +77 -0
  29. data/assets/javascripts/views/page_content.js +26 -0
  30. data/assets/javascripts/views/settings.js +89 -0
  31. data/assets/stylesheets/_bootstrap-custom.scss +50 -0
  32. data/assets/stylesheets/_editor.scss +303 -0
  33. data/assets/stylesheets/_font-awesome-custom.scss +17 -0
  34. data/assets/stylesheets/_variable-overrides.scss +13 -0
  35. data/assets/stylesheets/application.scss +41 -0
  36. data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
  37. data/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
  38. data/assets/stylesheets/font-awesome/_core.scss +12 -0
  39. data/assets/stylesheets/font-awesome/_mixins.scss +26 -0
  40. data/assets/stylesheets/font-awesome/_path.scss +14 -0
  41. data/lib/pollypost.rb +13 -0
  42. data/lib/pollypost/rake.rb +55 -0
  43. data/lib/pollypost/version.rb +11 -0
  44. data/pollypost.gemspec +27 -0
  45. data/test/README.md +55 -0
  46. data/test/basic.html +19 -0
  47. data/test/page_content_test.js +69 -0
  48. data/test/qunit-1.17.1.css +280 -0
  49. data/test/qunit-1.17.1.js +2875 -0
  50. data/test/sinon-1.14.1.js +5931 -0
  51. data/test/sinon-qunit-1.0.0.js +62 -0
  52. data/test/test.html +16 -0
  53. data/test/testmain.js +28 -0
  54. data/test/tests.js +58 -0
  55. data/vendor/assets/ace-1.1.8/ace.js +129 -0
  56. data/vendor/assets/ace-1.1.8/anchor.js +245 -0
  57. data/vendor/assets/ace-1.1.8/anchor_test.js +223 -0
  58. data/vendor/assets/ace-1.1.8/autocomplete.js +485 -0
  59. data/vendor/assets/ace-1.1.8/autocomplete/popup.js +338 -0
  60. data/vendor/assets/ace-1.1.8/autocomplete/text_completer.js +78 -0
  61. data/vendor/assets/ace-1.1.8/autocomplete/util.js +74 -0
  62. data/vendor/assets/ace-1.1.8/background_tokenizer.js +250 -0
  63. data/vendor/assets/ace-1.1.8/background_tokenizer_test.js +85 -0
  64. data/vendor/assets/ace-1.1.8/commands/command_manager.js +118 -0
  65. data/vendor/assets/ace-1.1.8/commands/command_manager_test.js +199 -0
  66. data/vendor/assets/ace-1.1.8/commands/default_commands.js +708 -0
  67. data/vendor/assets/ace-1.1.8/commands/incremental_search_commands.js +232 -0
  68. data/vendor/assets/ace-1.1.8/commands/multi_select_commands.js +102 -0
  69. data/vendor/assets/ace-1.1.8/commands/occur_commands.js +110 -0
  70. data/vendor/assets/ace-1.1.8/config.js +301 -0
  71. data/vendor/assets/ace-1.1.8/config_test.js +128 -0
  72. data/vendor/assets/ace-1.1.8/css/codefolding-fold-button-states.png +0 -0
  73. data/vendor/assets/ace-1.1.8/css/editor.css +422 -0
  74. data/vendor/assets/ace-1.1.8/css/expand-marker.png +0 -0
  75. data/vendor/assets/ace-1.1.8/document.js +645 -0
  76. data/vendor/assets/ace-1.1.8/document_test.js +306 -0
  77. data/vendor/assets/ace-1.1.8/edit_session.js +2554 -0
  78. data/vendor/assets/ace-1.1.8/edit_session/bracket_match.js +221 -0
  79. data/vendor/assets/ace-1.1.8/edit_session/fold.js +140 -0
  80. data/vendor/assets/ace-1.1.8/edit_session/fold_line.js +269 -0
  81. data/vendor/assets/ace-1.1.8/edit_session/folding.js +851 -0
  82. data/vendor/assets/ace-1.1.8/edit_session_test.js +1075 -0
  83. data/vendor/assets/ace-1.1.8/editor.js +2658 -0
  84. data/vendor/assets/ace-1.1.8/editor_change_document_test.js +188 -0
  85. data/vendor/assets/ace-1.1.8/editor_highlight_selected_word_test.js +223 -0
  86. data/vendor/assets/ace-1.1.8/editor_navigation_test.js +164 -0
  87. data/vendor/assets/ace-1.1.8/editor_text_edit_test.js +557 -0
  88. data/vendor/assets/ace-1.1.8/ext/beautify.js +57 -0
  89. data/vendor/assets/ace-1.1.8/ext/beautify/php_rules.js +366 -0
  90. data/vendor/assets/ace-1.1.8/ext/chromevox.js +980 -0
  91. data/vendor/assets/ace-1.1.8/ext/elastic_tabstops_lite.js +319 -0
  92. data/vendor/assets/ace-1.1.8/ext/emmet.js +434 -0
  93. data/vendor/assets/ace-1.1.8/ext/error_marker.js +214 -0
  94. data/vendor/assets/ace-1.1.8/ext/keybinding_menu.js +86 -0
  95. data/vendor/assets/ace-1.1.8/ext/language_tools.js +229 -0
  96. data/vendor/assets/ace-1.1.8/ext/linking.js +78 -0
  97. data/vendor/assets/ace-1.1.8/ext/menu_tools/add_editor_menu_options.js +109 -0
  98. data/vendor/assets/ace-1.1.8/ext/menu_tools/element_generator.js +148 -0
  99. data/vendor/assets/ace-1.1.8/ext/menu_tools/generate_settings_menu.js +264 -0
  100. data/vendor/assets/ace-1.1.8/ext/menu_tools/get_editor_keyboard_shortcuts.js +91 -0
  101. data/vendor/assets/ace-1.1.8/ext/menu_tools/get_set_functions.js +141 -0
  102. data/vendor/assets/ace-1.1.8/ext/menu_tools/overlay_page.js +116 -0
  103. data/vendor/assets/ace-1.1.8/ext/menu_tools/settings_menu.css +48 -0
  104. data/vendor/assets/ace-1.1.8/ext/modelist.js +191 -0
  105. data/vendor/assets/ace-1.1.8/ext/old_ie.js +114 -0
  106. data/vendor/assets/ace-1.1.8/ext/old_ie_test.js +77 -0
  107. data/vendor/assets/ace-1.1.8/ext/searchbox.css +153 -0
  108. data/vendor/assets/ace-1.1.8/ext/searchbox.js +308 -0
  109. data/vendor/assets/ace-1.1.8/ext/settings_menu.js +76 -0
  110. data/vendor/assets/ace-1.1.8/ext/spellcheck.js +69 -0
  111. data/vendor/assets/ace-1.1.8/ext/split.js +40 -0
  112. data/vendor/assets/ace-1.1.8/ext/static.css +31 -0
  113. data/vendor/assets/ace-1.1.8/ext/static_highlight.js +190 -0
  114. data/vendor/assets/ace-1.1.8/ext/static_highlight_test.js +96 -0
  115. data/vendor/assets/ace-1.1.8/ext/statusbar.js +48 -0
  116. data/vendor/assets/ace-1.1.8/ext/textarea.js +521 -0
  117. data/vendor/assets/ace-1.1.8/ext/themelist.js +100 -0
  118. data/vendor/assets/ace-1.1.8/ext/whitespace.js +213 -0
  119. data/vendor/assets/ace-1.1.8/ext/whitespace_test.js +116 -0
  120. data/vendor/assets/ace-1.1.8/incremental_search.js +317 -0
  121. data/vendor/assets/ace-1.1.8/incremental_search_test.js +213 -0
  122. data/vendor/assets/ace-1.1.8/keyboard/emacs.js +652 -0
  123. data/vendor/assets/ace-1.1.8/keyboard/emacs_test.js +151 -0
  124. data/vendor/assets/ace-1.1.8/keyboard/hash_handler.js +231 -0
  125. data/vendor/assets/ace-1.1.8/keyboard/keybinding.js +145 -0
  126. data/vendor/assets/ace-1.1.8/keyboard/keybinding_test.js +69 -0
  127. data/vendor/assets/ace-1.1.8/keyboard/state_handler.js +249 -0
  128. data/vendor/assets/ace-1.1.8/keyboard/textarea.js +82 -0
  129. data/vendor/assets/ace-1.1.8/keyboard/textinput.js +495 -0
  130. data/vendor/assets/ace-1.1.8/keyboard/vim.js +199 -0
  131. data/vendor/assets/ace-1.1.8/keyboard/vim/commands.js +618 -0
  132. data/vendor/assets/ace-1.1.8/keyboard/vim/maps/aliases.js +94 -0
  133. data/vendor/assets/ace-1.1.8/keyboard/vim/maps/motions.js +681 -0
  134. data/vendor/assets/ace-1.1.8/keyboard/vim/maps/operators.js +201 -0
  135. data/vendor/assets/ace-1.1.8/keyboard/vim/maps/util.js +132 -0
  136. data/vendor/assets/ace-1.1.8/keyboard/vim/registers.js +42 -0
  137. data/vendor/assets/ace-1.1.8/keyboard/vim_test.js +528 -0
  138. data/vendor/assets/ace-1.1.8/layer/cursor.js +234 -0
  139. data/vendor/assets/ace-1.1.8/layer/font_metrics.js +176 -0
  140. data/vendor/assets/ace-1.1.8/layer/gutter.js +287 -0
  141. data/vendor/assets/ace-1.1.8/layer/marker.js +218 -0
  142. data/vendor/assets/ace-1.1.8/layer/text.js +575 -0
  143. data/vendor/assets/ace-1.1.8/layer/text_test.js +126 -0
  144. data/vendor/assets/ace-1.1.8/lib/dom.js +283 -0
  145. data/vendor/assets/ace-1.1.8/lib/es5-shim.js +1062 -0
  146. data/vendor/assets/ace-1.1.8/lib/event.js +381 -0
  147. data/vendor/assets/ace-1.1.8/lib/event_emitter.js +155 -0
  148. data/vendor/assets/ace-1.1.8/lib/event_emitter_test.js +65 -0
  149. data/vendor/assets/ace-1.1.8/lib/fixoldbrowsers.js +19 -0
  150. data/vendor/assets/ace-1.1.8/lib/keys.js +163 -0
  151. data/vendor/assets/ace-1.1.8/lib/lang.js +221 -0
  152. data/vendor/assets/ace-1.1.8/lib/net.js +51 -0
  153. data/vendor/assets/ace-1.1.8/lib/oop.js +57 -0
  154. data/vendor/assets/ace-1.1.8/lib/regexp.js +113 -0
  155. data/vendor/assets/ace-1.1.8/lib/useragent.js +106 -0
  156. data/vendor/assets/ace-1.1.8/line_widgets.js +297 -0
  157. data/vendor/assets/ace-1.1.8/mode/_test/Readme.md +9 -0
  158. data/vendor/assets/ace-1.1.8/mode/_test/highlight_rules_test.js +210 -0
  159. data/vendor/assets/ace-1.1.8/mode/_test/package.json +8 -0
  160. data/vendor/assets/ace-1.1.8/mode/_test/text_asciidoc.txt +111 -0
  161. data/vendor/assets/ace-1.1.8/mode/_test/text_coffee.txt +57 -0
  162. data/vendor/assets/ace-1.1.8/mode/_test/text_curly.txt +9 -0
  163. data/vendor/assets/ace-1.1.8/mode/_test/text_html.txt +10 -0
  164. data/vendor/assets/ace-1.1.8/mode/_test/text_javascript.txt +86 -0
  165. data/vendor/assets/ace-1.1.8/mode/_test/text_livescript.txt +1 -0
  166. data/vendor/assets/ace-1.1.8/mode/_test/text_lucene.txt +16 -0
  167. data/vendor/assets/ace-1.1.8/mode/_test/text_markdown.txt +22 -0
  168. data/vendor/assets/ace-1.1.8/mode/_test/text_php.txt +24 -0
  169. data/vendor/assets/ace-1.1.8/mode/_test/text_ruby.txt +34 -0
  170. data/vendor/assets/ace-1.1.8/mode/_test/text_xml.txt +7 -0
  171. data/vendor/assets/ace-1.1.8/mode/_test/tokens_abap.json +189 -0
  172. data/vendor/assets/ace-1.1.8/mode/_test/tokens_actionscript.json +263 -0
  173. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ada.json +39 -0
  174. data/vendor/assets/ace-1.1.8/mode/_test/tokens_asciidoc.json +422 -0
  175. data/vendor/assets/ace-1.1.8/mode/_test/tokens_assembly_x86.json +114 -0
  176. data/vendor/assets/ace-1.1.8/mode/_test/tokens_autohotkey.json +261 -0
  177. data/vendor/assets/ace-1.1.8/mode/_test/tokens_batchfile.json +70 -0
  178. data/vendor/assets/ace-1.1.8/mode/_test/tokens_c9search.json +131 -0
  179. data/vendor/assets/ace-1.1.8/mode/_test/tokens_c_cpp.json +185 -0
  180. data/vendor/assets/ace-1.1.8/mode/_test/tokens_cirru.json +267 -0
  181. data/vendor/assets/ace-1.1.8/mode/_test/tokens_clojure.json +162 -0
  182. data/vendor/assets/ace-1.1.8/mode/_test/tokens_cobol.json +4 -0
  183. data/vendor/assets/ace-1.1.8/mode/_test/tokens_coffee.json +545 -0
  184. data/vendor/assets/ace-1.1.8/mode/_test/tokens_coldfusion.json +26 -0
  185. data/vendor/assets/ace-1.1.8/mode/_test/tokens_csharp.json +31 -0
  186. data/vendor/assets/ace-1.1.8/mode/_test/tokens_css.json +148 -0
  187. data/vendor/assets/ace-1.1.8/mode/_test/tokens_curly.json +56 -0
  188. data/vendor/assets/ace-1.1.8/mode/_test/tokens_d.json +111 -0
  189. data/vendor/assets/ace-1.1.8/mode/_test/tokens_dart.json +368 -0
  190. data/vendor/assets/ace-1.1.8/mode/_test/tokens_diff.json +262 -0
  191. data/vendor/assets/ace-1.1.8/mode/_test/tokens_dot.json +2254 -0
  192. data/vendor/assets/ace-1.1.8/mode/_test/tokens_eiffel.json +141 -0
  193. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ejs.json +296 -0
  194. data/vendor/assets/ace-1.1.8/mode/_test/tokens_elixir.json +196 -0
  195. data/vendor/assets/ace-1.1.8/mode/_test/tokens_elm.json +198 -0
  196. data/vendor/assets/ace-1.1.8/mode/_test/tokens_erlang.json +166 -0
  197. data/vendor/assets/ace-1.1.8/mode/_test/tokens_forth.json +219 -0
  198. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ftl.json +341 -0
  199. data/vendor/assets/ace-1.1.8/mode/_test/tokens_gcode.json +296 -0
  200. data/vendor/assets/ace-1.1.8/mode/_test/tokens_gherkin.json +142 -0
  201. data/vendor/assets/ace-1.1.8/mode/_test/tokens_gitignore.json +33 -0
  202. data/vendor/assets/ace-1.1.8/mode/_test/tokens_glsl.json +127 -0
  203. data/vendor/assets/ace-1.1.8/mode/_test/tokens_golang.json +256 -0
  204. data/vendor/assets/ace-1.1.8/mode/_test/tokens_groovy.json +410 -0
  205. data/vendor/assets/ace-1.1.8/mode/_test/tokens_haml.json +174 -0
  206. data/vendor/assets/ace-1.1.8/mode/_test/tokens_handlebars.json +81 -0
  207. data/vendor/assets/ace-1.1.8/mode/_test/tokens_haskell.json +156 -0
  208. data/vendor/assets/ace-1.1.8/mode/_test/tokens_haxe.json +143 -0
  209. data/vendor/assets/ace-1.1.8/mode/_test/tokens_html.json +63 -0
  210. data/vendor/assets/ace-1.1.8/mode/_test/tokens_html_ruby.json +257 -0
  211. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ini.json +23 -0
  212. data/vendor/assets/ace-1.1.8/mode/_test/tokens_io.json +49 -0
  213. data/vendor/assets/ace-1.1.8/mode/_test/tokens_jack.json +1786 -0
  214. data/vendor/assets/ace-1.1.8/mode/_test/tokens_jade.json +188 -0
  215. data/vendor/assets/ace-1.1.8/mode/_test/tokens_java.json +95 -0
  216. data/vendor/assets/ace-1.1.8/mode/_test/tokens_javascript.json +593 -0
  217. data/vendor/assets/ace-1.1.8/mode/_test/tokens_json.json +412 -0
  218. data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsoniq.json +4 -0
  219. data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsp.json +435 -0
  220. data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsx.json +51 -0
  221. data/vendor/assets/ace-1.1.8/mode/_test/tokens_julia.json +111 -0
  222. data/vendor/assets/ace-1.1.8/mode/_test/tokens_latex.json +127 -0
  223. data/vendor/assets/ace-1.1.8/mode/_test/tokens_less.json +204 -0
  224. data/vendor/assets/ace-1.1.8/mode/_test/tokens_liquid.json +551 -0
  225. data/vendor/assets/ace-1.1.8/mode/_test/tokens_lisp.json +248 -0
  226. data/vendor/assets/ace-1.1.8/mode/_test/tokens_livescript.json +6 -0
  227. data/vendor/assets/ace-1.1.8/mode/_test/tokens_logiql.json +190 -0
  228. data/vendor/assets/ace-1.1.8/mode/_test/tokens_lsl.json +503 -0
  229. data/vendor/assets/ace-1.1.8/mode/_test/tokens_lua.json +348 -0
  230. data/vendor/assets/ace-1.1.8/mode/_test/tokens_luapage.json +633 -0
  231. data/vendor/assets/ace-1.1.8/mode/_test/tokens_lucene.json +92 -0
  232. data/vendor/assets/ace-1.1.8/mode/_test/tokens_markdown.json +114 -0
  233. data/vendor/assets/ace-1.1.8/mode/_test/tokens_matlab.json +90 -0
  234. data/vendor/assets/ace-1.1.8/mode/_test/tokens_mel.json +257 -0
  235. data/vendor/assets/ace-1.1.8/mode/_test/tokens_mushcode.json +790 -0
  236. data/vendor/assets/ace-1.1.8/mode/_test/tokens_mysql.json +4 -0
  237. data/vendor/assets/ace-1.1.8/mode/_test/tokens_nix.json +360 -0
  238. data/vendor/assets/ace-1.1.8/mode/_test/tokens_objectivec.json +792 -0
  239. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ocaml.json +200 -0
  240. data/vendor/assets/ace-1.1.8/mode/_test/tokens_pascal.json +297 -0
  241. data/vendor/assets/ace-1.1.8/mode/_test/tokens_perl.json +227 -0
  242. data/vendor/assets/ace-1.1.8/mode/_test/tokens_pgsql.json +889 -0
  243. data/vendor/assets/ace-1.1.8/mode/_test/tokens_php.json +171 -0
  244. data/vendor/assets/ace-1.1.8/mode/_test/tokens_powershell.json +184 -0
  245. data/vendor/assets/ace-1.1.8/mode/_test/tokens_prolog.json +245 -0
  246. data/vendor/assets/ace-1.1.8/mode/_test/tokens_properties.json +68 -0
  247. data/vendor/assets/ace-1.1.8/mode/_test/tokens_protobuf.json +136 -0
  248. data/vendor/assets/ace-1.1.8/mode/_test/tokens_python.json +152 -0
  249. data/vendor/assets/ace-1.1.8/mode/_test/tokens_r.json +235 -0
  250. data/vendor/assets/ace-1.1.8/mode/_test/tokens_rdoc.json +441 -0
  251. data/vendor/assets/ace-1.1.8/mode/_test/tokens_rhtml.json +106 -0
  252. data/vendor/assets/ace-1.1.8/mode/_test/tokens_ruby.json +234 -0
  253. data/vendor/assets/ace-1.1.8/mode/_test/tokens_rust.json +136 -0
  254. data/vendor/assets/ace-1.1.8/mode/_test/tokens_sass.json +229 -0
  255. data/vendor/assets/ace-1.1.8/mode/_test/tokens_scad.json +194 -0
  256. data/vendor/assets/ace-1.1.8/mode/_test/tokens_scala.json +542 -0
  257. data/vendor/assets/ace-1.1.8/mode/_test/tokens_scheme.json +216 -0
  258. data/vendor/assets/ace-1.1.8/mode/_test/tokens_scss.json +123 -0
  259. data/vendor/assets/ace-1.1.8/mode/_test/tokens_sh.json +334 -0
  260. data/vendor/assets/ace-1.1.8/mode/_test/tokens_sjs.json +276 -0
  261. data/vendor/assets/ace-1.1.8/mode/_test/tokens_smarty.json +98 -0
  262. data/vendor/assets/ace-1.1.8/mode/_test/tokens_snippets.json +159 -0
  263. data/vendor/assets/ace-1.1.8/mode/_test/tokens_soy_template.json +286 -0
  264. data/vendor/assets/ace-1.1.8/mode/_test/tokens_space.json +322 -0
  265. data/vendor/assets/ace-1.1.8/mode/_test/tokens_sql.json +54 -0
  266. data/vendor/assets/ace-1.1.8/mode/_test/tokens_stylus.json +271 -0
  267. data/vendor/assets/ace-1.1.8/mode/_test/tokens_svg.json +684 -0
  268. data/vendor/assets/ace-1.1.8/mode/_test/tokens_tcl.json +385 -0
  269. data/vendor/assets/ace-1.1.8/mode/_test/tokens_tex.json +130 -0
  270. data/vendor/assets/ace-1.1.8/mode/_test/tokens_text.json +29 -0
  271. data/vendor/assets/ace-1.1.8/mode/_test/tokens_textile.json +113 -0
  272. data/vendor/assets/ace-1.1.8/mode/_test/tokens_toml.json +131 -0
  273. data/vendor/assets/ace-1.1.8/mode/_test/tokens_twig.json +288 -0
  274. data/vendor/assets/ace-1.1.8/mode/_test/tokens_typescript.json +559 -0
  275. data/vendor/assets/ace-1.1.8/mode/_test/tokens_vala.json +158 -0
  276. data/vendor/assets/ace-1.1.8/mode/_test/tokens_vbscript.json +205 -0
  277. data/vendor/assets/ace-1.1.8/mode/_test/tokens_velocity.json +285 -0
  278. data/vendor/assets/ace-1.1.8/mode/_test/tokens_verilog.json +113 -0
  279. data/vendor/assets/ace-1.1.8/mode/_test/tokens_vhdl.json +271 -0
  280. data/vendor/assets/ace-1.1.8/mode/_test/tokens_xml.json +43 -0
  281. data/vendor/assets/ace-1.1.8/mode/_test/tokens_xquery.json +44 -0
  282. data/vendor/assets/ace-1.1.8/mode/_test/tokens_yaml.json +150 -0
  283. data/vendor/assets/ace-1.1.8/mode/abap.js +77 -0
  284. data/vendor/assets/ace-1.1.8/mode/abap_highlight_rules.js +134 -0
  285. data/vendor/assets/ace-1.1.8/mode/actionscript.js +58 -0
  286. data/vendor/assets/ace-1.1.8/mode/actionscript_highlight_rules.js +141 -0
  287. data/vendor/assets/ace-1.1.8/mode/ada.js +54 -0
  288. data/vendor/assets/ace-1.1.8/mode/ada_highlight_rules.js +93 -0
  289. data/vendor/assets/ace-1.1.8/mode/apache_conf.js +62 -0
  290. data/vendor/assets/ace-1.1.8/mode/apache_conf_highlight_rules.js +231 -0
  291. data/vendor/assets/ace-1.1.8/mode/applescript.js +55 -0
  292. data/vendor/assets/ace-1.1.8/mode/applescript_highlight_rules.js +139 -0
  293. data/vendor/assets/ace-1.1.8/mode/asciidoc.js +64 -0
  294. data/vendor/assets/ace-1.1.8/mode/asciidoc_highlight_rules.js +234 -0
  295. data/vendor/assets/ace-1.1.8/mode/assembly_x86.js +56 -0
  296. data/vendor/assets/ace-1.1.8/mode/assembly_x86_highlight_rules.js +114 -0
  297. data/vendor/assets/ace-1.1.8/mode/autohotkey.js +57 -0
  298. data/vendor/assets/ace-1.1.8/mode/autohotkey_highlight_rules.js +107 -0
  299. data/vendor/assets/ace-1.1.8/mode/batchfile.js +61 -0
  300. data/vendor/assets/ace-1.1.8/mode/batchfile_highlight_rules.js +97 -0
  301. data/vendor/assets/ace-1.1.8/mode/behaviour.js +90 -0
  302. data/vendor/assets/ace-1.1.8/mode/behaviour/behaviour_test.js +133 -0
  303. data/vendor/assets/ace-1.1.8/mode/behaviour/css.js +108 -0
  304. data/vendor/assets/ace-1.1.8/mode/behaviour/cstyle.js +400 -0
  305. data/vendor/assets/ace-1.1.8/mode/behaviour/html.js +46 -0
  306. data/vendor/assets/ace-1.1.8/mode/behaviour/xml.js +202 -0
  307. data/vendor/assets/ace-1.1.8/mode/behaviour/xquery.js +92 -0
  308. data/vendor/assets/ace-1.1.8/mode/c9search.js +67 -0
  309. data/vendor/assets/ace-1.1.8/mode/c9search_highlight_rules.js +182 -0
  310. data/vendor/assets/ace-1.1.8/mode/c_cpp.js +101 -0
  311. data/vendor/assets/ace-1.1.8/mode/c_cpp_highlight_rules.js +196 -0
  312. data/vendor/assets/ace-1.1.8/mode/cirru.js +51 -0
  313. data/vendor/assets/ace-1.1.8/mode/cirru_highlight_rules.js +125 -0
  314. data/vendor/assets/ace-1.1.8/mode/clojure.js +128 -0
  315. data/vendor/assets/ace-1.1.8/mode/clojure_highlight_rules.js +200 -0
  316. data/vendor/assets/ace-1.1.8/mode/cobol.js +53 -0
  317. data/vendor/assets/ace-1.1.8/mode/cobol_highlight_rules.js +100 -0
  318. data/vendor/assets/ace-1.1.8/mode/coffee.js +135 -0
  319. data/vendor/assets/ace-1.1.8/mode/coffee/coffee-script.js +62 -0
  320. data/vendor/assets/ace-1.1.8/mode/coffee/helpers.js +271 -0
  321. data/vendor/assets/ace-1.1.8/mode/coffee/lexer.js +935 -0
  322. data/vendor/assets/ace-1.1.8/mode/coffee/nodes.js +3106 -0
  323. data/vendor/assets/ace-1.1.8/mode/coffee/parser.js +724 -0
  324. data/vendor/assets/ace-1.1.8/mode/coffee/parser_test.js +88 -0
  325. data/vendor/assets/ace-1.1.8/mode/coffee/rewriter.js +516 -0
  326. data/vendor/assets/ace-1.1.8/mode/coffee/scope.js +174 -0
  327. data/vendor/assets/ace-1.1.8/mode/coffee_highlight_rules.js +233 -0
  328. data/vendor/assets/ace-1.1.8/mode/coffee_worker.js +74 -0
  329. data/vendor/assets/ace-1.1.8/mode/coldfusion.js +61 -0
  330. data/vendor/assets/ace-1.1.8/mode/coldfusion_highlight_rules.js +49 -0
  331. data/vendor/assets/ace-1.1.8/mode/coldfusion_test.js +67 -0
  332. data/vendor/assets/ace-1.1.8/mode/csharp.js +61 -0
  333. data/vendor/assets/ace-1.1.8/mode/csharp_highlight_rules.js +93 -0
  334. data/vendor/assets/ace-1.1.8/mode/css.js +100 -0
  335. data/vendor/assets/ace-1.1.8/mode/css/csslint.js +9628 -0
  336. data/vendor/assets/ace-1.1.8/mode/css_highlight_rules.js +179 -0
  337. data/vendor/assets/ace-1.1.8/mode/css_test.js +78 -0
  338. data/vendor/assets/ace-1.1.8/mode/css_worker.js +100 -0
  339. data/vendor/assets/ace-1.1.8/mode/css_worker_test.js +68 -0
  340. data/vendor/assets/ace-1.1.8/mode/curly.js +63 -0
  341. data/vendor/assets/ace-1.1.8/mode/curly_highlight_rules.js +66 -0
  342. data/vendor/assets/ace-1.1.8/mode/d.js +56 -0
  343. data/vendor/assets/ace-1.1.8/mode/d_highlight_rules.js +334 -0
  344. data/vendor/assets/ace-1.1.8/mode/dart.js +62 -0
  345. data/vendor/assets/ace-1.1.8/mode/dart_highlight_rules.js +186 -0
  346. data/vendor/assets/ace-1.1.8/mode/diff.js +52 -0
  347. data/vendor/assets/ace-1.1.8/mode/diff_highlight_rules.js +108 -0
  348. data/vendor/assets/ace-1.1.8/mode/django.js +119 -0
  349. data/vendor/assets/ace-1.1.8/mode/doc_comment_highlight_rules.js +79 -0
  350. data/vendor/assets/ace-1.1.8/mode/dockerfile.js +52 -0
  351. data/vendor/assets/ace-1.1.8/mode/dockerfile_highlight_rules.js +57 -0
  352. data/vendor/assets/ace-1.1.8/mode/dot.js +55 -0
  353. data/vendor/assets/ace-1.1.8/mode/dot_highlight_rules.js +126 -0
  354. data/vendor/assets/ace-1.1.8/mode/eiffel.js +52 -0
  355. data/vendor/assets/ace-1.1.8/mode/eiffel_highlight_rules.js +143 -0
  356. data/vendor/assets/ace-1.1.8/mode/ejs.js +109 -0
  357. data/vendor/assets/ace-1.1.8/mode/elixir.js +58 -0
  358. data/vendor/assets/ace-1.1.8/mode/elixir_highlight_rules.js +433 -0
  359. data/vendor/assets/ace-1.1.8/mode/elm.js +58 -0
  360. data/vendor/assets/ace-1.1.8/mode/elm_highlight_rules.js +162 -0
  361. data/vendor/assets/ace-1.1.8/mode/erlang.js +57 -0
  362. data/vendor/assets/ace-1.1.8/mode/erlang_highlight_rules.js +876 -0
  363. data/vendor/assets/ace-1.1.8/mode/folding/asciidoc.js +142 -0
  364. data/vendor/assets/ace-1.1.8/mode/folding/c9search.js +83 -0
  365. data/vendor/assets/ace-1.1.8/mode/folding/coffee.js +120 -0
  366. data/vendor/assets/ace-1.1.8/mode/folding/coffee_test.js +101 -0
  367. data/vendor/assets/ace-1.1.8/mode/folding/csharp.js +138 -0
  368. data/vendor/assets/ace-1.1.8/mode/folding/cstyle.js +124 -0
  369. data/vendor/assets/ace-1.1.8/mode/folding/cstyle_test.js +109 -0
  370. data/vendor/assets/ace-1.1.8/mode/folding/diff.js +69 -0
  371. data/vendor/assets/ace-1.1.8/mode/folding/fold_mode.js +120 -0
  372. data/vendor/assets/ace-1.1.8/mode/folding/html.js +48 -0
  373. data/vendor/assets/ace-1.1.8/mode/folding/html_test.js +162 -0
  374. data/vendor/assets/ace-1.1.8/mode/folding/ini.js +80 -0
  375. data/vendor/assets/ace-1.1.8/mode/folding/latex.js +162 -0
  376. data/vendor/assets/ace-1.1.8/mode/folding/lua.js +163 -0
  377. data/vendor/assets/ace-1.1.8/mode/folding/markdown.js +125 -0
  378. data/vendor/assets/ace-1.1.8/mode/folding/mixed.js +83 -0
  379. data/vendor/assets/ace-1.1.8/mode/folding/pythonic.js +58 -0
  380. data/vendor/assets/ace-1.1.8/mode/folding/pythonic_test.js +98 -0
  381. data/vendor/assets/ace-1.1.8/mode/folding/velocity.js +120 -0
  382. data/vendor/assets/ace-1.1.8/mode/folding/xml.js +277 -0
  383. data/vendor/assets/ace-1.1.8/mode/folding/xml_test.js +110 -0
  384. data/vendor/assets/ace-1.1.8/mode/forth.js +58 -0
  385. data/vendor/assets/ace-1.1.8/mode/forth_highlight_rules.js +164 -0
  386. data/vendor/assets/ace-1.1.8/mode/ftl.js +49 -0
  387. data/vendor/assets/ace-1.1.8/mode/ftl_highlight_rules.js +195 -0
  388. data/vendor/assets/ace-1.1.8/mode/gcode.js +51 -0
  389. data/vendor/assets/ace-1.1.8/mode/gcode_highlight_rules.js +94 -0
  390. data/vendor/assets/ace-1.1.8/mode/gherkin.js +80 -0
  391. data/vendor/assets/ace-1.1.8/mode/gherkin_highlight_rules.js +113 -0
  392. data/vendor/assets/ace-1.1.8/mode/gitignore.js +20 -0
  393. data/vendor/assets/ace-1.1.8/mode/gitignore_highlight_rules.js +31 -0
  394. data/vendor/assets/ace-1.1.8/mode/glsl.js +56 -0
  395. data/vendor/assets/ace-1.1.8/mode/glsl_highlight_rules.js +81 -0
  396. data/vendor/assets/ace-1.1.8/mode/golang.js +55 -0
  397. data/vendor/assets/ace-1.1.8/mode/golang_highlight_rules.js +108 -0
  398. data/vendor/assets/ace-1.1.8/mode/groovy.js +24 -0
  399. data/vendor/assets/ace-1.1.8/mode/groovy_highlight_rules.js +173 -0
  400. data/vendor/assets/ace-1.1.8/mode/haml.js +61 -0
  401. data/vendor/assets/ace-1.1.8/mode/haml_highlight_rules.js +132 -0
  402. data/vendor/assets/ace-1.1.8/mode/handlebars.js +29 -0
  403. data/vendor/assets/ace-1.1.8/mode/handlebars_highlight_rules.js +72 -0
  404. data/vendor/assets/ace-1.1.8/mode/haskell.js +62 -0
  405. data/vendor/assets/ace-1.1.8/mode/haskell_highlight_rules.js +246 -0
  406. data/vendor/assets/ace-1.1.8/mode/haxe.js +56 -0
  407. data/vendor/assets/ace-1.1.8/mode/haxe_highlight_rules.js +98 -0
  408. data/vendor/assets/ace-1.1.8/mode/html.js +106 -0
  409. data/vendor/assets/ace-1.1.8/mode/html/saxparser.js +10430 -0
  410. data/vendor/assets/ace-1.1.8/mode/html_completions.js +305 -0
  411. data/vendor/assets/ace-1.1.8/mode/html_highlight_rules.js +111 -0
  412. data/vendor/assets/ace-1.1.8/mode/html_ruby.js +59 -0
  413. data/vendor/assets/ace-1.1.8/mode/html_ruby_highlight_rules.js +84 -0
  414. data/vendor/assets/ace-1.1.8/mode/html_test.js +67 -0
  415. data/vendor/assets/ace-1.1.8/mode/html_worker.js +92 -0
  416. data/vendor/assets/ace-1.1.8/mode/ini.js +53 -0
  417. data/vendor/assets/ace-1.1.8/mode/ini_highlight_rules.js +112 -0
  418. data/vendor/assets/ace-1.1.8/mode/io.js +58 -0
  419. data/vendor/assets/ace-1.1.8/mode/io_highlight_rules.js +120 -0
  420. data/vendor/assets/ace-1.1.8/mode/jack.js +79 -0
  421. data/vendor/assets/ace-1.1.8/mode/jack_highlight_rules.js +142 -0
  422. data/vendor/assets/ace-1.1.8/mode/jade.js +57 -0
  423. data/vendor/assets/ace-1.1.8/mode/jade_highlight_rules.js +341 -0
  424. data/vendor/assets/ace-1.1.8/mode/java.js +24 -0
  425. data/vendor/assets/ace-1.1.8/mode/java_highlight_rules.js +128 -0
  426. data/vendor/assets/ace-1.1.8/mode/javascript.js +116 -0
  427. data/vendor/assets/ace-1.1.8/mode/javascript/jshint.js +9459 -0
  428. data/vendor/assets/ace-1.1.8/mode/javascript_highlight_rules.js +405 -0
  429. data/vendor/assets/ace-1.1.8/mode/javascript_test.js +213 -0
  430. data/vendor/assets/ace-1.1.8/mode/javascript_worker.js +187 -0
  431. data/vendor/assets/ace-1.1.8/mode/javascript_worker_test.js +106 -0
  432. data/vendor/assets/ace-1.1.8/mode/js_regex_highlight_rules.js +94 -0
  433. data/vendor/assets/ace-1.1.8/mode/json.js +93 -0
  434. data/vendor/assets/ace-1.1.8/mode/json/json_parse.js +346 -0
  435. data/vendor/assets/ace-1.1.8/mode/json_highlight_rules.js +100 -0
  436. data/vendor/assets/ace-1.1.8/mode/json_worker.js +68 -0
  437. data/vendor/assets/ace-1.1.8/mode/json_worker_test.js +101 -0
  438. data/vendor/assets/ace-1.1.8/mode/jsoniq.js +203 -0
  439. data/vendor/assets/ace-1.1.8/mode/jsp.js +55 -0
  440. data/vendor/assets/ace-1.1.8/mode/jsp_highlight_rules.js +91 -0
  441. data/vendor/assets/ace-1.1.8/mode/jsx.js +56 -0
  442. data/vendor/assets/ace-1.1.8/mode/jsx_highlight_rules.js +120 -0
  443. data/vendor/assets/ace-1.1.8/mode/julia.js +62 -0
  444. data/vendor/assets/ace-1.1.8/mode/julia_highlight_rules.js +170 -0
  445. data/vendor/assets/ace-1.1.8/mode/latex.js +26 -0
  446. data/vendor/assets/ace-1.1.8/mode/latex_highlight_rules.js +73 -0
  447. data/vendor/assets/ace-1.1.8/mode/less.js +84 -0
  448. data/vendor/assets/ace-1.1.8/mode/less_highlight_rules.js +271 -0
  449. data/vendor/assets/ace-1.1.8/mode/liquid.js +82 -0
  450. data/vendor/assets/ace-1.1.8/mode/liquid_highlight_rules.js +131 -0
  451. data/vendor/assets/ace-1.1.8/mode/lisp.js +56 -0
  452. data/vendor/assets/ace-1.1.8/mode/lisp_highlight_rules.js +124 -0
  453. data/vendor/assets/ace-1.1.8/mode/livescript.js +249 -0
  454. data/vendor/assets/ace-1.1.8/mode/logiql.js +139 -0
  455. data/vendor/assets/ace-1.1.8/mode/logiql_highlight_rules.js +119 -0
  456. data/vendor/assets/ace-1.1.8/mode/logiql_test.js +98 -0
  457. data/vendor/assets/ace-1.1.8/mode/lsl.js +92 -0
  458. data/vendor/assets/ace-1.1.8/mode/lsl_highlight_rules.js +123 -0
  459. data/vendor/assets/ace-1.1.8/mode/lua.js +168 -0
  460. data/vendor/assets/ace-1.1.8/mode/lua/luaparse.js +1989 -0
  461. data/vendor/assets/ace-1.1.8/mode/lua_highlight_rules.js +193 -0
  462. data/vendor/assets/ace-1.1.8/mode/lua_worker.js +71 -0
  463. data/vendor/assets/ace-1.1.8/mode/luapage.js +24 -0
  464. data/vendor/assets/ace-1.1.8/mode/luapage_highlight_rules.js +49 -0
  465. data/vendor/assets/ace-1.1.8/mode/lucene.js +19 -0
  466. data/vendor/assets/ace-1.1.8/mode/lucene_highlight_rules.js +49 -0
  467. data/vendor/assets/ace-1.1.8/mode/makefile.js +58 -0
  468. data/vendor/assets/ace-1.1.8/mode/makefile_highlight_rules.js +75 -0
  469. data/vendor/assets/ace-1.1.8/mode/markdown.js +76 -0
  470. data/vendor/assets/ace-1.1.8/mode/markdown_highlight_rules.js +228 -0
  471. data/vendor/assets/ace-1.1.8/mode/matching_brace_outdent.js +69 -0
  472. data/vendor/assets/ace-1.1.8/mode/matching_parens_outdent.js +74 -0
  473. data/vendor/assets/ace-1.1.8/mode/matlab.js +55 -0
  474. data/vendor/assets/ace-1.1.8/mode/matlab_highlight_rules.js +262 -0
  475. data/vendor/assets/ace-1.1.8/mode/mel.js +56 -0
  476. data/vendor/assets/ace-1.1.8/mode/mel_highlight_rules.js +133 -0
  477. data/vendor/assets/ace-1.1.8/mode/mushcode.js +116 -0
  478. data/vendor/assets/ace-1.1.8/mode/mushcode_highlight_rules.js +569 -0
  479. data/vendor/assets/ace-1.1.8/mode/mysql.js +51 -0
  480. data/vendor/assets/ace-1.1.8/mode/mysql_highlight_rules.js +122 -0
  481. data/vendor/assets/ace-1.1.8/mode/nix.js +62 -0
  482. data/vendor/assets/ace-1.1.8/mode/nix_highlight_rules.js +119 -0
  483. data/vendor/assets/ace-1.1.8/mode/objectivec.js +61 -0
  484. data/vendor/assets/ace-1.1.8/mode/objectivec_highlight_rules.js +331 -0
  485. data/vendor/assets/ace-1.1.8/mode/ocaml.js +97 -0
  486. data/vendor/assets/ace-1.1.8/mode/ocaml_highlight_rules.js +337 -0
  487. data/vendor/assets/ace-1.1.8/mode/pascal.js +67 -0
  488. data/vendor/assets/ace-1.1.8/mode/pascal_highlight_rules.js +127 -0
  489. data/vendor/assets/ace-1.1.8/mode/perl.js +90 -0
  490. data/vendor/assets/ace-1.1.8/mode/perl_highlight_rules.js +165 -0
  491. data/vendor/assets/ace-1.1.8/mode/pgsql.js +59 -0
  492. data/vendor/assets/ace-1.1.8/mode/pgsql_highlight_rules.js +619 -0
  493. data/vendor/assets/ace-1.1.8/mode/php.js +158 -0
  494. data/vendor/assets/ace-1.1.8/mode/php/php.js +5031 -0
  495. data/vendor/assets/ace-1.1.8/mode/php_highlight_rules.js +1085 -0
  496. data/vendor/assets/ace-1.1.8/mode/php_test.js +65 -0
  497. data/vendor/assets/ace-1.1.8/mode/php_worker.js +81 -0
  498. data/vendor/assets/ace-1.1.8/mode/plain_text.js +55 -0
  499. data/vendor/assets/ace-1.1.8/mode/plain_text_test.js +56 -0
  500. data/vendor/assets/ace-1.1.8/mode/powershell.js +61 -0
  501. data/vendor/assets/ace-1.1.8/mode/powershell_highlight_rules.js +145 -0
  502. data/vendor/assets/ace-1.1.8/mode/praat.js +84 -0
  503. data/vendor/assets/ace-1.1.8/mode/praat_highlight_rules.js +262 -0
  504. data/vendor/assets/ace-1.1.8/mode/prolog.js +62 -0
  505. data/vendor/assets/ace-1.1.8/mode/prolog_highlight_rules.js +238 -0
  506. data/vendor/assets/ace-1.1.8/mode/properties.js +48 -0
  507. data/vendor/assets/ace-1.1.8/mode/properties_highlight_rules.js +86 -0
  508. data/vendor/assets/ace-1.1.8/mode/protobuf.js +63 -0
  509. data/vendor/assets/ace-1.1.8/mode/protobuf_highlight_rules.js +66 -0
  510. data/vendor/assets/ace-1.1.8/mode/python.js +113 -0
  511. data/vendor/assets/ace-1.1.8/mode/python_highlight_rules.js +191 -0
  512. data/vendor/assets/ace-1.1.8/mode/python_test.js +79 -0
  513. data/vendor/assets/ace-1.1.8/mode/r.js +154 -0
  514. data/vendor/assets/ace-1.1.8/mode/r_highlight_rules.js +208 -0
  515. data/vendor/assets/ace-1.1.8/mode/rdoc.js +61 -0
  516. data/vendor/assets/ace-1.1.8/mode/rdoc_highlight_rules.js +119 -0
  517. data/vendor/assets/ace-1.1.8/mode/rhtml.js +87 -0
  518. data/vendor/assets/ace-1.1.8/mode/rhtml_highlight_rules.js +66 -0
  519. data/vendor/assets/ace-1.1.8/mode/ruby.js +100 -0
  520. data/vendor/assets/ace-1.1.8/mode/ruby_highlight_rules.js +323 -0
  521. data/vendor/assets/ace-1.1.8/mode/ruby_test.js +77 -0
  522. data/vendor/assets/ace-1.1.8/mode/rust.js +58 -0
  523. data/vendor/assets/ace-1.1.8/mode/rust_highlight_rules.js +158 -0
  524. data/vendor/assets/ace-1.1.8/mode/sass.js +52 -0
  525. data/vendor/assets/ace-1.1.8/mode/sass_highlight_rules.js +79 -0
  526. data/vendor/assets/ace-1.1.8/mode/scad.js +99 -0
  527. data/vendor/assets/ace-1.1.8/mode/scad_highlight_rules.js +142 -0
  528. data/vendor/assets/ace-1.1.8/mode/scala.js +25 -0
  529. data/vendor/assets/ace-1.1.8/mode/scala_highlight_rules.js +160 -0
  530. data/vendor/assets/ace-1.1.8/mode/scheme.js +56 -0
  531. data/vendor/assets/ace-1.1.8/mode/scheme_highlight_rules.js +123 -0
  532. data/vendor/assets/ace-1.1.8/mode/scss.js +84 -0
  533. data/vendor/assets/ace-1.1.8/mode/scss_highlight_rules.js +296 -0
  534. data/vendor/assets/ace-1.1.8/mode/sh.js +116 -0
  535. data/vendor/assets/ace-1.1.8/mode/sh_highlight_rules.js +203 -0
  536. data/vendor/assets/ace-1.1.8/mode/sjs.js +56 -0
  537. data/vendor/assets/ace-1.1.8/mode/sjs_highlight_rules.js +233 -0
  538. data/vendor/assets/ace-1.1.8/mode/smarty.js +51 -0
  539. data/vendor/assets/ace-1.1.8/mode/smarty_highlight_rules.js +139 -0
  540. data/vendor/assets/ace-1.1.8/mode/snippets.js +113 -0
  541. data/vendor/assets/ace-1.1.8/mode/soy_template.js +60 -0
  542. data/vendor/assets/ace-1.1.8/mode/soy_template_highlight_rules.js +356 -0
  543. data/vendor/assets/ace-1.1.8/mode/space.js +21 -0
  544. data/vendor/assets/ace-1.1.8/mode/space_highlight_rules.js +56 -0
  545. data/vendor/assets/ace-1.1.8/mode/sql.js +53 -0
  546. data/vendor/assets/ace-1.1.8/mode/sql_highlight_rules.js +99 -0
  547. data/vendor/assets/ace-1.1.8/mode/stylus.js +62 -0
  548. data/vendor/assets/ace-1.1.8/mode/stylus_highlight_rules.js +165 -0
  549. data/vendor/assets/ace-1.1.8/mode/svg.js +69 -0
  550. data/vendor/assets/ace-1.1.8/mode/svg_highlight_rules.js +49 -0
  551. data/vendor/assets/ace-1.1.8/mode/tcl.js +84 -0
  552. data/vendor/assets/ace-1.1.8/mode/tcl_highlight_rules.js +172 -0
  553. data/vendor/assets/ace-1.1.8/mode/tex.js +68 -0
  554. data/vendor/assets/ace-1.1.8/mode/tex_highlight_rules.js +127 -0
  555. data/vendor/assets/ace-1.1.8/mode/text.js +386 -0
  556. data/vendor/assets/ace-1.1.8/mode/text_highlight_rules.js +234 -0
  557. data/vendor/assets/ace-1.1.8/mode/text_test.js +64 -0
  558. data/vendor/assets/ace-1.1.8/mode/textile.js +67 -0
  559. data/vendor/assets/ace-1.1.8/mode/textile_highlight_rules.js +93 -0
  560. data/vendor/assets/ace-1.1.8/mode/toml.js +56 -0
  561. data/vendor/assets/ace-1.1.8/mode/toml_highlight_rules.js +103 -0
  562. data/vendor/assets/ace-1.1.8/mode/twig.js +81 -0
  563. data/vendor/assets/ace-1.1.8/mode/twig_highlight_rules.js +166 -0
  564. data/vendor/assets/ace-1.1.8/mode/typescript.js +62 -0
  565. data/vendor/assets/ace-1.1.8/mode/typescript_highlight_rules.js +98 -0
  566. data/vendor/assets/ace-1.1.8/mode/vala.js +105 -0
  567. data/vendor/assets/ace-1.1.8/mode/vala_highlight_rules.js +457 -0
  568. data/vendor/assets/ace-1.1.8/mode/vbscript.js +60 -0
  569. data/vendor/assets/ace-1.1.8/mode/vbscript_highlight_rules.js +246 -0
  570. data/vendor/assets/ace-1.1.8/mode/velocity.js +58 -0
  571. data/vendor/assets/ace-1.1.8/mode/velocity_highlight_rules.js +177 -0
  572. data/vendor/assets/ace-1.1.8/mode/verilog.js +54 -0
  573. data/vendor/assets/ace-1.1.8/mode/verilog_highlight_rules.js +101 -0
  574. data/vendor/assets/ace-1.1.8/mode/vhdl.js +52 -0
  575. data/vendor/assets/ace-1.1.8/mode/vhdl_highlight_rules.js +115 -0
  576. data/vendor/assets/ace-1.1.8/mode/xml.js +59 -0
  577. data/vendor/assets/ace-1.1.8/mode/xml_highlight_rules.js +242 -0
  578. data/vendor/assets/ace-1.1.8/mode/xml_test.js +75 -0
  579. data/vendor/assets/ace-1.1.8/mode/xquery.js +216 -0
  580. data/vendor/assets/ace-1.1.8/mode/xquery/Readme.md +1 -0
  581. data/vendor/assets/ace-1.1.8/mode/xquery/jsoniq_lexer.js +4453 -0
  582. data/vendor/assets/ace-1.1.8/mode/xquery/modules.js +4 -0
  583. data/vendor/assets/ace-1.1.8/mode/xquery/xqlint.js +78912 -0
  584. data/vendor/assets/ace-1.1.8/mode/xquery/xquery_lexer.js +4422 -0
  585. data/vendor/assets/ace-1.1.8/mode/xquery_worker.js +115 -0
  586. data/vendor/assets/ace-1.1.8/mode/yaml.js +78 -0
  587. data/vendor/assets/ace-1.1.8/mode/yaml_highlight_rules.js +113 -0
  588. data/vendor/assets/ace-1.1.8/model/editor.js +62 -0
  589. data/vendor/assets/ace-1.1.8/mouse/default_gutter_handler.js +181 -0
  590. data/vendor/assets/ace-1.1.8/mouse/default_handlers.js +278 -0
  591. data/vendor/assets/ace-1.1.8/mouse/dragdrop_handler.js +428 -0
  592. data/vendor/assets/ace-1.1.8/mouse/fold_handler.js +93 -0
  593. data/vendor/assets/ace-1.1.8/mouse/mouse_event.js +129 -0
  594. data/vendor/assets/ace-1.1.8/mouse/mouse_handler.js +203 -0
  595. data/vendor/assets/ace-1.1.8/mouse/mouse_handler_test.js +77 -0
  596. data/vendor/assets/ace-1.1.8/mouse/multi_select_handler.js +208 -0
  597. data/vendor/assets/ace-1.1.8/multi_select.js +996 -0
  598. data/vendor/assets/ace-1.1.8/multi_select_test.js +199 -0
  599. data/vendor/assets/ace-1.1.8/occur.js +193 -0
  600. data/vendor/assets/ace-1.1.8/occur_test.js +154 -0
  601. data/vendor/assets/ace-1.1.8/placeholder.js +274 -0
  602. data/vendor/assets/ace-1.1.8/placeholder_test.js +156 -0
  603. data/vendor/assets/ace-1.1.8/range.js +549 -0
  604. data/vendor/assets/ace-1.1.8/range_list.js +240 -0
  605. data/vendor/assets/ace-1.1.8/range_list_test.js +182 -0
  606. data/vendor/assets/ace-1.1.8/range_test.js +191 -0
  607. data/vendor/assets/ace-1.1.8/renderloop.js +75 -0
  608. data/vendor/assets/ace-1.1.8/requirejs/text.js +52 -0
  609. data/vendor/assets/ace-1.1.8/requirejs/text_build.js +60 -0
  610. data/vendor/assets/ace-1.1.8/scrollbar.js +270 -0
  611. data/vendor/assets/ace-1.1.8/search.js +396 -0
  612. data/vendor/assets/ace-1.1.8/search_highlight.js +82 -0
  613. data/vendor/assets/ace-1.1.8/search_test.js +461 -0
  614. data/vendor/assets/ace-1.1.8/selection.js +955 -0
  615. data/vendor/assets/ace-1.1.8/selection_test.js +480 -0
  616. data/vendor/assets/ace-1.1.8/snippets.js +949 -0
  617. data/vendor/assets/ace-1.1.8/snippets/_.snippets +240 -0
  618. data/vendor/assets/ace-1.1.8/snippets/_all_modes.js +7 -0
  619. data/vendor/assets/ace-1.1.8/snippets/_all_modes.snippets +0 -0
  620. data/vendor/assets/ace-1.1.8/snippets/abap.js +7 -0
  621. data/vendor/assets/ace-1.1.8/snippets/abap.snippets +0 -0
  622. data/vendor/assets/ace-1.1.8/snippets/actionscript.js +7 -0
  623. data/vendor/assets/ace-1.1.8/snippets/actionscript.snippets +157 -0
  624. data/vendor/assets/ace-1.1.8/snippets/ada.js +7 -0
  625. data/vendor/assets/ace-1.1.8/snippets/ada.snippets +0 -0
  626. data/vendor/assets/ace-1.1.8/snippets/all_modes.js +7 -0
  627. data/vendor/assets/ace-1.1.8/snippets/all_modes.snippets +0 -0
  628. data/vendor/assets/ace-1.1.8/snippets/apache.snippets +35 -0
  629. data/vendor/assets/ace-1.1.8/snippets/apache_conf.js +7 -0
  630. data/vendor/assets/ace-1.1.8/snippets/apache_conf.snippets +0 -0
  631. data/vendor/assets/ace-1.1.8/snippets/applescript.js +7 -0
  632. data/vendor/assets/ace-1.1.8/snippets/applescript.snippets +0 -0
  633. data/vendor/assets/ace-1.1.8/snippets/asciidoc.js +7 -0
  634. data/vendor/assets/ace-1.1.8/snippets/asciidoc.snippets +0 -0
  635. data/vendor/assets/ace-1.1.8/snippets/assembly_x86.js +7 -0
  636. data/vendor/assets/ace-1.1.8/snippets/assembly_x86.snippets +0 -0
  637. data/vendor/assets/ace-1.1.8/snippets/autohotkey.js +7 -0
  638. data/vendor/assets/ace-1.1.8/snippets/autohotkey.snippets +0 -0
  639. data/vendor/assets/ace-1.1.8/snippets/autoit.snippets +66 -0
  640. data/vendor/assets/ace-1.1.8/snippets/batchfile.js +7 -0
  641. data/vendor/assets/ace-1.1.8/snippets/batchfile.snippets +0 -0
  642. data/vendor/assets/ace-1.1.8/snippets/c.snippets +235 -0
  643. data/vendor/assets/ace-1.1.8/snippets/c9search.js +7 -0
  644. data/vendor/assets/ace-1.1.8/snippets/c9search.snippets +0 -0
  645. data/vendor/assets/ace-1.1.8/snippets/c_cpp.js +7 -0
  646. data/vendor/assets/ace-1.1.8/snippets/c_cpp.snippets +131 -0
  647. data/vendor/assets/ace-1.1.8/snippets/chef.snippets +204 -0
  648. data/vendor/assets/ace-1.1.8/snippets/cirru.js +7 -0
  649. data/vendor/assets/ace-1.1.8/snippets/cirru.snippets +0 -0
  650. data/vendor/assets/ace-1.1.8/snippets/clojure.js +7 -0
  651. data/vendor/assets/ace-1.1.8/snippets/clojure.snippets +90 -0
  652. data/vendor/assets/ace-1.1.8/snippets/cmake.snippets +58 -0
  653. data/vendor/assets/ace-1.1.8/snippets/cobol.js +7 -0
  654. data/vendor/assets/ace-1.1.8/snippets/cobol.snippets +0 -0
  655. data/vendor/assets/ace-1.1.8/snippets/coffee.js +7 -0
  656. data/vendor/assets/ace-1.1.8/snippets/coffee.snippets +95 -0
  657. data/vendor/assets/ace-1.1.8/snippets/coldfusion.js +7 -0
  658. data/vendor/assets/ace-1.1.8/snippets/coldfusion.snippets +0 -0
  659. data/vendor/assets/ace-1.1.8/snippets/cs.snippets +374 -0
  660. data/vendor/assets/ace-1.1.8/snippets/csharp.js +7 -0
  661. data/vendor/assets/ace-1.1.8/snippets/csharp.snippets +0 -0
  662. data/vendor/assets/ace-1.1.8/snippets/css.js +7 -0
  663. data/vendor/assets/ace-1.1.8/snippets/css.snippets +967 -0
  664. data/vendor/assets/ace-1.1.8/snippets/curly.js +7 -0
  665. data/vendor/assets/ace-1.1.8/snippets/curly.snippets +0 -0
  666. data/vendor/assets/ace-1.1.8/snippets/d.js +7 -0
  667. data/vendor/assets/ace-1.1.8/snippets/d.snippets +0 -0
  668. data/vendor/assets/ace-1.1.8/snippets/dart.js +7 -0
  669. data/vendor/assets/ace-1.1.8/snippets/dart.snippets +83 -0
  670. data/vendor/assets/ace-1.1.8/snippets/diff.js +7 -0
  671. data/vendor/assets/ace-1.1.8/snippets/diff.snippets +11 -0
  672. data/vendor/assets/ace-1.1.8/snippets/django.js +7 -0
  673. data/vendor/assets/ace-1.1.8/snippets/django.snippets +108 -0
  674. data/vendor/assets/ace-1.1.8/snippets/dockerfile.js +7 -0
  675. data/vendor/assets/ace-1.1.8/snippets/dockerfile.snippets +0 -0
  676. data/vendor/assets/ace-1.1.8/snippets/dot.js +7 -0
  677. data/vendor/assets/ace-1.1.8/snippets/dot.snippets +0 -0
  678. data/vendor/assets/ace-1.1.8/snippets/dummy.js +7 -0
  679. data/vendor/assets/ace-1.1.8/snippets/dummy_syntax.js +7 -0
  680. data/vendor/assets/ace-1.1.8/snippets/eiffel.js +7 -0
  681. data/vendor/assets/ace-1.1.8/snippets/eiffel.snippets +0 -0
  682. data/vendor/assets/ace-1.1.8/snippets/ejs.js +7 -0
  683. data/vendor/assets/ace-1.1.8/snippets/ejs.snippets +0 -0
  684. data/vendor/assets/ace-1.1.8/snippets/elixir.js +7 -0
  685. data/vendor/assets/ace-1.1.8/snippets/elixir.snippets +0 -0
  686. data/vendor/assets/ace-1.1.8/snippets/elm.js +7 -0
  687. data/vendor/assets/ace-1.1.8/snippets/elm.snippets +0 -0
  688. data/vendor/assets/ace-1.1.8/snippets/erlang.js +7 -0
  689. data/vendor/assets/ace-1.1.8/snippets/erlang.snippets +160 -0
  690. data/vendor/assets/ace-1.1.8/snippets/eruby.snippets +113 -0
  691. data/vendor/assets/ace-1.1.8/snippets/falcon.snippets +71 -0
  692. data/vendor/assets/ace-1.1.8/snippets/forth.js +7 -0
  693. data/vendor/assets/ace-1.1.8/snippets/forth.snippets +0 -0
  694. data/vendor/assets/ace-1.1.8/snippets/ftl.js +7 -0
  695. data/vendor/assets/ace-1.1.8/snippets/ftl.snippets +0 -0
  696. data/vendor/assets/ace-1.1.8/snippets/gcode.js +7 -0
  697. data/vendor/assets/ace-1.1.8/snippets/gcode.snippets +0 -0
  698. data/vendor/assets/ace-1.1.8/snippets/gherkin.js +7 -0
  699. data/vendor/assets/ace-1.1.8/snippets/gherkin.snippets +0 -0
  700. data/vendor/assets/ace-1.1.8/snippets/gitignore.js +7 -0
  701. data/vendor/assets/ace-1.1.8/snippets/gitignore.snippets +0 -0
  702. data/vendor/assets/ace-1.1.8/snippets/glsl.js +7 -0
  703. data/vendor/assets/ace-1.1.8/snippets/glsl.snippets +0 -0
  704. data/vendor/assets/ace-1.1.8/snippets/go.snippets +201 -0
  705. data/vendor/assets/ace-1.1.8/snippets/golang.js +7 -0
  706. data/vendor/assets/ace-1.1.8/snippets/golang.snippets +0 -0
  707. data/vendor/assets/ace-1.1.8/snippets/groovy.js +7 -0
  708. data/vendor/assets/ace-1.1.8/snippets/groovy.snippets +0 -0
  709. data/vendor/assets/ace-1.1.8/snippets/haml.js +7 -0
  710. data/vendor/assets/ace-1.1.8/snippets/haml.snippets +20 -0
  711. data/vendor/assets/ace-1.1.8/snippets/handlebars.js +7 -0
  712. data/vendor/assets/ace-1.1.8/snippets/handlebars.snippets +0 -0
  713. data/vendor/assets/ace-1.1.8/snippets/haskell.js +7 -0
  714. data/vendor/assets/ace-1.1.8/snippets/haskell.snippets +82 -0
  715. data/vendor/assets/ace-1.1.8/snippets/haxe.js +7 -0
  716. data/vendor/assets/ace-1.1.8/snippets/haxe.snippets +0 -0
  717. data/vendor/assets/ace-1.1.8/snippets/html.js +7 -0
  718. data/vendor/assets/ace-1.1.8/snippets/html.snippets +828 -0
  719. data/vendor/assets/ace-1.1.8/snippets/html_ruby.js +7 -0
  720. data/vendor/assets/ace-1.1.8/snippets/html_ruby.snippets +0 -0
  721. data/vendor/assets/ace-1.1.8/snippets/htmldjango.snippets +136 -0
  722. data/vendor/assets/ace-1.1.8/snippets/htmltornado.snippets +55 -0
  723. data/vendor/assets/ace-1.1.8/snippets/ini.js +7 -0
  724. data/vendor/assets/ace-1.1.8/snippets/ini.snippets +0 -0
  725. data/vendor/assets/ace-1.1.8/snippets/io.js +69 -0
  726. data/vendor/assets/ace-1.1.8/snippets/io.snippets +0 -0
  727. data/vendor/assets/ace-1.1.8/snippets/jack.js +7 -0
  728. data/vendor/assets/ace-1.1.8/snippets/jack.snippets +0 -0
  729. data/vendor/assets/ace-1.1.8/snippets/jade.js +7 -0
  730. data/vendor/assets/ace-1.1.8/snippets/jade.snippets +0 -0
  731. data/vendor/assets/ace-1.1.8/snippets/java.js +7 -0
  732. data/vendor/assets/ace-1.1.8/snippets/java.snippets +240 -0
  733. data/vendor/assets/ace-1.1.8/snippets/javascript-jquery.snippets +589 -0
  734. data/vendor/assets/ace-1.1.8/snippets/javascript.js +7 -0
  735. data/vendor/assets/ace-1.1.8/snippets/javascript.snippets +195 -0
  736. data/vendor/assets/ace-1.1.8/snippets/json.js +7 -0
  737. data/vendor/assets/ace-1.1.8/snippets/json.snippets +0 -0
  738. data/vendor/assets/ace-1.1.8/snippets/jsoniq.js +7 -0
  739. data/vendor/assets/ace-1.1.8/snippets/jsoniq.snippets +61 -0
  740. data/vendor/assets/ace-1.1.8/snippets/jsp.js +7 -0
  741. data/vendor/assets/ace-1.1.8/snippets/jsp.snippets +99 -0
  742. data/vendor/assets/ace-1.1.8/snippets/jsx.js +7 -0
  743. data/vendor/assets/ace-1.1.8/snippets/jsx.snippets +0 -0
  744. data/vendor/assets/ace-1.1.8/snippets/julia.js +7 -0
  745. data/vendor/assets/ace-1.1.8/snippets/julia.snippets +0 -0
  746. data/vendor/assets/ace-1.1.8/snippets/latex.js +7 -0
  747. data/vendor/assets/ace-1.1.8/snippets/latex.snippets +0 -0
  748. data/vendor/assets/ace-1.1.8/snippets/ledger.snippets +5 -0
  749. data/vendor/assets/ace-1.1.8/snippets/less.js +7 -0
  750. data/vendor/assets/ace-1.1.8/snippets/less.snippets +0 -0
  751. data/vendor/assets/ace-1.1.8/snippets/liquid.js +7 -0
  752. data/vendor/assets/ace-1.1.8/snippets/liquid.snippets +0 -0
  753. data/vendor/assets/ace-1.1.8/snippets/lisp.js +7 -0
  754. data/vendor/assets/ace-1.1.8/snippets/lisp.snippets +0 -0
  755. data/vendor/assets/ace-1.1.8/snippets/livescript.js +7 -0
  756. data/vendor/assets/ace-1.1.8/snippets/livescript.snippets +0 -0
  757. data/vendor/assets/ace-1.1.8/snippets/logiql.js +7 -0
  758. data/vendor/assets/ace-1.1.8/snippets/logiql.snippets +0 -0
  759. data/vendor/assets/ace-1.1.8/snippets/lsl.js +7 -0
  760. data/vendor/assets/ace-1.1.8/snippets/lsl.snippets +1066 -0
  761. data/vendor/assets/ace-1.1.8/snippets/lua.js +7 -0
  762. data/vendor/assets/ace-1.1.8/snippets/lua.snippets +21 -0
  763. data/vendor/assets/ace-1.1.8/snippets/luapage.js +7 -0
  764. data/vendor/assets/ace-1.1.8/snippets/luapage.snippets +0 -0
  765. data/vendor/assets/ace-1.1.8/snippets/lucene.js +7 -0
  766. data/vendor/assets/ace-1.1.8/snippets/lucene.snippets +0 -0
  767. data/vendor/assets/ace-1.1.8/snippets/makefile.js +7 -0
  768. data/vendor/assets/ace-1.1.8/snippets/makefile.snippets +4 -0
  769. data/vendor/assets/ace-1.1.8/snippets/mako.snippets +54 -0
  770. data/vendor/assets/ace-1.1.8/snippets/markdown.js +7 -0
  771. data/vendor/assets/ace-1.1.8/snippets/markdown.snippets +88 -0
  772. data/vendor/assets/ace-1.1.8/snippets/matlab.js +7 -0
  773. data/vendor/assets/ace-1.1.8/snippets/matlab.snippets +0 -0
  774. data/vendor/assets/ace-1.1.8/snippets/mel.js +7 -0
  775. data/vendor/assets/ace-1.1.8/snippets/mel.snippets +0 -0
  776. data/vendor/assets/ace-1.1.8/snippets/mushcode.js +7 -0
  777. data/vendor/assets/ace-1.1.8/snippets/mushcode.snippets +0 -0
  778. data/vendor/assets/ace-1.1.8/snippets/mushcode_high_rules.js +7 -0
  779. data/vendor/assets/ace-1.1.8/snippets/mushcode_high_rules.snippets +0 -0
  780. data/vendor/assets/ace-1.1.8/snippets/mysql.js +7 -0
  781. data/vendor/assets/ace-1.1.8/snippets/mysql.snippets +0 -0
  782. data/vendor/assets/ace-1.1.8/snippets/nix.js +7 -0
  783. data/vendor/assets/ace-1.1.8/snippets/nix.snippets +0 -0
  784. data/vendor/assets/ace-1.1.8/snippets/objc.snippets +247 -0
  785. data/vendor/assets/ace-1.1.8/snippets/objectivec.js +7 -0
  786. data/vendor/assets/ace-1.1.8/snippets/objectivec.snippets +0 -0
  787. data/vendor/assets/ace-1.1.8/snippets/ocaml.js +7 -0
  788. data/vendor/assets/ace-1.1.8/snippets/ocaml.snippets +0 -0
  789. data/vendor/assets/ace-1.1.8/snippets/pascal.js +7 -0
  790. data/vendor/assets/ace-1.1.8/snippets/pascal.snippets +0 -0
  791. data/vendor/assets/ace-1.1.8/snippets/perl.js +7 -0
  792. data/vendor/assets/ace-1.1.8/snippets/perl.snippets +347 -0
  793. data/vendor/assets/ace-1.1.8/snippets/pgsql.js +7 -0
  794. data/vendor/assets/ace-1.1.8/snippets/pgsql.snippets +0 -0
  795. data/vendor/assets/ace-1.1.8/snippets/php.js +7 -0
  796. data/vendor/assets/ace-1.1.8/snippets/php.snippets +377 -0
  797. data/vendor/assets/ace-1.1.8/snippets/plain_text.js +7 -0
  798. data/vendor/assets/ace-1.1.8/snippets/plain_text.snippets +0 -0
  799. data/vendor/assets/ace-1.1.8/snippets/powershell.js +7 -0
  800. data/vendor/assets/ace-1.1.8/snippets/powershell.snippets +0 -0
  801. data/vendor/assets/ace-1.1.8/snippets/praat.js +7 -0
  802. data/vendor/assets/ace-1.1.8/snippets/praat.snippets +0 -0
  803. data/vendor/assets/ace-1.1.8/snippets/prolog.js +7 -0
  804. data/vendor/assets/ace-1.1.8/snippets/prolog.snippets +0 -0
  805. data/vendor/assets/ace-1.1.8/snippets/properties.js +7 -0
  806. data/vendor/assets/ace-1.1.8/snippets/properties.snippets +0 -0
  807. data/vendor/assets/ace-1.1.8/snippets/protobuf.js +7 -0
  808. data/vendor/assets/ace-1.1.8/snippets/protobuf.snippets +0 -0
  809. data/vendor/assets/ace-1.1.8/snippets/python.js +7 -0
  810. data/vendor/assets/ace-1.1.8/snippets/python.snippets +158 -0
  811. data/vendor/assets/ace-1.1.8/snippets/r.js +7 -0
  812. data/vendor/assets/ace-1.1.8/snippets/r.snippets +121 -0
  813. data/vendor/assets/ace-1.1.8/snippets/rdoc.js +7 -0
  814. data/vendor/assets/ace-1.1.8/snippets/rdoc.snippets +0 -0
  815. data/vendor/assets/ace-1.1.8/snippets/rhtml.js +7 -0
  816. data/vendor/assets/ace-1.1.8/snippets/rhtml.snippets +0 -0
  817. data/vendor/assets/ace-1.1.8/snippets/rst.snippets +22 -0
  818. data/vendor/assets/ace-1.1.8/snippets/ruby.js +7 -0
  819. data/vendor/assets/ace-1.1.8/snippets/ruby.snippets +928 -0
  820. data/vendor/assets/ace-1.1.8/snippets/rust.js +7 -0
  821. data/vendor/assets/ace-1.1.8/snippets/rust.snippets +0 -0
  822. data/vendor/assets/ace-1.1.8/snippets/sass.js +7 -0
  823. data/vendor/assets/ace-1.1.8/snippets/sass.snippets +0 -0
  824. data/vendor/assets/ace-1.1.8/snippets/scad.js +7 -0
  825. data/vendor/assets/ace-1.1.8/snippets/scad.snippets +0 -0
  826. data/vendor/assets/ace-1.1.8/snippets/scala.js +7 -0
  827. data/vendor/assets/ace-1.1.8/snippets/scala.snippets +0 -0
  828. data/vendor/assets/ace-1.1.8/snippets/scheme.js +7 -0
  829. data/vendor/assets/ace-1.1.8/snippets/scheme.snippets +0 -0
  830. data/vendor/assets/ace-1.1.8/snippets/scss.js +7 -0
  831. data/vendor/assets/ace-1.1.8/snippets/scss.snippets +0 -0
  832. data/vendor/assets/ace-1.1.8/snippets/sh.js +7 -0
  833. data/vendor/assets/ace-1.1.8/snippets/sh.snippets +83 -0
  834. data/vendor/assets/ace-1.1.8/snippets/sjs.js +7 -0
  835. data/vendor/assets/ace-1.1.8/snippets/sjs.snippets +0 -0
  836. data/vendor/assets/ace-1.1.8/snippets/smarty.js +7 -0
  837. data/vendor/assets/ace-1.1.8/snippets/smarty.snippets +0 -0
  838. data/vendor/assets/ace-1.1.8/snippets/snippets.js +7 -0
  839. data/vendor/assets/ace-1.1.8/snippets/snippets.snippets +9 -0
  840. data/vendor/assets/ace-1.1.8/snippets/soy_template.js +7 -0
  841. data/vendor/assets/ace-1.1.8/snippets/soy_template.snippets +0 -0
  842. data/vendor/assets/ace-1.1.8/snippets/space.js +7 -0
  843. data/vendor/assets/ace-1.1.8/snippets/space.snippets +0 -0
  844. data/vendor/assets/ace-1.1.8/snippets/sql.js +7 -0
  845. data/vendor/assets/ace-1.1.8/snippets/sql.snippets +26 -0
  846. data/vendor/assets/ace-1.1.8/snippets/stylus.js +7 -0
  847. data/vendor/assets/ace-1.1.8/snippets/stylus.snippets +0 -0
  848. data/vendor/assets/ace-1.1.8/snippets/svg.js +7 -0
  849. data/vendor/assets/ace-1.1.8/snippets/svg.snippets +0 -0
  850. data/vendor/assets/ace-1.1.8/snippets/tcl.js +7 -0
  851. data/vendor/assets/ace-1.1.8/snippets/tcl.snippets +92 -0
  852. data/vendor/assets/ace-1.1.8/snippets/tex.js +7 -0
  853. data/vendor/assets/ace-1.1.8/snippets/tex.snippets +191 -0
  854. data/vendor/assets/ace-1.1.8/snippets/text.js +7 -0
  855. data/vendor/assets/ace-1.1.8/snippets/text.snippets +0 -0
  856. data/vendor/assets/ace-1.1.8/snippets/textile.js +7 -0
  857. data/vendor/assets/ace-1.1.8/snippets/textile.snippets +30 -0
  858. data/vendor/assets/ace-1.1.8/snippets/tmsnippet.snippets +0 -0
  859. data/vendor/assets/ace-1.1.8/snippets/toml.js +7 -0
  860. data/vendor/assets/ace-1.1.8/snippets/toml.snippets +0 -0
  861. data/vendor/assets/ace-1.1.8/snippets/twig.js +7 -0
  862. data/vendor/assets/ace-1.1.8/snippets/twig.snippets +0 -0
  863. data/vendor/assets/ace-1.1.8/snippets/typescript.js +7 -0
  864. data/vendor/assets/ace-1.1.8/snippets/typescript.snippets +0 -0
  865. data/vendor/assets/ace-1.1.8/snippets/vala.js +195 -0
  866. data/vendor/assets/ace-1.1.8/snippets/vala.snippets +0 -0
  867. data/vendor/assets/ace-1.1.8/snippets/vbscript.js +7 -0
  868. data/vendor/assets/ace-1.1.8/snippets/vbscript.snippets +0 -0
  869. data/vendor/assets/ace-1.1.8/snippets/velocity.js +8 -0
  870. data/vendor/assets/ace-1.1.8/snippets/velocity.snippets +28 -0
  871. data/vendor/assets/ace-1.1.8/snippets/verilog.js +7 -0
  872. data/vendor/assets/ace-1.1.8/snippets/verilog.snippets +0 -0
  873. data/vendor/assets/ace-1.1.8/snippets/vhdl.js +7 -0
  874. data/vendor/assets/ace-1.1.8/snippets/vhdl.snippets +0 -0
  875. data/vendor/assets/ace-1.1.8/snippets/xml.js +7 -0
  876. data/vendor/assets/ace-1.1.8/snippets/xml.snippets +0 -0
  877. data/vendor/assets/ace-1.1.8/snippets/xquery.js +7 -0
  878. data/vendor/assets/ace-1.1.8/snippets/xquery.snippets +61 -0
  879. data/vendor/assets/ace-1.1.8/snippets/xslt.snippets +97 -0
  880. data/vendor/assets/ace-1.1.8/snippets/yaml.js +7 -0
  881. data/vendor/assets/ace-1.1.8/snippets/yaml.snippets +0 -0
  882. data/vendor/assets/ace-1.1.8/snippets_test.js +131 -0
  883. data/vendor/assets/ace-1.1.8/split.js +373 -0
  884. data/vendor/assets/ace-1.1.8/test/all.js +35 -0
  885. data/vendor/assets/ace-1.1.8/test/all_browser.js +141 -0
  886. data/vendor/assets/ace-1.1.8/test/assertions.js +56 -0
  887. data/vendor/assets/ace-1.1.8/test/asyncjs/assert.js +313 -0
  888. data/vendor/assets/ace-1.1.8/test/asyncjs/async.js +529 -0
  889. data/vendor/assets/ace-1.1.8/test/asyncjs/index.js +13 -0
  890. data/vendor/assets/ace-1.1.8/test/asyncjs/test.js +195 -0
  891. data/vendor/assets/ace-1.1.8/test/asyncjs/utils.js +65 -0
  892. data/vendor/assets/ace-1.1.8/test/benchmark.js +78 -0
  893. data/vendor/assets/ace-1.1.8/test/mockdom.js +10 -0
  894. data/vendor/assets/ace-1.1.8/test/mockrenderer.js +208 -0
  895. data/vendor/assets/ace-1.1.8/test/tests.html +46 -0
  896. data/vendor/assets/ace-1.1.8/theme/ambiance.css +221 -0
  897. data/vendor/assets/ace-1.1.8/theme/ambiance.js +33 -0
  898. data/vendor/assets/ace-1.1.8/theme/chaos.css +154 -0
  899. data/vendor/assets/ace-1.1.8/theme/chaos.js +33 -0
  900. data/vendor/assets/ace-1.1.8/theme/chrome.css +154 -0
  901. data/vendor/assets/ace-1.1.8/theme/chrome.js +39 -0
  902. data/vendor/assets/ace-1.1.8/theme/clouds.css +112 -0
  903. data/vendor/assets/ace-1.1.8/theme/clouds.js +39 -0
  904. data/vendor/assets/ace-1.1.8/theme/clouds_midnight.css +113 -0
  905. data/vendor/assets/ace-1.1.8/theme/clouds_midnight.js +39 -0
  906. data/vendor/assets/ace-1.1.8/theme/cobalt.css +134 -0
  907. data/vendor/assets/ace-1.1.8/theme/cobalt.js +39 -0
  908. data/vendor/assets/ace-1.1.8/theme/crimson_editor.css +143 -0
  909. data/vendor/assets/ace-1.1.8/theme/crimson_editor.js +39 -0
  910. data/vendor/assets/ace-1.1.8/theme/dawn.css +127 -0
  911. data/vendor/assets/ace-1.1.8/theme/dawn.js +39 -0
  912. data/vendor/assets/ace-1.1.8/theme/dreamweaver.css +176 -0
  913. data/vendor/assets/ace-1.1.8/theme/dreamweaver.js +38 -0
  914. data/vendor/assets/ace-1.1.8/theme/eclipse.css +113 -0
  915. data/vendor/assets/ace-1.1.8/theme/eclipse.js +41 -0
  916. data/vendor/assets/ace-1.1.8/theme/github.css +119 -0
  917. data/vendor/assets/ace-1.1.8/theme/github.js +39 -0
  918. data/vendor/assets/ace-1.1.8/theme/idle_fingers.css +113 -0
  919. data/vendor/assets/ace-1.1.8/theme/idle_fingers.js +39 -0
  920. data/vendor/assets/ace-1.1.8/theme/katzenmilch.css +140 -0
  921. data/vendor/assets/ace-1.1.8/theme/katzenmilch.js +39 -0
  922. data/vendor/assets/ace-1.1.8/theme/kr_theme.css +124 -0
  923. data/vendor/assets/ace-1.1.8/theme/kr_theme.js +39 -0
  924. data/vendor/assets/ace-1.1.8/theme/kuroir.css +67 -0
  925. data/vendor/assets/ace-1.1.8/theme/kuroir.js +39 -0
  926. data/vendor/assets/ace-1.1.8/theme/merbivore.css +110 -0
  927. data/vendor/assets/ace-1.1.8/theme/merbivore.js +39 -0
  928. data/vendor/assets/ace-1.1.8/theme/merbivore_soft.css +111 -0
  929. data/vendor/assets/ace-1.1.8/theme/merbivore_soft.js +39 -0
  930. data/vendor/assets/ace-1.1.8/theme/mono_industrial.css +126 -0
  931. data/vendor/assets/ace-1.1.8/theme/mono_industrial.js +39 -0
  932. data/vendor/assets/ace-1.1.8/theme/monokai.css +122 -0
  933. data/vendor/assets/ace-1.1.8/theme/monokai.js +39 -0
  934. data/vendor/assets/ace-1.1.8/theme/pastel_on_dark.css +129 -0
  935. data/vendor/assets/ace-1.1.8/theme/pastel_on_dark.js +39 -0
  936. data/vendor/assets/ace-1.1.8/theme/solarized_dark.css +101 -0
  937. data/vendor/assets/ace-1.1.8/theme/solarized_dark.js +39 -0
  938. data/vendor/assets/ace-1.1.8/theme/solarized_light.css +106 -0
  939. data/vendor/assets/ace-1.1.8/theme/solarized_light.js +39 -0
  940. data/vendor/assets/ace-1.1.8/theme/terminal.css +132 -0
  941. data/vendor/assets/ace-1.1.8/theme/terminal.js +39 -0
  942. data/vendor/assets/ace-1.1.8/theme/textmate.css +155 -0
  943. data/vendor/assets/ace-1.1.8/theme/textmate.js +40 -0
  944. data/vendor/assets/ace-1.1.8/theme/tomorrow.css +125 -0
  945. data/vendor/assets/ace-1.1.8/theme/tomorrow.js +39 -0
  946. data/vendor/assets/ace-1.1.8/theme/tomorrow_night.css +125 -0
  947. data/vendor/assets/ace-1.1.8/theme/tomorrow_night.js +39 -0
  948. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_blue.css +122 -0
  949. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_blue.js +39 -0
  950. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_bright.css +141 -0
  951. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_bright.js +39 -0
  952. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_eighties.css +125 -0
  953. data/vendor/assets/ace-1.1.8/theme/tomorrow_night_eighties.js +39 -0
  954. data/vendor/assets/ace-1.1.8/theme/twilight.css +128 -0
  955. data/vendor/assets/ace-1.1.8/theme/twilight.js +39 -0
  956. data/vendor/assets/ace-1.1.8/theme/vibrant_ink.css +110 -0
  957. data/vendor/assets/ace-1.1.8/theme/vibrant_ink.js +39 -0
  958. data/vendor/assets/ace-1.1.8/theme/xcode.css +103 -0
  959. data/vendor/assets/ace-1.1.8/theme/xcode.js +39 -0
  960. data/vendor/assets/ace-1.1.8/token_iterator.js +150 -0
  961. data/vendor/assets/ace-1.1.8/token_iterator_test.js +212 -0
  962. data/vendor/assets/ace-1.1.8/tokenizer.js +366 -0
  963. data/vendor/assets/ace-1.1.8/tokenizer_dev.js +183 -0
  964. data/vendor/assets/ace-1.1.8/tokenizer_test.js +97 -0
  965. data/vendor/assets/ace-1.1.8/tooltip.js +138 -0
  966. data/vendor/assets/ace-1.1.8/undomanager.js +168 -0
  967. data/vendor/assets/ace-1.1.8/unicode.js +107 -0
  968. data/vendor/assets/ace-1.1.8/virtual_renderer.js +1759 -0
  969. data/vendor/assets/ace-1.1.8/virtual_renderer_test.js +86 -0
  970. data/vendor/assets/ace-1.1.8/worker/mirror.js +49 -0
  971. data/vendor/assets/ace-1.1.8/worker/worker.js +193 -0
  972. data/vendor/assets/ace-1.1.8/worker/worker_client.js +255 -0
  973. data/vendor/assets/ace-1.1.8/worker/worker_test.js +125 -0
  974. data/vendor/assets/ckeditor-4.4.7/CHANGES.md +720 -0
  975. data/vendor/assets/ckeditor-4.4.7/LICENSE.md +1264 -0
  976. data/vendor/assets/ckeditor-4.4.7/README.md +39 -0
  977. data/vendor/assets/ckeditor-4.4.7/adapters/jquery.js +10 -0
  978. data/vendor/assets/ckeditor-4.4.7/build-config.js +83 -0
  979. data/vendor/assets/ckeditor-4.4.7/ckeditor.js +829 -0
  980. data/vendor/assets/ckeditor-4.4.7/config.js +34 -0
  981. data/vendor/assets/ckeditor-4.4.7/contents.css +134 -0
  982. data/vendor/assets/ckeditor-4.4.7/lang/en.js +5 -0
  983. data/vendor/assets/ckeditor-4.4.7/plugins/clipboard/dialogs/paste.js +11 -0
  984. data/vendor/assets/ckeditor-4.4.7/plugins/dialog/dialogDefinition.js +4 -0
  985. data/vendor/assets/ckeditor-4.4.7/plugins/icons.png +0 -0
  986. data/vendor/assets/ckeditor-4.4.7/plugins/icons_hidpi.png +0 -0
  987. data/vendor/assets/ckeditor-4.4.7/plugins/image/dialogs/image.js +43 -0
  988. data/vendor/assets/ckeditor-4.4.7/plugins/image/images/noimage.png +0 -0
  989. data/vendor/assets/ckeditor-4.4.7/plugins/link/dialogs/anchor.js +7 -0
  990. data/vendor/assets/ckeditor-4.4.7/plugins/link/dialogs/link.js +26 -0
  991. data/vendor/assets/ckeditor-4.4.7/plugins/link/images/anchor.png +0 -0
  992. data/vendor/assets/ckeditor-4.4.7/plugins/link/images/hidpi/anchor.png +0 -0
  993. data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  994. data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/hidpi/icon.png +0 -0
  995. data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/icon-rtl.png +0 -0
  996. data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/icon.png +0 -0
  997. data/vendor/assets/ckeditor-4.4.7/plugins/pastefromword/filter/default.js +31 -0
  998. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_address.png +0 -0
  999. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_blockquote.png +0 -0
  1000. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_div.png +0 -0
  1001. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h1.png +0 -0
  1002. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h2.png +0 -0
  1003. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h3.png +0 -0
  1004. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h4.png +0 -0
  1005. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h5.png +0 -0
  1006. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h6.png +0 -0
  1007. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_p.png +0 -0
  1008. data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_pre.png +0 -0
  1009. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  1010. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/af.js +13 -0
  1011. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ar.js +13 -0
  1012. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/bg.js +13 -0
  1013. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ca.js +14 -0
  1014. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/cs.js +13 -0
  1015. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/cy.js +14 -0
  1016. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/da.js +13 -0
  1017. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/de.js +13 -0
  1018. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/el.js +13 -0
  1019. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  1020. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/en.js +13 -0
  1021. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/eo.js +12 -0
  1022. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/es.js +13 -0
  1023. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/et.js +13 -0
  1024. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fa.js +12 -0
  1025. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fi.js +13 -0
  1026. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  1027. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fr.js +11 -0
  1028. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/gl.js +13 -0
  1029. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/he.js +12 -0
  1030. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/hr.js +13 -0
  1031. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/hu.js +12 -0
  1032. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/id.js +13 -0
  1033. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/it.js +14 -0
  1034. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ja.js +9 -0
  1035. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/km.js +13 -0
  1036. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ku.js +13 -0
  1037. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/lt.js +13 -0
  1038. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/lv.js +13 -0
  1039. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/nb.js +11 -0
  1040. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/nl.js +13 -0
  1041. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/no.js +11 -0
  1042. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pl.js +12 -0
  1043. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  1044. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pt.js +13 -0
  1045. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ru.js +13 -0
  1046. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/si.js +13 -0
  1047. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sk.js +13 -0
  1048. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sl.js +12 -0
  1049. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sq.js +13 -0
  1050. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sv.js +11 -0
  1051. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/th.js +13 -0
  1052. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/tr.js +12 -0
  1053. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/tt.js +13 -0
  1054. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ug.js +13 -0
  1055. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/uk.js +12 -0
  1056. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/vi.js +14 -0
  1057. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  1058. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/zh.js +12 -0
  1059. data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/specialchar.js +14 -0
  1060. data/vendor/assets/ckeditor-4.4.7/plugins/table/dialogs/table.js +21 -0
  1061. data/vendor/assets/ckeditor-4.4.7/plugins/templates/dialogs/templates.css +84 -0
  1062. data/vendor/assets/ckeditor-4.4.7/plugins/templates/dialogs/templates.js +10 -0
  1063. data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/default.js +6 -0
  1064. data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template1.gif +0 -0
  1065. data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template2.gif +0 -0
  1066. data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template3.gif +0 -0
  1067. data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/README.md +64 -0
  1068. data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/icons/hidpi/uploadcare.png +0 -0
  1069. data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/icons/uploadcare.png +0 -0
  1070. data/vendor/assets/ckeditor-4.4.7/samples/ajax.html +82 -0
  1071. data/vendor/assets/ckeditor-4.4.7/samples/api.html +207 -0
  1072. data/vendor/assets/ckeditor-4.4.7/samples/appendto.html +56 -0
  1073. data/vendor/assets/ckeditor-4.4.7/samples/assets/inlineall/logo.png +0 -0
  1074. data/vendor/assets/ckeditor-4.4.7/samples/assets/outputxhtml/outputxhtml.css +204 -0
  1075. data/vendor/assets/ckeditor-4.4.7/samples/assets/posteddata.php +59 -0
  1076. data/vendor/assets/ckeditor-4.4.7/samples/assets/sample.jpg +0 -0
  1077. data/vendor/assets/ckeditor-4.4.7/samples/assets/uilanguages/languages.js +7 -0
  1078. data/vendor/assets/ckeditor-4.4.7/samples/datafiltering.html +401 -0
  1079. data/vendor/assets/ckeditor-4.4.7/samples/divreplace.html +141 -0
  1080. data/vendor/assets/ckeditor-4.4.7/samples/index.html +119 -0
  1081. data/vendor/assets/ckeditor-4.4.7/samples/inlineall.html +311 -0
  1082. data/vendor/assets/ckeditor-4.4.7/samples/inlinebycode.html +121 -0
  1083. data/vendor/assets/ckeditor-4.4.7/samples/inlinetextarea.html +110 -0
  1084. data/vendor/assets/ckeditor-4.4.7/samples/jquery.html +100 -0
  1085. data/vendor/assets/ckeditor-4.4.7/samples/plugins/dialog/assets/my_dialog.js +48 -0
  1086. data/vendor/assets/ckeditor-4.4.7/samples/plugins/dialog/dialog.html +187 -0
  1087. data/vendor/assets/ckeditor-4.4.7/samples/plugins/enterkey/enterkey.html +103 -0
  1088. data/vendor/assets/ckeditor-4.4.7/samples/plugins/magicline/magicline.html +206 -0
  1089. data/vendor/assets/ckeditor-4.4.7/samples/plugins/toolbar/toolbar.html +232 -0
  1090. data/vendor/assets/ckeditor-4.4.7/samples/readonly.html +73 -0
  1091. data/vendor/assets/ckeditor-4.4.7/samples/replacebyclass.html +57 -0
  1092. data/vendor/assets/ckeditor-4.4.7/samples/replacebycode.html +56 -0
  1093. data/vendor/assets/ckeditor-4.4.7/samples/sample.css +365 -0
  1094. data/vendor/assets/ckeditor-4.4.7/samples/sample.js +50 -0
  1095. data/vendor/assets/ckeditor-4.4.7/samples/sample_posteddata.php +16 -0
  1096. data/vendor/assets/ckeditor-4.4.7/samples/tabindex.html +75 -0
  1097. data/vendor/assets/ckeditor-4.4.7/samples/uicolor.html +69 -0
  1098. data/vendor/assets/ckeditor-4.4.7/samples/uilanguages.html +119 -0
  1099. data/vendor/assets/ckeditor-4.4.7/samples/xhtmlstyle.html +231 -0
  1100. data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog.css +5 -0
  1101. data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie.css +5 -0
  1102. data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie7.css +5 -0
  1103. data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie8.css +5 -0
  1104. data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_iequirks.css +5 -0
  1105. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor.css +5 -0
  1106. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_gecko.css +5 -0
  1107. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie.css +5 -0
  1108. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie7.css +5 -0
  1109. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie8.css +5 -0
  1110. data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_iequirks.css +5 -0
  1111. data/vendor/assets/ckeditor-4.4.7/skins/flat/icons.png +0 -0
  1112. data/vendor/assets/ckeditor-4.4.7/skins/flat/icons_hidpi.png +0 -0
  1113. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/arrow.png +0 -0
  1114. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/close.png +0 -0
  1115. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/close.png +0 -0
  1116. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/lock-open.png +0 -0
  1117. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/lock.png +0 -0
  1118. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/refresh.png +0 -0
  1119. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/lock-open.png +0 -0
  1120. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/lock.png +0 -0
  1121. data/vendor/assets/ckeditor-4.4.7/skins/flat/images/refresh.png +0 -0
  1122. data/vendor/assets/ckeditor-4.4.7/skins/flat/readme.md +8 -0
  1123. data/vendor/assets/ckeditor-4.4.7/styles.js +111 -0
  1124. data/vendor/assets/javascripts/backbone.js +1608 -0
  1125. data/vendor/assets/javascripts/backbone.memento.js +159 -0
  1126. data/vendor/assets/javascripts/jquery-ui.js +14987 -0
  1127. data/vendor/assets/javascripts/jquery.js +10346 -0
  1128. data/vendor/assets/javascripts/jquery.noty.js +1436 -0
  1129. data/vendor/assets/javascripts/require.js +36 -0
  1130. data/vendor/assets/javascripts/text.js +391 -0
  1131. data/vendor/assets/javascripts/underscore.js +1536 -0
  1132. metadata +1287 -0
@@ -0,0 +1,280 @@
1
+ /*!
2
+ * QUnit 1.17.1
3
+ * http://qunitjs.com/
4
+ *
5
+ * Copyright jQuery Foundation and other contributors
6
+ * Released under the MIT license
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: 2015-01-20T19:39Z
10
+ */
11
+
12
+ /** Font Family and Sizes */
13
+
14
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
15
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
16
+ }
17
+
18
+ #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
19
+ #qunit-tests { font-size: smaller; }
20
+
21
+
22
+ /** Resets */
23
+
24
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+
29
+
30
+ /** Header */
31
+
32
+ #qunit-header {
33
+ padding: 0.5em 0 0.5em 1em;
34
+
35
+ color: #8699A4;
36
+ background-color: #0D3349;
37
+
38
+ font-size: 1.5em;
39
+ line-height: 1em;
40
+ font-weight: 400;
41
+
42
+ border-radius: 5px 5px 0 0;
43
+ }
44
+
45
+ #qunit-header a {
46
+ text-decoration: none;
47
+ color: #C2CCD1;
48
+ }
49
+
50
+ #qunit-header a:hover,
51
+ #qunit-header a:focus {
52
+ color: #FFF;
53
+ }
54
+
55
+ #qunit-testrunner-toolbar label {
56
+ display: inline-block;
57
+ padding: 0 0.5em 0 0.1em;
58
+ }
59
+
60
+ #qunit-banner {
61
+ height: 5px;
62
+ }
63
+
64
+ #qunit-testrunner-toolbar {
65
+ padding: 0.5em 1em 0.5em 1em;
66
+ color: #5E740B;
67
+ background-color: #EEE;
68
+ overflow: hidden;
69
+ }
70
+
71
+ #qunit-userAgent {
72
+ padding: 0.5em 1em 0.5em 1em;
73
+ background-color: #2B81AF;
74
+ color: #FFF;
75
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
76
+ }
77
+
78
+ #qunit-modulefilter-container {
79
+ float: right;
80
+ padding: 0.2em;
81
+ }
82
+
83
+ .qunit-url-config {
84
+ display: inline-block;
85
+ padding: 0.1em;
86
+ }
87
+
88
+ .qunit-filter {
89
+ display: block;
90
+ float: right;
91
+ margin-left: 1em;
92
+ }
93
+
94
+ /** Tests: Pass/Fail */
95
+
96
+ #qunit-tests {
97
+ list-style-position: inside;
98
+ }
99
+
100
+ #qunit-tests li {
101
+ padding: 0.4em 1em 0.4em 1em;
102
+ border-bottom: 1px solid #FFF;
103
+ list-style-position: inside;
104
+ }
105
+
106
+ #qunit-tests > li {
107
+ display: none;
108
+ }
109
+
110
+ #qunit-tests li.running,
111
+ #qunit-tests li.pass,
112
+ #qunit-tests li.fail,
113
+ #qunit-tests li.skipped {
114
+ display: list-item;
115
+ }
116
+
117
+ #qunit-tests.hidepass li.running,
118
+ #qunit-tests.hidepass li.pass {
119
+ display: none;
120
+ }
121
+
122
+ #qunit-tests li strong {
123
+ cursor: pointer;
124
+ }
125
+
126
+ #qunit-tests li.skipped strong {
127
+ cursor: default;
128
+ }
129
+
130
+ #qunit-tests li a {
131
+ padding: 0.5em;
132
+ color: #C2CCD1;
133
+ text-decoration: none;
134
+ }
135
+ #qunit-tests li a:hover,
136
+ #qunit-tests li a:focus {
137
+ color: #000;
138
+ }
139
+
140
+ #qunit-tests li .runtime {
141
+ float: right;
142
+ font-size: smaller;
143
+ }
144
+
145
+ .qunit-assert-list {
146
+ margin-top: 0.5em;
147
+ padding: 0.5em;
148
+
149
+ background-color: #FFF;
150
+
151
+ border-radius: 5px;
152
+ }
153
+
154
+ .qunit-collapsed {
155
+ display: none;
156
+ }
157
+
158
+ #qunit-tests table {
159
+ border-collapse: collapse;
160
+ margin-top: 0.2em;
161
+ }
162
+
163
+ #qunit-tests th {
164
+ text-align: right;
165
+ vertical-align: top;
166
+ padding: 0 0.5em 0 0;
167
+ }
168
+
169
+ #qunit-tests td {
170
+ vertical-align: top;
171
+ }
172
+
173
+ #qunit-tests pre {
174
+ margin: 0;
175
+ white-space: pre-wrap;
176
+ word-wrap: break-word;
177
+ }
178
+
179
+ #qunit-tests del {
180
+ background-color: #E0F2BE;
181
+ color: #374E0C;
182
+ text-decoration: none;
183
+ }
184
+
185
+ #qunit-tests ins {
186
+ background-color: #FFCACA;
187
+ color: #500;
188
+ text-decoration: none;
189
+ }
190
+
191
+ /*** Test Counts */
192
+
193
+ #qunit-tests b.counts { color: #000; }
194
+ #qunit-tests b.passed { color: #5E740B; }
195
+ #qunit-tests b.failed { color: #710909; }
196
+
197
+ #qunit-tests li li {
198
+ padding: 5px;
199
+ background-color: #FFF;
200
+ border-bottom: none;
201
+ list-style-position: inside;
202
+ }
203
+
204
+ /*** Passing Styles */
205
+
206
+ #qunit-tests li li.pass {
207
+ color: #3C510C;
208
+ background-color: #FFF;
209
+ border-left: 10px solid #C6E746;
210
+ }
211
+
212
+ #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
213
+ #qunit-tests .pass .test-name { color: #366097; }
214
+
215
+ #qunit-tests .pass .test-actual,
216
+ #qunit-tests .pass .test-expected { color: #999; }
217
+
218
+ #qunit-banner.qunit-pass { background-color: #C6E746; }
219
+
220
+ /*** Failing Styles */
221
+
222
+ #qunit-tests li li.fail {
223
+ color: #710909;
224
+ background-color: #FFF;
225
+ border-left: 10px solid #EE5757;
226
+ white-space: pre;
227
+ }
228
+
229
+ #qunit-tests > li:last-child {
230
+ border-radius: 0 0 5px 5px;
231
+ }
232
+
233
+ #qunit-tests .fail { color: #000; background-color: #EE5757; }
234
+ #qunit-tests .fail .test-name,
235
+ #qunit-tests .fail .module-name { color: #000; }
236
+
237
+ #qunit-tests .fail .test-actual { color: #EE5757; }
238
+ #qunit-tests .fail .test-expected { color: #008000; }
239
+
240
+ #qunit-banner.qunit-fail { background-color: #EE5757; }
241
+
242
+ /*** Skipped tests */
243
+
244
+ #qunit-tests .skipped {
245
+ background-color: #EBECE9;
246
+ }
247
+
248
+ #qunit-tests .qunit-skipped-label {
249
+ background-color: #F4FF77;
250
+ display: inline-block;
251
+ font-style: normal;
252
+ color: #366097;
253
+ line-height: 1.8em;
254
+ padding: 0 0.5em;
255
+ margin: -0.4em 0.4em -0.4em 0;
256
+ }
257
+
258
+ /** Result */
259
+
260
+ #qunit-testresult {
261
+ padding: 0.5em 1em 0.5em 1em;
262
+
263
+ color: #2B81AF;
264
+ background-color: #D2E0E6;
265
+
266
+ border-bottom: 1px solid #FFF;
267
+ }
268
+ #qunit-testresult .module-name {
269
+ font-weight: 700;
270
+ }
271
+
272
+ /** Fixture */
273
+
274
+ #qunit-fixture {
275
+ position: absolute;
276
+ top: -10000px;
277
+ left: -10000px;
278
+ width: 1000px;
279
+ height: 1000px;
280
+ }
@@ -0,0 +1,2875 @@
1
+ /*!
2
+ * QUnit 1.17.1
3
+ * http://qunitjs.com/
4
+ *
5
+ * Copyright jQuery Foundation and other contributors
6
+ * Released under the MIT license
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: 2015-01-20T19:39Z
10
+ */
11
+
12
+ (function( window ) {
13
+
14
+ var QUnit,
15
+ config,
16
+ onErrorFnPrev,
17
+ loggingCallbacks = {},
18
+ fileName = ( sourceFromStacktrace( 0 ) || "" ).replace( /(:\d+)+\)?/, "" ).replace( /.+\//, "" ),
19
+ toString = Object.prototype.toString,
20
+ hasOwn = Object.prototype.hasOwnProperty,
21
+ // Keep a local reference to Date (GH-283)
22
+ Date = window.Date,
23
+ now = Date.now || function() {
24
+ return new Date().getTime();
25
+ },
26
+ globalStartCalled = false,
27
+ runStarted = false,
28
+ setTimeout = window.setTimeout,
29
+ clearTimeout = window.clearTimeout,
30
+ defined = {
31
+ document: window.document !== undefined,
32
+ setTimeout: window.setTimeout !== undefined,
33
+ sessionStorage: (function() {
34
+ var x = "qunit-test-string";
35
+ try {
36
+ sessionStorage.setItem( x, x );
37
+ sessionStorage.removeItem( x );
38
+ return true;
39
+ } catch ( e ) {
40
+ return false;
41
+ }
42
+ }())
43
+ },
44
+ /**
45
+ * Provides a normalized error string, correcting an issue
46
+ * with IE 7 (and prior) where Error.prototype.toString is
47
+ * not properly implemented
48
+ *
49
+ * Based on http://es5.github.com/#x15.11.4.4
50
+ *
51
+ * @param {String|Error} error
52
+ * @return {String} error message
53
+ */
54
+ errorString = function( error ) {
55
+ var name, message,
56
+ errorString = error.toString();
57
+ if ( errorString.substring( 0, 7 ) === "[object" ) {
58
+ name = error.name ? error.name.toString() : "Error";
59
+ message = error.message ? error.message.toString() : "";
60
+ if ( name && message ) {
61
+ return name + ": " + message;
62
+ } else if ( name ) {
63
+ return name;
64
+ } else if ( message ) {
65
+ return message;
66
+ } else {
67
+ return "Error";
68
+ }
69
+ } else {
70
+ return errorString;
71
+ }
72
+ },
73
+ /**
74
+ * Makes a clone of an object using only Array or Object as base,
75
+ * and copies over the own enumerable properties.
76
+ *
77
+ * @param {Object} obj
78
+ * @return {Object} New object with only the own properties (recursively).
79
+ */
80
+ objectValues = function( obj ) {
81
+ var key, val,
82
+ vals = QUnit.is( "array", obj ) ? [] : {};
83
+ for ( key in obj ) {
84
+ if ( hasOwn.call( obj, key ) ) {
85
+ val = obj[ key ];
86
+ vals[ key ] = val === Object( val ) ? objectValues( val ) : val;
87
+ }
88
+ }
89
+ return vals;
90
+ };
91
+
92
+ QUnit = {};
93
+
94
+ /**
95
+ * Config object: Maintain internal state
96
+ * Later exposed as QUnit.config
97
+ * `config` initialized at top of scope
98
+ */
99
+ config = {
100
+ // The queue of tests to run
101
+ queue: [],
102
+
103
+ // block until document ready
104
+ blocking: true,
105
+
106
+ // by default, run previously failed tests first
107
+ // very useful in combination with "Hide passed tests" checked
108
+ reorder: true,
109
+
110
+ // by default, modify document.title when suite is done
111
+ altertitle: true,
112
+
113
+ // by default, scroll to top of the page when suite is done
114
+ scrolltop: true,
115
+
116
+ // when enabled, all tests must call expect()
117
+ requireExpects: false,
118
+
119
+ // add checkboxes that are persisted in the query-string
120
+ // when enabled, the id is set to `true` as a `QUnit.config` property
121
+ urlConfig: [
122
+ {
123
+ id: "hidepassed",
124
+ label: "Hide passed tests",
125
+ tooltip: "Only show tests and assertions that fail. Stored as query-strings."
126
+ },
127
+ {
128
+ id: "noglobals",
129
+ label: "Check for Globals",
130
+ tooltip: "Enabling this will test if any test introduces new properties on the " +
131
+ "`window` object. Stored as query-strings."
132
+ },
133
+ {
134
+ id: "notrycatch",
135
+ label: "No try-catch",
136
+ tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " +
137
+ "exceptions in IE reasonable. Stored as query-strings."
138
+ }
139
+ ],
140
+
141
+ // Set of all modules.
142
+ modules: [],
143
+
144
+ // The first unnamed module
145
+ currentModule: {
146
+ name: "",
147
+ tests: []
148
+ },
149
+
150
+ callbacks: {}
151
+ };
152
+
153
+ // Push a loose unnamed module to the modules collection
154
+ config.modules.push( config.currentModule );
155
+
156
+ // Initialize more QUnit.config and QUnit.urlParams
157
+ (function() {
158
+ var i, current,
159
+ location = window.location || { search: "", protocol: "file:" },
160
+ params = location.search.slice( 1 ).split( "&" ),
161
+ length = params.length,
162
+ urlParams = {};
163
+
164
+ if ( params[ 0 ] ) {
165
+ for ( i = 0; i < length; i++ ) {
166
+ current = params[ i ].split( "=" );
167
+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
168
+
169
+ // allow just a key to turn on a flag, e.g., test.html?noglobals
170
+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
171
+ if ( urlParams[ current[ 0 ] ] ) {
172
+ urlParams[ current[ 0 ] ] = [].concat( urlParams[ current[ 0 ] ], current[ 1 ] );
173
+ } else {
174
+ urlParams[ current[ 0 ] ] = current[ 1 ];
175
+ }
176
+ }
177
+ }
178
+
179
+ if ( urlParams.filter === true ) {
180
+ delete urlParams.filter;
181
+ }
182
+
183
+ QUnit.urlParams = urlParams;
184
+
185
+ // String search anywhere in moduleName+testName
186
+ config.filter = urlParams.filter;
187
+
188
+ config.testId = [];
189
+ if ( urlParams.testId ) {
190
+
191
+ // Ensure that urlParams.testId is an array
192
+ urlParams.testId = [].concat( urlParams.testId );
193
+ for ( i = 0; i < urlParams.testId.length; i++ ) {
194
+ config.testId.push( urlParams.testId[ i ] );
195
+ }
196
+ }
197
+
198
+ // Figure out if we're running the tests from a server or not
199
+ QUnit.isLocal = location.protocol === "file:";
200
+ }());
201
+
202
+ // Root QUnit object.
203
+ // `QUnit` initialized at top of scope
204
+ extend( QUnit, {
205
+
206
+ // call on start of module test to prepend name to all tests
207
+ module: function( name, testEnvironment ) {
208
+ var currentModule = {
209
+ name: name,
210
+ testEnvironment: testEnvironment,
211
+ tests: []
212
+ };
213
+
214
+ // DEPRECATED: handles setup/teardown functions,
215
+ // beforeEach and afterEach should be used instead
216
+ if ( testEnvironment && testEnvironment.setup ) {
217
+ testEnvironment.beforeEach = testEnvironment.setup;
218
+ delete testEnvironment.setup;
219
+ }
220
+ if ( testEnvironment && testEnvironment.teardown ) {
221
+ testEnvironment.afterEach = testEnvironment.teardown;
222
+ delete testEnvironment.teardown;
223
+ }
224
+
225
+ config.modules.push( currentModule );
226
+ config.currentModule = currentModule;
227
+ },
228
+
229
+ // DEPRECATED: QUnit.asyncTest() will be removed in QUnit 2.0.
230
+ asyncTest: function( testName, expected, callback ) {
231
+ if ( arguments.length === 2 ) {
232
+ callback = expected;
233
+ expected = null;
234
+ }
235
+
236
+ QUnit.test( testName, expected, callback, true );
237
+ },
238
+
239
+ test: function( testName, expected, callback, async ) {
240
+ var test;
241
+
242
+ if ( arguments.length === 2 ) {
243
+ callback = expected;
244
+ expected = null;
245
+ }
246
+
247
+ test = new Test({
248
+ testName: testName,
249
+ expected: expected,
250
+ async: async,
251
+ callback: callback
252
+ });
253
+
254
+ test.queue();
255
+ },
256
+
257
+ skip: function( testName ) {
258
+ var test = new Test({
259
+ testName: testName,
260
+ skip: true
261
+ });
262
+
263
+ test.queue();
264
+ },
265
+
266
+ // DEPRECATED: The functionality of QUnit.start() will be altered in QUnit 2.0.
267
+ // In QUnit 2.0, invoking it will ONLY affect the `QUnit.config.autostart` blocking behavior.
268
+ start: function( count ) {
269
+ var globalStartAlreadyCalled = globalStartCalled;
270
+
271
+ if ( !config.current ) {
272
+ globalStartCalled = true;
273
+
274
+ if ( runStarted ) {
275
+ throw new Error( "Called start() outside of a test context while already started" );
276
+ } else if ( globalStartAlreadyCalled || count > 1 ) {
277
+ throw new Error( "Called start() outside of a test context too many times" );
278
+ } else if ( config.autostart ) {
279
+ throw new Error( "Called start() outside of a test context when " +
280
+ "QUnit.config.autostart was true" );
281
+ } else if ( !config.pageLoaded ) {
282
+
283
+ // The page isn't completely loaded yet, so bail out and let `QUnit.load` handle it
284
+ config.autostart = true;
285
+ return;
286
+ }
287
+ } else {
288
+
289
+ // If a test is running, adjust its semaphore
290
+ config.current.semaphore -= count || 1;
291
+
292
+ // Don't start until equal number of stop-calls
293
+ if ( config.current.semaphore > 0 ) {
294
+ return;
295
+ }
296
+
297
+ // throw an Error if start is called more often than stop
298
+ if ( config.current.semaphore < 0 ) {
299
+ config.current.semaphore = 0;
300
+
301
+ QUnit.pushFailure(
302
+ "Called start() while already started (test's semaphore was 0 already)",
303
+ sourceFromStacktrace( 2 )
304
+ );
305
+ return;
306
+ }
307
+ }
308
+
309
+ resumeProcessing();
310
+ },
311
+
312
+ // DEPRECATED: QUnit.stop() will be removed in QUnit 2.0.
313
+ stop: function( count ) {
314
+
315
+ // If there isn't a test running, don't allow QUnit.stop() to be called
316
+ if ( !config.current ) {
317
+ throw new Error( "Called stop() outside of a test context" );
318
+ }
319
+
320
+ // If a test is running, adjust its semaphore
321
+ config.current.semaphore += count || 1;
322
+
323
+ pauseProcessing();
324
+ },
325
+
326
+ config: config,
327
+
328
+ // Safe object type checking
329
+ is: function( type, obj ) {
330
+ return QUnit.objectType( obj ) === type;
331
+ },
332
+
333
+ objectType: function( obj ) {
334
+ if ( typeof obj === "undefined" ) {
335
+ return "undefined";
336
+ }
337
+
338
+ // Consider: typeof null === object
339
+ if ( obj === null ) {
340
+ return "null";
341
+ }
342
+
343
+ var match = toString.call( obj ).match( /^\[object\s(.*)\]$/ ),
344
+ type = match && match[ 1 ] || "";
345
+
346
+ switch ( type ) {
347
+ case "Number":
348
+ if ( isNaN( obj ) ) {
349
+ return "nan";
350
+ }
351
+ return "number";
352
+ case "String":
353
+ case "Boolean":
354
+ case "Array":
355
+ case "Date":
356
+ case "RegExp":
357
+ case "Function":
358
+ return type.toLowerCase();
359
+ }
360
+ if ( typeof obj === "object" ) {
361
+ return "object";
362
+ }
363
+ return undefined;
364
+ },
365
+
366
+ extend: extend,
367
+
368
+ load: function() {
369
+ config.pageLoaded = true;
370
+
371
+ // Initialize the configuration options
372
+ extend( config, {
373
+ stats: { all: 0, bad: 0 },
374
+ moduleStats: { all: 0, bad: 0 },
375
+ started: 0,
376
+ updateRate: 1000,
377
+ autostart: true,
378
+ filter: ""
379
+ }, true );
380
+
381
+ config.blocking = false;
382
+
383
+ if ( config.autostart ) {
384
+ resumeProcessing();
385
+ }
386
+ }
387
+ });
388
+
389
+ // Register logging callbacks
390
+ (function() {
391
+ var i, l, key,
392
+ callbacks = [ "begin", "done", "log", "testStart", "testDone",
393
+ "moduleStart", "moduleDone" ];
394
+
395
+ function registerLoggingCallback( key ) {
396
+ var loggingCallback = function( callback ) {
397
+ if ( QUnit.objectType( callback ) !== "function" ) {
398
+ throw new Error(
399
+ "QUnit logging methods require a callback function as their first parameters."
400
+ );
401
+ }
402
+
403
+ config.callbacks[ key ].push( callback );
404
+ };
405
+
406
+ // DEPRECATED: This will be removed on QUnit 2.0.0+
407
+ // Stores the registered functions allowing restoring
408
+ // at verifyLoggingCallbacks() if modified
409
+ loggingCallbacks[ key ] = loggingCallback;
410
+
411
+ return loggingCallback;
412
+ }
413
+
414
+ for ( i = 0, l = callbacks.length; i < l; i++ ) {
415
+ key = callbacks[ i ];
416
+
417
+ // Initialize key collection of logging callback
418
+ if ( QUnit.objectType( config.callbacks[ key ] ) === "undefined" ) {
419
+ config.callbacks[ key ] = [];
420
+ }
421
+
422
+ QUnit[ key ] = registerLoggingCallback( key );
423
+ }
424
+ })();
425
+
426
+ // `onErrorFnPrev` initialized at top of scope
427
+ // Preserve other handlers
428
+ onErrorFnPrev = window.onerror;
429
+
430
+ // Cover uncaught exceptions
431
+ // Returning true will suppress the default browser handler,
432
+ // returning false will let it run.
433
+ window.onerror = function( error, filePath, linerNr ) {
434
+ var ret = false;
435
+ if ( onErrorFnPrev ) {
436
+ ret = onErrorFnPrev( error, filePath, linerNr );
437
+ }
438
+
439
+ // Treat return value as window.onerror itself does,
440
+ // Only do our handling if not suppressed.
441
+ if ( ret !== true ) {
442
+ if ( QUnit.config.current ) {
443
+ if ( QUnit.config.current.ignoreGlobalErrors ) {
444
+ return true;
445
+ }
446
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
447
+ } else {
448
+ QUnit.test( "global failure", extend(function() {
449
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
450
+ }, { validTest: true } ) );
451
+ }
452
+ return false;
453
+ }
454
+
455
+ return ret;
456
+ };
457
+
458
+ function done() {
459
+ var runtime, passed;
460
+
461
+ config.autorun = true;
462
+
463
+ // Log the last module results
464
+ if ( config.previousModule ) {
465
+ runLoggingCallbacks( "moduleDone", {
466
+ name: config.previousModule.name,
467
+ tests: config.previousModule.tests,
468
+ failed: config.moduleStats.bad,
469
+ passed: config.moduleStats.all - config.moduleStats.bad,
470
+ total: config.moduleStats.all,
471
+ runtime: now() - config.moduleStats.started
472
+ });
473
+ }
474
+ delete config.previousModule;
475
+
476
+ runtime = now() - config.started;
477
+ passed = config.stats.all - config.stats.bad;
478
+
479
+ runLoggingCallbacks( "done", {
480
+ failed: config.stats.bad,
481
+ passed: passed,
482
+ total: config.stats.all,
483
+ runtime: runtime
484
+ });
485
+ }
486
+
487
+ // Doesn't support IE6 to IE9
488
+ // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
489
+ function extractStacktrace( e, offset ) {
490
+ offset = offset === undefined ? 4 : offset;
491
+
492
+ var stack, include, i;
493
+
494
+ if ( e.stacktrace ) {
495
+
496
+ // Opera 12.x
497
+ return e.stacktrace.split( "\n" )[ offset + 3 ];
498
+ } else if ( e.stack ) {
499
+
500
+ // Firefox, Chrome, Safari 6+, IE10+, PhantomJS and Node
501
+ stack = e.stack.split( "\n" );
502
+ if ( /^error$/i.test( stack[ 0 ] ) ) {
503
+ stack.shift();
504
+ }
505
+ if ( fileName ) {
506
+ include = [];
507
+ for ( i = offset; i < stack.length; i++ ) {
508
+ if ( stack[ i ].indexOf( fileName ) !== -1 ) {
509
+ break;
510
+ }
511
+ include.push( stack[ i ] );
512
+ }
513
+ if ( include.length ) {
514
+ return include.join( "\n" );
515
+ }
516
+ }
517
+ return stack[ offset ];
518
+ } else if ( e.sourceURL ) {
519
+
520
+ // Safari < 6
521
+ // exclude useless self-reference for generated Error objects
522
+ if ( /qunit.js$/.test( e.sourceURL ) ) {
523
+ return;
524
+ }
525
+
526
+ // for actual exceptions, this is useful
527
+ return e.sourceURL + ":" + e.line;
528
+ }
529
+ }
530
+
531
+ function sourceFromStacktrace( offset ) {
532
+ var e = new Error();
533
+ if ( !e.stack ) {
534
+ try {
535
+ throw e;
536
+ } catch ( err ) {
537
+ // This should already be true in most browsers
538
+ e = err;
539
+ }
540
+ }
541
+ return extractStacktrace( e, offset );
542
+ }
543
+
544
+ function synchronize( callback, last ) {
545
+ if ( QUnit.objectType( callback ) === "array" ) {
546
+ while ( callback.length ) {
547
+ synchronize( callback.shift() );
548
+ }
549
+ return;
550
+ }
551
+ config.queue.push( callback );
552
+
553
+ if ( config.autorun && !config.blocking ) {
554
+ process( last );
555
+ }
556
+ }
557
+
558
+ function process( last ) {
559
+ function next() {
560
+ process( last );
561
+ }
562
+ var start = now();
563
+ config.depth = ( config.depth || 0 ) + 1;
564
+
565
+ while ( config.queue.length && !config.blocking ) {
566
+ if ( !defined.setTimeout || config.updateRate <= 0 ||
567
+ ( ( now() - start ) < config.updateRate ) ) {
568
+ if ( config.current ) {
569
+
570
+ // Reset async tracking for each phase of the Test lifecycle
571
+ config.current.usedAsync = false;
572
+ }
573
+ config.queue.shift()();
574
+ } else {
575
+ setTimeout( next, 13 );
576
+ break;
577
+ }
578
+ }
579
+ config.depth--;
580
+ if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
581
+ done();
582
+ }
583
+ }
584
+
585
+ function begin() {
586
+ var i, l,
587
+ modulesLog = [];
588
+
589
+ // If the test run hasn't officially begun yet
590
+ if ( !config.started ) {
591
+
592
+ // Record the time of the test run's beginning
593
+ config.started = now();
594
+
595
+ verifyLoggingCallbacks();
596
+
597
+ // Delete the loose unnamed module if unused.
598
+ if ( config.modules[ 0 ].name === "" && config.modules[ 0 ].tests.length === 0 ) {
599
+ config.modules.shift();
600
+ }
601
+
602
+ // Avoid unnecessary information by not logging modules' test environments
603
+ for ( i = 0, l = config.modules.length; i < l; i++ ) {
604
+ modulesLog.push({
605
+ name: config.modules[ i ].name,
606
+ tests: config.modules[ i ].tests
607
+ });
608
+ }
609
+
610
+ // The test run is officially beginning now
611
+ runLoggingCallbacks( "begin", {
612
+ totalTests: Test.count,
613
+ modules: modulesLog
614
+ });
615
+ }
616
+
617
+ config.blocking = false;
618
+ process( true );
619
+ }
620
+
621
+ function resumeProcessing() {
622
+ runStarted = true;
623
+
624
+ // A slight delay to allow this iteration of the event loop to finish (more assertions, etc.)
625
+ if ( defined.setTimeout ) {
626
+ setTimeout(function() {
627
+ if ( config.current && config.current.semaphore > 0 ) {
628
+ return;
629
+ }
630
+ if ( config.timeout ) {
631
+ clearTimeout( config.timeout );
632
+ }
633
+
634
+ begin();
635
+ }, 13 );
636
+ } else {
637
+ begin();
638
+ }
639
+ }
640
+
641
+ function pauseProcessing() {
642
+ config.blocking = true;
643
+
644
+ if ( config.testTimeout && defined.setTimeout ) {
645
+ clearTimeout( config.timeout );
646
+ config.timeout = setTimeout(function() {
647
+ if ( config.current ) {
648
+ config.current.semaphore = 0;
649
+ QUnit.pushFailure( "Test timed out", sourceFromStacktrace( 2 ) );
650
+ } else {
651
+ throw new Error( "Test timed out" );
652
+ }
653
+ resumeProcessing();
654
+ }, config.testTimeout );
655
+ }
656
+ }
657
+
658
+ function saveGlobal() {
659
+ config.pollution = [];
660
+
661
+ if ( config.noglobals ) {
662
+ for ( var key in window ) {
663
+ if ( hasOwn.call( window, key ) ) {
664
+ // in Opera sometimes DOM element ids show up here, ignore them
665
+ if ( /^qunit-test-output/.test( key ) ) {
666
+ continue;
667
+ }
668
+ config.pollution.push( key );
669
+ }
670
+ }
671
+ }
672
+ }
673
+
674
+ function checkPollution() {
675
+ var newGlobals,
676
+ deletedGlobals,
677
+ old = config.pollution;
678
+
679
+ saveGlobal();
680
+
681
+ newGlobals = diff( config.pollution, old );
682
+ if ( newGlobals.length > 0 ) {
683
+ QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join( ", " ) );
684
+ }
685
+
686
+ deletedGlobals = diff( old, config.pollution );
687
+ if ( deletedGlobals.length > 0 ) {
688
+ QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join( ", " ) );
689
+ }
690
+ }
691
+
692
+ // returns a new Array with the elements that are in a but not in b
693
+ function diff( a, b ) {
694
+ var i, j,
695
+ result = a.slice();
696
+
697
+ for ( i = 0; i < result.length; i++ ) {
698
+ for ( j = 0; j < b.length; j++ ) {
699
+ if ( result[ i ] === b[ j ] ) {
700
+ result.splice( i, 1 );
701
+ i--;
702
+ break;
703
+ }
704
+ }
705
+ }
706
+ return result;
707
+ }
708
+
709
+ function extend( a, b, undefOnly ) {
710
+ for ( var prop in b ) {
711
+ if ( hasOwn.call( b, prop ) ) {
712
+
713
+ // Avoid "Member not found" error in IE8 caused by messing with window.constructor
714
+ if ( !( prop === "constructor" && a === window ) ) {
715
+ if ( b[ prop ] === undefined ) {
716
+ delete a[ prop ];
717
+ } else if ( !( undefOnly && typeof a[ prop ] !== "undefined" ) ) {
718
+ a[ prop ] = b[ prop ];
719
+ }
720
+ }
721
+ }
722
+ }
723
+
724
+ return a;
725
+ }
726
+
727
+ function runLoggingCallbacks( key, args ) {
728
+ var i, l, callbacks;
729
+
730
+ callbacks = config.callbacks[ key ];
731
+ for ( i = 0, l = callbacks.length; i < l; i++ ) {
732
+ callbacks[ i ]( args );
733
+ }
734
+ }
735
+
736
+ // DEPRECATED: This will be removed on 2.0.0+
737
+ // This function verifies if the loggingCallbacks were modified by the user
738
+ // If so, it will restore it, assign the given callback and print a console warning
739
+ function verifyLoggingCallbacks() {
740
+ var loggingCallback, userCallback;
741
+
742
+ for ( loggingCallback in loggingCallbacks ) {
743
+ if ( QUnit[ loggingCallback ] !== loggingCallbacks[ loggingCallback ] ) {
744
+
745
+ userCallback = QUnit[ loggingCallback ];
746
+
747
+ // Restore the callback function
748
+ QUnit[ loggingCallback ] = loggingCallbacks[ loggingCallback ];
749
+
750
+ // Assign the deprecated given callback
751
+ QUnit[ loggingCallback ]( userCallback );
752
+
753
+ if ( window.console && window.console.warn ) {
754
+ window.console.warn(
755
+ "QUnit." + loggingCallback + " was replaced with a new value.\n" +
756
+ "Please, check out the documentation on how to apply logging callbacks.\n" +
757
+ "Reference: http://api.qunitjs.com/category/callbacks/"
758
+ );
759
+ }
760
+ }
761
+ }
762
+ }
763
+
764
+ // from jquery.js
765
+ function inArray( elem, array ) {
766
+ if ( array.indexOf ) {
767
+ return array.indexOf( elem );
768
+ }
769
+
770
+ for ( var i = 0, length = array.length; i < length; i++ ) {
771
+ if ( array[ i ] === elem ) {
772
+ return i;
773
+ }
774
+ }
775
+
776
+ return -1;
777
+ }
778
+
779
+ function Test( settings ) {
780
+ var i, l;
781
+
782
+ ++Test.count;
783
+
784
+ extend( this, settings );
785
+ this.assertions = [];
786
+ this.semaphore = 0;
787
+ this.usedAsync = false;
788
+ this.module = config.currentModule;
789
+ this.stack = sourceFromStacktrace( 3 );
790
+
791
+ // Register unique strings
792
+ for ( i = 0, l = this.module.tests; i < l.length; i++ ) {
793
+ if ( this.module.tests[ i ].name === this.testName ) {
794
+ this.testName += " ";
795
+ }
796
+ }
797
+
798
+ this.testId = generateHash( this.module.name, this.testName );
799
+
800
+ this.module.tests.push({
801
+ name: this.testName,
802
+ testId: this.testId
803
+ });
804
+
805
+ if ( settings.skip ) {
806
+
807
+ // Skipped tests will fully ignore any sent callback
808
+ this.callback = function() {};
809
+ this.async = false;
810
+ this.expected = 0;
811
+ } else {
812
+ this.assert = new Assert( this );
813
+ }
814
+ }
815
+
816
+ Test.count = 0;
817
+
818
+ Test.prototype = {
819
+ before: function() {
820
+ if (
821
+
822
+ // Emit moduleStart when we're switching from one module to another
823
+ this.module !== config.previousModule ||
824
+
825
+ // They could be equal (both undefined) but if the previousModule property doesn't
826
+ // yet exist it means this is the first test in a suite that isn't wrapped in a
827
+ // module, in which case we'll just emit a moduleStart event for 'undefined'.
828
+ // Without this, reporters can get testStart before moduleStart which is a problem.
829
+ !hasOwn.call( config, "previousModule" )
830
+ ) {
831
+ if ( hasOwn.call( config, "previousModule" ) ) {
832
+ runLoggingCallbacks( "moduleDone", {
833
+ name: config.previousModule.name,
834
+ tests: config.previousModule.tests,
835
+ failed: config.moduleStats.bad,
836
+ passed: config.moduleStats.all - config.moduleStats.bad,
837
+ total: config.moduleStats.all,
838
+ runtime: now() - config.moduleStats.started
839
+ });
840
+ }
841
+ config.previousModule = this.module;
842
+ config.moduleStats = { all: 0, bad: 0, started: now() };
843
+ runLoggingCallbacks( "moduleStart", {
844
+ name: this.module.name,
845
+ tests: this.module.tests
846
+ });
847
+ }
848
+
849
+ config.current = this;
850
+
851
+ this.testEnvironment = extend( {}, this.module.testEnvironment );
852
+ delete this.testEnvironment.beforeEach;
853
+ delete this.testEnvironment.afterEach;
854
+
855
+ this.started = now();
856
+ runLoggingCallbacks( "testStart", {
857
+ name: this.testName,
858
+ module: this.module.name,
859
+ testId: this.testId
860
+ });
861
+
862
+ if ( !config.pollution ) {
863
+ saveGlobal();
864
+ }
865
+ },
866
+
867
+ run: function() {
868
+ var promise;
869
+
870
+ config.current = this;
871
+
872
+ if ( this.async ) {
873
+ QUnit.stop();
874
+ }
875
+
876
+ this.callbackStarted = now();
877
+
878
+ if ( config.notrycatch ) {
879
+ promise = this.callback.call( this.testEnvironment, this.assert );
880
+ this.resolvePromise( promise );
881
+ return;
882
+ }
883
+
884
+ try {
885
+ promise = this.callback.call( this.testEnvironment, this.assert );
886
+ this.resolvePromise( promise );
887
+ } catch ( e ) {
888
+ this.pushFailure( "Died on test #" + ( this.assertions.length + 1 ) + " " +
889
+ this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
890
+
891
+ // else next test will carry the responsibility
892
+ saveGlobal();
893
+
894
+ // Restart the tests if they're blocking
895
+ if ( config.blocking ) {
896
+ QUnit.start();
897
+ }
898
+ }
899
+ },
900
+
901
+ after: function() {
902
+ checkPollution();
903
+ },
904
+
905
+ queueHook: function( hook, hookName ) {
906
+ var promise,
907
+ test = this;
908
+ return function runHook() {
909
+ config.current = test;
910
+ if ( config.notrycatch ) {
911
+ promise = hook.call( test.testEnvironment, test.assert );
912
+ test.resolvePromise( promise, hookName );
913
+ return;
914
+ }
915
+ try {
916
+ promise = hook.call( test.testEnvironment, test.assert );
917
+ test.resolvePromise( promise, hookName );
918
+ } catch ( error ) {
919
+ test.pushFailure( hookName + " failed on " + test.testName + ": " +
920
+ ( error.message || error ), extractStacktrace( error, 0 ) );
921
+ }
922
+ };
923
+ },
924
+
925
+ // Currently only used for module level hooks, can be used to add global level ones
926
+ hooks: function( handler ) {
927
+ var hooks = [];
928
+
929
+ // Hooks are ignored on skipped tests
930
+ if ( this.skip ) {
931
+ return hooks;
932
+ }
933
+
934
+ if ( this.module.testEnvironment &&
935
+ QUnit.objectType( this.module.testEnvironment[ handler ] ) === "function" ) {
936
+ hooks.push( this.queueHook( this.module.testEnvironment[ handler ], handler ) );
937
+ }
938
+
939
+ return hooks;
940
+ },
941
+
942
+ finish: function() {
943
+ config.current = this;
944
+ if ( config.requireExpects && this.expected === null ) {
945
+ this.pushFailure( "Expected number of assertions to be defined, but expect() was " +
946
+ "not called.", this.stack );
947
+ } else if ( this.expected !== null && this.expected !== this.assertions.length ) {
948
+ this.pushFailure( "Expected " + this.expected + " assertions, but " +
949
+ this.assertions.length + " were run", this.stack );
950
+ } else if ( this.expected === null && !this.assertions.length ) {
951
+ this.pushFailure( "Expected at least one assertion, but none were run - call " +
952
+ "expect(0) to accept zero assertions.", this.stack );
953
+ }
954
+
955
+ var i,
956
+ bad = 0;
957
+
958
+ this.runtime = now() - this.started;
959
+ config.stats.all += this.assertions.length;
960
+ config.moduleStats.all += this.assertions.length;
961
+
962
+ for ( i = 0; i < this.assertions.length; i++ ) {
963
+ if ( !this.assertions[ i ].result ) {
964
+ bad++;
965
+ config.stats.bad++;
966
+ config.moduleStats.bad++;
967
+ }
968
+ }
969
+
970
+ runLoggingCallbacks( "testDone", {
971
+ name: this.testName,
972
+ module: this.module.name,
973
+ skipped: !!this.skip,
974
+ failed: bad,
975
+ passed: this.assertions.length - bad,
976
+ total: this.assertions.length,
977
+ runtime: this.runtime,
978
+
979
+ // HTML Reporter use
980
+ assertions: this.assertions,
981
+ testId: this.testId,
982
+
983
+ // DEPRECATED: this property will be removed in 2.0.0, use runtime instead
984
+ duration: this.runtime
985
+ });
986
+
987
+ // QUnit.reset() is deprecated and will be replaced for a new
988
+ // fixture reset function on QUnit 2.0/2.1.
989
+ // It's still called here for backwards compatibility handling
990
+ QUnit.reset();
991
+
992
+ config.current = undefined;
993
+ },
994
+
995
+ queue: function() {
996
+ var bad,
997
+ test = this;
998
+
999
+ if ( !this.valid() ) {
1000
+ return;
1001
+ }
1002
+
1003
+ function run() {
1004
+
1005
+ // each of these can by async
1006
+ synchronize([
1007
+ function() {
1008
+ test.before();
1009
+ },
1010
+
1011
+ test.hooks( "beforeEach" ),
1012
+
1013
+ function() {
1014
+ test.run();
1015
+ },
1016
+
1017
+ test.hooks( "afterEach" ).reverse(),
1018
+
1019
+ function() {
1020
+ test.after();
1021
+ },
1022
+ function() {
1023
+ test.finish();
1024
+ }
1025
+ ]);
1026
+ }
1027
+
1028
+ // `bad` initialized at top of scope
1029
+ // defer when previous test run passed, if storage is available
1030
+ bad = QUnit.config.reorder && defined.sessionStorage &&
1031
+ +sessionStorage.getItem( "qunit-test-" + this.module.name + "-" + this.testName );
1032
+
1033
+ if ( bad ) {
1034
+ run();
1035
+ } else {
1036
+ synchronize( run, true );
1037
+ }
1038
+ },
1039
+
1040
+ push: function( result, actual, expected, message ) {
1041
+ var source,
1042
+ details = {
1043
+ module: this.module.name,
1044
+ name: this.testName,
1045
+ result: result,
1046
+ message: message,
1047
+ actual: actual,
1048
+ expected: expected,
1049
+ testId: this.testId,
1050
+ runtime: now() - this.started
1051
+ };
1052
+
1053
+ if ( !result ) {
1054
+ source = sourceFromStacktrace();
1055
+
1056
+ if ( source ) {
1057
+ details.source = source;
1058
+ }
1059
+ }
1060
+
1061
+ runLoggingCallbacks( "log", details );
1062
+
1063
+ this.assertions.push({
1064
+ result: !!result,
1065
+ message: message
1066
+ });
1067
+ },
1068
+
1069
+ pushFailure: function( message, source, actual ) {
1070
+ if ( !this instanceof Test ) {
1071
+ throw new Error( "pushFailure() assertion outside test context, was " +
1072
+ sourceFromStacktrace( 2 ) );
1073
+ }
1074
+
1075
+ var details = {
1076
+ module: this.module.name,
1077
+ name: this.testName,
1078
+ result: false,
1079
+ message: message || "error",
1080
+ actual: actual || null,
1081
+ testId: this.testId,
1082
+ runtime: now() - this.started
1083
+ };
1084
+
1085
+ if ( source ) {
1086
+ details.source = source;
1087
+ }
1088
+
1089
+ runLoggingCallbacks( "log", details );
1090
+
1091
+ this.assertions.push({
1092
+ result: false,
1093
+ message: message
1094
+ });
1095
+ },
1096
+
1097
+ resolvePromise: function( promise, phase ) {
1098
+ var then, message,
1099
+ test = this;
1100
+ if ( promise != null ) {
1101
+ then = promise.then;
1102
+ if ( QUnit.objectType( then ) === "function" ) {
1103
+ QUnit.stop();
1104
+ then.call(
1105
+ promise,
1106
+ QUnit.start,
1107
+ function( error ) {
1108
+ message = "Promise rejected " +
1109
+ ( !phase ? "during" : phase.replace( /Each$/, "" ) ) +
1110
+ " " + test.testName + ": " + ( error.message || error );
1111
+ test.pushFailure( message, extractStacktrace( error, 0 ) );
1112
+
1113
+ // else next test will carry the responsibility
1114
+ saveGlobal();
1115
+
1116
+ // Unblock
1117
+ QUnit.start();
1118
+ }
1119
+ );
1120
+ }
1121
+ }
1122
+ },
1123
+
1124
+ valid: function() {
1125
+ var include,
1126
+ filter = config.filter,
1127
+ module = QUnit.urlParams.module && QUnit.urlParams.module.toLowerCase(),
1128
+ fullName = ( this.module.name + ": " + this.testName ).toLowerCase();
1129
+
1130
+ // Internally-generated tests are always valid
1131
+ if ( this.callback && this.callback.validTest ) {
1132
+ return true;
1133
+ }
1134
+
1135
+ if ( config.testId.length > 0 && inArray( this.testId, config.testId ) < 0 ) {
1136
+ return false;
1137
+ }
1138
+
1139
+ if ( module && ( !this.module.name || this.module.name.toLowerCase() !== module ) ) {
1140
+ return false;
1141
+ }
1142
+
1143
+ if ( !filter ) {
1144
+ return true;
1145
+ }
1146
+
1147
+ include = filter.charAt( 0 ) !== "!";
1148
+ if ( !include ) {
1149
+ filter = filter.toLowerCase().slice( 1 );
1150
+ }
1151
+
1152
+ // If the filter matches, we need to honour include
1153
+ if ( fullName.indexOf( filter ) !== -1 ) {
1154
+ return include;
1155
+ }
1156
+
1157
+ // Otherwise, do the opposite
1158
+ return !include;
1159
+ }
1160
+
1161
+ };
1162
+
1163
+ // Resets the test setup. Useful for tests that modify the DOM.
1164
+ /*
1165
+ DEPRECATED: Use multiple tests instead of resetting inside a test.
1166
+ Use testStart or testDone for custom cleanup.
1167
+ This method will throw an error in 2.0, and will be removed in 2.1
1168
+ */
1169
+ QUnit.reset = function() {
1170
+
1171
+ // Return on non-browser environments
1172
+ // This is necessary to not break on node tests
1173
+ if ( typeof window === "undefined" ) {
1174
+ return;
1175
+ }
1176
+
1177
+ var fixture = defined.document && document.getElementById &&
1178
+ document.getElementById( "qunit-fixture" );
1179
+
1180
+ if ( fixture ) {
1181
+ fixture.innerHTML = config.fixture;
1182
+ }
1183
+ };
1184
+
1185
+ QUnit.pushFailure = function() {
1186
+ if ( !QUnit.config.current ) {
1187
+ throw new Error( "pushFailure() assertion outside test context, in " +
1188
+ sourceFromStacktrace( 2 ) );
1189
+ }
1190
+
1191
+ // Gets current test obj
1192
+ var currentTest = QUnit.config.current;
1193
+
1194
+ return currentTest.pushFailure.apply( currentTest, arguments );
1195
+ };
1196
+
1197
+ // Based on Java's String.hashCode, a simple but not
1198
+ // rigorously collision resistant hashing function
1199
+ function generateHash( module, testName ) {
1200
+ var hex,
1201
+ i = 0,
1202
+ hash = 0,
1203
+ str = module + "\x1C" + testName,
1204
+ len = str.length;
1205
+
1206
+ for ( ; i < len; i++ ) {
1207
+ hash = ( ( hash << 5 ) - hash ) + str.charCodeAt( i );
1208
+ hash |= 0;
1209
+ }
1210
+
1211
+ // Convert the possibly negative integer hash code into an 8 character hex string, which isn't
1212
+ // strictly necessary but increases user understanding that the id is a SHA-like hash
1213
+ hex = ( 0x100000000 + hash ).toString( 16 );
1214
+ if ( hex.length < 8 ) {
1215
+ hex = "0000000" + hex;
1216
+ }
1217
+
1218
+ return hex.slice( -8 );
1219
+ }
1220
+
1221
+ function Assert( testContext ) {
1222
+ this.test = testContext;
1223
+ }
1224
+
1225
+ // Assert helpers
1226
+ QUnit.assert = Assert.prototype = {
1227
+
1228
+ // Specify the number of expected assertions to guarantee that failed test
1229
+ // (no assertions are run at all) don't slip through.
1230
+ expect: function( asserts ) {
1231
+ if ( arguments.length === 1 ) {
1232
+ this.test.expected = asserts;
1233
+ } else {
1234
+ return this.test.expected;
1235
+ }
1236
+ },
1237
+
1238
+ // Increment this Test's semaphore counter, then return a single-use function that
1239
+ // decrements that counter a maximum of once.
1240
+ async: function() {
1241
+ var test = this.test,
1242
+ popped = false;
1243
+
1244
+ test.semaphore += 1;
1245
+ test.usedAsync = true;
1246
+ pauseProcessing();
1247
+
1248
+ return function done() {
1249
+ if ( !popped ) {
1250
+ test.semaphore -= 1;
1251
+ popped = true;
1252
+ resumeProcessing();
1253
+ } else {
1254
+ test.pushFailure( "Called the callback returned from `assert.async` more than once",
1255
+ sourceFromStacktrace( 2 ) );
1256
+ }
1257
+ };
1258
+ },
1259
+
1260
+ // Exports test.push() to the user API
1261
+ push: function( /* result, actual, expected, message */ ) {
1262
+ var assert = this,
1263
+ currentTest = ( assert instanceof Assert && assert.test ) || QUnit.config.current;
1264
+
1265
+ // Backwards compatibility fix.
1266
+ // Allows the direct use of global exported assertions and QUnit.assert.*
1267
+ // Although, it's use is not recommended as it can leak assertions
1268
+ // to other tests from async tests, because we only get a reference to the current test,
1269
+ // not exactly the test where assertion were intended to be called.
1270
+ if ( !currentTest ) {
1271
+ throw new Error( "assertion outside test context, in " + sourceFromStacktrace( 2 ) );
1272
+ }
1273
+
1274
+ if ( currentTest.usedAsync === true && currentTest.semaphore === 0 ) {
1275
+ currentTest.pushFailure( "Assertion after the final `assert.async` was resolved",
1276
+ sourceFromStacktrace( 2 ) );
1277
+
1278
+ // Allow this assertion to continue running anyway...
1279
+ }
1280
+
1281
+ if ( !( assert instanceof Assert ) ) {
1282
+ assert = currentTest.assert;
1283
+ }
1284
+ return assert.test.push.apply( assert.test, arguments );
1285
+ },
1286
+
1287
+ /**
1288
+ * Asserts rough true-ish result.
1289
+ * @name ok
1290
+ * @function
1291
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
1292
+ */
1293
+ ok: function( result, message ) {
1294
+ message = message || ( result ? "okay" : "failed, expected argument to be truthy, was: " +
1295
+ QUnit.dump.parse( result ) );
1296
+ this.push( !!result, result, true, message );
1297
+ },
1298
+
1299
+ /**
1300
+ * Assert that the first two arguments are equal, with an optional message.
1301
+ * Prints out both actual and expected values.
1302
+ * @name equal
1303
+ * @function
1304
+ * @example equal( format( "{0} bytes.", 2), "2 bytes.", "replaces {0} with next argument" );
1305
+ */
1306
+ equal: function( actual, expected, message ) {
1307
+ /*jshint eqeqeq:false */
1308
+ this.push( expected == actual, actual, expected, message );
1309
+ },
1310
+
1311
+ /**
1312
+ * @name notEqual
1313
+ * @function
1314
+ */
1315
+ notEqual: function( actual, expected, message ) {
1316
+ /*jshint eqeqeq:false */
1317
+ this.push( expected != actual, actual, expected, message );
1318
+ },
1319
+
1320
+ /**
1321
+ * @name propEqual
1322
+ * @function
1323
+ */
1324
+ propEqual: function( actual, expected, message ) {
1325
+ actual = objectValues( actual );
1326
+ expected = objectValues( expected );
1327
+ this.push( QUnit.equiv( actual, expected ), actual, expected, message );
1328
+ },
1329
+
1330
+ /**
1331
+ * @name notPropEqual
1332
+ * @function
1333
+ */
1334
+ notPropEqual: function( actual, expected, message ) {
1335
+ actual = objectValues( actual );
1336
+ expected = objectValues( expected );
1337
+ this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
1338
+ },
1339
+
1340
+ /**
1341
+ * @name deepEqual
1342
+ * @function
1343
+ */
1344
+ deepEqual: function( actual, expected, message ) {
1345
+ this.push( QUnit.equiv( actual, expected ), actual, expected, message );
1346
+ },
1347
+
1348
+ /**
1349
+ * @name notDeepEqual
1350
+ * @function
1351
+ */
1352
+ notDeepEqual: function( actual, expected, message ) {
1353
+ this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
1354
+ },
1355
+
1356
+ /**
1357
+ * @name strictEqual
1358
+ * @function
1359
+ */
1360
+ strictEqual: function( actual, expected, message ) {
1361
+ this.push( expected === actual, actual, expected, message );
1362
+ },
1363
+
1364
+ /**
1365
+ * @name notStrictEqual
1366
+ * @function
1367
+ */
1368
+ notStrictEqual: function( actual, expected, message ) {
1369
+ this.push( expected !== actual, actual, expected, message );
1370
+ },
1371
+
1372
+ "throws": function( block, expected, message ) {
1373
+ var actual, expectedType,
1374
+ expectedOutput = expected,
1375
+ ok = false;
1376
+
1377
+ // 'expected' is optional unless doing string comparison
1378
+ if ( message == null && typeof expected === "string" ) {
1379
+ message = expected;
1380
+ expected = null;
1381
+ }
1382
+
1383
+ this.test.ignoreGlobalErrors = true;
1384
+ try {
1385
+ block.call( this.test.testEnvironment );
1386
+ } catch (e) {
1387
+ actual = e;
1388
+ }
1389
+ this.test.ignoreGlobalErrors = false;
1390
+
1391
+ if ( actual ) {
1392
+ expectedType = QUnit.objectType( expected );
1393
+
1394
+ // we don't want to validate thrown error
1395
+ if ( !expected ) {
1396
+ ok = true;
1397
+ expectedOutput = null;
1398
+
1399
+ // expected is a regexp
1400
+ } else if ( expectedType === "regexp" ) {
1401
+ ok = expected.test( errorString( actual ) );
1402
+
1403
+ // expected is a string
1404
+ } else if ( expectedType === "string" ) {
1405
+ ok = expected === errorString( actual );
1406
+
1407
+ // expected is a constructor, maybe an Error constructor
1408
+ } else if ( expectedType === "function" && actual instanceof expected ) {
1409
+ ok = true;
1410
+
1411
+ // expected is an Error object
1412
+ } else if ( expectedType === "object" ) {
1413
+ ok = actual instanceof expected.constructor &&
1414
+ actual.name === expected.name &&
1415
+ actual.message === expected.message;
1416
+
1417
+ // expected is a validation function which returns true if validation passed
1418
+ } else if ( expectedType === "function" && expected.call( {}, actual ) === true ) {
1419
+ expectedOutput = null;
1420
+ ok = true;
1421
+ }
1422
+
1423
+ this.push( ok, actual, expectedOutput, message );
1424
+ } else {
1425
+ this.test.pushFailure( message, null, "No exception was thrown." );
1426
+ }
1427
+ }
1428
+ };
1429
+
1430
+ // Provide an alternative to assert.throws(), for enviroments that consider throws a reserved word
1431
+ // Known to us are: Closure Compiler, Narwhal
1432
+ (function() {
1433
+ /*jshint sub:true */
1434
+ Assert.prototype.raises = Assert.prototype[ "throws" ];
1435
+ }());
1436
+
1437
+ // Test for equality any JavaScript type.
1438
+ // Author: Philippe Rathé <prathe@gmail.com>
1439
+ QUnit.equiv = (function() {
1440
+
1441
+ // Call the o related callback with the given arguments.
1442
+ function bindCallbacks( o, callbacks, args ) {
1443
+ var prop = QUnit.objectType( o );
1444
+ if ( prop ) {
1445
+ if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
1446
+ return callbacks[ prop ].apply( callbacks, args );
1447
+ } else {
1448
+ return callbacks[ prop ]; // or undefined
1449
+ }
1450
+ }
1451
+ }
1452
+
1453
+ // the real equiv function
1454
+ var innerEquiv,
1455
+
1456
+ // stack to decide between skip/abort functions
1457
+ callers = [],
1458
+
1459
+ // stack to avoiding loops from circular referencing
1460
+ parents = [],
1461
+ parentsB = [],
1462
+
1463
+ getProto = Object.getPrototypeOf || function( obj ) {
1464
+ /* jshint camelcase: false, proto: true */
1465
+ return obj.__proto__;
1466
+ },
1467
+ callbacks = (function() {
1468
+
1469
+ // for string, boolean, number and null
1470
+ function useStrictEquality( b, a ) {
1471
+
1472
+ /*jshint eqeqeq:false */
1473
+ if ( b instanceof a.constructor || a instanceof b.constructor ) {
1474
+
1475
+ // to catch short annotation VS 'new' annotation of a
1476
+ // declaration
1477
+ // e.g. var i = 1;
1478
+ // var j = new Number(1);
1479
+ return a == b;
1480
+ } else {
1481
+ return a === b;
1482
+ }
1483
+ }
1484
+
1485
+ return {
1486
+ "string": useStrictEquality,
1487
+ "boolean": useStrictEquality,
1488
+ "number": useStrictEquality,
1489
+ "null": useStrictEquality,
1490
+ "undefined": useStrictEquality,
1491
+
1492
+ "nan": function( b ) {
1493
+ return isNaN( b );
1494
+ },
1495
+
1496
+ "date": function( b, a ) {
1497
+ return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
1498
+ },
1499
+
1500
+ "regexp": function( b, a ) {
1501
+ return QUnit.objectType( b ) === "regexp" &&
1502
+
1503
+ // the regex itself
1504
+ a.source === b.source &&
1505
+
1506
+ // and its modifiers
1507
+ a.global === b.global &&
1508
+
1509
+ // (gmi) ...
1510
+ a.ignoreCase === b.ignoreCase &&
1511
+ a.multiline === b.multiline &&
1512
+ a.sticky === b.sticky;
1513
+ },
1514
+
1515
+ // - skip when the property is a method of an instance (OOP)
1516
+ // - abort otherwise,
1517
+ // initial === would have catch identical references anyway
1518
+ "function": function() {
1519
+ var caller = callers[ callers.length - 1 ];
1520
+ return caller !== Object && typeof caller !== "undefined";
1521
+ },
1522
+
1523
+ "array": function( b, a ) {
1524
+ var i, j, len, loop, aCircular, bCircular;
1525
+
1526
+ // b could be an object literal here
1527
+ if ( QUnit.objectType( b ) !== "array" ) {
1528
+ return false;
1529
+ }
1530
+
1531
+ len = a.length;
1532
+ if ( len !== b.length ) {
1533
+ // safe and faster
1534
+ return false;
1535
+ }
1536
+
1537
+ // track reference to avoid circular references
1538
+ parents.push( a );
1539
+ parentsB.push( b );
1540
+ for ( i = 0; i < len; i++ ) {
1541
+ loop = false;
1542
+ for ( j = 0; j < parents.length; j++ ) {
1543
+ aCircular = parents[ j ] === a[ i ];
1544
+ bCircular = parentsB[ j ] === b[ i ];
1545
+ if ( aCircular || bCircular ) {
1546
+ if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
1547
+ loop = true;
1548
+ } else {
1549
+ parents.pop();
1550
+ parentsB.pop();
1551
+ return false;
1552
+ }
1553
+ }
1554
+ }
1555
+ if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
1556
+ parents.pop();
1557
+ parentsB.pop();
1558
+ return false;
1559
+ }
1560
+ }
1561
+ parents.pop();
1562
+ parentsB.pop();
1563
+ return true;
1564
+ },
1565
+
1566
+ "object": function( b, a ) {
1567
+
1568
+ /*jshint forin:false */
1569
+ var i, j, loop, aCircular, bCircular,
1570
+ // Default to true
1571
+ eq = true,
1572
+ aProperties = [],
1573
+ bProperties = [];
1574
+
1575
+ // comparing constructors is more strict than using
1576
+ // instanceof
1577
+ if ( a.constructor !== b.constructor ) {
1578
+
1579
+ // Allow objects with no prototype to be equivalent to
1580
+ // objects with Object as their constructor.
1581
+ if ( !( ( getProto( a ) === null && getProto( b ) === Object.prototype ) ||
1582
+ ( getProto( b ) === null && getProto( a ) === Object.prototype ) ) ) {
1583
+ return false;
1584
+ }
1585
+ }
1586
+
1587
+ // stack constructor before traversing properties
1588
+ callers.push( a.constructor );
1589
+
1590
+ // track reference to avoid circular references
1591
+ parents.push( a );
1592
+ parentsB.push( b );
1593
+
1594
+ // be strict: don't ensure hasOwnProperty and go deep
1595
+ for ( i in a ) {
1596
+ loop = false;
1597
+ for ( j = 0; j < parents.length; j++ ) {
1598
+ aCircular = parents[ j ] === a[ i ];
1599
+ bCircular = parentsB[ j ] === b[ i ];
1600
+ if ( aCircular || bCircular ) {
1601
+ if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
1602
+ loop = true;
1603
+ } else {
1604
+ eq = false;
1605
+ break;
1606
+ }
1607
+ }
1608
+ }
1609
+ aProperties.push( i );
1610
+ if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
1611
+ eq = false;
1612
+ break;
1613
+ }
1614
+ }
1615
+
1616
+ parents.pop();
1617
+ parentsB.pop();
1618
+ callers.pop(); // unstack, we are done
1619
+
1620
+ for ( i in b ) {
1621
+ bProperties.push( i ); // collect b's properties
1622
+ }
1623
+
1624
+ // Ensures identical properties name
1625
+ return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
1626
+ }
1627
+ };
1628
+ }());
1629
+
1630
+ innerEquiv = function() { // can take multiple arguments
1631
+ var args = [].slice.apply( arguments );
1632
+ if ( args.length < 2 ) {
1633
+ return true; // end transition
1634
+ }
1635
+
1636
+ return ( (function( a, b ) {
1637
+ if ( a === b ) {
1638
+ return true; // catch the most you can
1639
+ } else if ( a === null || b === null || typeof a === "undefined" ||
1640
+ typeof b === "undefined" ||
1641
+ QUnit.objectType( a ) !== QUnit.objectType( b ) ) {
1642
+
1643
+ // don't lose time with error prone cases
1644
+ return false;
1645
+ } else {
1646
+ return bindCallbacks( a, callbacks, [ b, a ] );
1647
+ }
1648
+
1649
+ // apply transition with (1..n) arguments
1650
+ }( args[ 0 ], args[ 1 ] ) ) &&
1651
+ innerEquiv.apply( this, args.splice( 1, args.length - 1 ) ) );
1652
+ };
1653
+
1654
+ return innerEquiv;
1655
+ }());
1656
+
1657
+ // Based on jsDump by Ariel Flesler
1658
+ // http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html
1659
+ QUnit.dump = (function() {
1660
+ function quote( str ) {
1661
+ return "\"" + str.toString().replace( /"/g, "\\\"" ) + "\"";
1662
+ }
1663
+ function literal( o ) {
1664
+ return o + "";
1665
+ }
1666
+ function join( pre, arr, post ) {
1667
+ var s = dump.separator(),
1668
+ base = dump.indent(),
1669
+ inner = dump.indent( 1 );
1670
+ if ( arr.join ) {
1671
+ arr = arr.join( "," + s + inner );
1672
+ }
1673
+ if ( !arr ) {
1674
+ return pre + post;
1675
+ }
1676
+ return [ pre, inner + arr, base + post ].join( s );
1677
+ }
1678
+ function array( arr, stack ) {
1679
+ var i = arr.length,
1680
+ ret = new Array( i );
1681
+
1682
+ if ( dump.maxDepth && dump.depth > dump.maxDepth ) {
1683
+ return "[object Array]";
1684
+ }
1685
+
1686
+ this.up();
1687
+ while ( i-- ) {
1688
+ ret[ i ] = this.parse( arr[ i ], undefined, stack );
1689
+ }
1690
+ this.down();
1691
+ return join( "[", ret, "]" );
1692
+ }
1693
+
1694
+ var reName = /^function (\w+)/,
1695
+ dump = {
1696
+
1697
+ // objType is used mostly internally, you can fix a (custom) type in advance
1698
+ parse: function( obj, objType, stack ) {
1699
+ stack = stack || [];
1700
+ var res, parser, parserType,
1701
+ inStack = inArray( obj, stack );
1702
+
1703
+ if ( inStack !== -1 ) {
1704
+ return "recursion(" + ( inStack - stack.length ) + ")";
1705
+ }
1706
+
1707
+ objType = objType || this.typeOf( obj );
1708
+ parser = this.parsers[ objType ];
1709
+ parserType = typeof parser;
1710
+
1711
+ if ( parserType === "function" ) {
1712
+ stack.push( obj );
1713
+ res = parser.call( this, obj, stack );
1714
+ stack.pop();
1715
+ return res;
1716
+ }
1717
+ return ( parserType === "string" ) ? parser : this.parsers.error;
1718
+ },
1719
+ typeOf: function( obj ) {
1720
+ var type;
1721
+ if ( obj === null ) {
1722
+ type = "null";
1723
+ } else if ( typeof obj === "undefined" ) {
1724
+ type = "undefined";
1725
+ } else if ( QUnit.is( "regexp", obj ) ) {
1726
+ type = "regexp";
1727
+ } else if ( QUnit.is( "date", obj ) ) {
1728
+ type = "date";
1729
+ } else if ( QUnit.is( "function", obj ) ) {
1730
+ type = "function";
1731
+ } else if ( obj.setInterval !== undefined &&
1732
+ obj.document !== undefined &&
1733
+ obj.nodeType === undefined ) {
1734
+ type = "window";
1735
+ } else if ( obj.nodeType === 9 ) {
1736
+ type = "document";
1737
+ } else if ( obj.nodeType ) {
1738
+ type = "node";
1739
+ } else if (
1740
+
1741
+ // native arrays
1742
+ toString.call( obj ) === "[object Array]" ||
1743
+
1744
+ // NodeList objects
1745
+ ( typeof obj.length === "number" && obj.item !== undefined &&
1746
+ ( obj.length ? obj.item( 0 ) === obj[ 0 ] : ( obj.item( 0 ) === null &&
1747
+ obj[ 0 ] === undefined ) ) )
1748
+ ) {
1749
+ type = "array";
1750
+ } else if ( obj.constructor === Error.prototype.constructor ) {
1751
+ type = "error";
1752
+ } else {
1753
+ type = typeof obj;
1754
+ }
1755
+ return type;
1756
+ },
1757
+ separator: function() {
1758
+ return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? "&#160;" : " ";
1759
+ },
1760
+ // extra can be a number, shortcut for increasing-calling-decreasing
1761
+ indent: function( extra ) {
1762
+ if ( !this.multiline ) {
1763
+ return "";
1764
+ }
1765
+ var chr = this.indentChar;
1766
+ if ( this.HTML ) {
1767
+ chr = chr.replace( /\t/g, " " ).replace( / /g, "&#160;" );
1768
+ }
1769
+ return new Array( this.depth + ( extra || 0 ) ).join( chr );
1770
+ },
1771
+ up: function( a ) {
1772
+ this.depth += a || 1;
1773
+ },
1774
+ down: function( a ) {
1775
+ this.depth -= a || 1;
1776
+ },
1777
+ setParser: function( name, parser ) {
1778
+ this.parsers[ name ] = parser;
1779
+ },
1780
+ // The next 3 are exposed so you can use them
1781
+ quote: quote,
1782
+ literal: literal,
1783
+ join: join,
1784
+ //
1785
+ depth: 1,
1786
+ maxDepth: 5,
1787
+
1788
+ // This is the list of parsers, to modify them, use dump.setParser
1789
+ parsers: {
1790
+ window: "[Window]",
1791
+ document: "[Document]",
1792
+ error: function( error ) {
1793
+ return "Error(\"" + error.message + "\")";
1794
+ },
1795
+ unknown: "[Unknown]",
1796
+ "null": "null",
1797
+ "undefined": "undefined",
1798
+ "function": function( fn ) {
1799
+ var ret = "function",
1800
+
1801
+ // functions never have name in IE
1802
+ name = "name" in fn ? fn.name : ( reName.exec( fn ) || [] )[ 1 ];
1803
+
1804
+ if ( name ) {
1805
+ ret += " " + name;
1806
+ }
1807
+ ret += "( ";
1808
+
1809
+ ret = [ ret, dump.parse( fn, "functionArgs" ), "){" ].join( "" );
1810
+ return join( ret, dump.parse( fn, "functionCode" ), "}" );
1811
+ },
1812
+ array: array,
1813
+ nodelist: array,
1814
+ "arguments": array,
1815
+ object: function( map, stack ) {
1816
+ var keys, key, val, i, nonEnumerableProperties,
1817
+ ret = [];
1818
+
1819
+ if ( dump.maxDepth && dump.depth > dump.maxDepth ) {
1820
+ return "[object Object]";
1821
+ }
1822
+
1823
+ dump.up();
1824
+ keys = [];
1825
+ for ( key in map ) {
1826
+ keys.push( key );
1827
+ }
1828
+
1829
+ // Some properties are not always enumerable on Error objects.
1830
+ nonEnumerableProperties = [ "message", "name" ];
1831
+ for ( i in nonEnumerableProperties ) {
1832
+ key = nonEnumerableProperties[ i ];
1833
+ if ( key in map && !( key in keys ) ) {
1834
+ keys.push( key );
1835
+ }
1836
+ }
1837
+ keys.sort();
1838
+ for ( i = 0; i < keys.length; i++ ) {
1839
+ key = keys[ i ];
1840
+ val = map[ key ];
1841
+ ret.push( dump.parse( key, "key" ) + ": " +
1842
+ dump.parse( val, undefined, stack ) );
1843
+ }
1844
+ dump.down();
1845
+ return join( "{", ret, "}" );
1846
+ },
1847
+ node: function( node ) {
1848
+ var len, i, val,
1849
+ open = dump.HTML ? "&lt;" : "<",
1850
+ close = dump.HTML ? "&gt;" : ">",
1851
+ tag = node.nodeName.toLowerCase(),
1852
+ ret = open + tag,
1853
+ attrs = node.attributes;
1854
+
1855
+ if ( attrs ) {
1856
+ for ( i = 0, len = attrs.length; i < len; i++ ) {
1857
+ val = attrs[ i ].nodeValue;
1858
+
1859
+ // IE6 includes all attributes in .attributes, even ones not explicitly
1860
+ // set. Those have values like undefined, null, 0, false, "" or
1861
+ // "inherit".
1862
+ if ( val && val !== "inherit" ) {
1863
+ ret += " " + attrs[ i ].nodeName + "=" +
1864
+ dump.parse( val, "attribute" );
1865
+ }
1866
+ }
1867
+ }
1868
+ ret += close;
1869
+
1870
+ // Show content of TextNode or CDATASection
1871
+ if ( node.nodeType === 3 || node.nodeType === 4 ) {
1872
+ ret += node.nodeValue;
1873
+ }
1874
+
1875
+ return ret + open + "/" + tag + close;
1876
+ },
1877
+
1878
+ // function calls it internally, it's the arguments part of the function
1879
+ functionArgs: function( fn ) {
1880
+ var args,
1881
+ l = fn.length;
1882
+
1883
+ if ( !l ) {
1884
+ return "";
1885
+ }
1886
+
1887
+ args = new Array( l );
1888
+ while ( l-- ) {
1889
+
1890
+ // 97 is 'a'
1891
+ args[ l ] = String.fromCharCode( 97 + l );
1892
+ }
1893
+ return " " + args.join( ", " ) + " ";
1894
+ },
1895
+ // object calls it internally, the key part of an item in a map
1896
+ key: quote,
1897
+ // function calls it internally, it's the content of the function
1898
+ functionCode: "[code]",
1899
+ // node calls it internally, it's an html attribute value
1900
+ attribute: quote,
1901
+ string: quote,
1902
+ date: quote,
1903
+ regexp: literal,
1904
+ number: literal,
1905
+ "boolean": literal
1906
+ },
1907
+ // if true, entities are escaped ( <, >, \t, space and \n )
1908
+ HTML: false,
1909
+ // indentation unit
1910
+ indentChar: " ",
1911
+ // if true, items in a collection, are separated by a \n, else just a space.
1912
+ multiline: true
1913
+ };
1914
+
1915
+ return dump;
1916
+ }());
1917
+
1918
+ // back compat
1919
+ QUnit.jsDump = QUnit.dump;
1920
+
1921
+ // For browser, export only select globals
1922
+ if ( typeof window !== "undefined" ) {
1923
+
1924
+ // Deprecated
1925
+ // Extend assert methods to QUnit and Global scope through Backwards compatibility
1926
+ (function() {
1927
+ var i,
1928
+ assertions = Assert.prototype;
1929
+
1930
+ function applyCurrent( current ) {
1931
+ return function() {
1932
+ var assert = new Assert( QUnit.config.current );
1933
+ current.apply( assert, arguments );
1934
+ };
1935
+ }
1936
+
1937
+ for ( i in assertions ) {
1938
+ QUnit[ i ] = applyCurrent( assertions[ i ] );
1939
+ }
1940
+ })();
1941
+
1942
+ (function() {
1943
+ var i, l,
1944
+ keys = [
1945
+ "test",
1946
+ "module",
1947
+ "expect",
1948
+ "asyncTest",
1949
+ "start",
1950
+ "stop",
1951
+ "ok",
1952
+ "equal",
1953
+ "notEqual",
1954
+ "propEqual",
1955
+ "notPropEqual",
1956
+ "deepEqual",
1957
+ "notDeepEqual",
1958
+ "strictEqual",
1959
+ "notStrictEqual",
1960
+ "throws"
1961
+ ];
1962
+
1963
+ for ( i = 0, l = keys.length; i < l; i++ ) {
1964
+ window[ keys[ i ] ] = QUnit[ keys[ i ] ];
1965
+ }
1966
+ })();
1967
+
1968
+ window.QUnit = QUnit;
1969
+ }
1970
+
1971
+ // For nodejs
1972
+ if ( typeof module !== "undefined" && module && module.exports ) {
1973
+ module.exports = QUnit;
1974
+
1975
+ // For consistency with CommonJS environments' exports
1976
+ module.exports.QUnit = QUnit;
1977
+ }
1978
+
1979
+ // For CommonJS with exports, but without module.exports, like Rhino
1980
+ if ( typeof exports !== "undefined" && exports ) {
1981
+ exports.QUnit = QUnit;
1982
+ }
1983
+
1984
+ // Get a reference to the global object, like window in browsers
1985
+ }( (function() {
1986
+ return this;
1987
+ })() ));
1988
+
1989
+ /*istanbul ignore next */
1990
+ // jscs:disable maximumLineLength
1991
+ /*
1992
+ * Javascript Diff Algorithm
1993
+ * By John Resig (http://ejohn.org/)
1994
+ * Modified by Chu Alan "sprite"
1995
+ *
1996
+ * Released under the MIT license.
1997
+ *
1998
+ * More Info:
1999
+ * http://ejohn.org/projects/javascript-diff-algorithm/
2000
+ *
2001
+ * Usage: QUnit.diff(expected, actual)
2002
+ *
2003
+ * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
2004
+ */
2005
+ QUnit.diff = (function() {
2006
+ var hasOwn = Object.prototype.hasOwnProperty;
2007
+
2008
+ /*jshint eqeqeq:false, eqnull:true */
2009
+ function diff( o, n ) {
2010
+ var i,
2011
+ ns = {},
2012
+ os = {};
2013
+
2014
+ for ( i = 0; i < n.length; i++ ) {
2015
+ if ( !hasOwn.call( ns, n[ i ] ) ) {
2016
+ ns[ n[ i ] ] = {
2017
+ rows: [],
2018
+ o: null
2019
+ };
2020
+ }
2021
+ ns[ n[ i ] ].rows.push( i );
2022
+ }
2023
+
2024
+ for ( i = 0; i < o.length; i++ ) {
2025
+ if ( !hasOwn.call( os, o[ i ] ) ) {
2026
+ os[ o[ i ] ] = {
2027
+ rows: [],
2028
+ n: null
2029
+ };
2030
+ }
2031
+ os[ o[ i ] ].rows.push( i );
2032
+ }
2033
+
2034
+ for ( i in ns ) {
2035
+ if ( hasOwn.call( ns, i ) ) {
2036
+ if ( ns[ i ].rows.length === 1 && hasOwn.call( os, i ) && os[ i ].rows.length === 1 ) {
2037
+ n[ ns[ i ].rows[ 0 ] ] = {
2038
+ text: n[ ns[ i ].rows[ 0 ] ],
2039
+ row: os[ i ].rows[ 0 ]
2040
+ };
2041
+ o[ os[ i ].rows[ 0 ] ] = {
2042
+ text: o[ os[ i ].rows[ 0 ] ],
2043
+ row: ns[ i ].rows[ 0 ]
2044
+ };
2045
+ }
2046
+ }
2047
+ }
2048
+
2049
+ for ( i = 0; i < n.length - 1; i++ ) {
2050
+ if ( n[ i ].text != null && n[ i + 1 ].text == null && n[ i ].row + 1 < o.length && o[ n[ i ].row + 1 ].text == null &&
2051
+ n[ i + 1 ] == o[ n[ i ].row + 1 ] ) {
2052
+
2053
+ n[ i + 1 ] = {
2054
+ text: n[ i + 1 ],
2055
+ row: n[ i ].row + 1
2056
+ };
2057
+ o[ n[ i ].row + 1 ] = {
2058
+ text: o[ n[ i ].row + 1 ],
2059
+ row: i + 1
2060
+ };
2061
+ }
2062
+ }
2063
+
2064
+ for ( i = n.length - 1; i > 0; i-- ) {
2065
+ if ( n[ i ].text != null && n[ i - 1 ].text == null && n[ i ].row > 0 && o[ n[ i ].row - 1 ].text == null &&
2066
+ n[ i - 1 ] == o[ n[ i ].row - 1 ] ) {
2067
+
2068
+ n[ i - 1 ] = {
2069
+ text: n[ i - 1 ],
2070
+ row: n[ i ].row - 1
2071
+ };
2072
+ o[ n[ i ].row - 1 ] = {
2073
+ text: o[ n[ i ].row - 1 ],
2074
+ row: i - 1
2075
+ };
2076
+ }
2077
+ }
2078
+
2079
+ return {
2080
+ o: o,
2081
+ n: n
2082
+ };
2083
+ }
2084
+
2085
+ return function( o, n ) {
2086
+ o = o.replace( /\s+$/, "" );
2087
+ n = n.replace( /\s+$/, "" );
2088
+
2089
+ var i, pre,
2090
+ str = "",
2091
+ out = diff( o === "" ? [] : o.split( /\s+/ ), n === "" ? [] : n.split( /\s+/ ) ),
2092
+ oSpace = o.match( /\s+/g ),
2093
+ nSpace = n.match( /\s+/g );
2094
+
2095
+ if ( oSpace == null ) {
2096
+ oSpace = [ " " ];
2097
+ } else {
2098
+ oSpace.push( " " );
2099
+ }
2100
+
2101
+ if ( nSpace == null ) {
2102
+ nSpace = [ " " ];
2103
+ } else {
2104
+ nSpace.push( " " );
2105
+ }
2106
+
2107
+ if ( out.n.length === 0 ) {
2108
+ for ( i = 0; i < out.o.length; i++ ) {
2109
+ str += "<del>" + out.o[ i ] + oSpace[ i ] + "</del>";
2110
+ }
2111
+ } else {
2112
+ if ( out.n[ 0 ].text == null ) {
2113
+ for ( n = 0; n < out.o.length && out.o[ n ].text == null; n++ ) {
2114
+ str += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
2115
+ }
2116
+ }
2117
+
2118
+ for ( i = 0; i < out.n.length; i++ ) {
2119
+ if ( out.n[ i ].text == null ) {
2120
+ str += "<ins>" + out.n[ i ] + nSpace[ i ] + "</ins>";
2121
+ } else {
2122
+
2123
+ // `pre` initialized at top of scope
2124
+ pre = "";
2125
+
2126
+ for ( n = out.n[ i ].row + 1; n < out.o.length && out.o[ n ].text == null; n++ ) {
2127
+ pre += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
2128
+ }
2129
+ str += " " + out.n[ i ].text + nSpace[ i ] + pre;
2130
+ }
2131
+ }
2132
+ }
2133
+
2134
+ return str;
2135
+ };
2136
+ }());
2137
+ // jscs:enable
2138
+
2139
+ (function() {
2140
+
2141
+ // Deprecated QUnit.init - Ref #530
2142
+ // Re-initialize the configuration options
2143
+ QUnit.init = function() {
2144
+ var tests, banner, result, qunit,
2145
+ config = QUnit.config;
2146
+
2147
+ config.stats = { all: 0, bad: 0 };
2148
+ config.moduleStats = { all: 0, bad: 0 };
2149
+ config.started = 0;
2150
+ config.updateRate = 1000;
2151
+ config.blocking = false;
2152
+ config.autostart = true;
2153
+ config.autorun = false;
2154
+ config.filter = "";
2155
+ config.queue = [];
2156
+
2157
+ // Return on non-browser environments
2158
+ // This is necessary to not break on node tests
2159
+ if ( typeof window === "undefined" ) {
2160
+ return;
2161
+ }
2162
+
2163
+ qunit = id( "qunit" );
2164
+ if ( qunit ) {
2165
+ qunit.innerHTML =
2166
+ "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
2167
+ "<h2 id='qunit-banner'></h2>" +
2168
+ "<div id='qunit-testrunner-toolbar'></div>" +
2169
+ "<h2 id='qunit-userAgent'></h2>" +
2170
+ "<ol id='qunit-tests'></ol>";
2171
+ }
2172
+
2173
+ tests = id( "qunit-tests" );
2174
+ banner = id( "qunit-banner" );
2175
+ result = id( "qunit-testresult" );
2176
+
2177
+ if ( tests ) {
2178
+ tests.innerHTML = "";
2179
+ }
2180
+
2181
+ if ( banner ) {
2182
+ banner.className = "";
2183
+ }
2184
+
2185
+ if ( result ) {
2186
+ result.parentNode.removeChild( result );
2187
+ }
2188
+
2189
+ if ( tests ) {
2190
+ result = document.createElement( "p" );
2191
+ result.id = "qunit-testresult";
2192
+ result.className = "result";
2193
+ tests.parentNode.insertBefore( result, tests );
2194
+ result.innerHTML = "Running...<br />&#160;";
2195
+ }
2196
+ };
2197
+
2198
+ // Don't load the HTML Reporter on non-Browser environments
2199
+ if ( typeof window === "undefined" ) {
2200
+ return;
2201
+ }
2202
+
2203
+ var config = QUnit.config,
2204
+ hasOwn = Object.prototype.hasOwnProperty,
2205
+ defined = {
2206
+ document: window.document !== undefined,
2207
+ sessionStorage: (function() {
2208
+ var x = "qunit-test-string";
2209
+ try {
2210
+ sessionStorage.setItem( x, x );
2211
+ sessionStorage.removeItem( x );
2212
+ return true;
2213
+ } catch ( e ) {
2214
+ return false;
2215
+ }
2216
+ }())
2217
+ },
2218
+ modulesList = [];
2219
+
2220
+ /**
2221
+ * Escape text for attribute or text content.
2222
+ */
2223
+ function escapeText( s ) {
2224
+ if ( !s ) {
2225
+ return "";
2226
+ }
2227
+ s = s + "";
2228
+
2229
+ // Both single quotes and double quotes (for attributes)
2230
+ return s.replace( /['"<>&]/g, function( s ) {
2231
+ switch ( s ) {
2232
+ case "'":
2233
+ return "&#039;";
2234
+ case "\"":
2235
+ return "&quot;";
2236
+ case "<":
2237
+ return "&lt;";
2238
+ case ">":
2239
+ return "&gt;";
2240
+ case "&":
2241
+ return "&amp;";
2242
+ }
2243
+ });
2244
+ }
2245
+
2246
+ /**
2247
+ * @param {HTMLElement} elem
2248
+ * @param {string} type
2249
+ * @param {Function} fn
2250
+ */
2251
+ function addEvent( elem, type, fn ) {
2252
+ if ( elem.addEventListener ) {
2253
+
2254
+ // Standards-based browsers
2255
+ elem.addEventListener( type, fn, false );
2256
+ } else if ( elem.attachEvent ) {
2257
+
2258
+ // support: IE <9
2259
+ elem.attachEvent( "on" + type, fn );
2260
+ }
2261
+ }
2262
+
2263
+ /**
2264
+ * @param {Array|NodeList} elems
2265
+ * @param {string} type
2266
+ * @param {Function} fn
2267
+ */
2268
+ function addEvents( elems, type, fn ) {
2269
+ var i = elems.length;
2270
+ while ( i-- ) {
2271
+ addEvent( elems[ i ], type, fn );
2272
+ }
2273
+ }
2274
+
2275
+ function hasClass( elem, name ) {
2276
+ return ( " " + elem.className + " " ).indexOf( " " + name + " " ) >= 0;
2277
+ }
2278
+
2279
+ function addClass( elem, name ) {
2280
+ if ( !hasClass( elem, name ) ) {
2281
+ elem.className += ( elem.className ? " " : "" ) + name;
2282
+ }
2283
+ }
2284
+
2285
+ function toggleClass( elem, name ) {
2286
+ if ( hasClass( elem, name ) ) {
2287
+ removeClass( elem, name );
2288
+ } else {
2289
+ addClass( elem, name );
2290
+ }
2291
+ }
2292
+
2293
+ function removeClass( elem, name ) {
2294
+ var set = " " + elem.className + " ";
2295
+
2296
+ // Class name may appear multiple times
2297
+ while ( set.indexOf( " " + name + " " ) >= 0 ) {
2298
+ set = set.replace( " " + name + " ", " " );
2299
+ }
2300
+
2301
+ // trim for prettiness
2302
+ elem.className = typeof set.trim === "function" ? set.trim() : set.replace( /^\s+|\s+$/g, "" );
2303
+ }
2304
+
2305
+ function id( name ) {
2306
+ return defined.document && document.getElementById && document.getElementById( name );
2307
+ }
2308
+
2309
+ function getUrlConfigHtml() {
2310
+ var i, j, val,
2311
+ escaped, escapedTooltip,
2312
+ selection = false,
2313
+ len = config.urlConfig.length,
2314
+ urlConfigHtml = "";
2315
+
2316
+ for ( i = 0; i < len; i++ ) {
2317
+ val = config.urlConfig[ i ];
2318
+ if ( typeof val === "string" ) {
2319
+ val = {
2320
+ id: val,
2321
+ label: val
2322
+ };
2323
+ }
2324
+
2325
+ escaped = escapeText( val.id );
2326
+ escapedTooltip = escapeText( val.tooltip );
2327
+
2328
+ if ( config[ val.id ] === undefined ) {
2329
+ config[ val.id ] = QUnit.urlParams[ val.id ];
2330
+ }
2331
+
2332
+ if ( !val.value || typeof val.value === "string" ) {
2333
+ urlConfigHtml += "<input id='qunit-urlconfig-" + escaped +
2334
+ "' name='" + escaped + "' type='checkbox'" +
2335
+ ( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
2336
+ ( config[ val.id ] ? " checked='checked'" : "" ) +
2337
+ " title='" + escapedTooltip + "' /><label for='qunit-urlconfig-" + escaped +
2338
+ "' title='" + escapedTooltip + "'>" + val.label + "</label>";
2339
+ } else {
2340
+ urlConfigHtml += "<label for='qunit-urlconfig-" + escaped +
2341
+ "' title='" + escapedTooltip + "'>" + val.label +
2342
+ ": </label><select id='qunit-urlconfig-" + escaped +
2343
+ "' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
2344
+
2345
+ if ( QUnit.is( "array", val.value ) ) {
2346
+ for ( j = 0; j < val.value.length; j++ ) {
2347
+ escaped = escapeText( val.value[ j ] );
2348
+ urlConfigHtml += "<option value='" + escaped + "'" +
2349
+ ( config[ val.id ] === val.value[ j ] ?
2350
+ ( selection = true ) && " selected='selected'" : "" ) +
2351
+ ">" + escaped + "</option>";
2352
+ }
2353
+ } else {
2354
+ for ( j in val.value ) {
2355
+ if ( hasOwn.call( val.value, j ) ) {
2356
+ urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
2357
+ ( config[ val.id ] === j ?
2358
+ ( selection = true ) && " selected='selected'" : "" ) +
2359
+ ">" + escapeText( val.value[ j ] ) + "</option>";
2360
+ }
2361
+ }
2362
+ }
2363
+ if ( config[ val.id ] && !selection ) {
2364
+ escaped = escapeText( config[ val.id ] );
2365
+ urlConfigHtml += "<option value='" + escaped +
2366
+ "' selected='selected' disabled='disabled'>" + escaped + "</option>";
2367
+ }
2368
+ urlConfigHtml += "</select>";
2369
+ }
2370
+ }
2371
+
2372
+ return urlConfigHtml;
2373
+ }
2374
+
2375
+ // Handle "click" events on toolbar checkboxes and "change" for select menus.
2376
+ // Updates the URL with the new state of `config.urlConfig` values.
2377
+ function toolbarChanged() {
2378
+ var updatedUrl, value,
2379
+ field = this,
2380
+ params = {};
2381
+
2382
+ // Detect if field is a select menu or a checkbox
2383
+ if ( "selectedIndex" in field ) {
2384
+ value = field.options[ field.selectedIndex ].value || undefined;
2385
+ } else {
2386
+ value = field.checked ? ( field.defaultValue || true ) : undefined;
2387
+ }
2388
+
2389
+ params[ field.name ] = value;
2390
+ updatedUrl = setUrl( params );
2391
+
2392
+ if ( "hidepassed" === field.name && "replaceState" in window.history ) {
2393
+ config[ field.name ] = value || false;
2394
+ if ( value ) {
2395
+ addClass( id( "qunit-tests" ), "hidepass" );
2396
+ } else {
2397
+ removeClass( id( "qunit-tests" ), "hidepass" );
2398
+ }
2399
+
2400
+ // It is not necessary to refresh the whole page
2401
+ window.history.replaceState( null, "", updatedUrl );
2402
+ } else {
2403
+ window.location = updatedUrl;
2404
+ }
2405
+ }
2406
+
2407
+ function setUrl( params ) {
2408
+ var key,
2409
+ querystring = "?";
2410
+
2411
+ params = QUnit.extend( QUnit.extend( {}, QUnit.urlParams ), params );
2412
+
2413
+ for ( key in params ) {
2414
+ if ( hasOwn.call( params, key ) ) {
2415
+ if ( params[ key ] === undefined ) {
2416
+ continue;
2417
+ }
2418
+ querystring += encodeURIComponent( key );
2419
+ if ( params[ key ] !== true ) {
2420
+ querystring += "=" + encodeURIComponent( params[ key ] );
2421
+ }
2422
+ querystring += "&";
2423
+ }
2424
+ }
2425
+ return location.protocol + "//" + location.host +
2426
+ location.pathname + querystring.slice( 0, -1 );
2427
+ }
2428
+
2429
+ function applyUrlParams() {
2430
+ var selectBox = id( "qunit-modulefilter" ),
2431
+ selection = decodeURIComponent( selectBox.options[ selectBox.selectedIndex ].value ),
2432
+ filter = id( "qunit-filter-input" ).value;
2433
+
2434
+ window.location = setUrl({
2435
+ module: ( selection === "" ) ? undefined : selection,
2436
+ filter: ( filter === "" ) ? undefined : filter,
2437
+
2438
+ // Remove testId filter
2439
+ testId: undefined
2440
+ });
2441
+ }
2442
+
2443
+ function toolbarUrlConfigContainer() {
2444
+ var urlConfigContainer = document.createElement( "span" );
2445
+
2446
+ urlConfigContainer.innerHTML = getUrlConfigHtml();
2447
+ addClass( urlConfigContainer, "qunit-url-config" );
2448
+
2449
+ // For oldIE support:
2450
+ // * Add handlers to the individual elements instead of the container
2451
+ // * Use "click" instead of "change" for checkboxes
2452
+ addEvents( urlConfigContainer.getElementsByTagName( "input" ), "click", toolbarChanged );
2453
+ addEvents( urlConfigContainer.getElementsByTagName( "select" ), "change", toolbarChanged );
2454
+
2455
+ return urlConfigContainer;
2456
+ }
2457
+
2458
+ function toolbarLooseFilter() {
2459
+ var filter = document.createElement( "form" ),
2460
+ label = document.createElement( "label" ),
2461
+ input = document.createElement( "input" ),
2462
+ button = document.createElement( "button" );
2463
+
2464
+ addClass( filter, "qunit-filter" );
2465
+
2466
+ label.innerHTML = "Filter: ";
2467
+
2468
+ input.type = "text";
2469
+ input.value = config.filter || "";
2470
+ input.name = "filter";
2471
+ input.id = "qunit-filter-input";
2472
+
2473
+ button.innerHTML = "Go";
2474
+
2475
+ label.appendChild( input );
2476
+
2477
+ filter.appendChild( label );
2478
+ filter.appendChild( button );
2479
+ addEvent( filter, "submit", function( ev ) {
2480
+ applyUrlParams();
2481
+
2482
+ if ( ev && ev.preventDefault ) {
2483
+ ev.preventDefault();
2484
+ }
2485
+
2486
+ return false;
2487
+ });
2488
+
2489
+ return filter;
2490
+ }
2491
+
2492
+ function toolbarModuleFilterHtml() {
2493
+ var i,
2494
+ moduleFilterHtml = "";
2495
+
2496
+ if ( !modulesList.length ) {
2497
+ return false;
2498
+ }
2499
+
2500
+ modulesList.sort(function( a, b ) {
2501
+ return a.localeCompare( b );
2502
+ });
2503
+
2504
+ moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label>" +
2505
+ "<select id='qunit-modulefilter' name='modulefilter'><option value='' " +
2506
+ ( QUnit.urlParams.module === undefined ? "selected='selected'" : "" ) +
2507
+ ">< All Modules ></option>";
2508
+
2509
+ for ( i = 0; i < modulesList.length; i++ ) {
2510
+ moduleFilterHtml += "<option value='" +
2511
+ escapeText( encodeURIComponent( modulesList[ i ] ) ) + "' " +
2512
+ ( QUnit.urlParams.module === modulesList[ i ] ? "selected='selected'" : "" ) +
2513
+ ">" + escapeText( modulesList[ i ] ) + "</option>";
2514
+ }
2515
+ moduleFilterHtml += "</select>";
2516
+
2517
+ return moduleFilterHtml;
2518
+ }
2519
+
2520
+ function toolbarModuleFilter() {
2521
+ var toolbar = id( "qunit-testrunner-toolbar" ),
2522
+ moduleFilter = document.createElement( "span" ),
2523
+ moduleFilterHtml = toolbarModuleFilterHtml();
2524
+
2525
+ if ( !toolbar || !moduleFilterHtml ) {
2526
+ return false;
2527
+ }
2528
+
2529
+ moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
2530
+ moduleFilter.innerHTML = moduleFilterHtml;
2531
+
2532
+ addEvent( moduleFilter.lastChild, "change", applyUrlParams );
2533
+
2534
+ toolbar.appendChild( moduleFilter );
2535
+ }
2536
+
2537
+ function appendToolbar() {
2538
+ var toolbar = id( "qunit-testrunner-toolbar" );
2539
+
2540
+ if ( toolbar ) {
2541
+ toolbar.appendChild( toolbarUrlConfigContainer() );
2542
+ toolbar.appendChild( toolbarLooseFilter() );
2543
+ }
2544
+ }
2545
+
2546
+ function appendHeader() {
2547
+ var header = id( "qunit-header" );
2548
+
2549
+ if ( header ) {
2550
+ header.innerHTML = "<a href='" +
2551
+ setUrl({ filter: undefined, module: undefined, testId: undefined }) +
2552
+ "'>" + header.innerHTML + "</a> ";
2553
+ }
2554
+ }
2555
+
2556
+ function appendBanner() {
2557
+ var banner = id( "qunit-banner" );
2558
+
2559
+ if ( banner ) {
2560
+ banner.className = "";
2561
+ }
2562
+ }
2563
+
2564
+ function appendTestResults() {
2565
+ var tests = id( "qunit-tests" ),
2566
+ result = id( "qunit-testresult" );
2567
+
2568
+ if ( result ) {
2569
+ result.parentNode.removeChild( result );
2570
+ }
2571
+
2572
+ if ( tests ) {
2573
+ tests.innerHTML = "";
2574
+ result = document.createElement( "p" );
2575
+ result.id = "qunit-testresult";
2576
+ result.className = "result";
2577
+ tests.parentNode.insertBefore( result, tests );
2578
+ result.innerHTML = "Running...<br />&#160;";
2579
+ }
2580
+ }
2581
+
2582
+ function storeFixture() {
2583
+ var fixture = id( "qunit-fixture" );
2584
+ if ( fixture ) {
2585
+ config.fixture = fixture.innerHTML;
2586
+ }
2587
+ }
2588
+
2589
+ function appendUserAgent() {
2590
+ var userAgent = id( "qunit-userAgent" );
2591
+ if ( userAgent ) {
2592
+ userAgent.innerHTML = "";
2593
+ userAgent.appendChild( document.createTextNode( navigator.userAgent ) );
2594
+ }
2595
+ }
2596
+
2597
+ function appendTestsList( modules ) {
2598
+ var i, l, x, z, test, moduleObj;
2599
+
2600
+ for ( i = 0, l = modules.length; i < l; i++ ) {
2601
+ moduleObj = modules[ i ];
2602
+
2603
+ if ( moduleObj.name ) {
2604
+ modulesList.push( moduleObj.name );
2605
+ }
2606
+
2607
+ for ( x = 0, z = moduleObj.tests.length; x < z; x++ ) {
2608
+ test = moduleObj.tests[ x ];
2609
+
2610
+ appendTest( test.name, test.testId, moduleObj.name );
2611
+ }
2612
+ }
2613
+ }
2614
+
2615
+ function appendTest( name, testId, moduleName ) {
2616
+ var title, rerunTrigger, testBlock, assertList,
2617
+ tests = id( "qunit-tests" );
2618
+
2619
+ if ( !tests ) {
2620
+ return;
2621
+ }
2622
+
2623
+ title = document.createElement( "strong" );
2624
+ title.innerHTML = getNameHtml( name, moduleName );
2625
+
2626
+ rerunTrigger = document.createElement( "a" );
2627
+ rerunTrigger.innerHTML = "Rerun";
2628
+ rerunTrigger.href = setUrl({ testId: testId });
2629
+
2630
+ testBlock = document.createElement( "li" );
2631
+ testBlock.appendChild( title );
2632
+ testBlock.appendChild( rerunTrigger );
2633
+ testBlock.id = "qunit-test-output-" + testId;
2634
+
2635
+ assertList = document.createElement( "ol" );
2636
+ assertList.className = "qunit-assert-list";
2637
+
2638
+ testBlock.appendChild( assertList );
2639
+
2640
+ tests.appendChild( testBlock );
2641
+ }
2642
+
2643
+ // HTML Reporter initialization and load
2644
+ QUnit.begin(function( details ) {
2645
+ var qunit = id( "qunit" );
2646
+
2647
+ // Fixture is the only one necessary to run without the #qunit element
2648
+ storeFixture();
2649
+
2650
+ if ( qunit ) {
2651
+ qunit.innerHTML =
2652
+ "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
2653
+ "<h2 id='qunit-banner'></h2>" +
2654
+ "<div id='qunit-testrunner-toolbar'></div>" +
2655
+ "<h2 id='qunit-userAgent'></h2>" +
2656
+ "<ol id='qunit-tests'></ol>";
2657
+ }
2658
+
2659
+ appendHeader();
2660
+ appendBanner();
2661
+ appendTestResults();
2662
+ appendUserAgent();
2663
+ appendToolbar();
2664
+ appendTestsList( details.modules );
2665
+ toolbarModuleFilter();
2666
+
2667
+ if ( qunit && config.hidepassed ) {
2668
+ addClass( qunit.lastChild, "hidepass" );
2669
+ }
2670
+ });
2671
+
2672
+ QUnit.done(function( details ) {
2673
+ var i, key,
2674
+ banner = id( "qunit-banner" ),
2675
+ tests = id( "qunit-tests" ),
2676
+ html = [
2677
+ "Tests completed in ",
2678
+ details.runtime,
2679
+ " milliseconds.<br />",
2680
+ "<span class='passed'>",
2681
+ details.passed,
2682
+ "</span> assertions of <span class='total'>",
2683
+ details.total,
2684
+ "</span> passed, <span class='failed'>",
2685
+ details.failed,
2686
+ "</span> failed."
2687
+ ].join( "" );
2688
+
2689
+ if ( banner ) {
2690
+ banner.className = details.failed ? "qunit-fail" : "qunit-pass";
2691
+ }
2692
+
2693
+ if ( tests ) {
2694
+ id( "qunit-testresult" ).innerHTML = html;
2695
+ }
2696
+
2697
+ if ( config.altertitle && defined.document && document.title ) {
2698
+
2699
+ // show ✖ for good, ✔ for bad suite result in title
2700
+ // use escape sequences in case file gets loaded with non-utf-8-charset
2701
+ document.title = [
2702
+ ( details.failed ? "\u2716" : "\u2714" ),
2703
+ document.title.replace( /^[\u2714\u2716] /i, "" )
2704
+ ].join( " " );
2705
+ }
2706
+
2707
+ // clear own sessionStorage items if all tests passed
2708
+ if ( config.reorder && defined.sessionStorage && details.failed === 0 ) {
2709
+ for ( i = 0; i < sessionStorage.length; i++ ) {
2710
+ key = sessionStorage.key( i++ );
2711
+ if ( key.indexOf( "qunit-test-" ) === 0 ) {
2712
+ sessionStorage.removeItem( key );
2713
+ }
2714
+ }
2715
+ }
2716
+
2717
+ // scroll back to top to show results
2718
+ if ( config.scrolltop && window.scrollTo ) {
2719
+ window.scrollTo( 0, 0 );
2720
+ }
2721
+ });
2722
+
2723
+ function getNameHtml( name, module ) {
2724
+ var nameHtml = "";
2725
+
2726
+ if ( module ) {
2727
+ nameHtml = "<span class='module-name'>" + escapeText( module ) + "</span>: ";
2728
+ }
2729
+
2730
+ nameHtml += "<span class='test-name'>" + escapeText( name ) + "</span>";
2731
+
2732
+ return nameHtml;
2733
+ }
2734
+
2735
+ QUnit.testStart(function( details ) {
2736
+ var running, testBlock;
2737
+
2738
+ testBlock = id( "qunit-test-output-" + details.testId );
2739
+ if ( testBlock ) {
2740
+ testBlock.className = "running";
2741
+ } else {
2742
+
2743
+ // Report later registered tests
2744
+ appendTest( details.name, details.testId, details.module );
2745
+ }
2746
+
2747
+ running = id( "qunit-testresult" );
2748
+ if ( running ) {
2749
+ running.innerHTML = "Running: <br />" + getNameHtml( details.name, details.module );
2750
+ }
2751
+
2752
+ });
2753
+
2754
+ QUnit.log(function( details ) {
2755
+ var assertList, assertLi,
2756
+ message, expected, actual,
2757
+ testItem = id( "qunit-test-output-" + details.testId );
2758
+
2759
+ if ( !testItem ) {
2760
+ return;
2761
+ }
2762
+
2763
+ message = escapeText( details.message ) || ( details.result ? "okay" : "failed" );
2764
+ message = "<span class='test-message'>" + message + "</span>";
2765
+ message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
2766
+
2767
+ // pushFailure doesn't provide details.expected
2768
+ // when it calls, it's implicit to also not show expected and diff stuff
2769
+ // Also, we need to check details.expected existence, as it can exist and be undefined
2770
+ if ( !details.result && hasOwn.call( details, "expected" ) ) {
2771
+ expected = escapeText( QUnit.dump.parse( details.expected ) );
2772
+ actual = escapeText( QUnit.dump.parse( details.actual ) );
2773
+ message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" +
2774
+ expected +
2775
+ "</pre></td></tr>";
2776
+
2777
+ if ( actual !== expected ) {
2778
+ message += "<tr class='test-actual'><th>Result: </th><td><pre>" +
2779
+ actual + "</pre></td></tr>" +
2780
+ "<tr class='test-diff'><th>Diff: </th><td><pre>" +
2781
+ QUnit.diff( expected, actual ) + "</pre></td></tr>";
2782
+ }
2783
+
2784
+ if ( details.source ) {
2785
+ message += "<tr class='test-source'><th>Source: </th><td><pre>" +
2786
+ escapeText( details.source ) + "</pre></td></tr>";
2787
+ }
2788
+
2789
+ message += "</table>";
2790
+
2791
+ // this occours when pushFailure is set and we have an extracted stack trace
2792
+ } else if ( !details.result && details.source ) {
2793
+ message += "<table>" +
2794
+ "<tr class='test-source'><th>Source: </th><td><pre>" +
2795
+ escapeText( details.source ) + "</pre></td></tr>" +
2796
+ "</table>";
2797
+ }
2798
+
2799
+ assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
2800
+
2801
+ assertLi = document.createElement( "li" );
2802
+ assertLi.className = details.result ? "pass" : "fail";
2803
+ assertLi.innerHTML = message;
2804
+ assertList.appendChild( assertLi );
2805
+ });
2806
+
2807
+ QUnit.testDone(function( details ) {
2808
+ var testTitle, time, testItem, assertList,
2809
+ good, bad, testCounts, skipped,
2810
+ tests = id( "qunit-tests" );
2811
+
2812
+ if ( !tests ) {
2813
+ return;
2814
+ }
2815
+
2816
+ testItem = id( "qunit-test-output-" + details.testId );
2817
+
2818
+ assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
2819
+
2820
+ good = details.passed;
2821
+ bad = details.failed;
2822
+
2823
+ // store result when possible
2824
+ if ( config.reorder && defined.sessionStorage ) {
2825
+ if ( bad ) {
2826
+ sessionStorage.setItem( "qunit-test-" + details.module + "-" + details.name, bad );
2827
+ } else {
2828
+ sessionStorage.removeItem( "qunit-test-" + details.module + "-" + details.name );
2829
+ }
2830
+ }
2831
+
2832
+ if ( bad === 0 ) {
2833
+ addClass( assertList, "qunit-collapsed" );
2834
+ }
2835
+
2836
+ // testItem.firstChild is the test name
2837
+ testTitle = testItem.firstChild;
2838
+
2839
+ testCounts = bad ?
2840
+ "<b class='failed'>" + bad + "</b>, " + "<b class='passed'>" + good + "</b>, " :
2841
+ "";
2842
+
2843
+ testTitle.innerHTML += " <b class='counts'>(" + testCounts +
2844
+ details.assertions.length + ")</b>";
2845
+
2846
+ if ( details.skipped ) {
2847
+ testItem.className = "skipped";
2848
+ skipped = document.createElement( "em" );
2849
+ skipped.className = "qunit-skipped-label";
2850
+ skipped.innerHTML = "skipped";
2851
+ testItem.insertBefore( skipped, testTitle );
2852
+ } else {
2853
+ addEvent( testTitle, "click", function() {
2854
+ toggleClass( assertList, "qunit-collapsed" );
2855
+ });
2856
+
2857
+ testItem.className = bad ? "fail" : "pass";
2858
+
2859
+ time = document.createElement( "span" );
2860
+ time.className = "runtime";
2861
+ time.innerHTML = details.runtime + " ms";
2862
+ testItem.insertBefore( time, assertList );
2863
+ }
2864
+ });
2865
+
2866
+ if ( !defined.document || document.readyState === "complete" ) {
2867
+ config.pageLoaded = true;
2868
+ config.autorun = true;
2869
+ }
2870
+
2871
+ if ( defined.document ) {
2872
+ addEvent( window, "load", QUnit.load );
2873
+ }
2874
+
2875
+ })();