avo 0.5.0.beta5 → 0.5.0.beta10

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

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +47 -48
  3. data/Gemfile.lock +28 -22
  4. data/Rakefile +14 -14
  5. data/app/components/avo/common/badge_viewer_component.html.erb +1 -1
  6. data/app/components/avo/common/gravatar_viewer_component.html.erb +2 -2
  7. data/app/components/avo/common/gravatar_viewer_component.rb +2 -1
  8. data/app/components/avo/common/multiple_file_viewer_component.rb +1 -1
  9. data/app/components/avo/common/single_file_viewer_component.rb +1 -1
  10. data/app/components/avo/edit/field_wrapper_component.rb +3 -3
  11. data/app/components/avo/edit/fields/trix_field_component.html.erb +1 -1
  12. data/app/components/avo/index/field_wrapper_component.html.erb +1 -1
  13. data/app/components/avo/index/field_wrapper_component.rb +1 -1
  14. data/app/components/avo/index/fields/belongs_to_field_component.html.erb +1 -5
  15. data/app/components/avo/index/fields/boolean_group_field_component.html.erb +1 -1
  16. data/app/components/avo/index/fields/gravatar_field_component.html.erb +2 -1
  17. data/app/components/avo/index/fields/has_one_field_component.html.erb +1 -5
  18. data/app/components/avo/index/fields/id_field_component.html.erb +1 -1
  19. data/app/components/avo/index/grid_item_component.html.erb +2 -2
  20. data/app/components/avo/index/grid_item_component.rb +10 -9
  21. data/app/components/avo/index/resource_controls_component.html.erb +12 -4
  22. data/app/components/avo/index/resource_controls_component.rb +2 -2
  23. data/app/components/avo/panel_component.rb +7 -6
  24. data/app/components/avo/resource_component.rb +4 -3
  25. data/app/components/avo/show/field_wrapper_component.html.erb +1 -1
  26. data/app/components/avo/show/field_wrapper_component.rb +3 -3
  27. data/app/components/avo/show/fields/boolean_group_field_component.html.erb +1 -1
  28. data/app/components/avo/show/fields/external_image_field_component.html.erb +1 -1
  29. data/app/components/avo/views/resource_edit_component.rb +4 -3
  30. data/app/components/avo/views/resource_index_component.rb +8 -7
  31. data/app/components/avo/views/resource_new_component.rb +4 -3
  32. data/app/components/avo/views/resource_show_component.html.erb +14 -2
  33. data/app/components/avo/views/resource_show_component.rb +21 -21
  34. data/app/controllers/avo/actions_controller.rb +34 -33
  35. data/app/controllers/avo/application_controller.rb +124 -116
  36. data/app/controllers/avo/attachments_controller.rb +3 -3
  37. data/app/controllers/avo/base_controller.rb +80 -87
  38. data/app/controllers/avo/home_controller.rb +2 -2
  39. data/app/controllers/avo/relations_controller.rb +29 -28
  40. data/app/controllers/avo/resources_controller.rb +1 -1
  41. data/app/controllers/avo/search_controller.rb +20 -19
  42. data/app/helpers/avo/application_helper.rb +49 -43
  43. data/app/helpers/avo/resources_helper.rb +11 -11
  44. data/app/mailers/avo/application_mailer.rb +2 -2
  45. data/app/{frontend/css → packs/entrypoints}/application.css +12 -11
  46. data/app/{frontend/packs → packs/entrypoints}/application.js +9 -3
  47. data/app/{frontend → packs}/fonts/nunito-v16-latin-700.eot +0 -0
  48. data/app/{frontend → packs}/fonts/nunito-v16-latin-700.svg +0 -0
  49. data/app/{frontend → packs}/fonts/nunito-v16-latin-700.ttf +0 -0
  50. data/app/{frontend → packs}/fonts/nunito-v16-latin-700.woff +0 -0
  51. data/app/{frontend → packs}/fonts/nunito-v16-latin-700.woff2 +0 -0
  52. data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.eot +0 -0
  53. data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.svg +0 -0
  54. data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.ttf +0 -0
  55. data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.woff +0 -0
  56. data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.woff2 +0 -0
  57. data/app/{frontend → packs}/images/logo.png +0 -0
  58. data/app/{frontend → packs}/importmap.json.erb +0 -0
  59. data/app/{frontend → packs}/js/controllers/action_controller.js +0 -0
  60. data/app/{frontend → packs}/js/controllers/actions_picker_controller.js +0 -0
  61. data/app/{frontend → packs}/js/controllers/alerts_controller.js +0 -0
  62. data/app/{frontend → packs}/js/controllers/attachments_controller.js +0 -0
  63. data/app/{frontend → packs}/js/controllers/boolean_filter_controller.js +0 -0
  64. data/app/{frontend → packs}/js/controllers/fields/code_field_controller.js +14 -14
  65. data/app/{frontend → packs}/js/controllers/fields/date_field_controller.js +0 -0
  66. data/app/{frontend → packs}/js/controllers/fields/simple_mde_controller.js +0 -0
  67. data/app/{frontend → packs}/js/controllers/filter_controller.js +20 -3
  68. data/app/{frontend → packs}/js/controllers/hidden_input_controller.js +0 -0
  69. data/app/{frontend → packs}/js/controllers/item_selector_controller.js +0 -0
  70. data/app/{frontend → packs}/js/controllers/modal_controller.js +0 -0
  71. data/app/{frontend → packs}/js/controllers/per_page_controller.js +5 -1
  72. data/app/{frontend → packs}/js/controllers/select_filter_controller.js +0 -0
  73. data/app/{frontend → packs}/js/controllers/tippy_controller.js +0 -0
  74. data/app/{frontend → packs}/js/controllers/toggle_panel_controller.js +0 -0
  75. data/app/{frontend → packs}/js/helpers/cast_boolean.js +0 -0
  76. data/app/{frontend → packs}/js/toastr.js +1 -0
  77. data/app/{frontend/css → packs/stylesheets}/alerts.css +0 -0
  78. data/app/packs/stylesheets/components/code.css +11 -0
  79. data/app/{frontend/css → packs/stylesheets}/components/status.css +0 -0
  80. data/app/{frontend/css → packs/stylesheets}/fonts.css +0 -0
  81. data/app/{frontend/css → packs/stylesheets}/loader.css +0 -0
  82. data/app/{frontend/css → packs/stylesheets}/pagination.css +0 -0
  83. data/app/{frontend/css → packs/stylesheets}/tailwindcss/base.css +0 -0
  84. data/app/{frontend/css → packs/stylesheets}/tailwindcss/components.css +0 -0
  85. data/app/{frontend/css → packs/stylesheets}/tailwindcss/utilities.css +0 -0
  86. data/app/{frontend/css → packs/stylesheets}/tooltips.css +0 -0
  87. data/app/{frontend/css → packs/stylesheets}/typography.css +0 -0
  88. data/app/{frontend → packs}/svgs/arrow-circle-right.svg +0 -0
  89. data/app/{frontend → packs}/svgs/arrow-left.svg +0 -0
  90. data/app/{frontend → packs}/svgs/avocado.svg +0 -0
  91. data/app/{frontend → packs}/svgs/badge-check-sm.svg +0 -0
  92. data/app/{frontend → packs}/svgs/check-circle.svg +0 -0
  93. data/app/{frontend → packs}/svgs/chevron-down.svg +0 -0
  94. data/app/{frontend → packs}/svgs/chevron-up.svg +0 -0
  95. data/app/{frontend → packs}/svgs/code.svg +0 -0
  96. data/app/{frontend → packs}/svgs/color-swatch.svg +0 -0
  97. data/app/{frontend → packs}/svgs/document-text.svg +0 -0
  98. data/app/{frontend → packs}/svgs/download.svg +0 -0
  99. data/app/{frontend → packs}/svgs/edit.svg +0 -0
  100. data/app/{frontend → packs}/svgs/exclamation-circle-sm.svg +0 -0
  101. data/app/{frontend → packs}/svgs/exclamation-sm.svg +0 -0
  102. data/app/{frontend → packs}/svgs/exclamation.svg +0 -0
  103. data/app/{frontend → packs}/svgs/eye.svg +0 -0
  104. data/app/{frontend → packs}/svgs/filter.svg +0 -0
  105. data/app/{frontend → packs}/svgs/fire.svg +0 -0
  106. data/app/{frontend → packs}/svgs/game-board.svg +0 -0
  107. data/app/{frontend → packs}/svgs/globe.svg +0 -0
  108. data/app/{frontend → packs}/svgs/information-circle-sm.svg +0 -0
  109. data/app/{frontend → packs}/svgs/information-circle.svg +0 -0
  110. data/app/{frontend → packs}/svgs/library.svg +0 -0
  111. data/app/{frontend → packs}/svgs/photograph.svg +0 -0
  112. data/app/{frontend → packs}/svgs/play.svg +0 -0
  113. data/app/{frontend → packs}/svgs/plus-circle.svg +0 -0
  114. data/app/{frontend → packs}/svgs/plus.svg +0 -0
  115. data/app/{frontend → packs}/svgs/question-mark-circle.svg +0 -0
  116. data/app/{frontend → packs}/svgs/save.svg +0 -0
  117. data/app/{frontend → packs}/svgs/selector.svg +0 -0
  118. data/app/{frontend → packs}/svgs/sort-ascending.svg +0 -0
  119. data/app/{frontend → packs}/svgs/sort-descending.svg +0 -0
  120. data/app/{frontend → packs}/svgs/switch-horizontal.svg +0 -0
  121. data/app/{frontend → packs}/svgs/thumbs-down.svg +0 -0
  122. data/app/{frontend → packs}/svgs/thumbs-up.svg +0 -0
  123. data/app/{frontend → packs}/svgs/times.svg +0 -0
  124. data/app/{frontend → packs}/svgs/trash-sm.svg +0 -0
  125. data/app/{frontend → packs}/svgs/trash.svg +0 -0
  126. data/app/{frontend → packs}/svgs/view-grid-add.svg +0 -0
  127. data/app/{frontend → packs}/svgs/view-grid.svg +0 -0
  128. data/app/{frontend → packs}/svgs/view-list.svg +0 -0
  129. data/app/{frontend → packs}/svgs/x-circle.svg +0 -0
  130. data/app/views/avo/actions/show.html.erb +3 -39
  131. data/app/views/avo/attachments/show.html.erb +8 -1
  132. data/app/views/avo/base/_boolean_filter.html.erb +1 -0
  133. data/app/views/avo/base/_filters.html.erb +1 -0
  134. data/app/views/avo/base/_select_filter.html.erb +1 -0
  135. data/app/views/avo/partials/_paginator.html.erb +24 -5
  136. data/app/views/avo/relations/new.html.erb +5 -1
  137. data/app/views/layouts/avo/application.html.erb +0 -5
  138. data/avo.gemspec +31 -31
  139. data/bin/helpers.rb +0 -0
  140. data/bin/rspec +1 -0
  141. data/bin/webpack +3 -1
  142. data/config/initializers/inline_svg.rb +1 -1
  143. data/config/initializers/pagy.rb +1 -1
  144. data/config/routes.rb +12 -12
  145. data/config/spring.rb +5 -5
  146. data/config/webpack/aliases.js +1 -1
  147. data/config/webpack/base.js +14 -0
  148. data/config/webpack/development.js +2 -2
  149. data/config/webpack/production.js +2 -2
  150. data/config/webpack/test.js +2 -2
  151. data/config/webpacker.yml +5 -44
  152. data/db/factories.rb +4 -5
  153. data/lib/avo.rb +6 -6
  154. data/lib/avo/action_model.rb +20 -0
  155. data/lib/avo/app.rb +34 -62
  156. data/lib/avo/base_action.rb +56 -45
  157. data/lib/avo/base_resource.rb +69 -93
  158. data/lib/avo/configuration.rb +16 -22
  159. data/lib/avo/engine.rb +30 -14
  160. data/lib/avo/fields/badge_field.rb +2 -2
  161. data/lib/avo/fields/base_field.rb +38 -29
  162. data/lib/avo/fields/belongs_to_field.rb +13 -12
  163. data/lib/avo/fields/boolean_field.rb +4 -4
  164. data/lib/avo/fields/boolean_group_field.rb +3 -3
  165. data/lib/avo/fields/code_field.rb +4 -4
  166. data/lib/avo/fields/country_field.rb +2 -2
  167. data/lib/avo/fields/currency_field.rb +3 -3
  168. data/lib/avo/fields/date_field.rb +3 -3
  169. data/lib/avo/fields/date_time_field.rb +2 -2
  170. data/lib/avo/fields/external_image_field.rb +2 -2
  171. data/lib/avo/fields/field_extensions/has_field_name.rb +2 -9
  172. data/lib/avo/fields/field_extensions/visible_in_different_views.rb +34 -33
  173. data/lib/avo/fields/file_field.rb +1 -1
  174. data/lib/avo/fields/files_field.rb +2 -2
  175. data/lib/avo/fields/gravatar_field.rb +10 -10
  176. data/lib/avo/fields/has_and_belongs_to_many_field.rb +1 -1
  177. data/lib/avo/fields/has_many_field.rb +1 -1
  178. data/lib/avo/fields/has_one_field.rb +2 -2
  179. data/lib/avo/fields/heading_field.rb +2 -2
  180. data/lib/avo/fields/hidden_field.rb +1 -1
  181. data/lib/avo/fields/id_field.rb +3 -3
  182. data/lib/avo/fields/key_value_field.rb +12 -12
  183. data/lib/avo/fields/markdown_field.rb +2 -2
  184. data/lib/avo/fields/number_field.rb +3 -3
  185. data/lib/avo/fields/password_field.rb +1 -1
  186. data/lib/avo/fields/select_field.rb +8 -12
  187. data/lib/avo/fields/status_field.rb +4 -4
  188. data/lib/avo/fields/text_field.rb +2 -2
  189. data/lib/avo/fields/textarea_field.rb +2 -2
  190. data/lib/avo/fields/trix_field.rb +1 -1
  191. data/lib/avo/fields_collector.rb +30 -0
  192. data/lib/avo/filters/base_filter.rb +6 -6
  193. data/lib/avo/filters/boolean_filter.rb +1 -1
  194. data/lib/avo/filters/select_filter.rb +1 -1
  195. data/lib/avo/grid_collector.rb +39 -0
  196. data/lib/avo/has_context.rb +7 -0
  197. data/lib/avo/licensing/h_q.rb +56 -55
  198. data/lib/avo/licensing/license.rb +5 -5
  199. data/lib/avo/licensing/license_manager.rb +4 -4
  200. data/lib/avo/licensing/null_license.rb +2 -2
  201. data/lib/avo/licensing/pro_license.rb +1 -1
  202. data/lib/avo/loaders/fields_loader.rb +4 -4
  203. data/lib/avo/services/authorization_service.rb +2 -2
  204. data/lib/avo/services/panel_service.rb +4 -4
  205. data/lib/avo/version.rb +1 -1
  206. data/lib/generators/avo/action_generator.rb +4 -4
  207. data/lib/generators/avo/controller_generator.rb +4 -4
  208. data/lib/generators/avo/filter_generator.rb +5 -5
  209. data/lib/generators/avo/install_generator.rb +8 -8
  210. data/lib/generators/avo/locales_generator.rb +5 -5
  211. data/lib/generators/avo/partials_generator.rb +4 -4
  212. data/lib/generators/avo/resource_generator.rb +5 -5
  213. data/lib/generators/avo/templates/action.tt +2 -2
  214. data/lib/tasks/avo_tasks.rake +52 -53
  215. data/public/avo-packs/css/application-4e16d6a6.css +5975 -0
  216. data/public/avo-packs/css/application-4e16d6a6.css.br +0 -0
  217. data/public/avo-packs/css/application-4e16d6a6.css.gz +0 -0
  218. data/public/avo-packs/css/application-4e16d6a6.css.map +1 -0
  219. data/public/avo-packs/css/application-4e16d6a6.css.map.br +0 -0
  220. data/public/avo-packs/css/application-4e16d6a6.css.map.gz +0 -0
  221. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js +2 -0
  222. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.br +0 -0
  223. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.gz +0 -0
  224. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map +1 -0
  225. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map.br +0 -0
  226. data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map.gz +0 -0
  227. data/public/avo-packs/js/application-8eb130a4688f2c667703.js +26 -0
  228. data/public/avo-packs/js/{application-8849c6e2c8f75d55c666.js.LICENSE.txt → application-8eb130a4688f2c667703.js.LICENSE.txt} +17 -17
  229. data/public/avo-packs/js/application-8eb130a4688f2c667703.js.br +0 -0
  230. data/public/avo-packs/js/application-8eb130a4688f2c667703.js.gz +0 -0
  231. data/public/avo-packs/js/application-8eb130a4688f2c667703.js.map +1 -0
  232. data/public/avo-packs/js/application-8eb130a4688f2c667703.js.map.br +0 -0
  233. data/public/avo-packs/js/application-8eb130a4688f2c667703.js.map.gz +0 -0
  234. data/public/avo-packs/manifest.json +46 -23
  235. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg → images/13ae283c0d7cc04efe7e.svg} +0 -0
  236. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.br → images/13ae283c0d7cc04efe7e.svg.br} +0 -0
  237. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.gz → images/13ae283c0d7cc04efe7e.svg.gz} +0 -0
  238. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg → images/195026a50008c53526ef.svg} +0 -0
  239. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.br → images/195026a50008c53526ef.svg.br} +0 -0
  240. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.gz → images/195026a50008c53526ef.svg.gz} +0 -0
  241. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-cb632c9fe211ba2c2bf1564c9a9295cc.woff → images/1f30e08faa7c60d1f7ac.woff} +0 -0
  242. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf → images/1fd17dabf6b7d2b15348.ttf} +0 -0
  243. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.br → images/1fd17dabf6b7d2b15348.ttf.br} +0 -0
  244. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.gz → images/1fd17dabf6b7d2b15348.ttf.gz} +0 -0
  245. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-bcf84d6cb8a0ac214c8c14ba9af834f3.woff2 → images/39a18f443d434999b89b.woff2} +0 -0
  246. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-412073df419ad5f6f8f2ea76eb4aced9.woff2 → images/4ad349571e28bb59c5a5.woff2} +0 -0
  247. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-2fae1e2418251b68fe5d0505ab93dd5c.eot → images/57a5470848663767abbf.eot} +0 -0
  248. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf → images/b2e4cf0fab6c8ca66b7f.ttf} +0 -0
  249. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.br → images/b2e4cf0fab6c8ca66b7f.ttf.br} +0 -0
  250. data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.gz → images/b2e4cf0fab6c8ca66b7f.ttf.gz} +0 -0
  251. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-df7e79af617f98cd3b95d320e8b2a1af.eot → images/b78d61ab7e046de8c156.eot} +0 -0
  252. data/public/avo-packs/media/{fonts/nunito-v16-latin-700-7c472b19cb573f537bad8ef62ca917ac.woff → images/c9ab29becb76ddab01d0.woff} +0 -0
  253. data/public/avo-packs/media/images/{logo-edf8d8d0d263e0c1f73bb32a222d9991.png → f1b4befac91a3336db9a.png} +0 -0
  254. metadata +135 -132
  255. data/app/frontend/css/components/code.css +0 -27
  256. data/app/views/layouts/avo/application_vue.html.erb +0 -61
  257. data/config/webpack/environment.js +0 -18
  258. data/db/migrate/20210305082639_add_url_to_teams.rb +0 -5
  259. data/public/avo-packs/css/application-c75ac28c.css +0 -6
  260. data/public/avo-packs/css/application-c75ac28c.css.br +0 -0
  261. data/public/avo-packs/css/application-c75ac28c.css.gz +0 -0
  262. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js +0 -2
  263. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.br +0 -0
  264. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.gz +0 -0
  265. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map +0 -1
  266. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.br +0 -0
  267. data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.gz +0 -0
  268. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js +0 -26
  269. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js.br +0 -0
  270. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js.gz +0 -0
  271. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js.map +0 -1
  272. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js.map.br +0 -0
  273. data/public/avo-packs/js/application-8849c6e2c8f75d55c666.js.map.gz +0 -0
  274. data/public/avo-packs/manifest.json.br +0 -0
  275. data/public/avo-packs/manifest.json.gz +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9ed4bc1c98f78365b9b2a50dda9ed809b6c598c2d0b745e6f706f3456974532
4
- data.tar.gz: 71cf2d32d71b19316e36cc2e4a7688d2581f668044ac2975a786c3ce753b11a9
3
+ metadata.gz: bbc5163742282b121c065a97fc808446b8d7e1dfe05ff3a85eb46c86bc0e5794
4
+ data.tar.gz: 5ee2eba0895df8227d2ab6630e50759f177c291efe672b79a1dedf143e5ad25d
5
5
  SHA512:
6
- metadata.gz: 19ecbf7fb7b632eb4e00d17c88eff0f613ed03051f9b527313515b953c31c847f6328a4faa58ae6a2eb87ceab94ab62cf4be3c0d89efd6f74669fa403bb73b74
7
- data.tar.gz: 61d6eef278896616b12cc4b3d3b996de8068ba93e7017a06885871f7d8a15b365621762360c2577ec5691cd37ab643a8e34318efc7be3ee99429e38ce6947dc8
6
+ metadata.gz: 3bfbe17a6b34aa4fd206ca6688fdca752e0fdebf6fcfcc38945af4b0e9cbe48a468b6643124cd0d65f9a7cfe0f2376f4a00271eeb8bcbf7346a0c6b12f5ccce4
7
+ data.tar.gz: 17dd64588f184560a367f54f29b40a802ab1dc530fb8ccae5785be415a1fd8ff10ea1a37aac3597690cb525eac78c28f2c86d9103dacb786197057b9b12a3716
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
4
  # Declare your gem's dependencies in avo.gemspec.
@@ -15,113 +15,112 @@ gemspec
15
15
  # gem 'byebug', group: [:development, :test]
16
16
 
17
17
  # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
18
- gem 'webpacker', '~> 5.x'
18
+ gem "webpacker", "6.0.0.beta.6"
19
19
 
20
20
  # SVGs
21
- gem 'inline_svg'
21
+ gem "inline_svg"
22
22
 
23
- gem 'countries'
23
+ gem "countries"
24
24
 
25
25
  # Authorization
26
- gem 'pundit'
26
+ gem "pundit"
27
27
 
28
28
  #
29
29
  # Dependencies for dummy_app
30
30
  #
31
31
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
32
- gem 'rails', '~> 6.0.2', '>= 6.0.2.2'
32
+ gem "rails", "~> 6.0.2", ">= 6.0.2.2"
33
33
  # Use postgresql as the database for Active Record
34
- gem 'pg', '>= 0.18', '< 2.0'
34
+ gem "pg", ">= 0.18", "< 2.0"
35
35
  # Use Puma as the app server
36
- gem 'puma', '~> 4.3.5'
36
+ gem "puma", "~> 4.3.5"
37
37
  # Use SCSS for stylesheets
38
- gem 'sass-rails', '>= 6'
38
+ gem "sass-rails", ">= 6"
39
39
  # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
40
40
  # gem 'turbolinks', '~> 5'
41
41
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
42
- gem 'jbuilder', '~> 2.7'
42
+ gem "jbuilder", "~> 2.7"
43
43
  # Use Redis adapter to run Action Cable in production
44
44
  # gem 'redis', '~> 4.0'
45
45
  # Use Active Model has_secure_password
46
46
  # gem 'bcrypt', '~> 3.1.7'
47
47
 
48
48
  # Use Active Storage variant
49
- gem 'image_processing', '~> 1.2'
49
+ gem "image_processing", "~> 1.2"
50
50
 
51
51
  # Reduces boot times through caching; required in config/boot.rb
52
- gem 'bootsnap', '>= 1.4.2', require: false
52
+ gem "bootsnap", ">= 1.4.2", require: false
53
53
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
54
- gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
55
- gem 'dotenv-rails'
54
+ gem "byebug", platforms: [:mri, :mingw, :x64_mingw]
55
+ gem "dotenv-rails"
56
56
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
57
- gem 'web-console', '>= 3.3.0'
58
- gem 'listen', '>= 3.0.5', '< 3.2'
57
+ gem "web-console", ">= 3.3.0"
58
+ gem "listen", ">= 3.0.5", "< 3.2"
59
59
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
60
- gem 'spring'
60
+ gem "spring"
61
61
 
62
- gem 'factory_bot_rails'
62
+ gem "factory_bot_rails"
63
63
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
64
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
64
+ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
65
65
 
66
- gem 'devise'
67
- gem 'database_cleaner'
66
+ gem "devise"
67
+ gem "database_cleaner"
68
68
 
69
- gem 'ruby-debug-ide', require: false
70
- gem 'debase'
69
+ gem "ruby-debug-ide", require: false
70
+ gem "debase"
71
71
  #
72
72
  # END Dependencies for dummy_app
73
73
  #
74
74
 
75
75
  group :development do
76
- gem 'rubocop'
76
+ gem "standard"
77
77
 
78
78
  # Release helper
79
- gem 'bump', require: false
80
- gem 'gem-release', require: false
79
+ gem "bump", require: false
80
+ gem "gem-release", require: false
81
81
 
82
82
  # gem 'rack-mini-profiler'
83
83
  # gem 'memory_profiler'
84
84
  # gem 'stackprof'
85
85
  # gem 'ruby-prof'
86
86
 
87
-
88
87
  # gem 'pry-rails'
89
88
  end
90
89
 
91
90
  group :development, :test do
92
- gem 'faker', require: false
91
+ gem "faker", require: false
93
92
  end
94
93
 
95
94
  group :test do
96
- gem 'rspec-rails', '~> 4.0.0'
97
- gem 'rails-controller-testing'
95
+ gem "rspec-rails", "~> 4.0.0"
96
+ gem "rails-controller-testing"
98
97
  # Adds support for Capybara system testing and selenium driver
99
- gem 'capybara', '>= 2.15'
100
- gem 'selenium-webdriver'
98
+ gem "capybara", ">= 2.15"
99
+ gem "selenium-webdriver"
101
100
  # Easy installation and use of web drivers to run system tests with browsers
102
- gem 'webdrivers'
103
- gem 'fuubar'
104
- gem 'simplecov', require: false
105
- gem 'simplecov-cobertura'
106
- gem 'webmock'
107
- gem 'spring-commands-rspec'
108
-
109
- gem 'test-prof'
101
+ gem "webdrivers"
102
+ gem "fuubar"
103
+ gem "simplecov", require: false
104
+ gem "simplecov-cobertura"
105
+ gem "webmock"
106
+ gem "spring-commands-rspec"
107
+
108
+ gem "test-prof"
110
109
  end
111
110
 
112
- gem 'zeitwerk', '~> 2.3'
111
+ gem "zeitwerk", "~> 2.3"
113
112
 
114
113
  # Pagination
115
- gem 'pagy'
114
+ gem "pagy"
116
115
 
117
- gem 'httparty'
116
+ gem "httparty"
118
117
 
119
- gem 'iso'
118
+ gem "iso"
120
119
 
121
- gem 'i18n-js'
120
+ gem "hotwire-rails"
122
121
 
123
- gem 'hotwire-rails'
122
+ gem "active_link_to"
124
123
 
125
- gem 'active_link_to'
124
+ gem "view_component", require: "view_component/engine"
126
125
 
127
- gem 'view_component', require: 'view_component/engine'
126
+ gem "addressable"
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (0.5.0.beta5)
4
+ avo (0.5.0.beta10)
5
5
  active_link_to
6
+ addressable
6
7
  countries
7
8
  hotwire-rails
8
9
  httparty
9
- i18n-js
10
10
  image_processing
11
11
  inline_svg
12
12
  pagy
@@ -79,7 +79,7 @@ GEM
79
79
  zeitwerk (~> 2.2, >= 2.2.2)
80
80
  addressable (2.7.0)
81
81
  public_suffix (>= 2.0.2, < 5.0)
82
- ast (2.4.1)
82
+ ast (2.4.2)
83
83
  bcrypt (3.1.16)
84
84
  bindex (0.8.1)
85
85
  bootsnap (1.4.8)
@@ -144,8 +144,6 @@ GEM
144
144
  multi_xml (>= 0.5.2)
145
145
  i18n (1.8.9)
146
146
  concurrent-ruby (~> 1.0)
147
- i18n-js (3.8.0)
148
- i18n (>= 0.6.6)
149
147
  i18n_data (0.10.0)
150
148
  image_processing (1.12.1)
151
149
  mini_magick (>= 4.9.5, < 5)
@@ -172,7 +170,9 @@ GEM
172
170
  mime-types (3.3.1)
173
171
  mime-types-data (~> 3.2015)
174
172
  mime-types-data (3.2020.0512)
175
- mimemagic (0.3.5)
173
+ mimemagic (0.3.10)
174
+ nokogiri (~> 1)
175
+ rake
176
176
  mini_magick (4.11.0)
177
177
  mini_mime (1.0.2)
178
178
  mini_portile2 (2.5.0)
@@ -180,13 +180,13 @@ GEM
180
180
  msgpack (1.3.3)
181
181
  multi_xml (0.6.0)
182
182
  nio4r (2.5.5)
183
- nokogiri (1.11.1)
183
+ nokogiri (1.11.2)
184
184
  mini_portile2 (~> 2.5.0)
185
185
  racc (~> 1.4)
186
186
  orm_adapter (0.5.0)
187
187
  pagy (3.10.0)
188
- parallel (1.19.2)
189
- parser (2.7.1.5)
188
+ parallel (1.20.1)
189
+ parser (3.0.0.0)
190
190
  ast (~> 2.4.1)
191
191
  pg (1.2.3)
192
192
  public_suffix (4.0.6)
@@ -257,17 +257,20 @@ GEM
257
257
  rspec-mocks (~> 3.9)
258
258
  rspec-support (~> 3.9)
259
259
  rspec-support (3.9.3)
260
- rubocop (0.92.0)
260
+ rubocop (1.11.0)
261
261
  parallel (~> 1.10)
262
- parser (>= 2.7.1.5)
262
+ parser (>= 3.0.0.0)
263
263
  rainbow (>= 2.2.2, < 4.0)
264
- regexp_parser (>= 1.7)
264
+ regexp_parser (>= 1.8, < 3.0)
265
265
  rexml
266
- rubocop-ast (>= 0.5.0)
266
+ rubocop-ast (>= 1.2.0, < 2.0)
267
267
  ruby-progressbar (~> 1.7)
268
- unicode-display_width (>= 1.4.0, < 2.0)
269
- rubocop-ast (0.7.1)
268
+ unicode-display_width (>= 1.4.0, < 3.0)
269
+ rubocop-ast (1.4.1)
270
270
  parser (>= 2.7.1.5)
271
+ rubocop-performance (1.10.1)
272
+ rubocop (>= 0.90.0, < 2.0)
273
+ rubocop-ast (>= 0.4.0)
271
274
  ruby-debug-ide (0.7.2)
272
275
  rake (>= 0.8.1)
273
276
  ruby-progressbar (1.10.1)
@@ -288,7 +291,7 @@ GEM
288
291
  selenium-webdriver (3.142.7)
289
292
  childprocess (>= 0.5, < 4.0)
290
293
  rubyzip (>= 1.2.2)
291
- semantic_range (2.3.1)
294
+ semantic_range (3.0.0)
292
295
  simplecov (0.19.0)
293
296
  docile (~> 1.1)
294
297
  simplecov-html (~> 0.11)
@@ -306,6 +309,9 @@ GEM
306
309
  actionpack (>= 4.0)
307
310
  activesupport (>= 4.0)
308
311
  sprockets (>= 3.0.0)
312
+ standard (1.0.4)
313
+ rubocop (= 1.11.0)
314
+ rubocop-performance (= 1.10.1)
309
315
  stimulus-rails (0.2.3)
310
316
  rails (>= 6.0.0)
311
317
  test-prof (0.12.2)
@@ -316,9 +322,9 @@ GEM
316
322
  rails (>= 6.0.0)
317
323
  tzinfo (1.2.9)
318
324
  thread_safe (~> 0.1)
319
- unicode-display_width (1.7.0)
325
+ unicode-display_width (2.0.0)
320
326
  unicode_utils (1.4.0)
321
- view_component (2.24.0)
327
+ view_component (2.28.0)
322
328
  activesupport (>= 5.0.0, < 7.0)
323
329
  warden (1.2.9)
324
330
  rack (>= 2.0.9)
@@ -335,7 +341,7 @@ GEM
335
341
  addressable (>= 2.3.6)
336
342
  crack (>= 0.3.2)
337
343
  hashdiff (>= 0.4.0, < 2.0.0)
338
- webpacker (5.2.1)
344
+ webpacker (6.0.0.beta.6)
339
345
  activesupport (>= 5.2)
340
346
  rack-proxy (>= 0.6.1)
341
347
  railties (>= 5.2)
@@ -352,6 +358,7 @@ PLATFORMS
352
358
 
353
359
  DEPENDENCIES
354
360
  active_link_to
361
+ addressable
355
362
  avo!
356
363
  bootsnap (>= 1.4.2)
357
364
  bump
@@ -368,7 +375,6 @@ DEPENDENCIES
368
375
  gem-release
369
376
  hotwire-rails
370
377
  httparty
371
- i18n-js
372
378
  image_processing (~> 1.2)
373
379
  inline_svg
374
380
  iso
@@ -381,7 +387,6 @@ DEPENDENCIES
381
387
  rails (~> 6.0.2, >= 6.0.2.2)
382
388
  rails-controller-testing
383
389
  rspec-rails (~> 4.0.0)
384
- rubocop
385
390
  ruby-debug-ide
386
391
  sass-rails (>= 6)
387
392
  selenium-webdriver
@@ -389,13 +394,14 @@ DEPENDENCIES
389
394
  simplecov-cobertura
390
395
  spring
391
396
  spring-commands-rspec
397
+ standard
392
398
  test-prof
393
399
  tzinfo-data
394
400
  view_component
395
401
  web-console (>= 3.3.0)
396
402
  webdrivers
397
403
  webmock
398
- webpacker (~> 5.x)
404
+ webpacker (= 6.0.0.beta.6)
399
405
  zeitwerk (~> 2.3)
400
406
 
401
407
  BUNDLED WITH
data/Rakefile CHANGED
@@ -1,31 +1,31 @@
1
1
  begin
2
- require 'bundler/setup'
2
+ require "bundler/setup"
3
3
  rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
4
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
5
5
  end
6
6
 
7
- require 'rdoc/task'
7
+ require "rdoc/task"
8
8
 
9
9
  RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'Avo'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.md')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
10
+ rdoc.rdoc_dir = "rdoc"
11
+ rdoc.title = "Avo"
12
+ rdoc.options << "--line-numbers"
13
+ rdoc.rdoc_files.include("README.md")
14
+ rdoc.rdoc_files.include("lib/**/*.rb")
15
15
  end
16
16
 
17
17
  APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
18
- load 'rails/tasks/engine.rake'
18
+ load "rails/tasks/engine.rake"
19
19
 
20
- load 'rails/tasks/statistics.rake'
20
+ load "rails/tasks/statistics.rake"
21
21
 
22
- require 'bundler/gem_tasks'
22
+ require "bundler/gem_tasks"
23
23
 
24
- require 'rake/testtask'
24
+ require "rake/testtask"
25
25
 
26
26
  Rake::TestTask.new(:test) do |t|
27
- t.libs << 'test'
28
- t.pattern = 'test/**/*_test.rb'
27
+ t.libs << "test"
28
+ t.pattern = "test/**/*_test.rb"
29
29
  t.verbose = false
30
30
  end
31
31
 
@@ -17,7 +17,7 @@
17
17
  end
18
18
  end
19
19
 
20
- classes = 'whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold text-black block text-center truncate '
20
+ classes = 'whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold block text-center truncate '
21
21
 
22
22
  classes += "#{backgrounds[background]} text-white" if backgrounds[background].present?
23
23
  %>
@@ -6,7 +6,7 @@
6
6
  options[:default] = @default if @default.present?
7
7
  options[:size] = @size if @size.present?
8
8
  query = options.map { |key, value| "#{key}=#{value}" }.join('&')
9
- url = URI::HTTP.build(host: "www.gravatar.com", path: "/avatar/#{@md5}", query: query)
9
+ url = URI::HTTPS.build(host: "www.gravatar.com", path: "/avatar/#{@md5}", query: query)
10
10
  classes = @rounded ? 'min-w-10 rounded-full' : 'min-w-10'
11
11
  %>
12
- <%= link_to_if @link_to_resource.present?, image_tag(url.to_s, class: classes), @link %>
12
+ <%= link_to_if @link_to_resource.present?, image_tag(url.to_s, class: classes), @link, title: @title %>
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Avo::Common::GravatarViewerComponent < ViewComponent::Base
4
- def initialize(md5: nil, link: nil, default: nil, size: nil, rounded: false, link_to_resource: false)
4
+ def initialize(md5: nil, link: nil, default: nil, size: nil, rounded: false, link_to_resource: false, title: nil)
5
5
  @md5 = md5
6
6
  @link = link
7
7
  @default = default
8
8
  @size = size
9
9
  @rounded = rounded
10
10
  @link_to_resource = link_to_resource
11
+ @title = title
11
12
  end
12
13
  end
@@ -3,7 +3,7 @@
3
3
  class Avo::Common::MultipleFileViewerComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
- def initialize(id:, file:, is_image:, button_size: :md, resource:)
6
+ def initialize(id:, file:, is_image:, resource:, button_size: :md)
7
7
  @id = id
8
8
  @file = file
9
9
  @is_image = is_image
@@ -3,7 +3,7 @@
3
3
  class Avo::Common::SingleFileViewerComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
- def initialize(id:, file:, is_image:, button_size: :md, resource:)
6
+ def initialize(id:, file:, is_image:, resource:, button_size: :md)
7
7
  @id = id
8
8
  @file = file
9
9
  @is_image = is_image
@@ -4,7 +4,7 @@ class Avo::Edit::FieldWrapperComponent < ViewComponent::Base
4
4
  def initialize(field: nil, dash_if_blank: true, full_width: false, displayed_in_modal: false, form: nil, resource: {}, **args)
5
5
  @field = field
6
6
  @dash_if_blank = dash_if_blank
7
- @classes = args[:class].present? ? args[:class] : ''
7
+ @classes = args[:class].present? ? args[:class] : ""
8
8
  @args = args
9
9
  @displayed_in_modal = displayed_in_modal
10
10
  @form = form
@@ -12,8 +12,8 @@ class Avo::Edit::FieldWrapperComponent < ViewComponent::Base
12
12
  @model = resource.present? ? resource.model : nil
13
13
  @full_width = full_width
14
14
 
15
- if @index != 0 or @displayed_in_modal
16
- @classes += ' border-t'
15
+ if (@index != 0) || @displayed_in_modal
16
+ @classes += " border-t"
17
17
  end
18
18
  end
19
19
  end