activeadmin 2.6.1 → 2.13.1

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

Potentially problematic release.


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

Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +291 -9
  3. data/CONTRIBUTING.md +9 -25
  4. data/README.md +4 -4
  5. data/app/assets/javascripts/active_admin/base.js +27 -22
  6. data/app/assets/stylesheets/active_admin/_base.scss +53 -37
  7. data/app/assets/stylesheets/active_admin/_forms.scss +0 -10
  8. data/app/assets/stylesheets/active_admin/_header.scss +37 -3
  9. data/app/assets/stylesheets/active_admin/_normalize.scss +25 -123
  10. data/app/assets/stylesheets/active_admin/{print.scss → _print.scss} +0 -0
  11. data/app/assets/stylesheets/active_admin/components/_comments.scss +2 -2
  12. data/app/assets/stylesheets/active_admin/components/_date_picker.scss +1 -2
  13. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +0 -1
  14. data/app/assets/stylesheets/active_admin/mixins/_variables.scss +12 -0
  15. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +0 -1
  16. data/app/javascript/active_admin/initializers/has-many.js +4 -1
  17. data/app/javascript/active_admin/initializers/per-page.js +1 -1
  18. data/app/javascript/active_admin/lib/checkbox-toggler.js +3 -3
  19. data/app/javascript/active_admin/lib/dropdown-menu.js +1 -1
  20. data/app/javascript/active_admin/lib/modal-dialog.js +7 -7
  21. data/app/javascript/active_admin/lib/per-page.js +1 -1
  22. data/app/javascript/active_admin/lib/table-checkbox-toggler.js +1 -1
  23. data/app/views/active_admin/devise/mailer/reset_password_instructions.html.erb +1 -1
  24. data/app/views/active_admin/devise/mailer/unlock_instructions.html.erb +2 -2
  25. data/app/views/active_admin/devise/shared/_links.erb +1 -1
  26. data/app/views/active_admin/page/index.html.arb +1 -0
  27. data/app/views/active_admin/resource/edit.html.arb +1 -0
  28. data/app/views/active_admin/resource/index.html.arb +1 -0
  29. data/app/views/active_admin/resource/new.html.arb +1 -0
  30. data/app/views/active_admin/resource/show.html.arb +1 -0
  31. data/app/views/layouts/active_admin.html.arb +1 -0
  32. data/app/views/layouts/active_admin_logged_out.html.erb +15 -5
  33. data/config/locales/ar.yml +6 -6
  34. data/config/locales/es-MX.yml +2 -1
  35. data/config/locales/es.yml +2 -2
  36. data/config/locales/it.yml +18 -0
  37. data/config/locales/ja.yml +3 -3
  38. data/config/locales/ko.yml +1 -1
  39. data/config/locales/nl.yml +1 -1
  40. data/config/locales/ro.yml +3 -2
  41. data/config/locales/vi.yml +5 -5
  42. data/docs/0-installation.md +27 -3
  43. data/docs/11-decorators.md +16 -5
  44. data/docs/2-resource-customization.md +10 -1
  45. data/docs/5-forms.md +9 -3
  46. data/docs/6-show-pages.md +12 -0
  47. data/docs/8-custom-actions.md +1 -1
  48. data/docs/Gemfile +3 -2
  49. data/docs/Gemfile.lock +138 -103
  50. data/docs/_includes/top-menu.html +1 -1
  51. data/docs/documentation.md +1 -1
  52. data/docs/index.html +6 -6
  53. data/lib/active_admin/abstract_view_factory.rb +1 -0
  54. data/lib/active_admin/application.rb +19 -19
  55. data/lib/active_admin/application_settings.rb +4 -3
  56. data/lib/active_admin/asset_registration.rb +1 -0
  57. data/lib/active_admin/authorization_adapter.rb +4 -3
  58. data/lib/active_admin/base_controller/authorization.rb +15 -13
  59. data/lib/active_admin/base_controller/menu.rb +1 -0
  60. data/lib/active_admin/base_controller.rb +6 -5
  61. data/lib/active_admin/batch_actions/controller.rb +4 -3
  62. data/lib/active_admin/batch_actions/resource_extension.rb +10 -8
  63. data/lib/active_admin/batch_actions/views/batch_action_form.rb +4 -3
  64. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +7 -6
  65. data/lib/active_admin/batch_actions/views/selection_cells.rb +4 -3
  66. data/lib/active_admin/batch_actions.rb +1 -0
  67. data/lib/active_admin/callbacks.rb +1 -0
  68. data/lib/active_admin/cancan_adapter.rb +2 -1
  69. data/lib/active_admin/collection_decorator.rb +32 -0
  70. data/lib/active_admin/component.rb +1 -0
  71. data/lib/active_admin/controller_action.rb +1 -0
  72. data/lib/active_admin/csv_builder.rb +6 -19
  73. data/lib/active_admin/dependency.rb +13 -12
  74. data/lib/active_admin/deprecation.rb +1 -0
  75. data/lib/active_admin/devise.rb +16 -5
  76. data/lib/active_admin/dsl.rb +2 -1
  77. data/lib/active_admin/dynamic_setting.rb +1 -0
  78. data/lib/active_admin/dynamic_settings_node.rb +3 -2
  79. data/lib/active_admin/engine.rb +13 -9
  80. data/lib/active_admin/error.rb +1 -2
  81. data/lib/active_admin/filters/active.rb +2 -1
  82. data/lib/active_admin/filters/active_filter.rb +6 -6
  83. data/lib/active_admin/filters/active_sidebar.rb +4 -30
  84. data/lib/active_admin/filters/dsl.rb +1 -0
  85. data/lib/active_admin/filters/forms.rb +7 -6
  86. data/lib/active_admin/filters/formtastic_addons.rb +2 -6
  87. data/lib/active_admin/filters/resource_extension.rb +2 -1
  88. data/lib/active_admin/filters.rb +8 -7
  89. data/lib/active_admin/form_builder.rb +25 -20
  90. data/lib/active_admin/generators/boilerplate.rb +2 -1
  91. data/lib/active_admin/helpers/collection.rb +2 -0
  92. data/lib/active_admin/helpers/i18n.rb +1 -0
  93. data/lib/active_admin/helpers/optional_display.rb +3 -2
  94. data/lib/active_admin/helpers/routes/url_helpers.rb +1 -0
  95. data/lib/active_admin/helpers/scope_chain.rb +1 -0
  96. data/lib/active_admin/inputs/datepicker_input.rb +2 -1
  97. data/lib/active_admin/inputs/filters/base/search_method_select.rb +5 -4
  98. data/lib/active_admin/inputs/filters/base.rb +2 -1
  99. data/lib/active_admin/inputs/filters/boolean_input.rb +2 -1
  100. data/lib/active_admin/inputs/filters/check_boxes_input.rb +2 -1
  101. data/lib/active_admin/inputs/filters/date_picker_input.rb +1 -0
  102. data/lib/active_admin/inputs/filters/date_range_input.rb +1 -0
  103. data/lib/active_admin/inputs/filters/numeric_input.rb +1 -0
  104. data/lib/active_admin/inputs/filters/select_input.rb +3 -2
  105. data/lib/active_admin/inputs/filters/string_input.rb +1 -0
  106. data/lib/active_admin/inputs/filters/text_input.rb +1 -0
  107. data/lib/active_admin/inputs.rb +1 -0
  108. data/lib/active_admin/localizers/resource_localizer.rb +4 -3
  109. data/lib/active_admin/localizers.rb +2 -1
  110. data/lib/active_admin/menu.rb +7 -3
  111. data/lib/active_admin/menu_collection.rb +1 -0
  112. data/lib/active_admin/menu_item.rb +8 -7
  113. data/lib/active_admin/namespace.rb +15 -14
  114. data/lib/active_admin/namespace_settings.rb +9 -5
  115. data/lib/active_admin/order_clause.rb +2 -1
  116. data/lib/active_admin/orm/active_record/comments/comment.rb +4 -3
  117. data/lib/active_admin/orm/active_record/comments/namespace_helper.rb +1 -0
  118. data/lib/active_admin/orm/active_record/comments/resource_helper.rb +1 -0
  119. data/lib/active_admin/orm/active_record/comments/show_page_helper.rb +1 -0
  120. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +20 -19
  121. data/lib/active_admin/orm/active_record/comments/views.rb +3 -2
  122. data/lib/active_admin/orm/active_record/comments.rb +20 -19
  123. data/lib/active_admin/orm/active_record.rb +2 -1
  124. data/lib/active_admin/orm/mongoid.rb +1 -0
  125. data/lib/active_admin/page.rb +2 -1
  126. data/lib/active_admin/page_controller.rb +1 -0
  127. data/lib/active_admin/page_dsl.rb +1 -0
  128. data/lib/active_admin/page_presenter.rb +1 -0
  129. data/lib/active_admin/pundit_adapter.rb +59 -15
  130. data/lib/active_admin/resource/action_items.rb +6 -5
  131. data/lib/active_admin/resource/attributes.rb +2 -1
  132. data/lib/active_admin/resource/belongs_to.rb +3 -2
  133. data/lib/active_admin/resource/controllers.rb +2 -1
  134. data/lib/active_admin/resource/includes.rb +1 -0
  135. data/lib/active_admin/resource/menu.rb +5 -4
  136. data/lib/active_admin/resource/model.rb +1 -0
  137. data/lib/active_admin/resource/naming.rb +5 -4
  138. data/lib/active_admin/resource/ordering.rb +1 -0
  139. data/lib/active_admin/resource/page_presenters.rb +1 -0
  140. data/lib/active_admin/resource/pagination.rb +1 -0
  141. data/lib/active_admin/resource/routes.rb +6 -7
  142. data/lib/active_admin/resource/scope_to.rb +8 -7
  143. data/lib/active_admin/resource/scopes.rb +1 -0
  144. data/lib/active_admin/resource/sidebars.rb +2 -1
  145. data/lib/active_admin/resource.rb +20 -19
  146. data/lib/active_admin/resource_collection.rb +1 -0
  147. data/lib/active_admin/resource_controller/action_builder.rb +1 -0
  148. data/lib/active_admin/resource_controller/data_access.rb +31 -5
  149. data/lib/active_admin/resource_controller/decorators.rb +7 -28
  150. data/lib/active_admin/resource_controller/polymorphic_routes.rb +1 -0
  151. data/lib/active_admin/resource_controller/resource_class_methods.rb +1 -0
  152. data/lib/active_admin/resource_controller/scoping.rb +1 -0
  153. data/lib/active_admin/resource_controller/sidebars.rb +1 -0
  154. data/lib/active_admin/resource_controller/streaming.rb +9 -7
  155. data/lib/active_admin/resource_controller.rb +13 -11
  156. data/lib/active_admin/resource_dsl.rb +11 -25
  157. data/lib/active_admin/router.rb +1 -0
  158. data/lib/active_admin/scope.rb +7 -6
  159. data/lib/active_admin/settings_node.rb +1 -0
  160. data/lib/active_admin/sidebar_section.rb +1 -0
  161. data/lib/active_admin/version.rb +2 -1
  162. data/lib/active_admin/view_factory.rb +18 -17
  163. data/lib/active_admin/view_helpers/active_admin_application_helper.rb +1 -0
  164. data/lib/active_admin/view_helpers/auto_link_helper.rb +1 -0
  165. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +4 -3
  166. data/lib/active_admin/view_helpers/display_helper.rb +15 -7
  167. data/lib/active_admin/view_helpers/download_format_links_helper.rb +2 -1
  168. data/lib/active_admin/view_helpers/fields_for.rb +3 -2
  169. data/lib/active_admin/view_helpers/flash_helper.rb +1 -0
  170. data/lib/active_admin/view_helpers/form_helper.rb +1 -0
  171. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +1 -0
  172. data/lib/active_admin/view_helpers/scope_name_helper.rb +1 -0
  173. data/lib/active_admin/view_helpers/sidebar_helper.rb +1 -0
  174. data/lib/active_admin/view_helpers/title_helper.rb +1 -0
  175. data/lib/active_admin/view_helpers/view_factory_helper.rb +1 -0
  176. data/lib/active_admin/view_helpers.rb +2 -1
  177. data/lib/active_admin/views/action_items.rb +1 -0
  178. data/lib/active_admin/views/components/active_admin_form.rb +7 -6
  179. data/lib/active_admin/views/components/active_filters_sidebar_content.rb +59 -0
  180. data/lib/active_admin/views/components/attributes_table.rb +6 -5
  181. data/lib/active_admin/views/components/blank_slate.rb +2 -1
  182. data/lib/active_admin/views/components/columns.rb +1 -0
  183. data/lib/active_admin/views/components/dropdown_menu.rb +7 -9
  184. data/lib/active_admin/views/components/index_list.rb +4 -3
  185. data/lib/active_admin/views/components/menu.rb +2 -1
  186. data/lib/active_admin/views/components/menu_item.rb +5 -4
  187. data/lib/active_admin/views/components/paginated_collection.rb +19 -18
  188. data/lib/active_admin/views/components/panel.rb +2 -1
  189. data/lib/active_admin/views/components/scopes.rb +8 -5
  190. data/lib/active_admin/views/components/sidebar.rb +1 -0
  191. data/lib/active_admin/views/components/sidebar_section.rb +1 -0
  192. data/lib/active_admin/views/components/site_title.rb +2 -1
  193. data/lib/active_admin/views/components/status_tag.rb +12 -11
  194. data/lib/active_admin/views/components/table_for.rb +18 -17
  195. data/lib/active_admin/views/components/tabs.rb +4 -3
  196. data/lib/active_admin/views/components/unsupported_browser.rb +1 -0
  197. data/lib/active_admin/views/footer.rb +3 -1
  198. data/lib/active_admin/views/header.rb +3 -2
  199. data/lib/active_admin/views/index_as_block.rb +1 -0
  200. data/lib/active_admin/views/index_as_blog.rb +2 -1
  201. data/lib/active_admin/views/index_as_grid.rb +2 -1
  202. data/lib/active_admin/views/index_as_table.rb +17 -16
  203. data/lib/active_admin/views/pages/base.rb +14 -9
  204. data/lib/active_admin/views/pages/form.rb +1 -0
  205. data/lib/active_admin/views/pages/index.rb +15 -13
  206. data/lib/active_admin/views/pages/layout.rb +1 -0
  207. data/lib/active_admin/views/pages/page.rb +1 -0
  208. data/lib/active_admin/views/pages/show.rb +1 -0
  209. data/lib/active_admin/views/tabbed_navigation.rb +3 -2
  210. data/lib/active_admin/views/title_bar.rb +2 -1
  211. data/lib/active_admin/views.rb +2 -1
  212. data/lib/active_admin.rb +61 -61
  213. data/lib/activeadmin.rb +2 -1
  214. data/lib/generators/active_admin/assets/assets_generator.rb +3 -2
  215. data/lib/generators/active_admin/assets/templates/active_admin.scss +2 -2
  216. data/lib/generators/active_admin/devise/devise_generator.rb +6 -5
  217. data/lib/generators/active_admin/install/install_generator.rb +15 -8
  218. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +9 -2
  219. data/lib/generators/active_admin/install/templates/dashboard.rb +1 -0
  220. data/lib/generators/active_admin/page/page_generator.rb +2 -1
  221. data/lib/generators/active_admin/page/templates/page.rb +1 -0
  222. data/lib/generators/active_admin/resource/resource_generator.rb +4 -3
  223. data/lib/generators/active_admin/webpacker/plugins/jquery.js +7 -0
  224. data/lib/generators/active_admin/webpacker/templates/active_admin.js +5 -0
  225. data/lib/generators/active_admin/webpacker/templates/active_admin.scss +17 -0
  226. data/lib/generators/active_admin/webpacker/templates/print.scss +2 -0
  227. data/lib/generators/active_admin/webpacker/webpacker_generator.rb +27 -0
  228. data/lib/ransack_ext.rb +9 -8
  229. metadata +32 -53
data/docs/Gemfile.lock CHANGED
@@ -1,99 +1,121 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (6.0.2.1)
4
+ activesupport (6.0.4.7)
5
5
  concurrent-ruby (~> 1.0, >= 1.0.2)
6
6
  i18n (>= 0.7, < 2)
7
7
  minitest (~> 5.1)
8
8
  tzinfo (~> 1.1)
9
- zeitwerk (~> 2.2)
10
- addressable (2.7.0)
9
+ zeitwerk (~> 2.2, >= 2.2.2)
10
+ addressable (2.8.0)
11
11
  public_suffix (>= 2.0.2, < 5.0)
12
12
  coffee-script (2.4.1)
13
13
  coffee-script-source
14
14
  execjs
15
15
  coffee-script-source (1.11.1)
16
16
  colorator (1.1.0)
17
- commonmarker (0.17.13)
18
- ruby-enum (~> 0.5)
19
- concurrent-ruby (1.1.5)
20
- dnsruby (1.61.3)
21
- addressable (~> 2.5)
22
- em-websocket (0.5.1)
17
+ commonmarker (0.23.4)
18
+ concurrent-ruby (1.1.10)
19
+ dnsruby (1.61.9)
20
+ simpleidn (~> 0.1)
21
+ em-websocket (0.5.3)
23
22
  eventmachine (>= 0.12.9)
24
- http_parser.rb (~> 0.6.0)
25
- ethon (0.12.0)
26
- ffi (>= 1.3.0)
23
+ http_parser.rb (~> 0)
24
+ ethon (0.15.0)
25
+ ffi (>= 1.15.0)
27
26
  eventmachine (1.2.7)
28
- execjs (2.7.0)
29
- faraday (1.0.0)
27
+ execjs (2.8.1)
28
+ faraday (1.10.0)
29
+ faraday-em_http (~> 1.0)
30
+ faraday-em_synchrony (~> 1.0)
31
+ faraday-excon (~> 1.1)
32
+ faraday-httpclient (~> 1.0)
33
+ faraday-multipart (~> 1.0)
34
+ faraday-net_http (~> 1.0)
35
+ faraday-net_http_persistent (~> 1.0)
36
+ faraday-patron (~> 1.0)
37
+ faraday-rack (~> 1.0)
38
+ faraday-retry (~> 1.0)
39
+ ruby2_keywords (>= 0.0.4)
40
+ faraday-em_http (1.0.0)
41
+ faraday-em_synchrony (1.0.0)
42
+ faraday-excon (1.1.0)
43
+ faraday-httpclient (1.0.1)
44
+ faraday-multipart (1.0.3)
30
45
  multipart-post (>= 1.2, < 3)
31
- ffi (1.12.1)
46
+ faraday-net_http (1.0.1)
47
+ faraday-net_http_persistent (1.2.0)
48
+ faraday-patron (1.0.0)
49
+ faraday-rack (1.0.0)
50
+ faraday-retry (1.0.3)
51
+ ffi (1.15.5)
32
52
  forwardable-extended (2.6.0)
33
53
  gemoji (3.0.1)
34
- github-pages (204)
35
- github-pages-health-check (= 1.16.1)
36
- jekyll (= 3.8.5)
54
+ github-pages (226)
55
+ github-pages-health-check (= 1.17.9)
56
+ jekyll (= 3.9.2)
37
57
  jekyll-avatar (= 0.7.0)
38
58
  jekyll-coffeescript (= 1.1.1)
39
- jekyll-commonmark-ghpages (= 0.1.6)
59
+ jekyll-commonmark-ghpages (= 0.2.0)
40
60
  jekyll-default-layout (= 0.1.4)
41
- jekyll-feed (= 0.13.0)
61
+ jekyll-feed (= 0.15.1)
42
62
  jekyll-gist (= 1.5.0)
43
63
  jekyll-github-metadata (= 2.13.0)
44
- jekyll-mentions (= 1.5.1)
64
+ jekyll-include-cache (= 0.2.1)
65
+ jekyll-mentions (= 1.6.0)
45
66
  jekyll-optional-front-matter (= 0.3.2)
46
67
  jekyll-paginate (= 1.1.0)
47
68
  jekyll-readme-index (= 0.3.0)
48
- jekyll-redirect-from (= 0.15.0)
69
+ jekyll-redirect-from (= 0.16.0)
49
70
  jekyll-relative-links (= 0.6.1)
50
- jekyll-remote-theme (= 0.4.1)
71
+ jekyll-remote-theme (= 0.4.3)
51
72
  jekyll-sass-converter (= 1.5.2)
52
- jekyll-seo-tag (= 2.6.1)
73
+ jekyll-seo-tag (= 2.8.0)
53
74
  jekyll-sitemap (= 1.4.0)
54
75
  jekyll-swiss (= 1.0.0)
55
- jekyll-theme-architect (= 0.1.1)
56
- jekyll-theme-cayman (= 0.1.1)
57
- jekyll-theme-dinky (= 0.1.1)
58
- jekyll-theme-hacker (= 0.1.1)
59
- jekyll-theme-leap-day (= 0.1.1)
60
- jekyll-theme-merlot (= 0.1.1)
61
- jekyll-theme-midnight (= 0.1.1)
62
- jekyll-theme-minimal (= 0.1.1)
63
- jekyll-theme-modernist (= 0.1.1)
64
- jekyll-theme-primer (= 0.5.4)
65
- jekyll-theme-slate (= 0.1.1)
66
- jekyll-theme-tactile (= 0.1.1)
67
- jekyll-theme-time-machine (= 0.1.1)
76
+ jekyll-theme-architect (= 0.2.0)
77
+ jekyll-theme-cayman (= 0.2.0)
78
+ jekyll-theme-dinky (= 0.2.0)
79
+ jekyll-theme-hacker (= 0.2.0)
80
+ jekyll-theme-leap-day (= 0.2.0)
81
+ jekyll-theme-merlot (= 0.2.0)
82
+ jekyll-theme-midnight (= 0.2.0)
83
+ jekyll-theme-minimal (= 0.2.0)
84
+ jekyll-theme-modernist (= 0.2.0)
85
+ jekyll-theme-primer (= 0.6.0)
86
+ jekyll-theme-slate (= 0.2.0)
87
+ jekyll-theme-tactile (= 0.2.0)
88
+ jekyll-theme-time-machine (= 0.2.0)
68
89
  jekyll-titles-from-headings (= 0.5.3)
69
- jemoji (= 0.11.1)
70
- kramdown (= 1.17.0)
90
+ jemoji (= 0.12.0)
91
+ kramdown (= 2.3.2)
92
+ kramdown-parser-gfm (= 1.1.0)
71
93
  liquid (= 4.0.3)
72
94
  mercenary (~> 0.3)
73
95
  minima (= 2.5.1)
74
- nokogiri (>= 1.10.4, < 2.0)
75
- rouge (= 3.13.0)
96
+ nokogiri (>= 1.13.4, < 2.0)
97
+ rouge (= 3.26.0)
76
98
  terminal-table (~> 1.4)
77
- github-pages-health-check (1.16.1)
99
+ github-pages-health-check (1.17.9)
78
100
  addressable (~> 2.3)
79
101
  dnsruby (~> 1.60)
80
102
  octokit (~> 4.0)
81
- public_suffix (~> 3.0)
103
+ public_suffix (>= 3.0, < 5.0)
82
104
  typhoeus (~> 1.3)
83
- html-pipeline (2.12.3)
105
+ html-pipeline (2.14.1)
84
106
  activesupport (>= 2)
85
107
  nokogiri (>= 1.4)
86
- http_parser.rb (0.6.0)
108
+ http_parser.rb (0.8.0)
87
109
  i18n (0.9.5)
88
110
  concurrent-ruby (~> 1.0)
89
- jekyll (3.8.5)
111
+ jekyll (3.9.2)
90
112
  addressable (~> 2.4)
91
113
  colorator (~> 1.0)
92
114
  em-websocket (~> 0.5)
93
115
  i18n (~> 0.7)
94
116
  jekyll-sass-converter (~> 1.0)
95
117
  jekyll-watch (~> 2.0)
96
- kramdown (~> 1.14)
118
+ kramdown (>= 1.17, < 3)
97
119
  liquid (~> 4.0)
98
120
  mercenary (~> 0.3.3)
99
121
  pathutil (~> 0.9)
@@ -104,23 +126,25 @@ GEM
104
126
  jekyll-coffeescript (1.1.1)
105
127
  coffee-script (~> 2.2)
106
128
  coffee-script-source (~> 1.11.1)
107
- jekyll-commonmark (1.3.1)
108
- commonmarker (~> 0.14)
109
- jekyll (>= 3.7, < 5.0)
110
- jekyll-commonmark-ghpages (0.1.6)
111
- commonmarker (~> 0.17.6)
112
- jekyll-commonmark (~> 1.2)
129
+ jekyll-commonmark (1.4.0)
130
+ commonmarker (~> 0.22)
131
+ jekyll-commonmark-ghpages (0.2.0)
132
+ commonmarker (~> 0.23.4)
133
+ jekyll (~> 3.9.0)
134
+ jekyll-commonmark (~> 1.4.0)
113
135
  rouge (>= 2.0, < 4.0)
114
136
  jekyll-default-layout (0.1.4)
115
137
  jekyll (~> 3.0)
116
- jekyll-feed (0.13.0)
138
+ jekyll-feed (0.15.1)
117
139
  jekyll (>= 3.7, < 5.0)
118
140
  jekyll-gist (1.5.0)
119
141
  octokit (~> 4.2)
120
142
  jekyll-github-metadata (2.13.0)
121
143
  jekyll (>= 3.4, < 5.0)
122
144
  octokit (~> 4.0, != 4.4.0)
123
- jekyll-mentions (1.5.1)
145
+ jekyll-include-cache (0.2.1)
146
+ jekyll (>= 3.7, < 5.0)
147
+ jekyll-mentions (1.6.0)
124
148
  html-pipeline (~> 2.3)
125
149
  jekyll (>= 3.7, < 5.0)
126
150
  jekyll-optional-front-matter (0.3.2)
@@ -128,97 +152,103 @@ GEM
128
152
  jekyll-paginate (1.1.0)
129
153
  jekyll-readme-index (0.3.0)
130
154
  jekyll (>= 3.0, < 5.0)
131
- jekyll-redirect-from (0.15.0)
155
+ jekyll-redirect-from (0.16.0)
132
156
  jekyll (>= 3.3, < 5.0)
133
157
  jekyll-relative-links (0.6.1)
134
158
  jekyll (>= 3.3, < 5.0)
135
- jekyll-remote-theme (0.4.1)
159
+ jekyll-remote-theme (0.4.3)
136
160
  addressable (~> 2.0)
137
161
  jekyll (>= 3.5, < 5.0)
138
- rubyzip (>= 1.3.0)
162
+ jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
163
+ rubyzip (>= 1.3.0, < 3.0)
139
164
  jekyll-sass-converter (1.5.2)
140
165
  sass (~> 3.4)
141
- jekyll-seo-tag (2.6.1)
142
- jekyll (>= 3.3, < 5.0)
166
+ jekyll-seo-tag (2.8.0)
167
+ jekyll (>= 3.8, < 5.0)
143
168
  jekyll-sitemap (1.4.0)
144
169
  jekyll (>= 3.7, < 5.0)
145
170
  jekyll-swiss (1.0.0)
146
- jekyll-theme-architect (0.1.1)
147
- jekyll (~> 3.5)
171
+ jekyll-theme-architect (0.2.0)
172
+ jekyll (> 3.5, < 5.0)
148
173
  jekyll-seo-tag (~> 2.0)
149
- jekyll-theme-cayman (0.1.1)
150
- jekyll (~> 3.5)
174
+ jekyll-theme-cayman (0.2.0)
175
+ jekyll (> 3.5, < 5.0)
151
176
  jekyll-seo-tag (~> 2.0)
152
- jekyll-theme-dinky (0.1.1)
153
- jekyll (~> 3.5)
177
+ jekyll-theme-dinky (0.2.0)
178
+ jekyll (> 3.5, < 5.0)
154
179
  jekyll-seo-tag (~> 2.0)
155
- jekyll-theme-hacker (0.1.1)
156
- jekyll (~> 3.5)
180
+ jekyll-theme-hacker (0.2.0)
181
+ jekyll (> 3.5, < 5.0)
157
182
  jekyll-seo-tag (~> 2.0)
158
- jekyll-theme-leap-day (0.1.1)
159
- jekyll (~> 3.5)
183
+ jekyll-theme-leap-day (0.2.0)
184
+ jekyll (> 3.5, < 5.0)
160
185
  jekyll-seo-tag (~> 2.0)
161
- jekyll-theme-merlot (0.1.1)
162
- jekyll (~> 3.5)
186
+ jekyll-theme-merlot (0.2.0)
187
+ jekyll (> 3.5, < 5.0)
163
188
  jekyll-seo-tag (~> 2.0)
164
- jekyll-theme-midnight (0.1.1)
165
- jekyll (~> 3.5)
189
+ jekyll-theme-midnight (0.2.0)
190
+ jekyll (> 3.5, < 5.0)
166
191
  jekyll-seo-tag (~> 2.0)
167
- jekyll-theme-minimal (0.1.1)
168
- jekyll (~> 3.5)
192
+ jekyll-theme-minimal (0.2.0)
193
+ jekyll (> 3.5, < 5.0)
169
194
  jekyll-seo-tag (~> 2.0)
170
- jekyll-theme-modernist (0.1.1)
171
- jekyll (~> 3.5)
195
+ jekyll-theme-modernist (0.2.0)
196
+ jekyll (> 3.5, < 5.0)
172
197
  jekyll-seo-tag (~> 2.0)
173
- jekyll-theme-primer (0.5.4)
198
+ jekyll-theme-primer (0.6.0)
174
199
  jekyll (> 3.5, < 5.0)
175
200
  jekyll-github-metadata (~> 2.9)
176
201
  jekyll-seo-tag (~> 2.0)
177
- jekyll-theme-slate (0.1.1)
178
- jekyll (~> 3.5)
202
+ jekyll-theme-slate (0.2.0)
203
+ jekyll (> 3.5, < 5.0)
179
204
  jekyll-seo-tag (~> 2.0)
180
- jekyll-theme-tactile (0.1.1)
181
- jekyll (~> 3.5)
205
+ jekyll-theme-tactile (0.2.0)
206
+ jekyll (> 3.5, < 5.0)
182
207
  jekyll-seo-tag (~> 2.0)
183
- jekyll-theme-time-machine (0.1.1)
184
- jekyll (~> 3.5)
208
+ jekyll-theme-time-machine (0.2.0)
209
+ jekyll (> 3.5, < 5.0)
185
210
  jekyll-seo-tag (~> 2.0)
186
211
  jekyll-titles-from-headings (0.5.3)
187
212
  jekyll (>= 3.3, < 5.0)
188
213
  jekyll-watch (2.2.1)
189
214
  listen (~> 3.0)
190
- jemoji (0.11.1)
215
+ jemoji (0.12.0)
191
216
  gemoji (~> 3.0)
192
217
  html-pipeline (~> 2.2)
193
218
  jekyll (>= 3.0, < 5.0)
194
- kramdown (1.17.0)
219
+ kramdown (2.3.2)
220
+ rexml
221
+ kramdown-parser-gfm (1.1.0)
222
+ kramdown (~> 2.0)
195
223
  liquid (4.0.3)
196
- listen (3.2.1)
224
+ listen (3.7.1)
197
225
  rb-fsevent (~> 0.10, >= 0.10.3)
198
226
  rb-inotify (~> 0.9, >= 0.9.10)
199
227
  mercenary (0.3.6)
200
- mini_portile2 (2.4.0)
228
+ mini_portile2 (2.8.0)
201
229
  minima (2.5.1)
202
230
  jekyll (>= 3.5, < 5.0)
203
231
  jekyll-feed (~> 0.9)
204
232
  jekyll-seo-tag (~> 2.1)
205
- minitest (5.14.0)
233
+ minitest (5.15.0)
206
234
  multipart-post (2.1.1)
207
- nokogiri (1.10.7)
208
- mini_portile2 (~> 2.4.0)
209
- octokit (4.15.0)
235
+ nokogiri (1.13.6)
236
+ mini_portile2 (~> 2.8.0)
237
+ racc (~> 1.4)
238
+ octokit (4.22.0)
210
239
  faraday (>= 0.9)
211
240
  sawyer (~> 0.8.0, >= 0.5.3)
212
241
  pathutil (0.16.2)
213
242
  forwardable-extended (~> 2.6)
214
- public_suffix (3.1.1)
215
- rb-fsevent (0.10.3)
243
+ public_suffix (4.0.7)
244
+ racc (1.6.0)
245
+ rb-fsevent (0.11.1)
216
246
  rb-inotify (0.10.1)
217
247
  ffi (~> 1.0)
218
- rouge (3.13.0)
219
- ruby-enum (0.7.2)
220
- i18n
221
- rubyzip (2.0.0)
248
+ rexml (3.2.5)
249
+ rouge (3.26.0)
250
+ ruby2_keywords (0.0.5)
251
+ rubyzip (2.3.2)
222
252
  safe_yaml (1.0.5)
223
253
  sass (3.7.4)
224
254
  sass-listen (~> 4.0.0)
@@ -228,15 +258,20 @@ GEM
228
258
  sawyer (0.8.2)
229
259
  addressable (>= 2.3.5)
230
260
  faraday (> 0.8, < 2.0)
261
+ simpleidn (0.2.1)
262
+ unf (~> 0.1.4)
231
263
  terminal-table (1.8.0)
232
264
  unicode-display_width (~> 1.1, >= 1.1.1)
233
265
  thread_safe (0.3.6)
234
- typhoeus (1.3.1)
266
+ typhoeus (1.4.0)
235
267
  ethon (>= 0.9.0)
236
- tzinfo (1.2.6)
268
+ tzinfo (1.2.9)
237
269
  thread_safe (~> 0.1)
238
- unicode-display_width (1.6.1)
239
- zeitwerk (2.2.2)
270
+ unf (0.1.4)
271
+ unf_ext
272
+ unf_ext (0.0.8.1)
273
+ unicode-display_width (1.8.0)
274
+ zeitwerk (2.5.4)
240
275
 
241
276
  PLATFORMS
242
277
  ruby
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
 
10
10
  <div id="tidelift">
11
- <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=homepage" target="_blank">
11
+ <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
12
12
  <span class="cta">
13
13
  Active Admin for enterprise available via Tidelift
14
14
  </span>
@@ -29,7 +29,7 @@ configurations.
29
29
  Migrate your db and start the server:
30
30
 
31
31
  ```bash
32
- $> rake db:migrate
32
+ $> rails db:migrate
33
33
  $> rails server
34
34
  ```
35
35
 
data/docs/index.html CHANGED
@@ -50,7 +50,7 @@
50
50
  </h3>
51
51
 
52
52
  <p>
53
- Each resource that is registered wtih Active Admin becomes available as <span class="caps">JSON</span>, <span class="caps">XML</span> and <span class="caps">CSV</span> download. Customize the output to meet your requirements.
53
+ Each resource that is registered with Active Admin becomes available as <span class="caps">JSON</span>, <span class="caps">XML</span> and <span class="caps">CSV</span> download. Customize the output to meet your requirements.
54
54
  </p>
55
55
  </div>
56
56
 
@@ -133,7 +133,7 @@
133
133
  </h2>
134
134
 
135
135
  <p>
136
- <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=homepage">
136
+ <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise">
137
137
  Available as part of the Tidelift Subscription
138
138
  </a>
139
139
  </p>
@@ -150,11 +150,11 @@
150
150
  </p>
151
151
 
152
152
  <div class="tidelift-buttons">
153
- <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
153
+ <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
154
154
  <span>LEARN MORE</span>
155
155
  </a>
156
156
 
157
- <a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
157
+ <a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
158
158
  <span>REQUEST A DEMO</span>
159
159
  </a>
160
160
  </div>
@@ -202,11 +202,11 @@
202
202
  </p>
203
203
 
204
204
  <div class="tidelift-buttons">
205
- <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
205
+ <a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
206
206
  <span>LEARN MORE</span>
207
207
  </a>
208
208
 
209
- <a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
209
+ <a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
210
210
  <span>REQUEST A DEMO</span>
211
211
  </a>
212
212
  </div>
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveAdmin
2
3
  class AbstractViewFactory < SettingsNode
3
4
 
@@ -1,6 +1,7 @@
1
- require 'active_admin/router'
2
- require 'active_admin/application_settings'
3
- require 'active_admin/namespace_settings'
1
+ # frozen_string_literal: true
2
+ require "active_admin/router"
3
+ require "active_admin/application_settings"
4
+ require "active_admin/namespace_settings"
4
5
 
5
6
  module ActiveAdmin
6
7
  class Application
@@ -45,8 +46,8 @@ module ActiveAdmin
45
46
  include AssetRegistration
46
47
 
47
48
  # Event that gets triggered on load of Active Admin
48
- BeforeLoadEvent = 'active_admin.application.before_load'.freeze
49
- AfterLoadEvent = 'active_admin.application.after_load'.freeze
49
+ BeforeLoadEvent = "active_admin.application.before_load".freeze
50
+ AfterLoadEvent = "active_admin.application.after_load".freeze
50
51
 
51
52
  # Runs before the app's AA initializer
52
53
  def setup!
@@ -75,7 +76,7 @@ module ActiveAdmin
75
76
 
76
77
  namespace = namespaces[name.to_sym] ||= begin
77
78
  namespace = Namespace.new(self, name)
78
- ActiveSupport::Notifications.publish ActiveAdmin::Namespace::RegisterEvent, namespace
79
+ ActiveSupport::Notifications.instrument ActiveAdmin::Namespace::RegisterEvent, { active_admin_namespace: namespace }
79
80
  namespace
80
81
  end
81
82
 
@@ -111,10 +112,10 @@ module ActiveAdmin
111
112
  # To reload everything simply call `ActiveAdmin.unload!`
112
113
  def load!
113
114
  unless loaded?
114
- ActiveSupport::Notifications.publish BeforeLoadEvent, self # before_load hook
115
- files.each { |file| load file } # load files
116
- namespace(default_namespace) # init AA resources
117
- ActiveSupport::Notifications.publish AfterLoadEvent, self # after_load hook
115
+ ActiveSupport::Notifications.instrument BeforeLoadEvent, { active_admin_application: self } # before_load hook
116
+ files.each { |file| load file } # load files
117
+ namespace(default_namespace) # init AA resources
118
+ ActiveSupport::Notifications.instrument AfterLoadEvent, { active_admin_application: self } # after_load hook
118
119
  @@loaded = true
119
120
  end
120
121
  end
@@ -125,7 +126,7 @@ module ActiveAdmin
125
126
 
126
127
  # Returns ALL the files to be loaded
127
128
  def files
128
- load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"] }
129
+ load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"].sort }
129
130
  end
130
131
 
131
132
  # Creates all the necessary routes for the ActiveAdmin configurations
@@ -144,13 +145,13 @@ module ActiveAdmin
144
145
 
145
146
  # Adds before, around and after filters to all controllers.
146
147
  # Example usage:
147
- # ActiveAdmin.before_filter :authenticate_admin!
148
+ # ActiveAdmin.before_action :authenticate_admin!
148
149
  #
149
150
  AbstractController::Callbacks::ClassMethods.public_instance_methods.
150
- select { |m| m.match(/(filter|action)/) }.each do |name|
151
+ select { |m| m.match(/_action\z/) }.each do |name|
151
152
  define_method name do |*args, &block|
152
- controllers_for_filters.each do |controller|
153
- controller.public_send name, *args, &block
153
+ ActiveSupport.on_load(:active_admin_controller) do
154
+ public_send name, *args, &block
154
155
  end
155
156
  end
156
157
  end
@@ -164,9 +165,8 @@ module ActiveAdmin
164
165
  private
165
166
 
166
167
  def register_default_assets
167
- register_stylesheet 'active_admin.css', media: 'screen'
168
- register_stylesheet 'active_admin/print.css', media: 'print'
169
- register_javascript 'active_admin.js'
168
+ register_stylesheet "active_admin.css", media: "all"
169
+ register_javascript "active_admin.js"
170
170
  end
171
171
 
172
172
  # Since app/admin is alphabetically before app/models, we have to remove it
@@ -176,7 +176,7 @@ module ActiveAdmin
176
176
  # files from being loaded twice in production.
177
177
  def remove_active_admin_load_paths_from_rails_autoload_and_eager_load
178
178
  ActiveSupport::Dependencies.autoload_paths -= load_paths
179
- Rails.application.config.eager_load_paths -= load_paths
179
+ Rails.application.config.eager_load_paths -= load_paths
180
180
  end
181
181
 
182
182
  # Hook into the Rails code reloading mechanism so that things are reloaded
@@ -1,4 +1,5 @@
1
- require 'active_admin/settings_node'
1
+ # frozen_string_literal: true
2
+ require "active_admin/settings_node"
2
3
 
3
4
  module ActiveAdmin
4
5
  class ApplicationSettings < SettingsNode
@@ -15,7 +16,7 @@ module ActiveAdmin
15
16
  # Load paths for admin configurations. Add folders to this load path
16
17
  # to load up other resources for administration. External gems can
17
18
  # include their paths in this load path to provide active_admin UIs
18
- register :load_paths, [File.expand_path('app/admin', Rails.root)]
19
+ register :load_paths, [File.expand_path("app/admin", Rails.root)]
19
20
 
20
21
  # Set default localize format for Date/Time values
21
22
  register :localize_format, :long
@@ -34,7 +35,7 @@ module ActiveAdmin
34
35
  :to_s ]
35
36
 
36
37
  # To make debugging easier, by default don't stream in development
37
- register :disable_streaming_in, ['development']
38
+ register :disable_streaming_in, ["development"]
38
39
 
39
40
  # Remove sensitive attributes from being displayed, made editable, or exported by default
40
41
  register :filter_attributes, [:encrypted_password, :password, :password_confirmation]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveAdmin
2
3
  module AssetRegistration
3
4
 
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveAdmin
2
3
 
3
4
  # Default Authorization permissions for Active Admin
4
5
  module Authorization
5
- READ = :read
6
- CREATE = :create
7
- UPDATE = :update
6
+ READ = :read
7
+ CREATE = :create
8
+ UPDATE = :update
8
9
  DESTROY = :destroy
9
10
  end
10
11
 
@@ -1,15 +1,16 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveAdmin
2
3
  class BaseController < ::InheritedResources::Base
3
4
  module Authorization
4
5
  extend ActiveSupport::Concern
5
6
 
6
7
  ACTIONS_DICTIONARY = {
7
- index: ActiveAdmin::Authorization::READ,
8
- show: ActiveAdmin::Authorization::READ,
9
- new: ActiveAdmin::Authorization::CREATE,
10
- create: ActiveAdmin::Authorization::CREATE,
11
- edit: ActiveAdmin::Authorization::UPDATE,
12
- update: ActiveAdmin::Authorization::UPDATE,
8
+ index: ActiveAdmin::Authorization::READ,
9
+ show: ActiveAdmin::Authorization::READ,
10
+ new: ActiveAdmin::Authorization::CREATE,
11
+ create: ActiveAdmin::Authorization::CREATE,
12
+ edit: ActiveAdmin::Authorization::UPDATE,
13
+ update: ActiveAdmin::Authorization::UPDATE,
13
14
  destroy: ActiveAdmin::Authorization::DESTROY
14
15
  }
15
16
 
@@ -52,9 +53,10 @@ module ActiveAdmin
52
53
  # an ActiveAdmin::AccessDenied.
53
54
  def authorize!(action, subject = nil)
54
55
  unless authorized? action, subject
55
- raise ActiveAdmin::AccessDenied.new(current_active_admin_user,
56
- action,
57
- subject)
56
+ raise ActiveAdmin::AccessDenied.new(
57
+ current_active_admin_user,
58
+ action,
59
+ subject)
58
60
  end
59
61
  end
60
62
 
@@ -80,7 +82,7 @@ module ActiveAdmin
80
82
  def active_admin_authorization_adapter
81
83
  adapter = active_admin_namespace.authorization_adapter
82
84
  if adapter.is_a? String
83
- ActiveSupport::Dependencies.constantize adapter
85
+ adapter.constantize
84
86
  else
85
87
  adapter
86
88
  end
@@ -112,9 +114,9 @@ module ActiveAdmin
112
114
  redirect_backwards_or_to_root
113
115
  end
114
116
 
115
- format.csv { render body: error, status: :unauthorized }
116
- format.json { render json: { error: error }, status: :unauthorized }
117
- format.xml { render xml: "<error>#{error}</error>", status: :unauthorized }
117
+ format.csv { render body: error, status: :unauthorized }
118
+ format.json { render json: { error: error }, status: :unauthorized }
119
+ format.xml { render xml: "<error>#{error}</error>", status: :unauthorized }
118
120
  end
119
121
  end
120
122
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveAdmin
2
3
  class BaseController < ::InheritedResources::Base
3
4
  module Menu