elabs 2.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintrc.yml +26 -0
  3. data/.gitignore +49 -0
  4. data/.gitlab-ci.yml +93 -0
  5. data/.haml-lint.yml +4 -0
  6. data/.node-version +1 -0
  7. data/.rspec +1 -0
  8. data/.rubocop.yml +59 -0
  9. data/.ruby-version +1 -0
  10. data/.simplecov +5 -0
  11. data/.stylelintrc.yml +218 -0
  12. data/CHANGELOG.md +273 -0
  13. data/CODE_OF_CONDUCT.md +78 -0
  14. data/Gemfile +75 -0
  15. data/Gemfile.lock +376 -0
  16. data/LICENSE +21 -0
  17. data/LICENSES.md +6 -0
  18. data/README.md +41 -0
  19. data/ROADMAP.md +61 -0
  20. data/Rakefile +32 -0
  21. data/app/assets/config/elabs_manifest.js +3 -0
  22. data/app/assets/images/elabs/preview_placeholder.png +0 -0
  23. data/app/assets/images/elabs/preview_placeholder_nsfw.png +0 -0
  24. data/app/assets/javascripts/elabs/application.js +27 -0
  25. data/app/assets/javascripts/elabs/helpers-codemirror.js +29 -0
  26. data/app/assets/javascripts/elabs/helpers-markdown.js +42 -0
  27. data/app/assets/javascripts/elabs/helpers.js +17 -0
  28. data/app/assets/javascripts/elabs/modals.js +19 -0
  29. data/app/assets/javascripts/elabs/tabs.js +32 -0
  30. data/app/assets/stylesheets/elabs/_colors.scss +345 -0
  31. data/app/assets/stylesheets/elabs/_icons.scss +9 -0
  32. data/app/assets/stylesheets/elabs/_variables.scss +13 -0
  33. data/app/assets/stylesheets/elabs/app/_acts.scss +58 -0
  34. data/app/assets/stylesheets/elabs/app/_alerts.scss +3 -0
  35. data/app/assets/stylesheets/elabs/app/_buttons.scss +21 -0
  36. data/app/assets/stylesheets/elabs/app/_comments.scss +1 -0
  37. data/app/assets/stylesheets/elabs/app/_content.scss +10 -0
  38. data/app/assets/stylesheets/elabs/app/_content_uploads.scss +39 -0
  39. data/app/assets/stylesheets/elabs/app/_empty.scss +19 -0
  40. data/app/assets/stylesheets/elabs/app/_errors.scss +9 -0
  41. data/app/assets/stylesheets/elabs/app/_filter_links.scss +27 -0
  42. data/app/assets/stylesheets/elabs/app/_forms.scss +69 -0
  43. data/app/assets/stylesheets/elabs/app/_helpers.scss +3 -0
  44. data/app/assets/stylesheets/elabs/app/_languages.scss +6 -0
  45. data/app/assets/stylesheets/elabs/app/_layout.scss +194 -0
  46. data/app/assets/stylesheets/elabs/app/_licenses.scss +6 -0
  47. data/app/assets/stylesheets/elabs/app/_link-to-top.scss +8 -0
  48. data/app/assets/stylesheets/elabs/app/_medias.scss +12 -0
  49. data/app/assets/stylesheets/elabs/app/_modals.scss +53 -0
  50. data/app/assets/stylesheets/elabs/app/_nsfw.scss +5 -0
  51. data/app/assets/stylesheets/elabs/app/_pagination.scss +16 -0
  52. data/app/assets/stylesheets/elabs/app/_tabs.scss +54 -0
  53. data/app/assets/stylesheets/elabs/app/_tags.scss +6 -0
  54. data/app/assets/stylesheets/elabs/app/_toolbars.scss +3 -0
  55. data/app/assets/stylesheets/elabs/app/_users.scss +6 -0
  56. data/app/assets/stylesheets/elabs/app/admin-members/_forms.scss +6 -0
  57. data/app/assets/stylesheets/elabs/app/admin-members/_indexes.scss +70 -0
  58. data/app/assets/stylesheets/elabs/app/admin-members/_layout.scss +17 -0
  59. data/app/assets/stylesheets/elabs/app/areas/_devise.scss +31 -0
  60. data/app/assets/stylesheets/elabs/app/components/_cards.scss +16 -0
  61. data/app/assets/stylesheets/elabs/app/components/_container.scss +4 -0
  62. data/app/assets/stylesheets/elabs/app/mixins/_classifier-card.scss +16 -0
  63. data/app/assets/stylesheets/elabs/app/mixins/_content-card.scss +58 -0
  64. data/app/assets/stylesheets/elabs/app/mixins/_content-full.scss +39 -0
  65. data/app/assets/stylesheets/elabs/app/mixins/_icon.scss +9 -0
  66. data/app/assets/stylesheets/elabs/application.css +14 -0
  67. data/app/assets/stylesheets/elabs/lib/_codemirror.scss +26 -0
  68. data/app/assets/stylesheets/elabs/lib/fontawesome/_fontawesome.scss +38 -0
  69. data/app/assets/stylesheets/elabs/lib/fontawesome/_fonts.scss +42 -0
  70. data/app/assets/stylesheets/elabs/lib/fontawesome/_icons.scss +1118 -0
  71. data/app/assets/stylesheets/elabs/lib/knacss/_knacss-variables.scss +230 -0
  72. data/app/assets/stylesheets/elabs/lib/knacss/_knacss.scss +59 -0
  73. data/app/assets/stylesheets/elabs/style.scss +72 -0
  74. data/app/controllers/elabs/acts_controller.rb +12 -0
  75. data/app/controllers/elabs/admin/admin_application_controller.rb +19 -0
  76. data/app/controllers/elabs/admin/admin_content_application_controller.rb +66 -0
  77. data/app/controllers/elabs/admin/albums_controller.rb +10 -0
  78. data/app/controllers/elabs/admin/articles_controller.rb +10 -0
  79. data/app/controllers/elabs/admin/languages_controller.rb +77 -0
  80. data/app/controllers/elabs/admin/licenses_controller.rb +77 -0
  81. data/app/controllers/elabs/admin/notes_controller.rb +10 -0
  82. data/app/controllers/elabs/admin/projects_controller.rb +10 -0
  83. data/app/controllers/elabs/admin/reports_controller.rb +34 -0
  84. data/app/controllers/elabs/admin/tags_controller.rb +56 -0
  85. data/app/controllers/elabs/admin/uploads_controller.rb +10 -0
  86. data/app/controllers/elabs/admin/users_controller.rb +43 -0
  87. data/app/controllers/elabs/albums_controller.rb +26 -0
  88. data/app/controllers/elabs/articles_controller.rb +25 -0
  89. data/app/controllers/elabs/auth/callbacks_controller.rb +38 -0
  90. data/app/controllers/elabs/auth/confirmations_controller.rb +43 -0
  91. data/app/controllers/elabs/auth/passwords_controller.rb +47 -0
  92. data/app/controllers/elabs/auth/registrations_controller.rb +70 -0
  93. data/app/controllers/elabs/auth/sessions_controller.rb +36 -0
  94. data/app/controllers/elabs/auth/unlocks_controller.rb +38 -0
  95. data/app/controllers/elabs/concerns/elabs_controller.rb +18 -0
  96. data/app/controllers/elabs/concerns/localizable.rb +11 -0
  97. data/app/controllers/elabs/concerns/reportable.rb +17 -0
  98. data/app/controllers/elabs/content_application_controller.rb +45 -0
  99. data/app/controllers/elabs/elabs_application_controller.rb +95 -0
  100. data/app/controllers/elabs/languages_controller.rb +36 -0
  101. data/app/controllers/elabs/licenses_controller.rb +31 -0
  102. data/app/controllers/elabs/member/albums_controller.rb +11 -0
  103. data/app/controllers/elabs/member/articles_controller.rb +11 -0
  104. data/app/controllers/elabs/member/member_application_controller.rb +12 -0
  105. data/app/controllers/elabs/member/member_content_application_controller.rb +128 -0
  106. data/app/controllers/elabs/member/notes_controller.rb +11 -0
  107. data/app/controllers/elabs/member/preferences_controller.rb +36 -0
  108. data/app/controllers/elabs/member/projects_controller.rb +11 -0
  109. data/app/controllers/elabs/member/uploads_controller.rb +11 -0
  110. data/app/controllers/elabs/member/users_controller.rb +28 -0
  111. data/app/controllers/elabs/notes_controller.rb +25 -0
  112. data/app/controllers/elabs/projects_controller.rb +30 -0
  113. data/app/controllers/elabs/reports_controller.rb +36 -0
  114. data/app/controllers/elabs/tags_controller.rb +36 -0
  115. data/app/controllers/elabs/uploads_controller.rb +24 -0
  116. data/app/controllers/elabs/users_controller.rb +36 -0
  117. data/app/helpers/elabs/acts_helper.rb +22 -0
  118. data/app/helpers/elabs/admin_content_helper.rb +54 -0
  119. data/app/helpers/elabs/application_helper.rb +54 -0
  120. data/app/helpers/elabs/content_filters_helper.rb +97 -0
  121. data/app/helpers/elabs/content_renderer_helper.rb +13 -0
  122. data/app/helpers/elabs/member_content_helper.rb +47 -0
  123. data/app/helpers/elabs/thumbnails_helper.rb +28 -0
  124. data/app/helpers/elabs/time_helper.rb +19 -0
  125. data/app/helpers/elabs/uploads_helper.rb +19 -0
  126. data/app/jobs/elabs/application_job.rb +4 -0
  127. data/app/mailers/elabs/application_mailer.rb +6 -0
  128. data/app/models/elabs/act.rb +7 -0
  129. data/app/models/elabs/album.rb +24 -0
  130. data/app/models/elabs/albums_tag.rb +21 -0
  131. data/app/models/elabs/albums_upload.rb +21 -0
  132. data/app/models/elabs/application_content_record.rb +10 -0
  133. data/app/models/elabs/application_record.rb +5 -0
  134. data/app/models/elabs/article.rb +23 -0
  135. data/app/models/elabs/articles_tag.rb +21 -0
  136. data/app/models/elabs/comment.rb +12 -0
  137. data/app/models/elabs/concerns/actable_entity.rb +52 -0
  138. data/app/models/elabs/concerns/content_entity.rb +70 -0
  139. data/app/models/elabs/concerns/countable_entity.rb +81 -0
  140. data/app/models/elabs/concerns/taggable.rb +33 -0
  141. data/app/models/elabs/language.rb +17 -0
  142. data/app/models/elabs/license.rb +15 -0
  143. data/app/models/elabs/note.rb +21 -0
  144. data/app/models/elabs/notes_tag.rb +21 -0
  145. data/app/models/elabs/preference.rb +9 -0
  146. data/app/models/elabs/project.rb +25 -0
  147. data/app/models/elabs/projects_album.rb +21 -0
  148. data/app/models/elabs/projects_article.rb +21 -0
  149. data/app/models/elabs/projects_note.rb +21 -0
  150. data/app/models/elabs/projects_tag.rb +21 -0
  151. data/app/models/elabs/projects_upload.rb +21 -0
  152. data/app/models/elabs/report.rb +11 -0
  153. data/app/models/elabs/tag.rb +18 -0
  154. data/app/models/elabs/upload.rb +28 -0
  155. data/app/models/elabs/uploads_tag.rb +21 -0
  156. data/app/models/elabs/user.rb +30 -0
  157. data/app/validators/elabs/associated_author_validator.rb +11 -0
  158. data/app/views/elabs/acts/_act.json.jbuilder +2 -0
  159. data/app/views/elabs/acts/_filters.html.haml +3 -0
  160. data/app/views/elabs/acts/index.html.haml +27 -0
  161. data/app/views/elabs/acts/index.json.jbuilder +1 -0
  162. data/app/views/elabs/admin/albums/_album.json.jbuilder +2 -0
  163. data/app/views/elabs/admin/albums/index.html.haml +43 -0
  164. data/app/views/elabs/admin/albums/index.json.jbuilder +1 -0
  165. data/app/views/elabs/admin/articles/_article.json.jbuilder +2 -0
  166. data/app/views/elabs/admin/articles/index.html.haml +41 -0
  167. data/app/views/elabs/admin/articles/index.json.jbuilder +1 -0
  168. data/app/views/elabs/admin/languages/_form.html.haml +18 -0
  169. data/app/views/elabs/admin/languages/_language.json.jbuilder +2 -0
  170. data/app/views/elabs/admin/languages/edit.html.haml +6 -0
  171. data/app/views/elabs/admin/languages/index.html.haml +34 -0
  172. data/app/views/elabs/admin/languages/index.json.jbuilder +1 -0
  173. data/app/views/elabs/admin/languages/new.html.haml +3 -0
  174. data/app/views/elabs/admin/licenses/_form.html.haml +25 -0
  175. data/app/views/elabs/admin/licenses/_license.json.jbuilder +2 -0
  176. data/app/views/elabs/admin/licenses/edit.html.haml +6 -0
  177. data/app/views/elabs/admin/licenses/index.html.haml +42 -0
  178. data/app/views/elabs/admin/licenses/index.json.jbuilder +1 -0
  179. data/app/views/elabs/admin/licenses/new.html.haml +3 -0
  180. data/app/views/elabs/admin/notes/_note.json.jbuilder +2 -0
  181. data/app/views/elabs/admin/notes/index.html.haml +40 -0
  182. data/app/views/elabs/admin/notes/index.json.jbuilder +1 -0
  183. data/app/views/elabs/admin/projects/_project.json.jbuilder +2 -0
  184. data/app/views/elabs/admin/projects/index.html.haml +45 -0
  185. data/app/views/elabs/admin/projects/index.json.jbuilder +1 -0
  186. data/app/views/elabs/admin/reports/index.html.haml +27 -0
  187. data/app/views/elabs/admin/reports/index.json.jbuilder +1 -0
  188. data/app/views/elabs/admin/tags/_form.html.haml +17 -0
  189. data/app/views/elabs/admin/tags/_tag.json.jbuilder +2 -0
  190. data/app/views/elabs/admin/tags/edit.html.haml +6 -0
  191. data/app/views/elabs/admin/tags/index.html.haml +27 -0
  192. data/app/views/elabs/admin/tags/index.json.jbuilder +1 -0
  193. data/app/views/elabs/admin/uploads/_upload.json.jbuilder +2 -0
  194. data/app/views/elabs/admin/uploads/index.html.haml +45 -0
  195. data/app/views/elabs/admin/uploads/index.json.jbuilder +1 -0
  196. data/app/views/elabs/admin/users/_admin_user.json.jbuilder +2 -0
  197. data/app/views/elabs/admin/users/index.html.haml +33 -0
  198. data/app/views/elabs/admin/users/index.json.jbuilder +1 -0
  199. data/app/views/elabs/admin/users/show.html.haml +26 -0
  200. data/app/views/elabs/admin/users/show.json.jbuilder +1 -0
  201. data/app/views/elabs/albums/_album.html.haml +38 -0
  202. data/app/views/elabs/albums/_album.json.jbuilder +2 -0
  203. data/app/views/elabs/albums/_filters.html.haml +8 -0
  204. data/app/views/elabs/albums/index.html.haml +9 -0
  205. data/app/views/elabs/albums/index.json.jbuilder +1 -0
  206. data/app/views/elabs/albums/show.html.haml +60 -0
  207. data/app/views/elabs/albums/show.json.jbuilder +1 -0
  208. data/app/views/elabs/articles/_article.html.haml +30 -0
  209. data/app/views/elabs/articles/_article.json.jbuilder +2 -0
  210. data/app/views/elabs/articles/_filters.html.haml +8 -0
  211. data/app/views/elabs/articles/index.html.haml +9 -0
  212. data/app/views/elabs/articles/index.json.jbuilder +1 -0
  213. data/app/views/elabs/articles/show.html.haml +45 -0
  214. data/app/views/elabs/articles/show.json.jbuilder +1 -0
  215. data/app/views/elabs/auth/confirmations/new.html.haml +26 -0
  216. data/app/views/elabs/auth/passwords/edit.html.haml +31 -0
  217. data/app/views/elabs/auth/passwords/new.html.haml +23 -0
  218. data/app/views/elabs/auth/registrations/edit.html.haml +48 -0
  219. data/app/views/elabs/auth/registrations/new.html.haml +34 -0
  220. data/app/views/elabs/auth/sessions/_new.html.haml +15 -0
  221. data/app/views/elabs/auth/sessions/new.html.haml +8 -0
  222. data/app/views/elabs/auth/shared/_links.html.haml +16 -0
  223. data/app/views/elabs/auth/unlocks/new.html.haml +23 -0
  224. data/app/views/elabs/comments/_comment.json.jbuilder +2 -0
  225. data/app/views/elabs/comments/_comments.html.haml +21 -0
  226. data/app/views/elabs/comments/_form.html.haml +31 -0
  227. data/app/views/elabs/languages/_associations.html.haml +51 -0
  228. data/app/views/elabs/languages/_filters.html.haml +6 -0
  229. data/app/views/elabs/languages/_language.json.jbuilder +2 -0
  230. data/app/views/elabs/languages/index.html.haml +33 -0
  231. data/app/views/elabs/languages/index.json.jbuilder +1 -0
  232. data/app/views/elabs/languages/show.html.haml +38 -0
  233. data/app/views/elabs/languages/show.json.jbuilder +1 -0
  234. data/app/views/elabs/layouts/_empty.html.haml +3 -0
  235. data/app/views/elabs/layouts/_footer.html.haml +6 -0
  236. data/app/views/elabs/layouts/_hidden_entry.html.haml +6 -0
  237. data/app/views/elabs/layouts/_hidden_entry_full.html.haml +6 -0
  238. data/app/views/elabs/layouts/_language_menu.html.haml +2 -0
  239. data/app/views/elabs/layouts/_menu.html.haml +72 -0
  240. data/app/views/elabs/layouts/admin_application.html.haml +21 -0
  241. data/app/views/elabs/layouts/application.html.haml +37 -0
  242. data/app/views/elabs/layouts/lists/_albums.html.haml +10 -0
  243. data/app/views/elabs/layouts/lists/_projects.html.haml +10 -0
  244. data/app/views/elabs/layouts/lists/_tags.html.haml +9 -0
  245. data/app/views/elabs/layouts/mailer.html.haml +8 -0
  246. data/app/views/elabs/layouts/mailer.text.haml +1 -0
  247. data/app/views/elabs/layouts/member_application.html.haml +21 -0
  248. data/app/views/elabs/licenses/_associations.html.haml +51 -0
  249. data/app/views/elabs/licenses/_filters.html.haml +3 -0
  250. data/app/views/elabs/licenses/_license.json.jbuilder +2 -0
  251. data/app/views/elabs/licenses/index.html.haml +27 -0
  252. data/app/views/elabs/licenses/index.json.jbuilder +1 -0
  253. data/app/views/elabs/licenses/show.html.haml +44 -0
  254. data/app/views/elabs/licenses/show.json.jbuilder +1 -0
  255. data/app/views/elabs/member/albums/_album.json.jbuilder +2 -0
  256. data/app/views/elabs/member/albums/_form.html.haml +64 -0
  257. data/app/views/elabs/member/albums/edit.html.haml +6 -0
  258. data/app/views/elabs/member/albums/index.html.haml +49 -0
  259. data/app/views/elabs/member/albums/index.json.jbuilder +1 -0
  260. data/app/views/elabs/member/albums/new.html.haml +3 -0
  261. data/app/views/elabs/member/articles/_article.json.jbuilder +2 -0
  262. data/app/views/elabs/member/articles/_form.html.haml +70 -0
  263. data/app/views/elabs/member/articles/edit.html.haml +6 -0
  264. data/app/views/elabs/member/articles/index.html.haml +47 -0
  265. data/app/views/elabs/member/articles/index.json.jbuilder +1 -0
  266. data/app/views/elabs/member/articles/new.html.haml +3 -0
  267. data/app/views/elabs/member/layouts/_empty.html.haml +4 -0
  268. data/app/views/elabs/member/layouts/_markdown-preview.html.haml +8 -0
  269. data/app/views/elabs/member/notes/_form.html.haml +54 -0
  270. data/app/views/elabs/member/notes/_note.json.jbuilder +2 -0
  271. data/app/views/elabs/member/notes/edit.html.haml +6 -0
  272. data/app/views/elabs/member/notes/index.html.haml +47 -0
  273. data/app/views/elabs/member/notes/index.json.jbuilder +1 -0
  274. data/app/views/elabs/member/notes/new.html.haml +3 -0
  275. data/app/views/elabs/member/preferences/_form.html.haml +20 -0
  276. data/app/views/elabs/member/preferences/edit.html.haml +3 -0
  277. data/app/views/elabs/member/projects/_form.html.haml +71 -0
  278. data/app/views/elabs/member/projects/_project.json.jbuilder +2 -0
  279. data/app/views/elabs/member/projects/edit.html.haml +6 -0
  280. data/app/views/elabs/member/projects/index.html.haml +53 -0
  281. data/app/views/elabs/member/projects/index.json.jbuilder +1 -0
  282. data/app/views/elabs/member/projects/new.html.haml +3 -0
  283. data/app/views/elabs/member/uploads/_form.html.haml +67 -0
  284. data/app/views/elabs/member/uploads/_upload.json.jbuilder +2 -0
  285. data/app/views/elabs/member/uploads/edit.html.haml +6 -0
  286. data/app/views/elabs/member/uploads/index.html.haml +61 -0
  287. data/app/views/elabs/member/uploads/index.json.jbuilder +1 -0
  288. data/app/views/elabs/member/uploads/new.html.haml +3 -0
  289. data/app/views/elabs/member/users/_form.html.haml +38 -0
  290. data/app/views/elabs/notes/_filters.html.haml +7 -0
  291. data/app/views/elabs/notes/_note.html.haml +31 -0
  292. data/app/views/elabs/notes/_note.json.jbuilder +2 -0
  293. data/app/views/elabs/notes/index.html.haml +9 -0
  294. data/app/views/elabs/notes/index.json.jbuilder +1 -0
  295. data/app/views/elabs/notes/show.html.haml +44 -0
  296. data/app/views/elabs/notes/show.json.jbuilder +1 -0
  297. data/app/views/elabs/projects/_associations.html.haml +46 -0
  298. data/app/views/elabs/projects/_filters.html.haml +8 -0
  299. data/app/views/elabs/projects/_project.html.haml +29 -0
  300. data/app/views/elabs/projects/index.html.haml +9 -0
  301. data/app/views/elabs/projects/index.json.jbuilder +1 -0
  302. data/app/views/elabs/projects/show.html.haml +71 -0
  303. data/app/views/elabs/projects/show.json.jbuilder +1 -0
  304. data/app/views/elabs/reports/_form.html.haml +29 -0
  305. data/app/views/elabs/tags/_associations.html.haml +51 -0
  306. data/app/views/elabs/tags/_filters.html.haml +3 -0
  307. data/app/views/elabs/tags/_tag.json.jbuilder +2 -0
  308. data/app/views/elabs/tags/index.html.haml +26 -0
  309. data/app/views/elabs/tags/index.json.jbuilder +1 -0
  310. data/app/views/elabs/tags/show.html.haml +34 -0
  311. data/app/views/elabs/tags/show.json.jbuilder +1 -0
  312. data/app/views/elabs/uploads/_filters.html.haml +7 -0
  313. data/app/views/elabs/uploads/_player.html.haml +10 -0
  314. data/app/views/elabs/uploads/_preview.html.haml +17 -0
  315. data/app/views/elabs/uploads/_upload.html.haml +41 -0
  316. data/app/views/elabs/uploads/_upload.json.jbuilder +2 -0
  317. data/app/views/elabs/uploads/index.html.haml +9 -0
  318. data/app/views/elabs/uploads/index.json.jbuilder +1 -0
  319. data/app/views/elabs/uploads/show.html.haml +58 -0
  320. data/app/views/elabs/uploads/show.json.jbuilder +1 -0
  321. data/app/views/elabs/users/_associations.html.haml +51 -0
  322. data/app/views/elabs/users/_filters.html.haml +4 -0
  323. data/app/views/elabs/users/_user.html.haml +31 -0
  324. data/app/views/elabs/users/_user.json.jbuilder +2 -0
  325. data/app/views/elabs/users/index.html.haml +7 -0
  326. data/app/views/elabs/users/index.json.jbuilder +1 -0
  327. data/app/views/elabs/users/show.html.haml +48 -0
  328. data/app/views/elabs/users/show.json.jbuilder +1 -0
  329. data/bin/rails +14 -0
  330. data/config.ru +5 -0
  331. data/config/brakeman.ignore +124 -0
  332. data/config/brakeman.yml +3 -0
  333. data/config/cucumber.yml +9 -0
  334. data/config/routes.rb +116 -0
  335. data/db/migrate/20180813000000_devise_update_users.rb +15 -0
  336. data/db/migrate/20180813000001_create_languages.rb +16 -0
  337. data/db/migrate/20180813000002_create_tags.rb +14 -0
  338. data/db/migrate/20180813000004_create_licenses.rb +17 -0
  339. data/db/migrate/20180813000005_create_reports.rb +15 -0
  340. data/db/migrate/20180813000006_create_comments.rb +15 -0
  341. data/db/migrate/20180813000007_create_acts.rb +10 -0
  342. data/db/migrate/20180813000008_create_preferences.rb +13 -0
  343. data/db/migrate/20180813000009_create_active_storage_tables.active_storage.rb +26 -0
  344. data/db/migrate/20180813000010_create_albums.rb +23 -0
  345. data/db/migrate/20180813000011_create_articles.rb +23 -0
  346. data/db/migrate/20180813000012_create_notes.rb +21 -0
  347. data/db/migrate/20180813000013_create_uploads.rb +26 -0
  348. data/db/migrate/20180813000014_create_projects.rb +44 -0
  349. data/db/seeds.rb +10 -0
  350. data/db/seeds_development.rb +21 -0
  351. data/db/seeds_production.rb +0 -0
  352. data/docs/contributing.md +52 -0
  353. data/docs/cucumber_terms.md +9 -0
  354. data/docs/migrating.md +4 -0
  355. data/docs/overriding.md +20 -0
  356. data/docs/setup.md +136 -0
  357. data/docs/tips.md +13 -0
  358. data/elabs.gemspec +25 -0
  359. data/lib/assets/javascripts/README-highlight.js.md +39 -0
  360. data/lib/assets/javascripts/codemirror-5.39.2/addon/mode/overlay.js +90 -0
  361. data/lib/assets/javascripts/codemirror-5.39.2/lib/codemirror.js +9684 -0
  362. data/lib/assets/javascripts/codemirror-5.39.2/mode/clike/clike.js +834 -0
  363. data/lib/assets/javascripts/codemirror-5.39.2/mode/css/css.js +832 -0
  364. data/lib/assets/javascripts/codemirror-5.39.2/mode/gfm/gfm.js +129 -0
  365. data/lib/assets/javascripts/codemirror-5.39.2/mode/htmlmixed/htmlmixed.js +152 -0
  366. data/lib/assets/javascripts/codemirror-5.39.2/mode/javascript/javascript.js +896 -0
  367. data/lib/assets/javascripts/codemirror-5.39.2/mode/markdown/markdown.js +882 -0
  368. data/lib/assets/javascripts/codemirror-5.39.2/mode/meta.js +217 -0
  369. data/lib/assets/javascripts/codemirror-5.39.2/mode/xml/xml.js +402 -0
  370. data/lib/assets/javascripts/highlight.js-9.12.0/highlight.pack.js +2 -0
  371. data/lib/assets/javascripts/markdown-it-8.4.2.min.js +1 -0
  372. data/lib/assets/stylesheets/codemirror-5.39.2/lib/codemirror.css +346 -0
  373. data/lib/assets/stylesheets/codemirror-5.39.2/theme/base16-dark.css +38 -0
  374. data/lib/assets/stylesheets/codemirror-5.39.2/theme/base16-light.css +38 -0
  375. data/lib/assets/stylesheets/highlight.js-9.12.0/styles/atelier-sulphurpool-light.css +69 -0
  376. data/lib/elabs.rb +41 -0
  377. data/lib/elabs/engine.rb +5 -0
  378. data/lib/elabs/version.rb +3 -0
  379. data/lib/generators/elabs/assets_generator.rb +36 -0
  380. data/lib/generators/elabs/devise_views_generator.rb +24 -0
  381. data/lib/generators/elabs/install_generator.rb +26 -0
  382. data/lib/generators/elabs/required_assets_generator.rb +26 -0
  383. data/lib/generators/elabs/views_generator.rb +25 -0
  384. data/lib/generators/templates/elabs.rb +25 -0
  385. data/lib/generators/templates/fast_gettext.rb +3 -0
  386. data/lib/tasks/.keep +0 -0
  387. data/lib/tasks/cucumber.rake +75 -0
  388. data/lib/tasks/elabs_tasks.rake +4 -0
  389. data/lib/tasks/factory_bot.rake +14 -0
  390. data/lib/tasks/wipe.rake +31 -0
  391. data/locale/app.pot +1124 -0
  392. data/locale/devise_strings.rb +88 -0
  393. data/locale/en/app.edit.po +1123 -0
  394. data/locale/en/app.po +1123 -0
  395. data/locale/en/app.po.time_stamp +0 -0
  396. data/locale/fr/app.edit.po +1126 -0
  397. data/locale/fr/app.po +1125 -0
  398. data/locale/fr/app.po.time_stamp +0 -0
  399. data/locale/model_attributes.rb +85 -0
  400. data/package.json +22 -0
  401. data/script/cucumber +10 -0
  402. data/tmp/pids/.keep +0 -0
  403. data/yarn.lock +2759 -0
  404. metadata +463 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 838695848a9e3f533e2419d77e5097a05e267442099baacc40753526d54c1731
4
+ data.tar.gz: c006a4f8a7e418d3f3969e74b787d6726fecdac085cea7edac0e35c8df375de5
5
+ SHA512:
6
+ metadata.gz: 7021d019b2d4460ce463f72c026e82bf467a1e6c56e43be61f7fa9e212ce68bbfd12a24439200eb5fd8714f5f975375dad3c288f80cbd00878dcbb205dab94dc
7
+ data.tar.gz: 2756d6742ed8d5da4d2506e552a48e51f6398b5db548933278a1dd6f163b238f82395de846cec3ff972aca9898bd504e1bb42971912b19cf57a0fc739741293a
@@ -0,0 +1,26 @@
1
+ ---
2
+ parser: null
3
+ extends: standard
4
+ env:
5
+ browser: true
6
+ globals:
7
+ App: true
8
+ ActionCable: true
9
+ # Methods
10
+ addClass: true
11
+ removeClass: true
12
+ openModal: true
13
+ # Libs
14
+ CodeMirror: true
15
+ hljs: true
16
+ rules:
17
+ comma-dangle:
18
+ - error
19
+ - arrays: always-multiline
20
+ - objects: always-multiline
21
+ - imports: always-multiline
22
+ - exports: always-multiline
23
+ - functions: ignore
24
+ no-unused-vars:
25
+ - error
26
+ - vars: local
@@ -0,0 +1,49 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # ---------------------------------------------------------
8
+ # Generic files
9
+ # ---------------------------------------------------------
10
+ # Ignore bundler config.
11
+ /.bundle
12
+
13
+ node_modules
14
+ yarn-error.log
15
+ /spec/dummy/node_modules
16
+ /spec/dummy/yarn-error.log
17
+
18
+ /public/assets
19
+
20
+ # IDE configuration
21
+ .idea/
22
+
23
+ # Commands outputs
24
+ .byebug_history
25
+
26
+ # Test outputs
27
+ /coverage/
28
+
29
+ # ---------------------------------------------------------
30
+ # Dummy app files
31
+ # ---------------------------------------------------------
32
+ # Ignore the default SQLite database.
33
+ /spec/dummy/db/*.sqlite3
34
+ /spec/dummy/db/*.sqlite3-journal
35
+
36
+ # Ignore all logfiles and tempfiles.
37
+ /spec/dummy/log/*
38
+ /spec/dummy/tmp/*
39
+ !/spec/dummy/log/.keep
40
+ !/spec/dummy/tmp/.keep
41
+
42
+ # Ignore uploaded files in development
43
+ /spec/dummy/storage/*
44
+ !/spec/dummy/storage/.keep
45
+ !/spec/dummy/tmp/storage/.keep
46
+
47
+ # Ignore installation-specific files
48
+ /spec/dummy/config/database.yml
49
+ /spec/dummy/db/schema.rb
@@ -0,0 +1,93 @@
1
+ ---
2
+ image: starefossen/ruby-node:2-8
3
+
4
+ services:
5
+ - postgres:latest
6
+
7
+ variables:
8
+ POSTGRES_DB: elcms_ci
9
+ POSTGRES_USER: runner
10
+ POSTGRES_PASSWORD: ""
11
+
12
+ before_script:
13
+ # The ruby image set this, and we want the bundle config to be in .bundle/
14
+ - unset BUNDLE_APP_CONFIG
15
+
16
+ stages:
17
+ - prepare
18
+ - code-lint
19
+ - test
20
+
21
+ bundle:
22
+ stage: prepare
23
+ script:
24
+ - yarn install
25
+ - bundle install --deployment
26
+ - cp spec/dummy/config/database.ci.yml spec/dummy/config/database.yml
27
+ - bundle exec rails db:migrate
28
+ - cd spec/dummy && yarn install
29
+ artifacts:
30
+ untracked: true
31
+ expire_in: 1 hour
32
+ paths:
33
+ - 'vendor/'
34
+ cache:
35
+ untracked: true
36
+ paths:
37
+ - 'vendor/'
38
+
39
+ rubocop:
40
+ stage: code-lint
41
+ script: bundle exec rubocop
42
+ dependencies:
43
+ - bundle
44
+
45
+ sass_lint:
46
+ stage: code-lint
47
+ script: yarn run lint:sass
48
+ dependencies:
49
+ - bundle
50
+
51
+ es_lint:
52
+ stage: code-lint
53
+ script: yarn run lint:js
54
+ dependencies:
55
+ - bundle
56
+
57
+ haml_lint:
58
+ stage: code-lint
59
+ script: bundle exec haml-lint app/views
60
+ dependencies:
61
+ - bundle
62
+
63
+ factory_bot_lint:
64
+ stage: code-lint
65
+ script:
66
+ - bundle exec rails db:drop
67
+ - bundle exec rails db:create
68
+ - bundle exec rails db:migrate
69
+ - bundle exec rake app:factory_bot:lint
70
+ dependencies:
71
+ - bundle
72
+
73
+ rspec:
74
+ stage: test
75
+ script:
76
+ - bundle exec rails spec
77
+ dependencies:
78
+ - bundle
79
+
80
+ cucumber:
81
+ stage: test
82
+ script:
83
+ - RAILS_ENV=test bundle exec rails db:migrate
84
+ - bundle exec cucumber
85
+ dependencies:
86
+ - bundle
87
+
88
+ brakeman:
89
+ stage: test
90
+ script:
91
+ - bundle exec brakeman
92
+ dependencies:
93
+ - bundle
@@ -0,0 +1,4 @@
1
+ ---
2
+ linters:
3
+ LineLength:
4
+ max: 120
@@ -0,0 +1 @@
1
+ 8
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,59 @@
1
+ AllCops:
2
+ Exclude:
3
+ - bin/*
4
+ - coverage/**/*
5
+ - tmp/**/*
6
+ - db/schema.rb
7
+ - vendor/bundle/**/*
8
+ - spec/dummy/bin/*
9
+ - spec/dummy/tmp/**/*
10
+ - spec/dummy/storage/**/*
11
+ - spec/dummy/db/schema.rb
12
+ TargetRubyVersion: 2.4
13
+
14
+ Metrics/AbcSize:
15
+ Max: 16.5
16
+ Exclude:
17
+ - db/migrate/*.rb
18
+
19
+ Metrics/BlockLength:
20
+ Exclude:
21
+ - db/migrate/*.rb
22
+ - config/environments/production.rb
23
+ - config/routes.rb
24
+ - spec/controllers/**/*.rb
25
+ - spec/factories/**/*.rb
26
+ - spec/features/**/*.rb
27
+ - spec/models/**/*.rb
28
+ - spec/routing/**/*.rb
29
+ - spec/support/shared_examples/**/*.rb
30
+ - lib/tasks/cucumber.rake
31
+ - elabs.gemspec
32
+
33
+ Metrics/ClassLength:
34
+ Exclude:
35
+ - db/migrate/*.rb
36
+
37
+ Metrics/LineLength:
38
+ Enabled: false
39
+
40
+ Metrics/MethodLength:
41
+ Max: 12
42
+ Exclude:
43
+ - db/migrate/*.rb
44
+ - spec/dummy/db/migrate/*.rb
45
+
46
+ Style/Documentation:
47
+ Enabled: false
48
+
49
+ Style/FrozenStringLiteralComment:
50
+ Enabled: false
51
+
52
+ Style/ClassAndModuleChildren:
53
+ Exclude:
54
+ - spec/**/*
55
+ - test/**/*
56
+
57
+ Lint/UselessAssignment:
58
+ Exclude:
59
+ - spec/controllers/*.rb
@@ -0,0 +1 @@
1
+ 2.5.1
@@ -0,0 +1,5 @@
1
+ # vim:filetype=ruby:
2
+
3
+ SimpleCov.start 'rails' do
4
+ add_filter %r{/vendor}
5
+ end
@@ -0,0 +1,218 @@
1
+ ---
2
+ plugins:
3
+ - stylelint-scss
4
+ rules:
5
+ scss/at-else-closing-brace-newline-after: always-last-in-chain
6
+ scss/at-else-closing-brace-space-after: always-intermediate
7
+ scss/at-else-empty-line-before: never
8
+ scss/at-else-if-parentheses-space-before: always
9
+ scss/at-extend-no-missing-placeholder: true
10
+ scss/at-function-named-arguments: never
11
+ scss/at-function-parentheses-space-before: never
12
+ scss/at-function-pattern: '[a-z0-9]+(?:-[a-z0-9]*)*'
13
+ scss/at-if-closing-brace-newline-after: always-last-in-chain
14
+ scss/at-if-closing-brace-space-after: always-intermediate
15
+ scss/at-import-no-partial-leading-underscore: true
16
+ # scss/at-import-partial-extension-blacklist: []
17
+ scss/at-import-partial-extension-whitelist:
18
+ - scss
19
+ - css
20
+ scss/at-mixin-argumentless-call-parentheses: always
21
+ scss/at-mixin-named-arguments: never
22
+ scss/at-mixin-parentheses-space-before: never
23
+ scss/at-mixin-pattern: '[a-z0-9]+(?:-[a-z0-9]*)*'
24
+ scss/at-rule-no-unknown: true
25
+ scss/dollar-variable-colon-newline-after: always-multi-line
26
+ scss/dollar-variable-colon-space-after: always-single-line # "at-least-one-space"
27
+ scss/dollar-variable-colon-space-before: never
28
+ scss/dollar-variable-default: null
29
+ scss/dollar-variable-empty-line-before: never
30
+ scss/dollar-variable-no-missing-interpolation: true
31
+ scss/dollar-variable-pattern: '[a-z0-9]+(?:-[a-z0-9]*)*'
32
+ scss/percent-placeholder-pattern: '[a-z0-9]+(?:-[a-z0-9]*)*'
33
+ scss/double-slash-comment-empty-line-before: always
34
+ scss/double-slash-comment-inline: never
35
+ scss/double-slash-comment-whitespace-inside: always
36
+ scss/declaration-nested-properties:
37
+ - always
38
+ - except:
39
+ - only-of-namespace
40
+ scss/declaration-nested-properties-no-divided-groups: true
41
+ scss/media-feature-value-dollar-variable: always
42
+ scss/operator-no-newline-after: true
43
+ scss/operator-no-newline-before: true
44
+ scss/operator-no-unspaced: true
45
+ scss/partial-no-import: null
46
+ scss/selector-no-redundant-nesting-selector: true
47
+ scss/no-duplicate-dollar-variables: true
48
+
49
+ # Stylelint rules
50
+ # at-rule-blacklist: []
51
+ at-rule-empty-line-before: never
52
+ at-rule-name-case: lower
53
+ # at-rule-name-newline-after: always
54
+ at-rule-name-space-after: always-single-line
55
+ at-rule-no-unknown: null # Overridden by scss plugin
56
+ at-rule-no-vendor-prefix: true
57
+ at-rule-semicolon-newline-after: always
58
+ at-rule-semicolon-space-before: never
59
+ # at-rule-whitelist: []
60
+ block-closing-brace-empty-line-before: never
61
+ block-closing-brace-newline-after: always
62
+ block-closing-brace-newline-before: always-multi-line
63
+ # block-closing-brace-space-after: never
64
+ block-closing-brace-space-before: always-single-line
65
+ block-no-empty: true
66
+ block-opening-brace-newline-after: always-multi-line
67
+ # block-opening-brace-newline-before: never-multi-line
68
+ block-opening-brace-space-after: always-single-line
69
+ block-opening-brace-space-before: always
70
+ color-hex-case: lower
71
+ color-hex-length: long
72
+ color-named: never
73
+ color-no-hex: null
74
+ color-no-invalid-hex: true
75
+ # comment-empty-line-before: always|never
76
+ comment-no-empty: true
77
+ comment-whitespace-inside: always
78
+ comment-word-blacklist: []
79
+ custom-media-pattern: '[a-z0-9]+(?:-[a-z0-9]*)*'
80
+ custom-property-empty-line-before: never
81
+ custom-property-pattern: '--[a-z0-9]+(?:-[a-z0-9]*)*'
82
+ declaration-bang-space-after: never
83
+ declaration-bang-space-before: always
84
+ declaration-block-no-duplicate-properties: true
85
+ declaration-block-no-redundant-longhand-properties: true
86
+ declaration-block-no-shorthand-property-overrides: true
87
+ declaration-block-semicolon-newline-after: always-multi-line
88
+ declaration-block-semicolon-newline-before: never-multi-line
89
+ declaration-block-semicolon-space-after: always-single-line
90
+ declaration-block-semicolon-space-before: never
91
+ declaration-block-single-line-max-declarations: 3
92
+ declaration-block-trailing-semicolon: always
93
+ declaration-colon-newline-after: always-multi-line
94
+ declaration-colon-space-after: always-single-line
95
+ declaration-colon-space-before: never
96
+ declaration-empty-line-before: never
97
+ declaration-no-important: true
98
+ # declaration-property-unit-blacklist: []
99
+ # declaration-property-unit-whitelist: []
100
+ # declaration-property-value-blacklist: []
101
+ # declaration-property-value-whitelist: []
102
+ font-family-name-quotes: always-unless-keyword
103
+ font-family-no-duplicate-names: true
104
+ font-family-no-missing-generic-family-keyword: null
105
+ font-weight-notation: numeric
106
+ function-blacklist: []
107
+ function-calc-no-unspaced-operator: true
108
+ function-comma-newline-after: never-multi-line
109
+ function-comma-newline-before: never-multi-line
110
+ function-comma-space-after: always
111
+ function-comma-space-before: never
112
+ function-max-empty-lines: 1
113
+ function-name-case: lower
114
+ function-parentheses-newline-inside: never-multi-line
115
+ function-parentheses-space-inside: never
116
+ function-url-no-scheme-relative: true
117
+ function-url-quotes: always
118
+ # function-url-scheme-blacklist: []
119
+ # function-url-scheme-whitelist: []
120
+ # function-whitelist: []
121
+ function-whitespace-after: always
122
+ indentation: 2
123
+ keyframe-declaration-no-important: true
124
+ keyframes-name-pattern: string
125
+ length-zero-no-unit: true
126
+ max-empty-lines: 1
127
+ max-line-length: 120
128
+ max-nesting-depth: 4
129
+ media-feature-colon-space-after: always
130
+ media-feature-colon-space-before: never
131
+ # media-feature-name-blacklist: []
132
+ media-feature-name-case: lower
133
+ media-feature-name-no-unknown: true
134
+ media-feature-name-no-vendor-prefix: true
135
+ # media-feature-name-value-whitelist: []
136
+ # media-feature-name-whitelist: []
137
+ media-feature-parentheses-space-inside: never
138
+ media-feature-range-operator-space-after: always
139
+ media-feature-range-operator-space-before: always
140
+ media-query-list-comma-newline-after: always-multi-line
141
+ media-query-list-comma-newline-before: never-multi-line
142
+ media-query-list-comma-space-after: always-single-line
143
+ media-query-list-comma-space-before: never
144
+ no-descending-specificity: true
145
+ no-duplicate-at-import-rules: true
146
+ no-duplicate-selectors: true
147
+ no-empty-source: true
148
+ no-eol-whitespace: true
149
+ no-extra-semicolons: true
150
+ no-invalid-double-slash-comments: true
151
+ no-missing-end-of-source-newline: true
152
+ no-unknown-animations: true
153
+ number-leading-zero: never
154
+ number-max-precision: 2
155
+ number-no-trailing-zeros: true
156
+ # property-blacklist: []
157
+ property-case: lower
158
+ property-no-unknown: true
159
+ property-no-vendor-prefix: true
160
+ # property-whitelist: []
161
+ rule-empty-line-before: always
162
+ selector-attribute-brackets-space-inside: never
163
+ # selector-attribute-operator-blacklist: []
164
+ selector-attribute-operator-space-after: never
165
+ selector-attribute-operator-space-before: never
166
+ # selector-attribute-operator-whitelist: []
167
+ selector-attribute-quotes: always
168
+ selector-class-pattern: '[a-z0-9]+(?:-{1,2}[a-z0-9]*)*'
169
+ # selector-combinator-blacklist: []
170
+ selector-combinator-space-after: always
171
+ selector-combinator-space-before: always
172
+ # selector-combinator-whitelist: []
173
+ selector-descendant-combinator-no-non-space: true
174
+ selector-id-pattern: '[a-z]+(?:-[a-z]*)*'
175
+ selector-list-comma-newline-after: always
176
+ selector-list-comma-newline-before: never-multi-line
177
+ selector-list-comma-space-after: always-single-line
178
+ selector-list-comma-space-before: never
179
+ selector-max-attribute: 2
180
+ selector-max-class: 4
181
+ selector-max-combinators: 3
182
+ selector-max-compound-selectors: 5
183
+ selector-max-empty-lines: 0
184
+ selector-max-id: 1
185
+ selector-max-pseudo-class: 2
186
+ # selector-max-specificity: 1,2,3
187
+ selector-max-type: 1
188
+ selector-max-universal: 1
189
+ selector-nested-pattern: ''
190
+ selector-no-qualifying-type: true
191
+ selector-no-vendor-prefix: true
192
+ # selector-pseudo-class-blacklist: []
193
+ selector-pseudo-class-case: lower
194
+ selector-pseudo-class-no-unknown: true
195
+ selector-pseudo-class-parentheses-space-inside: never
196
+ # selector-pseudo-class-whitelist: []
197
+ # selector-pseudo-element-blacklist: []
198
+ selector-pseudo-element-case: lower
199
+ selector-pseudo-element-colon-notation: single
200
+ selector-pseudo-element-no-unknown: true
201
+ # selector-pseudo-element-whitelist: []
202
+ selector-type-case: lower
203
+ selector-type-no-unknown: true
204
+ shorthand-property-no-redundant-values: true
205
+ string-no-newline: true
206
+ string-quotes: single
207
+ time-min-milliseconds: 100
208
+ # unit-blacklist: []
209
+ unit-case: lower
210
+ unit-no-unknown: true
211
+ # unit-whitelist: []
212
+ value-keyword-case: lower
213
+ value-list-comma-newline-after: always-multi-line
214
+ value-list-comma-newline-before: never-multi-line
215
+ value-list-comma-space-after: always-single-line
216
+ value-list-comma-space-before: never
217
+ value-list-max-empty-lines: 0
218
+ value-no-vendor-prefix: true