fluentd-ui 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd-ui might be problematic. Click here for more details.

Files changed (287) hide show
  1. data/ChangeLog +9 -0
  2. data/Gemfile.lock +47 -44
  3. data/README.md +4 -4
  4. data/app/assets/javascripts/vue/in_tail_format.js +7 -2
  5. data/app/assets/stylesheets/common.css.scss +16 -0
  6. data/app/controllers/concerns/setting_history_concern.rb +6 -0
  7. data/app/controllers/fluentd/settings_controller.rb +37 -8
  8. data/app/models/fluent_gem.rb +6 -3
  9. data/app/models/fluentd/agent.rb +1 -0
  10. data/app/models/fluentd/agent/common.rb +4 -0
  11. data/app/models/fluentd/agent/fluentd_gem.rb +9 -13
  12. data/app/models/fluentd/agent/local_common.rb +23 -0
  13. data/app/models/fluentd/agent/td_agent.rb +4 -0
  14. data/app/models/fluentd/agent/td_agent/macosx.rb +0 -4
  15. data/app/models/fluentd/agent/td_agent/unix.rb +0 -4
  16. data/app/views/fluentd/settings/edit.html.haml +1 -3
  17. data/app/views/fluentd/settings/histories/show.html.haml +10 -0
  18. data/app/views/fluentd/settings/running_backup/show.html.haml +11 -0
  19. data/app/views/shared/settings/_diff.html.erb +21 -0
  20. data/circle.yml +5 -0
  21. data/config/application.rb +1 -0
  22. data/config/locales/translation_en.yml +7 -0
  23. data/config/locales/translation_ja.yml +7 -0
  24. data/fluentd-ui.gemspec +1 -0
  25. data/lib/fluentd-ui.rb +5 -1
  26. data/lib/fluentd-ui/version.rb +1 -1
  27. data/spec/features/fluentd/setting/histories_spec.rb +23 -1
  28. data/spec/features/fluentd/setting/running_backup_spec.rb +22 -1
  29. data/spec/models/fluentd/agent/local_common_spec.rb +4 -2
  30. data/spec/models/fluentd/agent_spec.rb +1 -48
  31. data/spec/models/plugin_spec.rb +2 -2
  32. data/spec/spec_helper.rb +10 -0
  33. data/spec/support/fluentd_agent_common_behavior.rb +53 -0
  34. data/vendor/assets/javascripts/bower/.gitignore +10 -0
  35. data/vendor/assets/javascripts/bower/vue/.bower.json +4 -4
  36. data/vendor/assets/javascripts/bower/vue/bower.json +17 -0
  37. data/vendor/assets/javascripts/bower/vue/dist/vue.js +329 -198
  38. data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +3 -3
  39. metadata +107 -291
  40. checksums.yaml +0 -7
  41. data/vendor/assets/javascripts/bower/codemirror/AUTHORS +0 -423
  42. data/vendor/assets/javascripts/bower/codemirror/CONTRIBUTING.md +0 -76
  43. data/vendor/assets/javascripts/bower/codemirror/LICENSE +0 -19
  44. data/vendor/assets/javascripts/bower/codemirror/README.md +0 -11
  45. data/vendor/assets/javascripts/bower/codemirror/addon/comment/comment.js +0 -183
  46. data/vendor/assets/javascripts/bower/codemirror/addon/comment/continuecomment.js +0 -85
  47. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.css +0 -32
  48. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.js +0 -155
  49. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.css +0 -6
  50. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.js +0 -41
  51. data/vendor/assets/javascripts/bower/codemirror/addon/display/panel.js +0 -94
  52. data/vendor/assets/javascripts/bower/codemirror/addon/display/placeholder.js +0 -58
  53. data/vendor/assets/javascripts/bower/codemirror/addon/display/rulers.js +0 -64
  54. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closebrackets.js +0 -159
  55. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closetag.js +0 -159
  56. data/vendor/assets/javascripts/bower/codemirror/addon/edit/continuelist.js +0 -51
  57. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchbrackets.js +0 -120
  58. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchtags.js +0 -66
  59. data/vendor/assets/javascripts/bower/codemirror/addon/edit/trailingspace.js +0 -27
  60. data/vendor/assets/javascripts/bower/codemirror/addon/fold/brace-fold.js +0 -105
  61. data/vendor/assets/javascripts/bower/codemirror/addon/fold/comment-fold.js +0 -57
  62. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldcode.js +0 -145
  63. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.css +0 -20
  64. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.js +0 -134
  65. data/vendor/assets/javascripts/bower/codemirror/addon/fold/indent-fold.js +0 -44
  66. data/vendor/assets/javascripts/bower/codemirror/addon/fold/markdown-fold.js +0 -49
  67. data/vendor/assets/javascripts/bower/codemirror/addon/fold/xml-fold.js +0 -182
  68. data/vendor/assets/javascripts/bower/codemirror/addon/hint/anyword-hint.js +0 -41
  69. data/vendor/assets/javascripts/bower/codemirror/addon/hint/css-hint.js +0 -56
  70. data/vendor/assets/javascripts/bower/codemirror/addon/hint/html-hint.js +0 -348
  71. data/vendor/assets/javascripts/bower/codemirror/addon/hint/javascript-hint.js +0 -146
  72. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.css +0 -38
  73. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.js +0 -389
  74. data/vendor/assets/javascripts/bower/codemirror/addon/hint/sql-hint.js +0 -197
  75. data/vendor/assets/javascripts/bower/codemirror/addon/hint/xml-hint.js +0 -110
  76. data/vendor/assets/javascripts/bower/codemirror/addon/lint/coffeescript-lint.js +0 -41
  77. data/vendor/assets/javascripts/bower/codemirror/addon/lint/css-lint.js +0 -35
  78. data/vendor/assets/javascripts/bower/codemirror/addon/lint/javascript-lint.js +0 -136
  79. data/vendor/assets/javascripts/bower/codemirror/addon/lint/json-lint.js +0 -31
  80. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.css +0 -73
  81. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.js +0 -204
  82. data/vendor/assets/javascripts/bower/codemirror/addon/lint/yaml-lint.js +0 -28
  83. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.css +0 -112
  84. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.js +0 -643
  85. data/vendor/assets/javascripts/bower/codemirror/addon/mode/loadmode.js +0 -64
  86. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex.js +0 -118
  87. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex_test.js +0 -33
  88. data/vendor/assets/javascripts/bower/codemirror/addon/mode/overlay.js +0 -85
  89. data/vendor/assets/javascripts/bower/codemirror/addon/mode/simple.js +0 -213
  90. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/colorize.js +0 -40
  91. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode-standalone.js +0 -157
  92. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.js +0 -72
  93. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.node.js +0 -120
  94. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/annotatescrollbar.js +0 -76
  95. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/scrollpastend.js +0 -46
  96. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.css +0 -66
  97. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.js +0 -139
  98. data/vendor/assets/javascripts/bower/codemirror/addon/search/match-highlighter.js +0 -128
  99. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.css +0 -8
  100. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.js +0 -90
  101. data/vendor/assets/javascripts/bower/codemirror/addon/search/search.js +0 -164
  102. data/vendor/assets/javascripts/bower/codemirror/addon/search/searchcursor.js +0 -189
  103. data/vendor/assets/javascripts/bower/codemirror/addon/selection/active-line.js +0 -71
  104. data/vendor/assets/javascripts/bower/codemirror/addon/selection/mark-selection.js +0 -118
  105. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.css +0 -86
  106. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.js +0 -670
  107. data/vendor/assets/javascripts/bower/codemirror/addon/tern/worker.js +0 -44
  108. data/vendor/assets/javascripts/bower/codemirror/addon/wrap/hardwrap.js +0 -139
  109. data/vendor/assets/javascripts/bower/codemirror/keymap/emacs.js +0 -411
  110. data/vendor/assets/javascripts/bower/codemirror/keymap/sublime.js +0 -540
  111. data/vendor/assets/javascripts/bower/codemirror/keymap/vim.js +0 -4901
  112. data/vendor/assets/javascripts/bower/codemirror/mode/apl/apl.js +0 -175
  113. data/vendor/assets/javascripts/bower/codemirror/mode/asterisk/asterisk.js +0 -198
  114. data/vendor/assets/javascripts/bower/codemirror/mode/clike/clike.js +0 -489
  115. data/vendor/assets/javascripts/bower/codemirror/mode/clike/scala.html +0 -767
  116. data/vendor/assets/javascripts/bower/codemirror/mode/clojure/clojure.js +0 -243
  117. data/vendor/assets/javascripts/bower/codemirror/mode/cobol/cobol.js +0 -255
  118. data/vendor/assets/javascripts/bower/codemirror/mode/coffeescript/coffeescript.js +0 -369
  119. data/vendor/assets/javascripts/bower/codemirror/mode/commonlisp/commonlisp.js +0 -122
  120. data/vendor/assets/javascripts/bower/codemirror/mode/css/css.js +0 -717
  121. data/vendor/assets/javascripts/bower/codemirror/mode/css/less.html +0 -152
  122. data/vendor/assets/javascripts/bower/codemirror/mode/css/less_test.js +0 -51
  123. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss.html +0 -157
  124. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss_test.js +0 -110
  125. data/vendor/assets/javascripts/bower/codemirror/mode/css/test.js +0 -135
  126. data/vendor/assets/javascripts/bower/codemirror/mode/cypher/cypher.js +0 -146
  127. data/vendor/assets/javascripts/bower/codemirror/mode/d/d.js +0 -218
  128. data/vendor/assets/javascripts/bower/codemirror/mode/dart/dart.js +0 -50
  129. data/vendor/assets/javascripts/bower/codemirror/mode/diff/diff.js +0 -47
  130. data/vendor/assets/javascripts/bower/codemirror/mode/django/django.js +0 -67
  131. data/vendor/assets/javascripts/bower/codemirror/mode/dockerfile/dockerfile.js +0 -76
  132. data/vendor/assets/javascripts/bower/codemirror/mode/dtd/dtd.js +0 -142
  133. data/vendor/assets/javascripts/bower/codemirror/mode/dylan/dylan.js +0 -299
  134. data/vendor/assets/javascripts/bower/codemirror/mode/ebnf/ebnf.js +0 -195
  135. data/vendor/assets/javascripts/bower/codemirror/mode/ecl/ecl.js +0 -207
  136. data/vendor/assets/javascripts/bower/codemirror/mode/eiffel/eiffel.js +0 -162
  137. data/vendor/assets/javascripts/bower/codemirror/mode/erlang/erlang.js +0 -622
  138. data/vendor/assets/javascripts/bower/codemirror/mode/fortran/fortran.js +0 -188
  139. data/vendor/assets/javascripts/bower/codemirror/mode/gas/gas.js +0 -345
  140. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/gfm.js +0 -123
  141. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/test.js +0 -213
  142. data/vendor/assets/javascripts/bower/codemirror/mode/gherkin/gherkin.js +0 -178
  143. data/vendor/assets/javascripts/bower/codemirror/mode/go/go.js +0 -184
  144. data/vendor/assets/javascripts/bower/codemirror/mode/groovy/groovy.js +0 -226
  145. data/vendor/assets/javascripts/bower/codemirror/mode/haml/haml.js +0 -159
  146. data/vendor/assets/javascripts/bower/codemirror/mode/haml/test.js +0 -97
  147. data/vendor/assets/javascripts/bower/codemirror/mode/haskell/haskell.js +0 -267
  148. data/vendor/assets/javascripts/bower/codemirror/mode/haxe/haxe.js +0 -518
  149. data/vendor/assets/javascripts/bower/codemirror/mode/htmlembedded/htmlembedded.js +0 -86
  150. data/vendor/assets/javascripts/bower/codemirror/mode/htmlmixed/htmlmixed.js +0 -121
  151. data/vendor/assets/javascripts/bower/codemirror/mode/http/http.js +0 -113
  152. data/vendor/assets/javascripts/bower/codemirror/mode/idl/idl.js +0 -290
  153. data/vendor/assets/javascripts/bower/codemirror/mode/jade/jade.js +0 -590
  154. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/javascript.js +0 -686
  155. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/json-ld.html +0 -72
  156. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/test.js +0 -200
  157. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/typescript.html +0 -61
  158. data/vendor/assets/javascripts/bower/codemirror/mode/jinja2/jinja2.js +0 -142
  159. data/vendor/assets/javascripts/bower/codemirror/mode/julia/julia.js +0 -301
  160. data/vendor/assets/javascripts/bower/codemirror/mode/kotlin/kotlin.js +0 -280
  161. data/vendor/assets/javascripts/bower/codemirror/mode/livescript/livescript.js +0 -280
  162. data/vendor/assets/javascripts/bower/codemirror/mode/lua/lua.js +0 -159
  163. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/markdown.js +0 -765
  164. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/test.js +0 -754
  165. data/vendor/assets/javascripts/bower/codemirror/mode/meta.js +0 -165
  166. data/vendor/assets/javascripts/bower/codemirror/mode/mirc/mirc.js +0 -193
  167. data/vendor/assets/javascripts/bower/codemirror/mode/mllike/mllike.js +0 -205
  168. data/vendor/assets/javascripts/bower/codemirror/mode/modelica/modelica.js +0 -245
  169. data/vendor/assets/javascripts/bower/codemirror/mode/nginx/nginx.js +0 -178
  170. data/vendor/assets/javascripts/bower/codemirror/mode/ntriples/ntriples.js +0 -186
  171. data/vendor/assets/javascripts/bower/codemirror/mode/octave/octave.js +0 -135
  172. data/vendor/assets/javascripts/bower/codemirror/mode/pascal/pascal.js +0 -109
  173. data/vendor/assets/javascripts/bower/codemirror/mode/pegjs/pegjs.js +0 -114
  174. data/vendor/assets/javascripts/bower/codemirror/mode/perl/perl.js +0 -832
  175. data/vendor/assets/javascripts/bower/codemirror/mode/php/php.js +0 -226
  176. data/vendor/assets/javascripts/bower/codemirror/mode/php/test.js +0 -154
  177. data/vendor/assets/javascripts/bower/codemirror/mode/pig/pig.js +0 -188
  178. data/vendor/assets/javascripts/bower/codemirror/mode/properties/properties.js +0 -78
  179. data/vendor/assets/javascripts/bower/codemirror/mode/puppet/puppet.js +0 -220
  180. data/vendor/assets/javascripts/bower/codemirror/mode/python/python.js +0 -359
  181. data/vendor/assets/javascripts/bower/codemirror/mode/q/q.js +0 -139
  182. data/vendor/assets/javascripts/bower/codemirror/mode/r/r.js +0 -162
  183. data/vendor/assets/javascripts/bower/codemirror/mode/rpm/rpm.js +0 -101
  184. data/vendor/assets/javascripts/bower/codemirror/mode/rst/rst.js +0 -557
  185. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/ruby.js +0 -285
  186. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/test.js +0 -14
  187. data/vendor/assets/javascripts/bower/codemirror/mode/rust/rust.js +0 -451
  188. data/vendor/assets/javascripts/bower/codemirror/mode/sass/sass.js +0 -327
  189. data/vendor/assets/javascripts/bower/codemirror/mode/scheme/scheme.js +0 -248
  190. data/vendor/assets/javascripts/bower/codemirror/mode/shell/shell.js +0 -139
  191. data/vendor/assets/javascripts/bower/codemirror/mode/shell/test.js +0 -58
  192. data/vendor/assets/javascripts/bower/codemirror/mode/sieve/sieve.js +0 -193
  193. data/vendor/assets/javascripts/bower/codemirror/mode/slim/slim.js +0 -575
  194. data/vendor/assets/javascripts/bower/codemirror/mode/slim/test.js +0 -96
  195. data/vendor/assets/javascripts/bower/codemirror/mode/smalltalk/smalltalk.js +0 -168
  196. data/vendor/assets/javascripts/bower/codemirror/mode/smarty/smarty.js +0 -221
  197. data/vendor/assets/javascripts/bower/codemirror/mode/smartymixed/smartymixed.js +0 -197
  198. data/vendor/assets/javascripts/bower/codemirror/mode/solr/solr.js +0 -104
  199. data/vendor/assets/javascripts/bower/codemirror/mode/soy/soy.js +0 -198
  200. data/vendor/assets/javascripts/bower/codemirror/mode/sparql/sparql.js +0 -174
  201. data/vendor/assets/javascripts/bower/codemirror/mode/spreadsheet/spreadsheet.js +0 -109
  202. data/vendor/assets/javascripts/bower/codemirror/mode/sql/sql.js +0 -391
  203. data/vendor/assets/javascripts/bower/codemirror/mode/stex/stex.js +0 -251
  204. data/vendor/assets/javascripts/bower/codemirror/mode/stex/test.js +0 -123
  205. data/vendor/assets/javascripts/bower/codemirror/mode/tcl/tcl.js +0 -147
  206. data/vendor/assets/javascripts/bower/codemirror/mode/textile/test.js +0 -417
  207. data/vendor/assets/javascripts/bower/codemirror/mode/textile/textile.js +0 -469
  208. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
  209. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -369
  210. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.css +0 -26
  211. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.js +0 -323
  212. data/vendor/assets/javascripts/bower/codemirror/mode/toml/toml.js +0 -88
  213. data/vendor/assets/javascripts/bower/codemirror/mode/tornado/tornado.js +0 -68
  214. data/vendor/assets/javascripts/bower/codemirror/mode/turtle/turtle.js +0 -162
  215. data/vendor/assets/javascripts/bower/codemirror/mode/vb/vb.js +0 -274
  216. data/vendor/assets/javascripts/bower/codemirror/mode/vbscript/vbscript.js +0 -350
  217. data/vendor/assets/javascripts/bower/codemirror/mode/velocity/velocity.js +0 -201
  218. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/test.js +0 -273
  219. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/verilog.js +0 -364
  220. data/vendor/assets/javascripts/bower/codemirror/mode/xml/test.js +0 -51
  221. data/vendor/assets/javascripts/bower/codemirror/mode/xml/xml.js +0 -384
  222. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/test.js +0 -67
  223. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/xquery.js +0 -447
  224. data/vendor/assets/javascripts/bower/codemirror/mode/yaml/yaml.js +0 -117
  225. data/vendor/assets/javascripts/bower/codemirror/mode/z80/z80.js +0 -100
  226. data/vendor/assets/javascripts/bower/vue/LICENSE +0 -21
  227. data/vendor/assets/javascripts/bower/vue/src/api/child.js +0 -53
  228. data/vendor/assets/javascripts/bower/vue/src/api/data.js +0 -161
  229. data/vendor/assets/javascripts/bower/vue/src/api/dom.js +0 -211
  230. data/vendor/assets/javascripts/bower/vue/src/api/events.js +0 -176
  231. data/vendor/assets/javascripts/bower/vue/src/api/global.js +0 -146
  232. data/vendor/assets/javascripts/bower/vue/src/api/lifecycle.js +0 -72
  233. data/vendor/assets/javascripts/bower/vue/src/batcher.js +0 -65
  234. data/vendor/assets/javascripts/bower/vue/src/cache.js +0 -112
  235. data/vendor/assets/javascripts/bower/vue/src/compiler/compile.js +0 -549
  236. data/vendor/assets/javascripts/bower/vue/src/compiler/transclude.js +0 -146
  237. data/vendor/assets/javascripts/bower/vue/src/config.js +0 -79
  238. data/vendor/assets/javascripts/bower/vue/src/directive.js +0 -219
  239. data/vendor/assets/javascripts/bower/vue/src/directives/attr.js +0 -32
  240. data/vendor/assets/javascripts/bower/vue/src/directives/class.js +0 -18
  241. data/vendor/assets/javascripts/bower/vue/src/directives/cloak.js +0 -12
  242. data/vendor/assets/javascripts/bower/vue/src/directives/component.js +0 -196
  243. data/vendor/assets/javascripts/bower/vue/src/directives/el.js +0 -13
  244. data/vendor/assets/javascripts/bower/vue/src/directives/html.js +0 -38
  245. data/vendor/assets/javascripts/bower/vue/src/directives/if.js +0 -87
  246. data/vendor/assets/javascripts/bower/vue/src/directives/index.js +0 -22
  247. data/vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js +0 -25
  248. data/vendor/assets/javascripts/bower/vue/src/directives/model/default.js +0 -123
  249. data/vendor/assets/javascripts/bower/vue/src/directives/model/index.js +0 -56
  250. data/vendor/assets/javascripts/bower/vue/src/directives/model/radio.js +0 -26
  251. data/vendor/assets/javascripts/bower/vue/src/directives/model/select.js +0 -166
  252. data/vendor/assets/javascripts/bower/vue/src/directives/on.js +0 -59
  253. data/vendor/assets/javascripts/bower/vue/src/directives/partial.js +0 -44
  254. data/vendor/assets/javascripts/bower/vue/src/directives/ref.js +0 -24
  255. data/vendor/assets/javascripts/bower/vue/src/directives/repeat.js +0 -503
  256. data/vendor/assets/javascripts/bower/vue/src/directives/show.js +0 -8
  257. data/vendor/assets/javascripts/bower/vue/src/directives/style.js +0 -58
  258. data/vendor/assets/javascripts/bower/vue/src/directives/text.js +0 -15
  259. data/vendor/assets/javascripts/bower/vue/src/directives/transition.js +0 -12
  260. data/vendor/assets/javascripts/bower/vue/src/directives/with.js +0 -47
  261. data/vendor/assets/javascripts/bower/vue/src/filters/array-filters.js +0 -87
  262. data/vendor/assets/javascripts/bower/vue/src/filters/index.js +0 -135
  263. data/vendor/assets/javascripts/bower/vue/src/instance/compile.js +0 -179
  264. data/vendor/assets/javascripts/bower/vue/src/instance/events.js +0 -122
  265. data/vendor/assets/javascripts/bower/vue/src/instance/init.js +0 -76
  266. data/vendor/assets/javascripts/bower/vue/src/instance/scope.js +0 -217
  267. data/vendor/assets/javascripts/bower/vue/src/observer/array.js +0 -90
  268. data/vendor/assets/javascripts/bower/vue/src/observer/dep.js +0 -50
  269. data/vendor/assets/javascripts/bower/vue/src/observer/index.js +0 -235
  270. data/vendor/assets/javascripts/bower/vue/src/observer/object.js +0 -66
  271. data/vendor/assets/javascripts/bower/vue/src/parsers/directive.js +0 -159
  272. data/vendor/assets/javascripts/bower/vue/src/parsers/expression.js +0 -226
  273. data/vendor/assets/javascripts/bower/vue/src/parsers/path.js +0 -300
  274. data/vendor/assets/javascripts/bower/vue/src/parsers/template.js +0 -248
  275. data/vendor/assets/javascripts/bower/vue/src/parsers/text.js +0 -178
  276. data/vendor/assets/javascripts/bower/vue/src/transition/css.js +0 -189
  277. data/vendor/assets/javascripts/bower/vue/src/transition/index.js +0 -151
  278. data/vendor/assets/javascripts/bower/vue/src/transition/js.js +0 -43
  279. data/vendor/assets/javascripts/bower/vue/src/util/debug.js +0 -50
  280. data/vendor/assets/javascripts/bower/vue/src/util/dom.js +0 -197
  281. data/vendor/assets/javascripts/bower/vue/src/util/env.js +0 -74
  282. data/vendor/assets/javascripts/bower/vue/src/util/filter.js +0 -72
  283. data/vendor/assets/javascripts/bower/vue/src/util/index.js +0 -8
  284. data/vendor/assets/javascripts/bower/vue/src/util/lang.js +0 -175
  285. data/vendor/assets/javascripts/bower/vue/src/util/merge-option.js +0 -255
  286. data/vendor/assets/javascripts/bower/vue/src/vue.js +0 -84
  287. data/vendor/assets/javascripts/bower/vue/src/watcher.js +0 -240
@@ -1,226 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: http://codemirror.net/LICENSE
3
-
4
- (function(mod) {
5
- if (typeof exports == "object" && typeof module == "object") // CommonJS
6
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike"));
7
- else if (typeof define == "function" && define.amd) // AMD
8
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod);
9
- else // Plain browser env
10
- mod(CodeMirror);
11
- })(function(CodeMirror) {
12
- "use strict";
13
-
14
- function keywords(str) {
15
- var obj = {}, words = str.split(" ");
16
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
17
- return obj;
18
- }
19
-
20
- // Helper for stringWithEscapes
21
- function matchSequence(list, end) {
22
- if (list.length == 0) return stringWithEscapes(end);
23
- return function (stream, state) {
24
- var patterns = list[0];
25
- for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
26
- state.tokenize = matchSequence(list.slice(1), end);
27
- return patterns[i][1];
28
- }
29
- state.tokenize = stringWithEscapes(end);
30
- return "string";
31
- };
32
- }
33
- function stringWithEscapes(closing) {
34
- return function(stream, state) { return stringWithEscapes_(stream, state, closing); };
35
- }
36
- function stringWithEscapes_(stream, state, closing) {
37
- // "Complex" syntax
38
- if (stream.match("${", false) || stream.match("{$", false)) {
39
- state.tokenize = null;
40
- return "string";
41
- }
42
-
43
- // Simple syntax
44
- if (stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
45
- // After the variable name there may appear array or object operator.
46
- if (stream.match("[", false)) {
47
- // Match array operator
48
- state.tokenize = matchSequence([
49
- [["[", null]],
50
- [[/\d[\w\.]*/, "number"],
51
- [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
52
- [/[\w\$]+/, "variable"]],
53
- [["]", null]]
54
- ], closing);
55
- }
56
- if (stream.match(/\-\>\w/, false)) {
57
- // Match object operator
58
- state.tokenize = matchSequence([
59
- [["->", null]],
60
- [[/[\w]+/, "variable"]]
61
- ], closing);
62
- }
63
- return "variable-2";
64
- }
65
-
66
- var escaped = false;
67
- // Normal string
68
- while (!stream.eol() &&
69
- (escaped || (!stream.match("{$", false) &&
70
- !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
71
- if (!escaped && stream.match(closing)) {
72
- state.tokenize = null;
73
- state.tokStack.pop(); state.tokStack.pop();
74
- break;
75
- }
76
- escaped = stream.next() == "\\" && !escaped;
77
- }
78
- return "string";
79
- }
80
-
81
- var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
82
- "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " +
83
- "for foreach function global goto if implements interface instanceof namespace " +
84
- "new or private protected public static switch throw trait try use var while xor " +
85
- "die echo empty exit eval include include_once isset list require require_once return " +
86
- "print unset __halt_compiler self static parent yield insteadof finally";
87
- var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
88
- var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
89
- CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
90
- CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
91
-
92
- var phpConfig = {
93
- name: "clike",
94
- helperType: "php",
95
- keywords: keywords(phpKeywords),
96
- blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
97
- atoms: keywords(phpAtoms),
98
- builtin: keywords(phpBuiltin),
99
- multiLineStrings: true,
100
- hooks: {
101
- "$": function(stream) {
102
- stream.eatWhile(/[\w\$_]/);
103
- return "variable-2";
104
- },
105
- "<": function(stream, state) {
106
- if (stream.match(/<</)) {
107
- stream.eatWhile(/[\w\.]/);
108
- var delim = stream.current().slice(3);
109
- if (delim) {
110
- (state.tokStack || (state.tokStack = [])).push(delim, 0);
111
- state.tokenize = stringWithEscapes(delim);
112
- return "string";
113
- }
114
- }
115
- return false;
116
- },
117
- "#": function(stream) {
118
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
119
- return "comment";
120
- },
121
- "/": function(stream) {
122
- if (stream.eat("/")) {
123
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
124
- return "comment";
125
- }
126
- return false;
127
- },
128
- '"': function(_stream, state) {
129
- (state.tokStack || (state.tokStack = [])).push('"', 0);
130
- state.tokenize = stringWithEscapes('"');
131
- return "string";
132
- },
133
- "{": function(_stream, state) {
134
- if (state.tokStack && state.tokStack.length)
135
- state.tokStack[state.tokStack.length - 1]++;
136
- return false;
137
- },
138
- "}": function(_stream, state) {
139
- if (state.tokStack && state.tokStack.length > 0 &&
140
- !--state.tokStack[state.tokStack.length - 1]) {
141
- state.tokenize = stringWithEscapes(state.tokStack[state.tokStack.length - 2]);
142
- }
143
- return false;
144
- }
145
- }
146
- };
147
-
148
- CodeMirror.defineMode("php", function(config, parserConfig) {
149
- var htmlMode = CodeMirror.getMode(config, "text/html");
150
- var phpMode = CodeMirror.getMode(config, phpConfig);
151
-
152
- function dispatch(stream, state) {
153
- var isPHP = state.curMode == phpMode;
154
- if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
155
- if (!isPHP) {
156
- if (stream.match(/^<\?\w*/)) {
157
- state.curMode = phpMode;
158
- state.curState = state.php;
159
- return "meta";
160
- }
161
- if (state.pending == '"' || state.pending == "'") {
162
- while (!stream.eol() && stream.next() != state.pending) {}
163
- var style = "string";
164
- } else if (state.pending && stream.pos < state.pending.end) {
165
- stream.pos = state.pending.end;
166
- var style = state.pending.style;
167
- } else {
168
- var style = htmlMode.token(stream, state.curState);
169
- }
170
- if (state.pending) state.pending = null;
171
- var cur = stream.current(), openPHP = cur.search(/<\?/), m;
172
- if (openPHP != -1) {
173
- if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
174
- else state.pending = {end: stream.pos, style: style};
175
- stream.backUp(cur.length - openPHP);
176
- }
177
- return style;
178
- } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
179
- state.curMode = htmlMode;
180
- state.curState = state.html;
181
- return "meta";
182
- } else {
183
- return phpMode.token(stream, state.curState);
184
- }
185
- }
186
-
187
- return {
188
- startState: function() {
189
- var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode);
190
- return {html: html,
191
- php: php,
192
- curMode: parserConfig.startOpen ? phpMode : htmlMode,
193
- curState: parserConfig.startOpen ? php : html,
194
- pending: null};
195
- },
196
-
197
- copyState: function(state) {
198
- var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
199
- php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
200
- if (state.curMode == htmlMode) cur = htmlNew;
201
- else cur = phpNew;
202
- return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
203
- pending: state.pending};
204
- },
205
-
206
- token: dispatch,
207
-
208
- indent: function(state, textAfter) {
209
- if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
210
- (state.curMode == phpMode && /^\?>/.test(textAfter)))
211
- return htmlMode.indent(state.html, textAfter);
212
- return state.curMode.indent(state.curState, textAfter);
213
- },
214
-
215
- blockCommentStart: "/*",
216
- blockCommentEnd: "*/",
217
- lineComment: "//",
218
-
219
- innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
220
- };
221
- }, "htmlmixed", "clike");
222
-
223
- CodeMirror.defineMIME("application/x-httpd-php", "php");
224
- CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
225
- CodeMirror.defineMIME("text/x-php", phpConfig);
226
- });
@@ -1,154 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: http://codemirror.net/LICENSE
3
-
4
- (function() {
5
- var mode = CodeMirror.getMode({indentUnit: 2}, "php");
6
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
7
-
8
- MT('simple_test',
9
- '[meta <?php] ' +
10
- '[keyword echo] [string "aaa"]; ' +
11
- '[meta ?>]');
12
-
13
- MT('variable_interpolation_non_alphanumeric',
14
- '[meta <?php]',
15
- '[keyword echo] [string "aaa$~$!$@$#$$$%$^$&$*$($)$.$<$>$/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]',
16
- '[meta ?>]');
17
-
18
- MT('variable_interpolation_digits',
19
- '[meta <?php]',
20
- '[keyword echo] [string "aaa$1$2$3$4$5$6$7$8$9$0aaa"]',
21
- '[meta ?>]');
22
-
23
- MT('variable_interpolation_simple_syntax_1',
24
- '[meta <?php]',
25
- '[keyword echo] [string "aaa][variable-2 $aaa][string .aaa"];',
26
- '[meta ?>]');
27
-
28
- MT('variable_interpolation_simple_syntax_2',
29
- '[meta <?php]',
30
- '[keyword echo] [string "][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
31
- '[keyword echo] [string "][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
32
- '[keyword echo] [string "][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
33
- '[keyword echo] [string "][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
34
- '[keyword echo] [string "][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
35
-
36
- '[keyword echo] [string "1aaa][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
37
- '[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
38
- '[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
39
- '[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
40
- '[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
41
- '[meta ?>]');
42
-
43
- MT('variable_interpolation_simple_syntax_3',
44
- '[meta <?php]',
45
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string .aaaaaa"];',
46
- '[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];',
47
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];',
48
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];',
49
- '[meta ?>]');
50
-
51
- MT('variable_interpolation_escaping',
52
- '[meta <?php] [comment /* Escaping */]',
53
- '[keyword echo] [string "aaa\\$aaaa->aaa.aaa"];',
54
- '[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];',
55
- '[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];',
56
- '[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];',
57
- '[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];',
58
- '[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];',
59
- '[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];',
60
- '[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];',
61
- '[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];',
62
- '[meta ?>]');
63
-
64
- MT('variable_interpolation_complex_syntax_1',
65
- '[meta <?php]',
66
- '[keyword echo] [string "aaa][variable-2 $]{[variable aaaa]}[string ->aaa.aaa"];',
67
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];',
68
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];',
69
- '[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');
70
-
71
- MT('variable_interpolation_complex_syntax_2',
72
- '[meta <?php] [comment /* Monsters */]',
73
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>} $aaa<?php } */]}[string ->aaa.aaa"];',
74
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];',
75
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];');
76
-
77
-
78
- function build_recursive_monsters(nt, t, n){
79
- var monsters = [t];
80
- for (var i = 1; i <= n; ++i)
81
- monsters[i] = nt.join(monsters[i - 1]);
82
- return monsters;
83
- }
84
-
85
- var m1 = build_recursive_monsters(
86
- ['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'],
87
- '[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]',
88
- 10
89
- );
90
-
91
- MT('variable_interpolation_complex_syntax_3_1',
92
- '[meta <?php] [comment /* Recursive monsters */]',
93
- '[keyword echo] ' + m1[4] + ';',
94
- '[keyword echo] ' + m1[7] + ';',
95
- '[keyword echo] ' + m1[8] + ';',
96
- '[keyword echo] ' + m1[5] + ';',
97
- '[keyword echo] ' + m1[1] + ';',
98
- '[keyword echo] ' + m1[6] + ';',
99
- '[keyword echo] ' + m1[9] + ';',
100
- '[keyword echo] ' + m1[0] + ';',
101
- '[keyword echo] ' + m1[10] + ';',
102
- '[keyword echo] ' + m1[2] + ';',
103
- '[keyword echo] ' + m1[3] + ';',
104
- '[keyword echo] [string "end"];',
105
- '[meta ?>]');
106
-
107
- var m2 = build_recursive_monsters(
108
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'],
109
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
110
- 5
111
- );
112
-
113
- MT('variable_interpolation_complex_syntax_3_2',
114
- '[meta <?php] [comment /* Recursive monsters 2 */]',
115
- '[keyword echo] ' + m2[0] + ';',
116
- '[keyword echo] ' + m2[1] + ';',
117
- '[keyword echo] ' + m2[5] + ';',
118
- '[keyword echo] ' + m2[4] + ';',
119
- '[keyword echo] ' + m2[2] + ';',
120
- '[keyword echo] ' + m2[3] + ';',
121
- '[keyword echo] [string "end"];',
122
- '[meta ?>]');
123
-
124
- function build_recursive_monsters_2(mf1, mf2, nt, t, n){
125
- var monsters = [t];
126
- for (var i = 1; i <= n; ++i)
127
- monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];
128
- return monsters;
129
- }
130
-
131
- var m3 = build_recursive_monsters_2(
132
- m1,
133
- m2,
134
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'],
135
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
136
- 4
137
- );
138
-
139
- MT('variable_interpolation_complex_syntax_3_3',
140
- '[meta <?php] [comment /* Recursive monsters 2 */]',
141
- '[keyword echo] ' + m3[4] + ';',
142
- '[keyword echo] ' + m3[0] + ';',
143
- '[keyword echo] ' + m3[3] + ';',
144
- '[keyword echo] ' + m3[1] + ';',
145
- '[keyword echo] ' + m3[2] + ';',
146
- '[keyword echo] [string "end"];',
147
- '[meta ?>]');
148
-
149
- MT("variable_interpolation_heredoc",
150
- "[meta <?php]",
151
- "[string <<<here]",
152
- "[string doc ][variable-2 $]{[variable yay]}[string more]",
153
- "[string here]; [comment // normal]");
154
- })();
@@ -1,188 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: http://codemirror.net/LICENSE
3
-
4
- /*
5
- * Pig Latin Mode for CodeMirror 2
6
- * @author Prasanth Jayachandran
7
- * @link https://github.com/prasanthj/pig-codemirror-2
8
- * This implementation is adapted from PL/SQL mode in CodeMirror 2.
9
- */
10
- (function(mod) {
11
- if (typeof exports == "object" && typeof module == "object") // CommonJS
12
- mod(require("../../lib/codemirror"));
13
- else if (typeof define == "function" && define.amd) // AMD
14
- define(["../../lib/codemirror"], mod);
15
- else // Plain browser env
16
- mod(CodeMirror);
17
- })(function(CodeMirror) {
18
- "use strict";
19
-
20
- CodeMirror.defineMode("pig", function(_config, parserConfig) {
21
- var keywords = parserConfig.keywords,
22
- builtins = parserConfig.builtins,
23
- types = parserConfig.types,
24
- multiLineStrings = parserConfig.multiLineStrings;
25
-
26
- var isOperatorChar = /[*+\-%<>=&?:\/!|]/;
27
-
28
- function chain(stream, state, f) {
29
- state.tokenize = f;
30
- return f(stream, state);
31
- }
32
-
33
- var type;
34
- function ret(tp, style) {
35
- type = tp;
36
- return style;
37
- }
38
-
39
- function tokenComment(stream, state) {
40
- var isEnd = false;
41
- var ch;
42
- while(ch = stream.next()) {
43
- if(ch == "/" && isEnd) {
44
- state.tokenize = tokenBase;
45
- break;
46
- }
47
- isEnd = (ch == "*");
48
- }
49
- return ret("comment", "comment");
50
- }
51
-
52
- function tokenString(quote) {
53
- return function(stream, state) {
54
- var escaped = false, next, end = false;
55
- while((next = stream.next()) != null) {
56
- if (next == quote && !escaped) {
57
- end = true; break;
58
- }
59
- escaped = !escaped && next == "\\";
60
- }
61
- if (end || !(escaped || multiLineStrings))
62
- state.tokenize = tokenBase;
63
- return ret("string", "error");
64
- };
65
- }
66
-
67
- function tokenBase(stream, state) {
68
- var ch = stream.next();
69
-
70
- // is a start of string?
71
- if (ch == '"' || ch == "'")
72
- return chain(stream, state, tokenString(ch));
73
- // is it one of the special chars
74
- else if(/[\[\]{}\(\),;\.]/.test(ch))
75
- return ret(ch);
76
- // is it a number?
77
- else if(/\d/.test(ch)) {
78
- stream.eatWhile(/[\w\.]/);
79
- return ret("number", "number");
80
- }
81
- // multi line comment or operator
82
- else if (ch == "/") {
83
- if (stream.eat("*")) {
84
- return chain(stream, state, tokenComment);
85
- }
86
- else {
87
- stream.eatWhile(isOperatorChar);
88
- return ret("operator", "operator");
89
- }
90
- }
91
- // single line comment or operator
92
- else if (ch=="-") {
93
- if(stream.eat("-")){
94
- stream.skipToEnd();
95
- return ret("comment", "comment");
96
- }
97
- else {
98
- stream.eatWhile(isOperatorChar);
99
- return ret("operator", "operator");
100
- }
101
- }
102
- // is it an operator
103
- else if (isOperatorChar.test(ch)) {
104
- stream.eatWhile(isOperatorChar);
105
- return ret("operator", "operator");
106
- }
107
- else {
108
- // get the while word
109
- stream.eatWhile(/[\w\$_]/);
110
- // is it one of the listed keywords?
111
- if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {
112
- if (stream.eat(")") || stream.eat(".")) {
113
- //keywords can be used as variables like flatten(group), group.$0 etc..
114
- }
115
- else {
116
- return ("keyword", "keyword");
117
- }
118
- }
119
- // is it one of the builtin functions?
120
- if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase()))
121
- {
122
- return ("keyword", "variable-2");
123
- }
124
- // is it one of the listed types?
125
- if (types && types.propertyIsEnumerable(stream.current().toUpperCase()))
126
- return ("keyword", "variable-3");
127
- // default is a 'variable'
128
- return ret("variable", "pig-word");
129
- }
130
- }
131
-
132
- // Interface
133
- return {
134
- startState: function() {
135
- return {
136
- tokenize: tokenBase,
137
- startOfLine: true
138
- };
139
- },
140
-
141
- token: function(stream, state) {
142
- if(stream.eatSpace()) return null;
143
- var style = state.tokenize(stream, state);
144
- return style;
145
- }
146
- };
147
- });
148
-
149
- (function() {
150
- function keywords(str) {
151
- var obj = {}, words = str.split(" ");
152
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
153
- return obj;
154
- }
155
-
156
- // builtin funcs taken from trunk revision 1303237
157
- var pBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL "
158
- + "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS "
159
- + "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG "
160
- + "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN "
161
- + "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER "
162
- + "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS "
163
- + "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA "
164
- + "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE "
165
- + "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG "
166
- + "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ";
167
-
168
- // taken from QueryLexer.g
169
- var pKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP "
170
- + "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL "
171
- + "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE "
172
- + "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE "
173
- + "NEQ MATCHES TRUE FALSE DUMP";
174
-
175
- // data types
176
- var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ";
177
-
178
- CodeMirror.defineMIME("text/x-pig", {
179
- name: "pig",
180
- builtins: keywords(pBuiltins),
181
- keywords: keywords(pKeywords),
182
- types: keywords(pTypes)
183
- });
184
-
185
- CodeMirror.registerHelper("hintWords", "pig", (pBuiltins + pTypes + pKeywords).split(" "));
186
- }());
187
-
188
- });