comfortable_mexican_sofa 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +2 -2
  3. data/.gitattributes +2 -2
  4. data/.gitignore +1 -1
  5. data/.travis.yml +21 -7
  6. data/Gemfile +10 -7
  7. data/app/assets/javascripts/comfy/admin/cms/application.js.coffee +24 -22
  8. data/app/assets/javascripts/comfy/admin/cms/base.js.coffee +2 -3
  9. data/app/assets/javascripts/comfy/admin/cms/uploader.js.coffee +13 -9
  10. data/app/assets/javascripts/comfy/vendor/Moxie.swf +0 -0
  11. data/app/assets/javascripts/comfy/vendor/Moxie.xap +0 -0
  12. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/bootstrap.min.js +0 -0
  13. data/app/assets/javascripts/comfy/vendor/codemirror.js +9653 -0
  14. data/app/assets/javascripts/comfy/vendor/codemirror/addon/edit/closetag.js +169 -0
  15. data/app/assets/javascripts/comfy/vendor/codemirror/mode/css/css.js +832 -0
  16. data/app/assets/javascripts/comfy/vendor/codemirror/mode/htmlmixed/htmlmixed.js +152 -0
  17. data/app/assets/javascripts/comfy/vendor/codemirror/mode/javascript/javascript.js +875 -0
  18. data/app/assets/javascripts/comfy/vendor/codemirror/mode/markdown/markdown.js +861 -0
  19. data/app/assets/javascripts/comfy/vendor/codemirror/mode/xml/xml.js +394 -0
  20. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/diff/diff_match_patch.min.js +0 -0
  21. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/diff/pretty_text_diff.js +0 -0
  22. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr.min.js +0 -0
  23. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ar.js +0 -0
  24. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/bg.js +0 -0
  25. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/bn.js +0 -0
  26. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ca.js +0 -0
  27. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/cs.js +0 -0
  28. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/cy.js +0 -0
  29. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/da.js +0 -0
  30. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/de.js +0 -0
  31. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/default.js +0 -0
  32. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/eo.js +0 -0
  33. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/es.js +0 -0
  34. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/et.js +0 -0
  35. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/fa.js +0 -0
  36. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/fi.js +0 -0
  37. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/fr.js +0 -0
  38. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/gr.js +0 -0
  39. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/he.js +0 -0
  40. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/hi.js +0 -0
  41. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/hr.js +0 -0
  42. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/hu.js +0 -0
  43. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/id.js +0 -0
  44. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/it.js +0 -0
  45. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ja.js +0 -0
  46. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ko.js +0 -0
  47. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/lt.js +0 -0
  48. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/lv.js +0 -0
  49. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/mk.js +0 -0
  50. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/mn.js +0 -0
  51. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ms.js +0 -0
  52. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/my.js +0 -0
  53. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/nl.js +0 -0
  54. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/no.js +0 -0
  55. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/pa.js +0 -0
  56. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/pl.js +0 -0
  57. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/pt-BR.js +0 -0
  58. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/pt.js +0 -0
  59. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ro.js +0 -0
  60. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/ru.js +0 -0
  61. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/si.js +0 -0
  62. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/sk.js +0 -0
  63. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/sl.js +0 -0
  64. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/sq.js +0 -0
  65. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/sr.js +0 -0
  66. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/sv.js +0 -0
  67. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/th.js +0 -0
  68. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/tr.js +0 -0
  69. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/uk.js +0 -0
  70. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/vn.js +0 -0
  71. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/zh-CN.js +0 -0
  72. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/flatpickr/i18n/zh-TW.js +0 -0
  73. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/fontawesome.js +0 -0
  74. data/app/assets/javascripts/comfy/vendor/moxie.min.js +16 -0
  75. data/app/assets/javascripts/comfy/vendor/plupload.dev.js +2497 -0
  76. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/popper.min.js +0 -0
  77. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor.js +0 -0
  78. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/definedlinks.js +0 -0
  79. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/filemanager.js +0 -0
  80. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ar.js +0 -0
  81. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/az.js +0 -0
  82. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ba.js +0 -0
  83. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/bg.js +0 -0
  84. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/by.js +0 -0
  85. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ca.js +0 -0
  86. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/cs.js +0 -0
  87. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/da.js +0 -0
  88. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/de.js +0 -0
  89. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/el.js +0 -0
  90. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/en.js +0 -0
  91. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/eo.js +0 -0
  92. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/es.js +0 -0
  93. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/es_AR.js +0 -0
  94. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/fa.js +0 -0
  95. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/fi.js +0 -0
  96. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/fr.js +0 -0
  97. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ge.js +0 -0
  98. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/gr.js +0 -0
  99. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/he.js +0 -0
  100. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/hr.js +0 -0
  101. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/hu.js +0 -0
  102. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/id.js +0 -0
  103. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/it.js +0 -0
  104. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ja.js +0 -0
  105. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/kn.js +0 -0
  106. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ko.js +0 -0
  107. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/lt.js +0 -0
  108. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/lv.js +0 -0
  109. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/mk.js +0 -0
  110. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/nb.js +0 -0
  111. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/nl.js +0 -0
  112. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/pl.js +0 -0
  113. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/pt-BR.js +0 -0
  114. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/pt.js +0 -0
  115. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ro.js +0 -0
  116. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ru.js +0 -0
  117. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sk.js +0 -0
  118. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sl.js +0 -0
  119. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sq.js +0 -0
  120. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sr-CIR.js +0 -0
  121. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sr-LAT.js +0 -0
  122. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/sv.js +0 -0
  123. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/th.js +0 -0
  124. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/tr.js +0 -0
  125. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/ua.js +0 -0
  126. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/uk.js +0 -0
  127. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/vi.js +0 -0
  128. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/zh-CN.js +0 -0
  129. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/i18n/zh-TW.js +0 -0
  130. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/imagemanager.js +0 -0
  131. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/table.js +0 -0
  132. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/redactor/video.js +0 -0
  133. data/app/assets/javascripts/comfy/{admin/cms/lib → vendor}/sortable.min.js +0 -0
  134. data/app/assets/stylesheets/comfy/admin/cms/application.sass +7 -5
  135. data/app/assets/stylesheets/comfy/admin/cms/codemirror_overrides.sass +6 -14
  136. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/_bootstrap.scss +0 -0
  137. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_alert.scss +0 -0
  138. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_badge.scss +0 -0
  139. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_breadcrumb.scss +0 -0
  140. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_button-group.scss +0 -0
  141. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_buttons.scss +0 -0
  142. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_card.scss +0 -0
  143. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_carousel.scss +0 -0
  144. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_close.scss +0 -0
  145. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_code.scss +0 -0
  146. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_custom-forms.scss +0 -0
  147. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_dropdown.scss +0 -0
  148. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_forms.scss +0 -0
  149. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_functions.scss +0 -0
  150. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_grid.scss +0 -0
  151. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_images.scss +0 -0
  152. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_input-group.scss +0 -0
  153. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_jumbotron.scss +0 -0
  154. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_list-group.scss +0 -0
  155. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_media.scss +0 -0
  156. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_mixins.scss +0 -0
  157. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_modal.scss +0 -0
  158. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_nav.scss +0 -0
  159. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_navbar.scss +0 -0
  160. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_pagination.scss +0 -0
  161. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_popover.scss +0 -0
  162. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_print.scss +0 -0
  163. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_progress.scss +0 -0
  164. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_reboot.scss +0 -0
  165. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_root.scss +0 -0
  166. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_tables.scss +0 -0
  167. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_tooltip.scss +0 -0
  168. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_transitions.scss +0 -0
  169. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_type.scss +0 -0
  170. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_utilities.scss +0 -0
  171. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/_variables.scss +0 -0
  172. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_alert.scss +0 -0
  173. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_background-variant.scss +0 -0
  174. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_badge.scss +0 -0
  175. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_border-radius.scss +0 -0
  176. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_box-shadow.scss +0 -0
  177. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_breakpoints.scss +0 -0
  178. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_buttons.scss +0 -0
  179. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_caret.scss +0 -0
  180. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_clearfix.scss +0 -0
  181. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_float.scss +0 -0
  182. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_forms.scss +0 -0
  183. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_gradients.scss +0 -0
  184. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_grid-framework.scss +0 -0
  185. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_grid.scss +0 -0
  186. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_hover.scss +0 -0
  187. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_image.scss +0 -0
  188. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_list-group.scss +0 -0
  189. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_lists.scss +0 -0
  190. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_nav-divider.scss +0 -0
  191. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_navbar-align.scss +0 -0
  192. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_pagination.scss +0 -0
  193. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_reset-text.scss +0 -0
  194. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_resize.scss +0 -0
  195. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_screen-reader.scss +0 -0
  196. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_size.scss +0 -0
  197. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_table-row.scss +0 -0
  198. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_text-emphasis.scss +0 -0
  199. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_text-hide.scss +0 -0
  200. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_text-truncate.scss +0 -0
  201. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_transition.scss +0 -0
  202. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/mixins/_visibility.scss +0 -0
  203. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_align.scss +0 -0
  204. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_background.scss +0 -0
  205. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_borders.scss +0 -0
  206. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_clearfix.scss +0 -0
  207. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_display.scss +0 -0
  208. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_embed.scss +0 -0
  209. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_flex.scss +0 -0
  210. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_float.scss +0 -0
  211. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_position.scss +0 -0
  212. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_screenreaders.scss +0 -0
  213. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_sizing.scss +0 -0
  214. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_spacing.scss +0 -0
  215. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_text.scss +0 -0
  216. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/bootstrap/utilities/_visibility.scss +0 -0
  217. data/app/assets/stylesheets/comfy/vendor/codemirror.css +346 -0
  218. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/flatpickr.min.css +0 -0
  219. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/fontawesome.css +0 -0
  220. data/app/assets/stylesheets/comfy/{admin/cms/lib → vendor}/redactor.css +0 -0
  221. data/app/models/comfy/cms/layout.rb +4 -2
  222. data/app/views/comfy/admin/cms/files/destroy.js.coffee +1 -1
  223. data/comfortable_mexican_sofa.gemspec +0 -2
  224. data/lib/comfortable_mexican_sofa/engine.rb +0 -3
  225. data/lib/comfortable_mexican_sofa/extensions/acts_as_tree.rb +1 -1
  226. data/lib/comfortable_mexican_sofa/extensions/has_revisions.rb +1 -1
  227. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  228. data/public/favicon.ico +0 -0
  229. data/test/controllers/comfy/admin/cms/sites_controller_test.rb +1 -1
  230. data/test/fixtures/comfy/cms/layouts.yml +4 -4
  231. data/test/fixtures/comfy/cms/sites.yml +1 -1
  232. data/test/gemfiles/Gemfile.rails.5.2 +9 -3
  233. data/test/integration/seeds_test.rb +1 -1
  234. data/test/integration/sites_test.rb +6 -6
  235. data/test/lib/seeds/layouts_test.rb +9 -9
  236. data/test/models/page_test.rb +6 -6
  237. data/test/models/site_test.rb +13 -13
  238. data/test/system/layouts_frontend_test.rb +15 -0
  239. data/test/system/pages_frontend_test.rb +15 -0
  240. data/test/system/sites_frontend_test.rb +11 -0
  241. data/test/system/snippets_frontend_test.rb +15 -0
  242. data/test/test_helper.rb +25 -12
  243. metadata +216 -227
@@ -51,7 +51,7 @@ class Comfy::Cms::Layout < ActiveRecord::Base
51
51
 
52
52
  # -- Instance Methods --------------------------------------------------------
53
53
  # Tokenized layout content that also pulls in parent layout (if there's one)
54
- # and merges on the {{cms:fragment content}} tag (if parent layout has that).
54
+ # and merges on the {{cms:tag_type content}} tag (if parent layout has that).
55
55
  # Returns a list of tokens that can be fed into the renderer.
56
56
  def content_tokens
57
57
  renderer = ComfortableMexicanSofa::Content::Renderer.new(nil)
@@ -59,14 +59,16 @@ class Comfy::Cms::Layout < ActiveRecord::Base
59
59
 
60
60
  if parent
61
61
  fragment_tags = ComfortableMexicanSofa::Content::Tag::Fragment.subclasses.map do |c|
62
- c.to_s.demodulize.underscore
62
+ ComfortableMexicanSofa::Content::Renderer.tags.key(c)
63
63
  end
64
+
64
65
  parent_tokens = parent.content_tokens
65
66
  replacement_position = parent_tokens.index do |n|
66
67
  n.is_a?(Hash) &&
67
68
  fragment_tags.member?(n[:tag_class]) &&
68
69
  n[:tag_params].split(%r{\s}).first == "content"
69
70
  end
71
+
70
72
  if replacement_position
71
73
  parent_tokens[replacement_position] = tokens
72
74
  tokens = parent_tokens.flatten
@@ -1,2 +1,2 @@
1
- $("#<%= dom_id(@file) %>").fadeOut 'slow', ->
1
+ $("li[data-id=<%= @file.id %>]").fadeOut 'slow', ->
2
2
  $(this).remove()
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.required_ruby_version = ">= 2.2.2"
19
19
 
20
20
  s.add_dependency "active_link_to", ">= 1.0.0"
21
- s.add_dependency "codemirror-rails", ">= 5.16.0"
22
21
  s.add_dependency "coffee-rails", ">= 4.2.0"
23
22
  s.add_dependency "comfy_bootstrap_form", ">= 4.0.0.beta1"
24
23
  s.add_dependency "haml-rails", ">= 1.0.0"
@@ -26,7 +25,6 @@ Gem::Specification.new do |s|
26
25
  s.add_dependency "kramdown", ">= 1.0.0"
27
26
  s.add_dependency "mimemagic", ">= 0.3.2"
28
27
  s.add_dependency "mini_magick", ">= 4.8.0"
29
- s.add_dependency "plupload-rails", ">= 1.2.1"
30
28
  s.add_dependency "rails", ">= 5.2.0.beta1"
31
29
  s.add_dependency "rails-i18n", ">= 5.0.0"
32
30
  s.add_dependency "sass-rails", ">= 5.0.0"
@@ -1,4 +1,3 @@
1
- require "rubygems"
2
1
  require "comfortable_mexican_sofa"
3
2
  require "rails"
4
3
  require "rails-i18n"
@@ -9,8 +8,6 @@ require "jquery-rails"
9
8
  require "haml-rails"
10
9
  require "sass-rails"
11
10
  require "coffee-rails"
12
- require "codemirror-rails"
13
- require "plupload-rails"
14
11
 
15
12
  module ComfortableMexicanSofa
16
13
  class Engine < ::Rails::Engine
@@ -29,7 +29,7 @@ module ComfortableMexicanSofa::ActsAsTree
29
29
  foreign_key: configuration[:foreign_key],
30
30
  dependent: configuration[:dependent]
31
31
 
32
- class_eval <<-RUBY
32
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
33
33
  include ComfortableMexicanSofa::ActsAsTree::InstanceMethods
34
34
 
35
35
  scope :roots, -> {
@@ -7,7 +7,7 @@ module ComfortableMexicanSofa::HasRevisions
7
7
  module ClassMethods
8
8
 
9
9
  def cms_has_revisions_for(*fields)
10
- include ComfortableMexicanSofa::HasRevisions::InstanceMethods
10
+ include ComfortableMexicanSofa::HasRevisions::InstanceMethods # rubocop:disable Style/MixinUsage
11
11
 
12
12
  attr_accessor :revision_data
13
13
 
@@ -1,5 +1,5 @@
1
1
  module ComfortableMexicanSofa
2
2
 
3
- VERSION = "2.0.6".freeze
3
+ VERSION = "2.0.7".freeze
4
4
 
5
5
  end
Binary file
@@ -22,7 +22,7 @@ class Comfy::Admin::Cms::SitesControllerTest < ActionDispatch::IntegrationTest
22
22
  r :get, new_comfy_admin_cms_site_path
23
23
  assert_response :success
24
24
  assert assigns(:site)
25
- assert_equal "test.host", assigns(:site).hostname
25
+ assert_equal "www.example.com", assigns(:site).hostname
26
26
  assert_template :new
27
27
  assert_select "form[action='/admin/sites']"
28
28
  end
@@ -4,7 +4,7 @@ default:
4
4
  identifier: default
5
5
  parent:
6
6
  content: |-
7
- {{cms:text content}}
7
+ {{cms:textarea content}}
8
8
  css: default_css
9
9
  js: default_js
10
10
  position: 0
@@ -16,7 +16,7 @@ nested:
16
16
  parent:
17
17
  content: |-
18
18
  {{cms:text header}}
19
- {{cms:text content}}
19
+ {{cms:textarea content}}
20
20
  css: nested_css
21
21
  js: nested_js
22
22
  position: 0
@@ -27,8 +27,8 @@ child:
27
27
  identifier: child
28
28
  parent: nested
29
29
  content: |-
30
- {{cms:text left_column}}
31
- {{cms:text right_column}}
30
+ {{cms:textarea left_column}}
31
+ {{cms:textarea right_column}}
32
32
  css: child_css
33
33
  js: child_js
34
34
  position: 0
@@ -1,5 +1,5 @@
1
1
  default:
2
2
  label: Default Site
3
3
  identifier: default-site
4
- hostname: test.host
4
+ hostname: www.example.com
5
5
  path:
@@ -2,11 +2,17 @@ source 'http://rubygems.org'
2
2
 
3
3
  gemspec path: "../../"
4
4
 
5
- gem 'kaminari', '>= 0.14.0'
5
+ group :development, :test do
6
+ gem "byebug", platforms: %i[mri mingw x64_mingw]
7
+ gem "capybara"
8
+ gem "kaminari"
9
+ gem "puma"
10
+ gem "rubocop", require: false
11
+ gem "selenium-webdriver"
12
+ gem "sqlite3"
13
+ end
6
14
 
7
15
  group :test do
8
- gem "rubocop", "~> 0.51.0", require: false
9
- gem "sqlite3"
10
16
  gem "coveralls", require: false
11
17
  gem "mocha", require: false
12
18
  gem "rails-controller-testing"
@@ -35,7 +35,7 @@ class SeedsIntergrationTest < ActionDispatch::IntegrationTest
35
35
  assert_equal "Default Seed Snippet", Comfy::Cms::Snippet.find_by_identifier("default").label
36
36
 
37
37
  file_path = url_for(ActiveStorage::Blob.find_by(filename: "header.png"))
38
- file_path = file_path.sub("http://test.host", "")
38
+ file_path = file_path.sub("http://www.example.com", "")
39
39
  out = <<-HTML.strip_heredoc
40
40
  <html>
41
41
  <body>
@@ -23,14 +23,14 @@ class SitesIntegrationTest < ActionDispatch::IntegrationTest
23
23
  get "/"
24
24
  assert_response :success
25
25
  assert assigns(:cms_site)
26
- assert_equal "test.host", assigns(:cms_site).hostname
26
+ assert_equal "www.example.com", assigns(:cms_site).hostname
27
27
  end
28
28
 
29
29
  def test_get_public_page_with_sites_with_different_paths
30
30
  Comfy::Cms::Site.delete_all
31
- site_a = Comfy::Cms::Site.create!(identifier: "site-a", hostname: "test.host", path: "")
32
- site_b = Comfy::Cms::Site.create!(identifier: "site-b", hostname: "test.host", path: "path-b")
33
- site_c = Comfy::Cms::Site.create!(identifier: "site-c", hostname: "test.host", path: "path-c/child")
31
+ site_a = Comfy::Cms::Site.create!(identifier: "site-a", hostname: "www.example.com", path: "")
32
+ site_b = Comfy::Cms::Site.create!(identifier: "site-b", hostname: "www.example.com", path: "path-b")
33
+ site_c = Comfy::Cms::Site.create!(identifier: "site-c", hostname: "www.example.com", path: "path-c/child")
34
34
 
35
35
  [site_a, site_b, site_c].each do |site|
36
36
  layout = site.layouts.create!(identifier: "test")
@@ -62,8 +62,8 @@ class SitesIntegrationTest < ActionDispatch::IntegrationTest
62
62
 
63
63
  def test_get_public_page_with_host_with_port
64
64
  Comfy::Cms::Site.delete_all
65
- site_a = Comfy::Cms::Site.create!(identifier: "site-a", hostname: "test.host:3000")
66
- site_b = Comfy::Cms::Site.create!(identifier: "site-b", hostname: "test.host")
65
+ site_a = Comfy::Cms::Site.create!(identifier: "site-a", hostname: "www.example.com:3000")
66
+ site_b = Comfy::Cms::Site.create!(identifier: "site-b", hostname: "www.example.com")
67
67
 
68
68
  [site_a, site_b].each do |site|
69
69
  layout = site.layouts.create!(identifier: "test")
@@ -79,11 +79,11 @@ class SeedsLayoutsTest < ActiveSupport::TestCase
79
79
 
80
80
  ComfortableMexicanSofa::Seeds::Layout::Importer.new("sample-site", "default-site").import!
81
81
  layout.reload
82
- assert_equal "default", layout.identifier
83
- assert_equal "Default Layout", layout.label
84
- assert_equal "{{cms:text content}}", layout.content
85
- assert_equal "default_css", layout.css
86
- assert_equal "default_js", layout.js
82
+ assert_equal "default", layout.identifier
83
+ assert_equal "Default Layout", layout.label
84
+ assert_equal "{{cms:textarea content}}", layout.content
85
+ assert_equal "default_css", layout.css
86
+ assert_equal "default_js", layout.js
87
87
  end
88
88
 
89
89
  def test_export
@@ -107,7 +107,7 @@ class SeedsLayoutsTest < ActiveSupport::TestCase
107
107
  position: 0
108
108
 
109
109
  [content]
110
- {{cms:text content}}
110
+ {{cms:textarea content}}
111
111
  [js]
112
112
  default_js
113
113
  [css]
@@ -124,7 +124,7 @@ class SeedsLayoutsTest < ActiveSupport::TestCase
124
124
 
125
125
  [content]
126
126
  {{cms:text header}}
127
- {{cms:text content}}
127
+ {{cms:textarea content}}
128
128
  [js]
129
129
  nested_js
130
130
  [css]
@@ -140,8 +140,8 @@ class SeedsLayoutsTest < ActiveSupport::TestCase
140
140
  position: 0
141
141
 
142
142
  [content]
143
- {{cms:text left_column}}
144
- {{cms:text right_column}}
143
+ {{cms:textarea left_column}}
144
+ {{cms:textarea right_column}}
145
145
  [js]
146
146
  child_js
147
147
  [css]
@@ -477,8 +477,8 @@ class CmsPageTest < ActiveSupport::TestCase
477
477
  end
478
478
 
479
479
  def test_url
480
- assert_equal "//test.host/", @page.url
481
- assert_equal "//test.host/child-page", comfy_cms_pages(:child).url
480
+ assert_equal "//www.example.com/", @page.url
481
+ assert_equal "//www.example.com/child-page", comfy_cms_pages(:child).url
482
482
 
483
483
  assert_equal "/", @page.url(relative: true)
484
484
  assert_equal "/child-page", comfy_cms_pages(:child).url(relative: true)
@@ -487,8 +487,8 @@ class CmsPageTest < ActiveSupport::TestCase
487
487
  @page.reload
488
488
  comfy_cms_pages(:child).reload
489
489
 
490
- assert_equal "//test.host/en/site/", @page.url
491
- assert_equal "//test.host/en/site/child-page", comfy_cms_pages(:child).url
490
+ assert_equal "//www.example.com/en/site/", @page.url
491
+ assert_equal "//www.example.com/en/site/child-page", comfy_cms_pages(:child).url
492
492
 
493
493
  assert_equal "/en/site/", @page.url(relative: true)
494
494
  assert_equal "/en/site/child-page", comfy_cms_pages(:child).url(relative: true)
@@ -496,8 +496,8 @@ class CmsPageTest < ActiveSupport::TestCase
496
496
 
497
497
  def test_url_with_public_cms_path
498
498
  ComfortableMexicanSofa.config.public_cms_path = "/custom"
499
- assert_equal "//test.host/custom/", @page.url
500
- assert_equal "//test.host/custom/child-page", comfy_cms_pages(:child).url
499
+ assert_equal "//www.example.com/custom/", @page.url
500
+ assert_equal "//www.example.com/custom/child-page", comfy_cms_pages(:child).url
501
501
 
502
502
  assert_equal "/custom/", @page.url(relative: true)
503
503
  assert_equal "/custom/child-page", comfy_cms_pages(:child).url(relative: true)
@@ -110,19 +110,19 @@ class CmsSiteTest < ActiveSupport::TestCase
110
110
 
111
111
  def test_find_site
112
112
  site_a = @site
113
- assert_equal "test.host", site_a.hostname
113
+ assert_equal "www.example.com", site_a.hostname
114
114
  assert_nil site_a.path
115
115
 
116
- assert_equal site_a, Comfy::Cms::Site.find_site("test.host")
117
- assert_equal site_a, Comfy::Cms::Site.find_site("test.host", "/some/path")
116
+ assert_equal site_a, Comfy::Cms::Site.find_site("www.example.com")
117
+ assert_equal site_a, Comfy::Cms::Site.find_site("www.example.com", "/some/path")
118
118
  assert_equal site_a, Comfy::Cms::Site.find_site("test99.host", "/some/path")
119
119
 
120
120
  site_b = Comfy::Cms::Site.create!(identifier: "test_a", hostname: "test2.host", path: "en")
121
121
  site_c = Comfy::Cms::Site.create!(identifier: "test_b", hostname: "test2.host", path: "fr")
122
122
 
123
- assert_equal site_a, Comfy::Cms::Site.find_site("test.host")
124
- assert_equal site_a, Comfy::Cms::Site.find_site("test.host", "/some/path")
125
- assert_equal site_a, Comfy::Cms::Site.find_site("test.host", "/some/path")
123
+ assert_equal site_a, Comfy::Cms::Site.find_site("www.example.com")
124
+ assert_equal site_a, Comfy::Cms::Site.find_site("www.example.com", "/some/path")
125
+ assert_equal site_a, Comfy::Cms::Site.find_site("www.example.com", "/some/path")
126
126
  assert_nil Comfy::Cms::Site.find_site("test99.host", "/some/path")
127
127
 
128
128
  assert_nil Comfy::Cms::Site.find_site("test2.host")
@@ -141,7 +141,7 @@ class CmsSiteTest < ActiveSupport::TestCase
141
141
 
142
142
  def test_find_site_with_public_cms_path
143
143
  ComfortableMexicanSofa.config.public_cms_path = "/custom"
144
- assert_equal "//test.host/custom", comfy_cms_sites(:default).url
144
+ assert_equal "//www.example.com/custom", @site.url
145
145
 
146
146
  site_a = Comfy::Cms::Site.create!(identifier: "test_a", hostname: "test2.host", path: "en")
147
147
  site_b = Comfy::Cms::Site.create!(identifier: "test_b", hostname: "test2.host", path: "fr")
@@ -165,8 +165,8 @@ class CmsSiteTest < ActiveSupport::TestCase
165
165
  site_b = Comfy::Cms::Site.create!(identifier: "site_b", hostname: "test2.host")
166
166
 
167
167
  ComfortableMexicanSofa.config.hostname_aliases = {
168
- "test.host" => "alias_a.host",
169
- "test2.host" => %w[alias_b.host alias_c.host]
168
+ "www.example.com" => "alias_a.host",
169
+ "test2.host" => %w[alias_b.host alias_c.host]
170
170
  }
171
171
 
172
172
  assert_equal site_a, Comfy::Cms::Site.find_site("alias_a.host")
@@ -175,14 +175,14 @@ class CmsSiteTest < ActiveSupport::TestCase
175
175
  end
176
176
 
177
177
  def test_url
178
- assert_equal "//test.host", @site.url
179
- assert_nil @site.url(relative: true)
178
+ assert_equal "//www.example.com", @site.url
179
+ assert_nil @site.url(relative: true)
180
180
 
181
181
  @site.update_column(:path, "/site-path")
182
- assert_equal "//test.host/site-path", @site.url
182
+ assert_equal "//www.example.com/site-path", @site.url
183
183
 
184
184
  ComfortableMexicanSofa.config.public_cms_path = "cms"
185
- assert_equal "//test.host/cms/site-path", @site.url
185
+ assert_equal "//www.example.com/cms/site-path", @site.url
186
186
 
187
187
  assert_equal "/cms/site-path", @site.url(relative: true)
188
188
  end
@@ -0,0 +1,15 @@
1
+ require_relative "../test_helper"
2
+
3
+ class LayoutsFrontendTest < ApplicationSystemTestCase
4
+
5
+ setup do
6
+ @site = comfy_cms_sites(:default)
7
+ end
8
+
9
+ def test_new_identifier
10
+ visit_p new_comfy_admin_cms_site_layout_path(@site)
11
+ fill_in "Layout Name", with: "Test Layout"
12
+ assert_equal "test-layout", find_field("Identifier").value
13
+ end
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+ require_relative "../test_helper"
2
+
3
+ class PagesFrontendTest < ApplicationSystemTestCase
4
+
5
+ setup do
6
+ @site = comfy_cms_sites(:default)
7
+ end
8
+
9
+ def test_new_identifier
10
+ visit_p new_comfy_admin_cms_site_page_path(@site)
11
+ fill_in "Label", with: "Test Page"
12
+ assert_equal "test-page", find_field("Slug").value
13
+ end
14
+
15
+ end
@@ -0,0 +1,11 @@
1
+ require_relative "../test_helper"
2
+
3
+ class SitesFrontendTest < ApplicationSystemTestCase
4
+
5
+ def test_new_identifier
6
+ visit_p new_comfy_admin_cms_site_path
7
+ fill_in "Label", with: "Test Site"
8
+ assert_equal "test-site", find_field("Identifier").value
9
+ end
10
+
11
+ end
@@ -0,0 +1,15 @@
1
+ require_relative "../test_helper"
2
+
3
+ class SnippetsFrontendTest < ApplicationSystemTestCase
4
+
5
+ setup do
6
+ @site = comfy_cms_sites(:default)
7
+ end
8
+
9
+ def test_new_identifier
10
+ visit_p new_comfy_admin_cms_site_snippet_path(@site)
11
+ fill_in "Label", with: "Test Snippet"
12
+ assert_equal "test-snippet", find_field("Identifier").value
13
+ end
14
+
15
+ end
data/test/test_helper.rb CHANGED
@@ -1,12 +1,17 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
 
3
- require "simplecov"
4
- require "coveralls"
5
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
6
- SimpleCov.start do
7
- add_filter "lib/generators"
8
- add_filter "lib/comfortable_mexican_sofa/engine.rb "
3
+ # In CI envoronment I don't want to send coverage report for system tests that
4
+ # obviously don't cover everything 100%
5
+ unless ENV["SKIP_COV"]
6
+ require "simplecov"
7
+ require "coveralls"
8
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
9
+ SimpleCov.start do
10
+ add_filter "lib/generators"
11
+ add_filter "lib/comfortable_mexican_sofa/engine.rb "
12
+ end
9
13
  end
14
+
10
15
  require_relative "../config/environment"
11
16
 
12
17
  require "rails/test_help"
@@ -121,12 +126,6 @@ end
121
126
 
122
127
  class ActionDispatch::IntegrationTest
123
128
 
124
- setup :setup_host
125
-
126
- def setup_host
127
- host! "test.host"
128
- end
129
-
130
129
  # Attaching http_auth stuff with request. Example use:
131
130
  # r :get, '/cms-admin/pages'
132
131
  def r(method, path, options = {})
@@ -186,3 +185,17 @@ class Rails::Generators::TestCase
186
185
  end
187
186
 
188
187
  end
188
+
189
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
190
+
191
+ driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400]
192
+
193
+ # Visiting path and passing in BasicAuth credentials at the same time
194
+ # I have no idea how to set headers here.
195
+ def visit_p(path)
196
+ username = ComfortableMexicanSofa::AccessControl::AdminAuthentication.username
197
+ password = ComfortableMexicanSofa::AccessControl::AdminAuthentication.password
198
+ visit("http://#{username}:#{password}@#{Capybara.server_host}:#{Capybara.server_port}#{path}")
199
+ end
200
+
201
+ end