releaf-core 1.1.21 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (495) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/releaf_core_manifest.js +3 -0
  3. data/app/assets/images/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  4. data/app/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  5. data/app/assets/images/ckeditor/plugins/flash/images/placeholder.png +0 -0
  6. data/app/assets/images/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  7. data/app/assets/images/ckeditor/plugins/icons.png +0 -0
  8. data/app/assets/images/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  9. data/app/assets/images/ckeditor/plugins/image/images/noimage.png +0 -0
  10. data/app/assets/images/ckeditor/plugins/link/images/anchor.png +0 -0
  11. data/app/assets/images/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  12. data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  13. data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  14. data/app/assets/images/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  15. data/app/assets/images/ckeditor/plugins/magicline/images/icon.png +0 -0
  16. data/app/assets/images/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  17. data/app/assets/images/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  18. data/app/assets/images/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  19. data/app/assets/images/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  20. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  21. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  22. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  23. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  24. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  25. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  26. data/app/assets/images/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  27. data/app/assets/images/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  28. data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  29. data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  30. data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  31. data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  32. data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  33. data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  34. data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  35. data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  36. data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  37. data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  38. data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  39. data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  40. data/app/assets/images/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  41. data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  42. data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  43. data/app/assets/images/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  44. data/app/assets/images/ckeditor/plugins/smiley/images/envelope.png +0 -0
  45. data/app/assets/images/ckeditor/plugins/smiley/images/heart.gif +0 -0
  46. data/app/assets/images/ckeditor/plugins/smiley/images/heart.png +0 -0
  47. data/app/assets/images/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  48. data/app/assets/images/ckeditor/plugins/smiley/images/kiss.png +0 -0
  49. data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  50. data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  51. data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  52. data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  53. data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  54. data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  55. data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  56. data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  57. data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  58. data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  59. data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  60. data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  61. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  62. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  63. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  64. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  65. data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  66. data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  67. data/app/assets/images/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  68. data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  69. data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  70. data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  71. data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  72. data/app/assets/images/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  73. data/app/assets/images/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  74. data/app/assets/images/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  75. data/app/assets/images/ckeditor/plugins/widget/images/handle.png +0 -0
  76. data/app/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
  77. data/app/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  78. data/app/assets/images/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  79. data/app/assets/images/ckeditor/skins/moono-lisa/images/close.png +0 -0
  80. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  81. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  82. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  83. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  84. data/app/assets/images/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  85. data/app/assets/images/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  86. data/app/assets/images/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  87. data/app/assets/images/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  88. data/app/assets/javascripts/ckeditor-jquery.js +3 -0
  89. data/app/assets/javascripts/ckeditor/CHANGES.md +1637 -0
  90. data/app/assets/javascripts/ckeditor/LICENSE.md +1420 -0
  91. data/app/assets/javascripts/ckeditor/README.md +39 -0
  92. data/app/assets/javascripts/ckeditor/basepath.js.erb +6 -0
  93. data/app/assets/javascripts/ckeditor/build-config.js +190 -0
  94. data/app/assets/javascripts/ckeditor/ckeditor.js +1331 -0
  95. data/app/assets/javascripts/ckeditor/config.js +10 -0
  96. data/app/assets/javascripts/ckeditor/jquery.js +10 -0
  97. data/app/assets/javascripts/ckeditor/lang/af.js +5 -0
  98. data/app/assets/javascripts/ckeditor/lang/ar.js +5 -0
  99. data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
  100. data/app/assets/javascripts/ckeditor/lang/bg.js +5 -0
  101. data/app/assets/javascripts/ckeditor/lang/bn.js +5 -0
  102. data/app/assets/javascripts/ckeditor/lang/bs.js +5 -0
  103. data/app/assets/javascripts/ckeditor/lang/ca.js +5 -0
  104. data/app/assets/javascripts/ckeditor/lang/cs.js +5 -0
  105. data/app/assets/javascripts/ckeditor/lang/cy.js +5 -0
  106. data/app/assets/javascripts/ckeditor/lang/da.js +5 -0
  107. data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
  108. data/app/assets/javascripts/ckeditor/lang/de.js +5 -0
  109. data/app/assets/javascripts/ckeditor/lang/el.js +5 -0
  110. data/app/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  111. data/app/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  112. data/app/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  113. data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
  114. data/app/assets/javascripts/ckeditor/lang/eo.js +5 -0
  115. data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
  116. data/app/assets/javascripts/ckeditor/lang/es.js +5 -0
  117. data/app/assets/javascripts/ckeditor/lang/et.js +5 -0
  118. data/app/assets/javascripts/ckeditor/lang/eu.js +5 -0
  119. data/app/assets/javascripts/ckeditor/lang/fa.js +5 -0
  120. data/app/assets/javascripts/ckeditor/lang/fi.js +5 -0
  121. data/app/assets/javascripts/ckeditor/lang/fo.js +5 -0
  122. data/app/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  123. data/app/assets/javascripts/ckeditor/lang/fr.js +5 -0
  124. data/app/assets/javascripts/ckeditor/lang/gl.js +5 -0
  125. data/app/assets/javascripts/ckeditor/lang/gu.js +5 -0
  126. data/app/assets/javascripts/ckeditor/lang/he.js +5 -0
  127. data/app/assets/javascripts/ckeditor/lang/hi.js +5 -0
  128. data/app/assets/javascripts/ckeditor/lang/hr.js +5 -0
  129. data/app/assets/javascripts/ckeditor/lang/hu.js +5 -0
  130. data/app/assets/javascripts/ckeditor/lang/id.js +5 -0
  131. data/app/assets/javascripts/ckeditor/lang/is.js +5 -0
  132. data/app/assets/javascripts/ckeditor/lang/it.js +5 -0
  133. data/app/assets/javascripts/ckeditor/lang/ja.js +5 -0
  134. data/app/assets/javascripts/ckeditor/lang/ka.js +5 -0
  135. data/app/assets/javascripts/ckeditor/lang/km.js +5 -0
  136. data/app/assets/javascripts/ckeditor/lang/ko.js +5 -0
  137. data/app/assets/javascripts/ckeditor/lang/ku.js +5 -0
  138. data/app/assets/javascripts/ckeditor/lang/lt.js +5 -0
  139. data/app/assets/javascripts/ckeditor/lang/lv.js +5 -0
  140. data/app/assets/javascripts/ckeditor/lang/mk.js +5 -0
  141. data/app/assets/javascripts/ckeditor/lang/mn.js +5 -0
  142. data/app/assets/javascripts/ckeditor/lang/ms.js +5 -0
  143. data/app/assets/javascripts/ckeditor/lang/nb.js +5 -0
  144. data/app/assets/javascripts/ckeditor/lang/nl.js +5 -0
  145. data/app/assets/javascripts/ckeditor/lang/no.js +5 -0
  146. data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
  147. data/app/assets/javascripts/ckeditor/lang/pl.js +5 -0
  148. data/app/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  149. data/app/assets/javascripts/ckeditor/lang/pt.js +5 -0
  150. data/app/assets/javascripts/ckeditor/lang/ro.js +5 -0
  151. data/app/assets/javascripts/ckeditor/lang/ru.js +5 -0
  152. data/app/assets/javascripts/ckeditor/lang/si.js +5 -0
  153. data/app/assets/javascripts/ckeditor/lang/sk.js +5 -0
  154. data/app/assets/javascripts/ckeditor/lang/sl.js +5 -0
  155. data/app/assets/javascripts/ckeditor/lang/sq.js +5 -0
  156. data/app/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  157. data/app/assets/javascripts/ckeditor/lang/sr.js +5 -0
  158. data/app/assets/javascripts/ckeditor/lang/sv.js +5 -0
  159. data/app/assets/javascripts/ckeditor/lang/th.js +5 -0
  160. data/app/assets/javascripts/ckeditor/lang/tr.js +5 -0
  161. data/app/assets/javascripts/ckeditor/lang/tt.js +5 -0
  162. data/app/assets/javascripts/ckeditor/lang/ug.js +5 -0
  163. data/app/assets/javascripts/ckeditor/lang/uk.js +5 -0
  164. data/app/assets/javascripts/ckeditor/lang/vi.js +5 -0
  165. data/app/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  166. data/app/assets/javascripts/ckeditor/lang/zh.js +5 -0
  167. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  168. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  169. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  170. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  171. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  172. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  173. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  174. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  175. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  176. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +12 -0
  177. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
  178. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  179. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  180. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  181. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  182. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  183. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  184. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  185. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  186. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  187. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  188. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  189. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
  190. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  191. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  192. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  193. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  194. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  195. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  196. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  197. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  198. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  199. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  200. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  201. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  202. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  203. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  204. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  205. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
  206. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  207. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  208. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  209. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  210. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  211. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  212. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  213. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
  214. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  215. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  216. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  217. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  218. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  219. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  220. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
  221. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
  222. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
  223. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  224. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  225. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  226. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  227. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
  228. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  229. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  230. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  231. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  232. data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +8 -0
  233. data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  234. data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
  235. data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  236. data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
  237. data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +25 -0
  238. data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +24 -0
  239. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
  240. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
  241. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
  242. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
  243. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +9 -0
  244. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +21 -0
  245. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
  246. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
  247. data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  248. data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +44 -0
  249. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  250. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +30 -0
  251. data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  252. data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +55 -0
  253. data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +13 -0
  254. data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
  255. data/app/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  256. data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  257. data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -0
  258. data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
  259. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  260. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  261. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  262. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  263. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  264. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  265. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  266. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  267. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  268. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  269. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  270. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  271. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  272. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  273. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  274. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  275. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  276. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  277. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  278. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  279. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  280. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  281. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  282. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
  283. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  284. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  285. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  286. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  287. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  288. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  289. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  290. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  291. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  292. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  293. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  294. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  295. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  296. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  297. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  298. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  299. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  300. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  301. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  302. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  303. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  304. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  305. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  306. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  307. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  308. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  309. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  310. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  311. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  312. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  313. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  314. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  315. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  316. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
  317. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  318. data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  319. data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
  320. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  321. data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +7 -0
  322. data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  323. data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  324. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +91 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  328. data/app/assets/javascripts/ckeditor/styles.js +137 -0
  329. data/app/assets/javascripts/releaf/include/remote_validator.js +1 -1
  330. data/app/assets/javascripts/releaf/include/store_settings.js +2 -2
  331. data/app/assets/javascripts/releaf/include/url_builder.js +130 -130
  332. data/app/assets/stylesheets/ckeditor/contents.css +208 -0
  333. data/app/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
  334. data/app/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
  335. data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  336. data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  337. data/app/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  338. data/app/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  339. data/app/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  340. data/app/assets/stylesheets/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  341. data/app/assets/stylesheets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  342. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +5 -0
  343. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  344. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  345. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  346. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +5 -0
  347. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  348. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  349. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  350. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  351. data/app/builders/releaf/builders.rb +4 -1
  352. data/app/builders/releaf/builders/base.rb +1 -1
  353. data/app/builders/releaf/builders/form_builder/associations.rb +1 -1
  354. data/app/builders/releaf/builders/page/layout_builder.rb +1 -1
  355. data/app/builders/releaf/builders/pagination_builder.rb +1 -1
  356. data/app/builders/releaf/builders/table_builder.rb +0 -1
  357. data/app/controllers/releaf/action_controller.rb +2 -2
  358. data/app/controllers/releaf/root_controller.rb +9 -7
  359. data/app/helpers/releaf/application_helper.rb +2 -2
  360. data/app/lib/releaf/action_controller/features.rb +1 -6
  361. data/app/lib/releaf/build_errors_hash.rb +12 -12
  362. data/app/lib/releaf/responders.rb +0 -1
  363. data/app/lib/releaf/search.rb +5 -18
  364. data/app/models/releaf/settings.rb +1 -1
  365. data/app/views/releaf/action/create_releaf_richtext_attachment.haml +2 -1
  366. data/app/views/releaf/error_pages/access_denied.html.haml +1 -1
  367. data/lib/generators/dummy/install_generator.rb +2 -1
  368. data/lib/generators/dummy/templates/assets/config/manifest.js +3 -0
  369. data/lib/generators/dummy/templates/controllers/application_controller.rb +1 -1
  370. data/lib/generators/dummy/templates/migrations/create_authors.rb +1 -1
  371. data/lib/generators/dummy/templates/migrations/create_banner_groups.rb +1 -1
  372. data/lib/generators/dummy/templates/migrations/create_banner_pages.rb +2 -2
  373. data/lib/generators/dummy/templates/migrations/create_banners.rb +2 -2
  374. data/lib/generators/dummy/templates/migrations/create_book_sequels.rb +1 -1
  375. data/lib/generators/dummy/templates/migrations/create_books.rb +1 -1
  376. data/lib/generators/dummy/templates/migrations/create_bundles.rb +1 -1
  377. data/lib/generators/dummy/templates/migrations/create_chapters.rb +1 -1
  378. data/lib/generators/dummy/templates/migrations/create_home_pages.rb +1 -1
  379. data/lib/generators/dummy/templates/migrations/create_node_extra_fields.rb +1 -1
  380. data/lib/generators/dummy/templates/migrations/create_other_nodes.rb +1 -1
  381. data/lib/generators/dummy/templates/migrations/create_publishers.rb +1 -1
  382. data/lib/generators/dummy/templates/migrations/create_text_pages.rb +1 -1
  383. data/lib/generators/dummy/templates/models/author.rb +1 -1
  384. data/lib/generators/dummy/templates/models/banner.rb +1 -1
  385. data/lib/generators/dummy/templates/models/banner_group.rb +1 -1
  386. data/lib/generators/dummy/templates/models/book.rb +1 -1
  387. data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +1 -1
  388. data/lib/generators/releaf/templates/migrations/create_releaf_permissions.rb +1 -1
  389. data/lib/generators/releaf/templates/migrations/create_releaf_richtext_attachments.rb +1 -1
  390. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -1
  391. data/lib/generators/releaf/templates/migrations/create_releaf_settings.rb +1 -1
  392. data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +1 -1
  393. data/lib/generators/releaf/templates/migrations/create_releaf_users.rb +1 -1
  394. data/lib/releaf-core.rb +1 -2
  395. data/lib/releaf/engine.rb +2 -3
  396. data/lib/releaf/rails_ext/globalize-accessors.rb +64 -0
  397. data/lib/releaf/rails_ext/validation_error_codes.rb +0 -36
  398. metadata +420 -222
  399. data/app/lib/releaf/responders/feature_disabled_responder.rb +0 -9
  400. data/app/views/releaf/error_pages/feature_disabled.html.haml +0 -1
  401. data/spec/builders/releaf/builders/association_reflector_spec.rb +0 -138
  402. data/spec/builders/releaf/builders/base_spec.rb +0 -272
  403. data/spec/builders/releaf/builders/collection_spec.rb +0 -18
  404. data/spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb +0 -71
  405. data/spec/builders/releaf/builders/confirm_dialog_builder_spec.rb +0 -107
  406. data/spec/builders/releaf/builders/edit_builder_spec.rb +0 -322
  407. data/spec/builders/releaf/builders/form_builder/associations_spec.rb +0 -129
  408. data/spec/builders/releaf/builders/form_builder/date_fields_spec.rb +0 -86
  409. data/spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb +0 -48
  410. data/spec/builders/releaf/builders/form_builder/label_spec.rb +0 -106
  411. data/spec/builders/releaf/builders/form_builder/number_fields_spec.rb +0 -37
  412. data/spec/builders/releaf/builders/form_builder_spec.rb +0 -228
  413. data/spec/builders/releaf/builders/index_builder_spec.rb +0 -364
  414. data/spec/builders/releaf/builders/page/header_builder_spec.rb +0 -65
  415. data/spec/builders/releaf/builders/page/layout_builder_spec.rb +0 -237
  416. data/spec/builders/releaf/builders/page/menu_builder_spec.rb +0 -345
  417. data/spec/builders/releaf/builders/pagination_builder_spec.rb +0 -330
  418. data/spec/builders/releaf/builders/resource_dialog_spec.rb +0 -21
  419. data/spec/builders/releaf/builders/resource_view_spec.rb +0 -158
  420. data/spec/builders/releaf/builders/show_builder_spec.rb +0 -7
  421. data/spec/builders/releaf/builders/table_builder_spec.rb +0 -637
  422. data/spec/builders/releaf/builders/template_spec.rb +0 -12
  423. data/spec/builders/releaf/builders/toolbox_builder_spec.rb +0 -67
  424. data/spec/builders/releaf/builders/toolbox_spec.rb +0 -48
  425. data/spec/builders/releaf/builders/utilities/date_fields_spec.rb +0 -125
  426. data/spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb +0 -318
  427. data/spec/builders/releaf/builders/view_spec.rb +0 -281
  428. data/spec/builders/releaf/builders_spec.rb +0 -134
  429. data/spec/builders/releaf/settings/form_builder_spec.rb +0 -48
  430. data/spec/builders/releaf/settings/table_builder_spec.rb +0 -23
  431. data/spec/controllers/concerns/releaf/richtext_attachments_spec.rb +0 -51
  432. data/spec/controllers/releaf/action_controller_spec.rb +0 -423
  433. data/spec/controllers/releaf/root_controller_spec.rb +0 -45
  434. data/spec/controllers/releaf/settings_controller_spec.rb +0 -52
  435. data/spec/error_hash_builder_spec.rb +0 -83
  436. data/spec/ext/array_reorder_spec.rb +0 -12
  437. data/spec/features/ajaxbox_spec.rb +0 -111
  438. data/spec/features/authorization_spec.rb +0 -50
  439. data/spec/features/breadcrumbs_spec.rb +0 -16
  440. data/spec/features/dragonfly_integration_spec.rb +0 -24
  441. data/spec/features/edit_actions_spec.rb +0 -186
  442. data/spec/features/errors_spec.rb +0 -47
  443. data/spec/features/index_actions_spec.rb +0 -85
  444. data/spec/features/index_table_spec.rb +0 -35
  445. data/spec/features/menu_spec.rb +0 -71
  446. data/spec/features/richtext_attachments_spec.rb +0 -64
  447. data/spec/features/richtext_custom_config_spec.rb +0 -28
  448. data/spec/features/richtext_embed_spec.rb +0 -29
  449. data/spec/features/richtext_spec.rb +0 -31
  450. data/spec/features/search_spec.rb +0 -825
  451. data/spec/features/settings_spec.rb +0 -70
  452. data/spec/features/title_spec.rb +0 -13
  453. data/spec/fixtures/common_fields.yml +0 -17
  454. data/spec/fixtures/cs.png +0 -0
  455. data/spec/fixtures/time.formats.xlsx +0 -0
  456. data/spec/fixtures/unicorn.jpg +0 -0
  457. data/spec/helpers/application_helper_spec.rb +0 -73
  458. data/spec/helpers/button_helper_spec.rb +0 -146
  459. data/spec/lib/releaf/action_controller/features_spec.rb +0 -171
  460. data/spec/lib/releaf/action_controller/search_spec.rb +0 -84
  461. data/spec/lib/releaf/application_spec.rb +0 -43
  462. data/spec/lib/releaf/assets_resolver_spec.rb +0 -130
  463. data/spec/lib/releaf/build_errors_hash_spec.rb +0 -141
  464. data/spec/lib/releaf/configuration_spec.rb +0 -205
  465. data/spec/lib/releaf/controller_definition_spec.rb +0 -78
  466. data/spec/lib/releaf/controller_group_definition_spec.rb +0 -33
  467. data/spec/lib/releaf/default_searchable_fields_spec.rb +0 -161
  468. data/spec/lib/releaf/instance_cache_spec.rb +0 -98
  469. data/spec/lib/releaf/resource_base_spec.rb +0 -212
  470. data/spec/lib/releaf/resource_fields_spec.rb +0 -12
  471. data/spec/lib/releaf/resource_params_spec.rb +0 -115
  472. data/spec/lib/releaf/resource_table_fields_spec.rb +0 -20
  473. data/spec/lib/releaf/resource_utilities_spec.rb +0 -87
  474. data/spec/lib/releaf/responders/access_denied_responder_spec.rb +0 -12
  475. data/spec/lib/releaf/responders/after_save_responder_spec.rb +0 -88
  476. data/spec/lib/releaf/responders/confirm_destroy_responder_spec.rb +0 -26
  477. data/spec/lib/releaf/responders/destroy_responder_spec.rb +0 -30
  478. data/spec/lib/releaf/responders/error_responder_spec.rb +0 -26
  479. data/spec/lib/releaf/responders/feature_disabled_responder_spec.rb +0 -12
  480. data/spec/lib/releaf/responders/page_not_found_responder_spec.rb +0 -12
  481. data/spec/lib/releaf/responders_spec.rb +0 -60
  482. data/spec/lib/releaf/root/configuration_spec.rb +0 -9
  483. data/spec/lib/releaf/root/default_controller_resolver_spec.rb +0 -44
  484. data/spec/lib/releaf/root_spec.rb +0 -13
  485. data/spec/lib/releaf/service_spec.rb +0 -20
  486. data/spec/lib/releaf/settings/normalize_value_spec.rb +0 -103
  487. data/spec/lib/releaf/settings/register_spec.rb +0 -135
  488. data/spec/lib/releaf/settings_manager_spec.rb +0 -22
  489. data/spec/lib/validation_error_codes_spec.rb +0 -56
  490. data/spec/misc/factories_spec.rb +0 -31
  491. data/spec/models/settings_spec.rb +0 -100
  492. data/spec/routing/route_mapper_spec.rb +0 -185
  493. data/spec/rspec_helpers/test_helpers_spec.rb +0 -20
  494. data/spec/rspec_helpers/test_spec.rb +0 -14
  495. data/spec/services/array/reorder_spec.rb +0 -121
@@ -1,31 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe "FactoryGirl factories" do
4
-
5
- describe "admin factory" do
6
- it "creates new user" do
7
- expect { create(:user) }.to change { Releaf::Permissions::User.count }.by(1)
8
- end
9
- end
10
-
11
- describe "role factory" do
12
- it "creates new role" do
13
- expect { create(:admin_role) }.to change { Releaf::Permissions::Role.count }.by(1)
14
- end
15
- end
16
-
17
- describe "node factory" do
18
- it "creates new content node" do
19
- expect { create(:node) }.to change { Node.count }.by(1)
20
- end
21
-
22
- it "creates new HomePage content node" do
23
- expect { create(:home_page_node) }.to change { HomePage.count }.by(1)
24
- end
25
-
26
- it "creates new TextPage content node" do
27
- parent = create(:home_page_node)
28
- expect { create(:text_page_node, parent: parent) }.to change { TextPage.count }.by(1)
29
- end
30
- end
31
- end
@@ -1,100 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe Releaf::Settings do
4
-
5
- describe ":registered scope" do
6
- it "returns only registed settings ordered by `var`" do
7
- registered = described_class.where(var: "x")
8
- allow(described_class).to receive(:registered_keys).and_return([:a, :b])
9
- allow(described_class).to receive(:where).with(var: [:a, :b]).and_return(registered)
10
- allow(registered).to receive(:order).with(:var).and_return(:c)
11
- expect(described_class.registered).to eq(:c)
12
- end
13
-
14
- it "returns valid query" do
15
- expect(described_class.registered.count).to be_instance_of(Fixnum)
16
- end
17
-
18
- it "returns instance of `Releaf::Settings::ActiveRecord_Relation`" do
19
- expect(described_class.registered).to be_instance_of(Releaf::Settings::ActiveRecord_Relation)
20
- end
21
- end
22
-
23
- describe "#releaf_title" do
24
- it "returns var value" do
25
- subject.var = "x"
26
- expect(subject.releaf_title).to eq("x")
27
- end
28
- end
29
-
30
- describe "#input_type" do
31
- it "returns type from metadata" do
32
- allow(subject).to receive(:metadata).and_return(type: "xx")
33
- expect(subject.input_type).to eq("xx")
34
- end
35
-
36
- context "when type not defined in meta data" do
37
- it "returns `:text` as default value" do
38
- allow(subject).to receive(:metadata).and_return(type: nil)
39
- expect(subject.input_type).to eq(:text)
40
-
41
- allow(subject).to receive(:metadata).and_return(asdasd: "xx")
42
- expect(subject.input_type).to eq(:text)
43
- end
44
- end
45
- end
46
-
47
- describe "#description" do
48
- it "returns type from metadata" do
49
- allow(subject).to receive(:metadata).and_return(description: "xxasd")
50
- expect(subject.description).to eq("xxasd")
51
- end
52
- end
53
-
54
- describe "#metadata" do
55
- before do
56
- subject.var = "xxx"
57
- end
58
-
59
- it "returns metadata values from settings registry fetched by object `var` value" do
60
- allow(described_class).to receive(:registry).and_return("xxx" => {a: "b"})
61
- expect(subject.metadata).to eq(a: "b")
62
- end
63
-
64
- context "when metadata does not exist" do
65
- it "returns empty hash" do
66
- allow(described_class).to receive(:registry).and_return("lasdh" => {a: "b"})
67
- expect(subject.metadata).to eq({})
68
- end
69
- end
70
- end
71
-
72
- describe ".register_scoped" do
73
- it "returns only register scoped settings" do
74
- allow(described_class).to receive(:where).with(var: ["a", "b"]).and_return("x")
75
- allow(described_class).to receive(:registered_keys).and_return(["a", "b"])
76
-
77
- expect(described_class.register_scoped).to eq("x")
78
- end
79
-
80
- it "returns instance of `Releaf::Settings::ActiveRecord_Relation`" do
81
- expect(described_class.register_scoped).to be_instance_of(Releaf::Settings::ActiveRecord_Relation)
82
- end
83
- end
84
-
85
- describe ".register" do
86
- it "calls `Releaf::Settings::Register` service with given arguments as array" do
87
- expect(Releaf::Settings::Register).to receive(:call)
88
- .with(settings: [{key: "a", type: "b"}, {key: "c", type: "d"}])
89
- described_class.register({key: "a", type: "b"}, {key: "c", type: "d"})
90
- end
91
- end
92
-
93
- describe ".supported_types" do
94
- it "returns list of supported types as array with symbols" do
95
- described_class.supported_types.each do|type|
96
- expect(type).to be_instance_of Symbol
97
- end
98
- end
99
- end
100
- end
@@ -1,185 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe Releaf::RouteMapper do
4
- after(:all) do
5
- # reset dummy app routes
6
- Dummy::Application.reload_routes!
7
- end
8
-
9
- describe "#mount_releaf_at" do
10
- it "it assigns normalized mount location to Releaf.application.config.mount_location" do
11
- expect{
12
- routes.draw do
13
- mount_releaf_at '/xxxx'
14
- end
15
- }.to change{ Releaf.application.config.mount_location }.to("xxxx")
16
-
17
- expect{
18
- routes.draw do
19
- mount_releaf_at '/'
20
- end
21
- }.to change{ Releaf.application.config.mount_location }.to("")
22
- end
23
- end
24
-
25
- describe "#releaf_resources" do
26
- before do
27
- routes.draw do
28
- mount_releaf_at '/admin' do
29
- releaf_resources :books
30
- end
31
- end
32
- end
33
-
34
- it "mounts resource toolbox route" do
35
- expect(get: "/admin/books/1/toolbox").to route_to(
36
- "action"=>"toolbox",
37
- "controller"=>"admin/books",
38
- "id"=>"1"
39
- )
40
- end
41
-
42
- it "mounts resource destroy confirm route" do
43
- expect(get: "/admin/books/1/confirm_destroy").to route_to(
44
- "action"=>"confirm_destroy",
45
- "controller"=>"admin/books",
46
- "id"=>"1"
47
- )
48
- end
49
-
50
- it "mounts resources index route" do
51
- expect(get: "/admin/books/").to route_to(
52
- "action"=>"index",
53
- "controller"=>"admin/books",
54
- )
55
- end
56
-
57
- it "mounts resource create route" do
58
- expect(post: "/admin/books/").to route_to(
59
- "action"=>"create",
60
- "controller"=>"admin/books",
61
- )
62
- end
63
-
64
- it "mounts resource new route" do
65
- expect(get: "/admin/books/new").to route_to(
66
- "action"=>"new",
67
- "controller"=>"admin/books",
68
- )
69
- end
70
-
71
- it "mounts resource edit route" do
72
- expect(get: "/admin/books/1/edit").to route_to(
73
- "action"=>"edit",
74
- "controller"=>"admin/books",
75
- "id"=>"1"
76
- )
77
- end
78
-
79
- it "mounts resource show route" do
80
- expect(get: "/admin/books/1").to route_to(
81
- "action"=>"show",
82
- "controller"=>"admin/books",
83
- "id"=>"1"
84
- )
85
- end
86
-
87
- it "mounts resource update route" do
88
- expect(put: "/admin/books/1").to route_to(
89
- "action"=>"update",
90
- "controller"=>"admin/books",
91
- "id"=>"1"
92
- )
93
- end
94
-
95
- it "mounts resource destroy route" do
96
- expect(delete: "/admin/books/1").to route_to(
97
- "action"=>"destroy",
98
- "controller"=>"admin/books",
99
- "id"=>"1"
100
- )
101
- end
102
-
103
- context "when toolbox route is disabled with except: option" do
104
- before do
105
- routes.draw do
106
- mount_releaf_at '/admin' do
107
- releaf_resources :books, except: [:toolbox]
108
- end
109
- end
110
- end
111
-
112
- it "route to page not found" do
113
- expect(get: "/admin/books/1/toolbox")
114
- .to route_to(controller: "releaf/root", action: "page_not_found", path: "books/1/toolbox")
115
- end
116
- end
117
-
118
- context "when destroy route is skiped within with only: option" do
119
- before do
120
- routes.draw do
121
- mount_releaf_at '/admin' do
122
- releaf_resources :books, only: [:index]
123
- end
124
- end
125
- end
126
-
127
- it "route to page not found" do
128
- expect(get: "/admin/books/1/toolbox")
129
- .to route_to(controller: "releaf/root", action: "page_not_found", path: "books/1/toolbox")
130
- end
131
- end
132
-
133
- context "when confirm destroy route is disabled with except: option" do
134
- before do
135
- routes.draw do
136
- mount_releaf_at '/admin' do
137
- releaf_resources :books, except: [:destroy]
138
- end
139
- end
140
- end
141
-
142
- it "does not mount destroy confirm route" do
143
- expect(get: "/admin/books/1/confirm_destroy")
144
- .to route_to(controller: "releaf/root", action: "page_not_found", path: "books/1/confirm_destroy")
145
- end
146
- end
147
-
148
- context "when confirm destroy route is skiped within with only: option" do
149
- before do
150
- routes.draw do
151
- mount_releaf_at '/admin' do
152
- releaf_resources :books, only: [:index]
153
- end
154
- end
155
- end
156
-
157
- it "does not mount destroy confirm route" do
158
- expect(get: "/admin/books/1/confirm_destroy")
159
- .to route_to(controller: "releaf/root", action: "page_not_found", path: "books/1/confirm_destroy")
160
- end
161
- end
162
-
163
- context "when custom block given" do
164
- before do
165
- routes.draw do
166
- mount_releaf_at '/admin' do
167
- releaf_resources :books, only: [:index] do
168
- member do
169
- get :download
170
- end
171
- end
172
- end
173
- end
174
- end
175
-
176
- it "calls it within resources method" do
177
- expect(get: "/admin/books/1/download").to route_to(
178
- "action"=>"download",
179
- "controller"=>"admin/books",
180
- "id"=>"1"
181
- )
182
- end
183
- end
184
- end
185
- end
@@ -1,20 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe Releaf::Test::Helpers do
4
- describe ".stub_settings" do
5
- it "stubs given hash by key, value to Releaf::Settings" do
6
- stub_settings("some.settings" => "x", "something" => "nothing")
7
- expect(Releaf::Settings["some.settings"]).to eq("x")
8
- expect(Releaf::Settings["something"]).to eq("nothing")
9
- end
10
-
11
- it "mergs multiple stub calls" do
12
- stub_settings("some.settings" => "x")
13
- stub_settings("another.settings" => "xx")
14
-
15
- expect(Releaf::Settings["some.settings"]).to eq("x")
16
- expect(Releaf::Settings["another.settings"]).to eq("xx")
17
- expect(Releaf::Settings["unrelated.settings"]).to eq(nil)
18
- end
19
- end
20
- end
@@ -1,14 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe Releaf::Test do
4
- describe ".reset!" do
5
- it "calls `Releaf::Content::RoutesReloader` reset" do
6
- # initial there are two calls
7
- expect(Releaf::Content::RoutesReloader).to receive(:reset!).twice
8
- described_class.reset!
9
-
10
- expect(Releaf::Content::RoutesReloader).to receive(:reset!).once
11
- described_class.reset!
12
- end
13
- end
14
- end
@@ -1,121 +0,0 @@
1
- require "rails_helper"
2
-
3
- describe Array::Reorder do
4
- subject{ described_class.new(array: ["a", "b", "c", "d", {items: "xx"}, "e", "f", "g"],
5
- values: "c", options: :first) }
6
-
7
- describe "#values=" do
8
- context "when `values` is not array" do
9
- it "wraps it within array before assigning" do
10
- expect{ subject.values = :a }.to change{ subject.values }.to([:a])
11
- end
12
- end
13
-
14
- context "when `values` is array" do
15
- it "does not modify it before assigning" do
16
- expect{ subject.values = [:a] }.to change{ subject.values }.to([:a])
17
- end
18
- end
19
- end
20
-
21
- describe "#call" do
22
- it "deletes given values and insert deleted values in reversed order at reorder index" do
23
- deleted_values = {a: "x", b: "y"}
24
- subject.values = [:a, :b]
25
- subject.options = :last
26
-
27
- expect(subject).to receive(:delete).with([:a, :b]).ordered.and_return(deleted_values)
28
- expect(subject).to receive(:reorder_index).with(:last).ordered.and_return(1)
29
- expect{ subject.call }.to change{ subject.array }
30
- .to(["a", "x", "y", "b", "c", "d", {items: "xx"}, "e", "f", "g"])
31
- end
32
-
33
- context "when given value is array" do
34
- it "process unmodified given value" do
35
- subject.values = [:a]
36
- subject.options = :last
37
- expect(subject).to receive(:delete).with([:a]).and_call_original
38
- subject.call
39
- end
40
- end
41
-
42
- context "when given value is not array" do
43
- it "puts value within array" do
44
- subject.values = [:a]
45
- subject.options = :last
46
- expect(subject).to receive(:delete).with([:a]).and_call_original
47
- subject.call
48
- end
49
- end
50
- end
51
-
52
- describe "#reorder_index" do
53
- context "when given options is :first" do
54
- it "returns 0" do
55
- expect(subject.reorder_index(:first)).to eq(0)
56
- end
57
- end
58
-
59
- context "when given options is :last" do
60
- it "returns size of array" do
61
- expect(subject.reorder_index(:last)).to eq(8)
62
- subject.array = [:a, :b]
63
- expect(subject.reorder_index(:last)).to eq(2)
64
- end
65
- end
66
-
67
- context "when given options is :before" do
68
- it "returns index of given `before` value" do
69
- allow(subject).to receive(:index).with(:items).and_return(4)
70
- expect(subject.reorder_index(before: :items)).to eq(4)
71
- end
72
- end
73
-
74
- context "when given options is :after" do
75
- it "returns index of given `after` value increased by 1" do
76
- allow(subject).to receive(:index).with(:items).and_return(4)
77
- expect(subject.reorder_index(after: :items)).to eq(5)
78
- end
79
- end
80
-
81
- context "when unknown option given" do
82
- it "raises ArgumentError" do
83
- expect{ subject.reorder_index(asdasd: :items) }.to raise_error(ArgumentError, "unknown reorder option")
84
- end
85
- end
86
- end
87
-
88
- describe "#index" do
89
- it "returns value index by comparing array and given values casted to strings" do
90
- expect(subject.index(:c)).to eq(2)
91
- expect(subject.index("c")).to eq(2)
92
- subject.array = ["a", :b, :c]
93
- expect(subject.index("c")).to eq(2)
94
- end
95
-
96
- context "when array value is Hash" do
97
- it "compares by hash first key casted to string" do
98
- expect(subject.index(:items)).to eq(4)
99
- expect(subject.index("items")).to eq(4)
100
-
101
- subject.array = ["a", {"items" => "x"}]
102
- expect(subject.index(:items)).to eq(1)
103
- expect(subject.index("items")).to eq(1)
104
- end
105
- end
106
- end
107
-
108
- describe "#delete" do
109
- before do
110
- subject.array = [:a, :b, :c, :d, {items: "x"}]
111
- end
112
-
113
- it "deletes given values from array" do
114
- expect{ subject.delete(["a", "b", "items"]) }.to change{ subject.array }.to([:c, :d])
115
- end
116
-
117
- it "returns hash with mapped deleted values" do
118
- expect(subject.delete(["a", "b", "items"])).to eq("a" => :a, "b" => :b, "items" => {items: "x"})
119
- end
120
- end
121
- end