activeadmin 1.0.0 → 1.1.0

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 (276) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +20 -0
  3. data/.mdlrc +1 -0
  4. data/.rubocop.yml +52 -3
  5. data/.simplecov +13 -0
  6. data/.travis.yml +9 -24
  7. data/.yardopts +0 -1
  8. data/CHANGELOG.md +85 -4
  9. data/CONTRIBUTING.md +33 -57
  10. data/Gemfile +26 -17
  11. data/Rakefile +1 -12
  12. data/activeadmin.gemspec +9 -11
  13. data/app/assets/javascripts/active_admin/base.js.coffee +6 -2
  14. data/app/assets/javascripts/active_admin/initializers/batch_actions.js.coffee +5 -1
  15. data/app/assets/javascripts/active_admin/initializers/datepicker.js.coffee +5 -1
  16. data/app/assets/javascripts/active_admin/initializers/filters.js.coffee +5 -1
  17. data/app/assets/javascripts/active_admin/initializers/tabs.js.coffee +5 -1
  18. data/app/assets/javascripts/active_admin/lib/batch_actions.js.coffee +6 -3
  19. data/app/assets/javascripts/active_admin/lib/checkbox-toggler.js.coffee +9 -7
  20. data/app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee +5 -2
  21. data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +6 -2
  22. data/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee +3 -5
  23. data/app/assets/stylesheets/active_admin/_base.scss +2 -2
  24. data/app/assets/stylesheets/active_admin/_forms.scss +6 -12
  25. data/app/assets/stylesheets/active_admin/components/_batch_actions.scss +0 -5
  26. data/app/assets/stylesheets/active_admin/components/_pagination.scss +11 -0
  27. data/app/assets/stylesheets/active_admin/components/_status_tags.scss +1 -0
  28. data/app/assets/stylesheets/active_admin/components/_tables.scss +4 -1
  29. data/app/assets/stylesheets/active_admin/mixins/_all.scss +0 -2
  30. data/app/assets/stylesheets/active_admin/print.scss +2 -3
  31. data/app/views/active_admin/devise/sessions/new.html.erb +1 -1
  32. data/app/views/active_admin/devise/shared/_links.erb +12 -6
  33. data/app/views/kaminari/active_admin/_first_page.html.erb +11 -0
  34. data/app/views/kaminari/active_admin/_gap.html.erb +8 -0
  35. data/app/views/kaminari/active_admin/_last_page.html.erb +11 -0
  36. data/app/views/kaminari/active_admin/_next_page.html.erb +11 -0
  37. data/app/views/kaminari/active_admin/_page.html.erb +12 -0
  38. data/app/views/kaminari/active_admin/_paginator.html.erb +25 -0
  39. data/app/views/kaminari/active_admin/_prev_page.html.erb +11 -0
  40. data/codecov.yml +14 -12
  41. data/config/i18n-tasks.yml +26 -0
  42. data/config/locales/ar.yml +1 -3
  43. data/config/locales/bg.yml +0 -2
  44. data/config/locales/bs.yml +0 -2
  45. data/config/locales/ca.yml +0 -2
  46. data/config/locales/cs.yml +0 -2
  47. data/config/locales/da.yml +1 -3
  48. data/config/locales/de-CH.yml +1 -3
  49. data/config/locales/de.yml +1 -3
  50. data/config/locales/el.yml +1 -3
  51. data/config/locales/en-CA.yml +138 -0
  52. data/config/locales/en-GB.yml +43 -3
  53. data/config/locales/en.yml +8 -4
  54. data/config/locales/es-MX.yml +3 -2
  55. data/config/locales/es.yml +10 -4
  56. data/config/locales/fa.yml +0 -2
  57. data/config/locales/fi.yml +0 -2
  58. data/config/locales/fr.yml +9 -2
  59. data/config/locales/he.yml +53 -7
  60. data/config/locales/hr.yml +0 -2
  61. data/config/locales/hu.yml +0 -2
  62. data/config/locales/id.yml +1 -3
  63. data/config/locales/it.yml +2 -4
  64. data/config/locales/ja.yml +1 -3
  65. data/config/locales/ko.yml +0 -2
  66. data/config/locales/lt.yml +24 -4
  67. data/config/locales/lv.yml +0 -2
  68. data/config/locales/nb.yml +0 -2
  69. data/config/locales/nl.yml +1 -3
  70. data/config/locales/pl.yml +3 -2
  71. data/config/locales/pt-BR.yml +1 -3
  72. data/config/locales/pt-PT.yml +0 -2
  73. data/config/locales/ro.yml +0 -2
  74. data/config/locales/ru.yml +1 -3
  75. data/config/locales/sk.yml +0 -2
  76. data/config/locales/sv-SE.yml +1 -3
  77. data/config/locales/tr.yml +0 -2
  78. data/config/locales/uk.yml +1 -3
  79. data/config/locales/vi.yml +0 -2
  80. data/config/locales/zh-CN.yml +0 -2
  81. data/config/locales/zh-TW.yml +1 -3
  82. data/config/mdl_style.rb +9 -0
  83. data/cucumber.yml +3 -3
  84. data/docs/0-installation.md +15 -12
  85. data/docs/1-general-configuration.md +10 -3
  86. data/docs/10-custom-pages.md +10 -5
  87. data/docs/11-decorators.md +1 -0
  88. data/docs/12-arbre-components.md +7 -9
  89. data/docs/13-authorization-adapter.md +39 -24
  90. data/docs/14-gotchas.md +41 -22
  91. data/docs/2-resource-customization.md +41 -18
  92. data/docs/3-index-pages.md +30 -12
  93. data/docs/3-index-pages/custom-index.md +1 -0
  94. data/docs/3-index-pages/index-as-block.md +0 -5
  95. data/docs/3-index-pages/index-as-blog.md +0 -5
  96. data/docs/3-index-pages/index-as-grid.md +0 -5
  97. data/docs/3-index-pages/index-as-table.md +1 -9
  98. data/docs/4-csv-format.md +2 -1
  99. data/docs/5-forms.md +45 -21
  100. data/docs/6-show-pages.md +2 -1
  101. data/docs/7-sidebars.md +2 -1
  102. data/docs/8-custom-actions.md +4 -1
  103. data/docs/9-batch-actions.md +4 -2
  104. data/docs/documentation.md +19 -21
  105. data/features/comments/commenting.feature +20 -0
  106. data/features/index/filters.feature +41 -1
  107. data/features/index/format_as_csv.feature +17 -0
  108. data/features/index/index_scopes.feature +15 -0
  109. data/features/registering_assets.feature +8 -4
  110. data/features/show/attributes_table_title.feature +54 -0
  111. data/features/show/tabs.feature +10 -4
  112. data/features/step_definitions/action_link_steps.rb +0 -1
  113. data/features/step_definitions/attributes_table_title_steps.rb +11 -0
  114. data/features/step_definitions/batch_action_steps.rb +2 -2
  115. data/features/step_definitions/comment_steps.rb +21 -1
  116. data/features/step_definitions/configuration_steps.rb +1 -1
  117. data/features/step_definitions/filter_steps.rb +9 -0
  118. data/features/step_definitions/format_steps.rb +1 -1
  119. data/features/step_definitions/index_scope_steps.rb +4 -0
  120. data/features/support/env.rb +5 -4
  121. data/features/support/regular_env.rb +7 -0
  122. data/features/support/reload_env.rb +7 -0
  123. data/gemfiles/rails_42.gemfile +2 -37
  124. data/gemfiles/rails_50.gemfile +5 -40
  125. data/gemfiles/rails_51.gemfile +5 -40
  126. data/lib/active_admin.rb +0 -3
  127. data/lib/active_admin/application.rb +6 -4
  128. data/lib/active_admin/asset_registration.rb +8 -0
  129. data/lib/active_admin/authorization_adapter.rb +0 -3
  130. data/lib/active_admin/base_controller.rb +1 -2
  131. data/lib/active_admin/base_controller/authorization.rb +0 -1
  132. data/lib/active_admin/base_controller/menu.rb +9 -9
  133. data/lib/active_admin/batch_actions/controller.rb +1 -1
  134. data/lib/active_admin/batch_actions/views/selection_cells.rb +6 -5
  135. data/lib/active_admin/csv_builder.rb +3 -3
  136. data/lib/active_admin/dependency.rb +1 -1
  137. data/lib/active_admin/devise.rb +2 -2
  138. data/lib/active_admin/dsl.rb +2 -2
  139. data/lib/active_admin/filters.rb +2 -0
  140. data/lib/active_admin/filters/active.rb +13 -14
  141. data/lib/active_admin/filters/active_filter.rb +87 -0
  142. data/lib/active_admin/filters/active_sidebar.rb +50 -0
  143. data/lib/active_admin/filters/forms.rb +1 -2
  144. data/lib/active_admin/filters/resource_extension.rb +2 -30
  145. data/lib/active_admin/helpers/settings.rb +0 -1
  146. data/lib/active_admin/inputs/datepicker_input.rb +5 -5
  147. data/lib/active_admin/inputs/filters/date_range_input.rb +12 -4
  148. data/lib/active_admin/inputs/filters/text_input.rb +0 -1
  149. data/lib/active_admin/menu.rb +4 -4
  150. data/lib/active_admin/menu_collection.rb +0 -2
  151. data/lib/active_admin/namespace.rb +1 -1
  152. data/lib/active_admin/orm/active_record/comments/comment.rb +1 -5
  153. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +4 -2
  154. data/lib/active_admin/page_controller.rb +1 -1
  155. data/lib/active_admin/resource/action_items.rb +4 -0
  156. data/lib/active_admin/resource/attributes.rb +1 -1
  157. data/lib/active_admin/resource/page_presenters.rb +1 -1
  158. data/lib/active_admin/resource/routes.rb +0 -1
  159. data/lib/active_admin/resource/scopes.rb +2 -1
  160. data/lib/active_admin/resource_controller.rb +1 -1
  161. data/lib/active_admin/resource_controller/data_access.rb +8 -9
  162. data/lib/active_admin/resource_dsl.rb +10 -10
  163. data/lib/active_admin/router.rb +1 -1
  164. data/lib/active_admin/scope.rb +3 -3
  165. data/lib/active_admin/version.rb +1 -1
  166. data/lib/active_admin/view_helpers.rb +1 -0
  167. data/lib/active_admin/view_helpers/display_helper.rb +1 -1
  168. data/lib/active_admin/view_helpers/form_helper.rb +1 -1
  169. data/lib/active_admin/view_helpers/scope_name_helper.rb +16 -0
  170. data/lib/active_admin/views/action_items.rb +1 -1
  171. data/lib/active_admin/views/components/active_admin_form.rb +1 -1
  172. data/lib/active_admin/views/components/dropdown_menu.rb +2 -2
  173. data/lib/active_admin/views/components/index_list.rb +0 -2
  174. data/lib/active_admin/views/components/paginated_collection.rb +1 -1
  175. data/lib/active_admin/views/components/scopes.rb +2 -10
  176. data/lib/active_admin/views/components/status_tag.rb +19 -11
  177. data/lib/active_admin/views/components/tabs.rb +2 -2
  178. data/lib/active_admin/views/header.rb +0 -1
  179. data/lib/active_admin/views/index_as_blog.rb +1 -2
  180. data/lib/active_admin/views/index_as_grid.rb +2 -2
  181. data/lib/active_admin/views/index_as_table.rb +19 -1
  182. data/lib/active_admin/views/pages/base.rb +4 -4
  183. data/lib/active_admin/views/pages/show.rb +6 -1
  184. data/lib/active_admin/views/title_bar.rb +4 -4
  185. data/lib/bug_report_templates/{rails_5_master.rb → active_admin_master.rb} +35 -40
  186. data/lib/generators/active_admin/devise/devise_generator.rb +1 -1
  187. data/lib/generators/active_admin/install/templates/admin_user.rb.erb +1 -1
  188. data/spec/bug_report_templates_spec.rb +2 -3
  189. data/spec/rails_helper.rb +0 -3
  190. data/spec/spec_helper.rb +1 -12
  191. data/spec/support/active_admin_integration_spec_helper.rb +1 -1
  192. data/spec/support/rails_template.rb +5 -37
  193. data/spec/support/rails_template_with_data.rb +262 -3
  194. data/spec/support/templates/policies/active_admin/comment_policy.rb +1 -1
  195. data/spec/support/templates/policies/active_admin/page_policy.rb +1 -1
  196. data/spec/support/templates/policies/application_policy.rb +1 -2
  197. data/spec/support/templates/post_decorator.rb +0 -1
  198. data/spec/unit/abstract_view_factory_spec.rb +0 -1
  199. data/spec/unit/application_spec.rb +4 -0
  200. data/spec/unit/asset_registration_spec.rb +29 -0
  201. data/spec/unit/belongs_to_spec.rb +1 -2
  202. data/spec/unit/config_shared_examples.rb +1 -1
  203. data/spec/unit/csv_builder_spec.rb +2 -4
  204. data/spec/unit/dependency_spec.rb +7 -7
  205. data/spec/unit/dsl_spec.rb +0 -2
  206. data/spec/unit/filters/active_filter_spec.rb +135 -0
  207. data/spec/unit/filters/active_spec.rb +11 -1
  208. data/spec/unit/filters/filter_form_builder_spec.rb +9 -7
  209. data/spec/unit/form_builder_spec.rb +14 -14
  210. data/spec/unit/helpers/scope_chain_spec.rb +0 -1
  211. data/spec/unit/i18n_spec.rb +17 -0
  212. data/spec/unit/menu_item_spec.rb +1 -3
  213. data/spec/unit/namespace/register_page_spec.rb +1 -1
  214. data/spec/unit/namespace_spec.rb +0 -1
  215. data/spec/unit/page_spec.rb +0 -3
  216. data/spec/unit/resource/action_items_spec.rb +5 -1
  217. data/spec/unit/resource/attributes_spec.rb +1 -2
  218. data/spec/unit/resource/ordering_spec.rb +0 -3
  219. data/spec/unit/resource/scopes_spec.rb +1 -1
  220. data/spec/unit/resource_controller/data_access_spec.rb +2 -2
  221. data/spec/unit/resource_controller_spec.rb +1 -2
  222. data/spec/unit/resource_spec.rb +9 -2
  223. data/spec/unit/routing_spec.rb +0 -2
  224. data/spec/unit/scope_spec.rb +3 -3
  225. data/spec/unit/settings_spec.rb +0 -1
  226. data/spec/unit/view_factory_spec.rb +1 -1
  227. data/spec/unit/view_helpers/flash_helper_spec.rb +0 -1
  228. data/spec/unit/view_helpers/form_helper_spec.rb +3 -4
  229. data/spec/unit/view_helpers/method_or_proc_helper_spec.rb +0 -1
  230. data/spec/unit/views/components/attributes_table_spec.rb +0 -1
  231. data/spec/unit/views/components/columns_spec.rb +0 -2
  232. data/spec/unit/views/components/site_title_spec.rb +0 -2
  233. data/spec/unit/views/components/status_tag_spec.rb +23 -7
  234. data/spec/unit/views/components/tabs_spec.rb +29 -1
  235. data/spec/unit/views/pages/index_spec.rb +1 -1
  236. data/tasks/docs.rake +37 -10
  237. data/tasks/lint.rake +14 -1
  238. data/tasks/local.rake +2 -2
  239. data/tasks/test.rake +8 -25
  240. data/vendor/assets/javascripts/jquery-ui/data.js +41 -0
  241. data/vendor/assets/javascripts/jquery-ui/disable-selection.js +48 -0
  242. data/vendor/assets/javascripts/jquery-ui/escape-selector.js +23 -0
  243. data/vendor/assets/javascripts/jquery-ui/focusable.js +86 -0
  244. data/vendor/assets/javascripts/jquery-ui/ie.js +17 -0
  245. data/vendor/assets/javascripts/jquery-ui/keycode.js +47 -0
  246. data/vendor/assets/javascripts/jquery-ui/plugin.js +46 -0
  247. data/vendor/assets/javascripts/jquery-ui/position.js +500 -0
  248. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +42 -0
  249. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +23 -0
  250. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +47 -0
  251. data/vendor/assets/javascripts/jquery-ui/tabbable.js +38 -0
  252. data/vendor/assets/javascripts/jquery-ui/unique-id.js +51 -0
  253. data/vendor/assets/javascripts/jquery-ui/version.js +17 -0
  254. data/vendor/assets/javascripts/jquery-ui/widget.js +735 -0
  255. data/vendor/assets/javascripts/jquery-ui/widgets/button.js +391 -0
  256. data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +300 -0
  257. data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +300 -0
  258. data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +2123 -0
  259. data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +954 -0
  260. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +1259 -0
  261. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +230 -0
  262. data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +1207 -0
  263. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +1561 -0
  264. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +931 -0
  265. data/vendor/assets/stylesheets/active_admin/_normalize.scss +447 -0
  266. metadata +62 -51
  267. data/.hound.yml +0 -14
  268. data/Appraisals +0 -41
  269. data/app/assets/images/active_admin/datepicker/datepicker-input-icon.png +0 -0
  270. data/app/assets/javascripts/active_admin/jquery_ui.js.erb +0 -18
  271. data/app/assets/stylesheets/active_admin/mixins/_reset.scss +0 -165
  272. data/lib/active_admin/filters/humanized.rb +0 -68
  273. data/spec/requests/javascript_spec.rb +0 -22
  274. data/spec/support/jslint.yml +0 -80
  275. data/spec/unit/filters/humanized_spec.rb +0 -64
  276. data/tasks/yard.rake +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ad68985cf893a7bfc01a87ca8d4e9941beeb44c
4
- data.tar.gz: 741933e1ad50389a45df1b376d8288dfdd5eec81
3
+ metadata.gz: 4a84a106c0900650dea61f07201b5917cd693955
4
+ data.tar.gz: cd12642360eba01bdd56347eca1afb8b7faf4b9f
5
5
  SHA512:
6
- metadata.gz: c3f01d37b8a53e5953e72d0d411789a05f47a4347fd05f42cbb02c911d4d03b7917bc05dddbc1772eff6b2985584387bc655b53a69a39b61e09803be69d185ed
7
- data.tar.gz: 8d62234059cc7662c37c79fd18cc6b59dc3e39ee4602d95cc16d21f1737cbfbd1fb40707a1fdfde3e58028ef10974f80e3bb02a80ac4795be894f0254fcb49a9
6
+ metadata.gz: 65e3bd10aeeba694b950408dea2e8cd2dc45cd498ab408094a091ec32212cf285fb80f7f4f897d8906e90ae084b0011cf17f02beb16312ce2ce241e0f1865417
7
+ data.tar.gz: 83d974c9f52817a78db747973fa862b9b203ae6ef7ab1c7df3e4c1b2a76b2a6dec1235e9428750571731e983bc7ccedf994270b3b75cf500594bd77776769d1f
@@ -0,0 +1,20 @@
1
+ [Please follow the guidelines for creating a bug report](https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md#4-did-you-find-a-bug).
2
+
3
+ The issue tracker is only for bugs and feature requests. If you need general
4
+ help please post to
5
+ [StackOverflow](http://stackoverflow.com/questions/tagged/activeadmin).
6
+
7
+ ### Expected behavior
8
+
9
+ What do you think should happen?
10
+
11
+ ### Actual behavior
12
+
13
+ What actually happens?
14
+
15
+ ### How to reproduce
16
+
17
+ Your best chance of getting this bug looked at quickly is to provide an
18
+ **executable test case** demonstrating the expected behavior that is not
19
+ occurring. [Please follow the guidelines for creating a bug
20
+ report](https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md#4-did-you-find-a-bug).
data/.mdlrc ADDED
@@ -0,0 +1 @@
1
+ style "config/mdl_style.rb"
@@ -2,7 +2,8 @@
2
2
 
3
3
  AllCops:
4
4
  DisabledByDefault: true
5
-
5
+ TargetRubyVersion: 2.2
6
+
6
7
  Exclude:
7
8
  - spec/rails/**/*
8
9
  - gemfiles/vendor/bundle/**/*
@@ -17,11 +18,59 @@ AllCops:
17
18
 
18
19
  StyleGuideCopsOnly: false
19
20
 
21
+ Lint/EndAlignment:
22
+ Enabled: true
23
+
24
+ Layout/CaseIndentation:
25
+ Enabled: true
26
+
27
+ Layout/ElseAlignment:
28
+ Enabled: true
29
+
30
+ Layout/EmptyLines:
31
+ Enabled: true
32
+
33
+ Layout/EndOfLine:
34
+ Enabled: true
35
+
36
+ Layout/ExtraSpacing:
37
+ Enabled: true
38
+
39
+ Style/Encoding:
40
+ EnforcedStyle: never
41
+ Enabled: true
42
+
20
43
  Style/HashSyntax:
21
44
  Enabled: true
22
45
 
23
- Style/TrailingWhitespace:
46
+ Layout/IndentationConsistency:
47
+ Enabled: true
48
+
49
+ Layout/IndentationWidth:
50
+ Enabled: true
51
+
52
+ Style/PredicateName:
53
+ Enabled: true
54
+
55
+ NamePrefixBlacklist:
56
+ - is_
57
+ - have_
58
+
59
+ NameWhitelist:
60
+ - has_many
61
+ - has_many_actions
62
+
63
+ Layout/TrailingBlankLines:
64
+ Enabled: true
65
+
66
+ Layout/TrailingWhitespace:
67
+ Enabled: true
68
+
69
+ Layout/SpaceAfterComma:
70
+ Enabled: true
71
+
72
+ Layout/SpaceAroundEqualsInParameterDefault:
24
73
  Enabled: true
25
74
 
26
- Style/SpaceAfterComma:
75
+ Layout/SpaceInsideParens:
27
76
  Enabled: true
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # TODO: Always run simplecov again once
4
+ # https://github.com/colszowka/simplecov/issues/404,
5
+ # https://github.com/glebm/i18n-tasks/issues/221 are fixed
6
+ SimpleCov.start do
7
+ add_filter 'spec/rails/'
8
+ end
9
+
10
+ if ENV['CI'] == 'true'
11
+ require 'codecov'
12
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
13
+ end
@@ -4,6 +4,8 @@ language: ruby
4
4
 
5
5
  sudo: false
6
6
 
7
+ dist: trusty
8
+
7
9
  bundler_args: --without development
8
10
 
9
11
  branches:
@@ -16,15 +18,14 @@ before_install:
16
18
  - PATH=$(npm bin):$PATH # needed to install phantomjs via npm
17
19
  - if [ $(phantomjs --version) != '2.1.1' ]; then npm install phantomjs-prebuilt@2.1; fi
18
20
  - gem update --system # use the very latest Rubygems
19
- - rvm @global do gem uninstall bundler -a -x
20
- - rvm @global do gem install bundler -v 1.14.6 # latest version known to work
21
+ - gem install bundler # use the very latest Bundler
21
22
 
22
23
  script:
23
24
  - bundle exec rake
25
+ - bundle exec rake docs:build
24
26
 
25
27
  rvm:
26
- - jruby-9.1.8.0
27
- - 2.1.10
28
+ - jruby-9.1.12.0
28
29
  - 2.2.7
29
30
  - 2.3.4
30
31
  - 2.4.1
@@ -37,30 +38,14 @@ gemfile:
37
38
  env:
38
39
  global:
39
40
  - JRUBY_OPTS="-J-Xmx1024m --dev --debug"
41
+ - JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
42
+ - COVERAGE=true
40
43
 
41
44
  matrix:
42
45
  fast_finish: true
43
46
 
44
- exclude:
45
- - rvm: 2.1.10
46
- gemfile: gemfiles/rails_50.gemfile
47
- - rvm: 2.1.10
48
- gemfile: gemfiles/rails_51.gemfile
49
-
50
47
  allow_failures:
51
- - rvm: jruby-9.1.8.0
48
+ - rvm: jruby-9.1.12.0
52
49
  gemfile: gemfiles/rails_50.gemfile
53
- - rvm: jruby-9.1.8.0
50
+ - rvm: jruby-9.1.12.0
54
51
  gemfile: gemfiles/rails_51.gemfile
55
-
56
- notifications:
57
- irc:
58
- channels:
59
- - irc.freenode.org#activeadmin
60
-
61
- on_success: change
62
- on_failure: always
63
- skip_join: true
64
-
65
- template:
66
- - "(%{branch}/%{commit} by %{author}): %{message} (%{build_url})"
data/.yardopts CHANGED
@@ -1,7 +1,6 @@
1
1
  lib/**/*.rb
2
2
  --protected
3
3
  --no-private
4
- --exclude (features|lib\/generators\/active_admin\/.*\/templates)
5
4
  -
6
5
  README.md
7
6
  CHANGELOG.md
@@ -1,4 +1,60 @@
1
1
  # Changelog
2
+
3
+ ## ## 1.1.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.0.0...v1.1.0)
4
+
5
+ ### Bug Fixes
6
+
7
+ * Fixed [#5093][] Handle table prefix & table suffix for `ActiveAdminComment` model
8
+ * Fixed [#4173][] by including the default Kaminari templates [#5069][] by [@javierjulio][]
9
+ * Fixed [#5043][]. Do not crash in sidebar rendering when a default scope is not
10
+ specified. [#5044] by [@Fivell][].
11
+ * Fixed [#3894][]. Make tab's component work with non-ascii titles. [#5046] by
12
+ [@Fivell][].
13
+
14
+ ### Removals
15
+
16
+ * Ruby 2.1 support has been dropped [#5002][] by [@deivid-rodriguez][]
17
+ * Replaced `sass-rails` with `sass` dependency [#5037][] by [@javierjulio][]
18
+
19
+ ### Deprecations
20
+
21
+ * Deprecated `config.register_stylesheet` and `config.register_javascript`. Import
22
+ your CSS and JS files in `active_admin.scss` or `active_admin.js`. [#5060][] by [@javierjulio][]
23
+ * Deprecated `type` param from `status_tag` and related CSS classes [#4989][] by [@javierjulio][]
24
+ * The method signature has changed from:
25
+
26
+ ```ruby
27
+ status_tag(status, :ok, class: 'completed', label: 'on')
28
+ ```
29
+
30
+ to:
31
+
32
+ ```ruby
33
+ status_tag(status, class: 'completed ok', label: 'on')
34
+ ```
35
+
36
+ * The following CSS classes have been deprecated and will be removed in the future:
37
+
38
+ ```css
39
+ .status_tag {
40
+ &.ok, &.published, &.complete, &.completed, &.green { background: #8daa92; }
41
+ &.warn, &.warning, &.orange { background: #e29b20; }
42
+ &.error, &.errored, &.red { background: #d45f53; }
43
+ }
44
+ ```
45
+
46
+ ### Enhancements
47
+
48
+ #### Minor
49
+
50
+ * Support proc as an input_html option value when declaring filters [#5029][] by [@Fivell][]
51
+ * Base localization support, better associations handling for active filters sidebar [#4951][] by [@Fivell][]
52
+ * Allow AA scopes to return paginated collections [#4996][] by [@Fivell][]
53
+ * Added `scopes_show_count` configuration to setup show_count attribute for scopes globally [#4950][] by [@Fivell][]
54
+ * Allow custom panel title given with `attributes_table` [#4940][] by [@ajw725][]
55
+ * Allow passing a class to `action_item` block [#4997][] by [@Fivell][]
56
+ * Add pagination to the comments section [#5088][] by [@alex-bogomolov][]
57
+
2
58
  ## 1.0.0 [☰](https://github.com/activeadmin/activeadmin/compare/v0.6.3...master)
3
59
 
4
60
  ### Breaking Changes
@@ -17,7 +73,7 @@
17
73
  #### Major
18
74
 
19
75
  * Migration from Metasearch to Ransack [#1979][] by [@seanlinsley][]
20
- * Rails 4 support [#2326][] by many people <3
76
+ * Rails 4 support [#2326][] by many people :heart:
21
77
  * Rails 4.2 support [#3731][] by [@gonzedge][] and [@timoschilling][]
22
78
  * Rails 5 support [#4254][] by [@seanlinsley][]
23
79
  * Rails 5.1 support [#4882][] by [@varyonic][]
@@ -41,6 +97,7 @@
41
97
  * Add multi-record support to `attributes_table_for` [#2544][] by [@zorab47][]
42
98
  * Table CSS classes are now prefixed to prevent clashes [#2532][] by [@TimPetricola][]
43
99
  * Allow Inherited Resources shorthand for redirection [#2001][] by [@seanlinsley][]
100
+
44
101
  ```ruby
45
102
  controller do
46
103
  # Redirects to index page instead of rendering updated resource
@@ -51,15 +108,17 @@
51
108
  ```
52
109
 
53
110
  * Accept block for download links [#2040][] by [@potatosalad][]
111
+
54
112
  ```ruby
55
113
  index download_links: ->{ can?(:view_all_download_links) || [:pdf] }
56
114
  ```
115
+
57
116
  * Comments menu can be customized via configuration passed to `config.comments_menu` [#4187][] by [@drn][]
58
117
  * Added `config.route_options` to namespace to customize routes [#4467][] by [@stereoscott[]]
59
118
 
60
119
  ### Security Fixes
61
120
 
62
- * Prevents access to formats that the user not permitted to see [#4867][] by [@Fivell][] and [@timoschilling][]
121
+ * Prevents access to formats that the user not permitted to see [#4867][] by [@Fivell][] and [@timoschilling][]
63
122
  * Prevents potential DOS attack via Ruby symbols [#1926][] by [@seanlinsley][]
64
123
  * [this isn't an issue for those using Ruby >= 2.2](http://rubykaigi.org/2014/presentation/S-NarihiroNakamura)
65
124
 
@@ -76,6 +135,7 @@ index download_links: ->{ can?(:view_all_download_links) || [:pdf] }
76
135
  `ActiveAdmin::Event` will be removed in a future version, ActiveAdmin switched
77
136
  to use `ActiveSupport::Notifications`.
78
137
  NOTE: The blog parameters has changed:
138
+
79
139
  ```ruby
80
140
  ActiveSupport::Notifications.subscribe ActiveAdmin::Application::BeforeLoadEvent do |event, *args|
81
141
  # some code
@@ -88,7 +148,6 @@ ActiveSupport::Notifications.publish ActiveAdmin::Application::BeforeLoadEvent,
88
148
 
89
149
  Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-stable/CHANGELOG.md) for previous changes.
90
150
 
91
- <!--- The following link definition list is generated by PimpMyChangelog --->
92
151
  [#1926]: https://github.com/activeadmin/activeadmin/issues/1926
93
152
  [#1979]: https://github.com/activeadmin/activeadmin/issues/1979
94
153
  [#2001]: https://github.com/activeadmin/activeadmin/issues/2001
@@ -112,8 +171,12 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
112
171
  [#3695]: https://github.com/activeadmin/activeadmin/issues/3695
113
172
  [#3731]: https://github.com/activeadmin/activeadmin/issues/3731
114
173
  [#3783]: https://github.com/activeadmin/activeadmin/issues/3783
174
+ [#3894]: https://github.com/activeadmin/activeadmin/issues/3894
115
175
  [#4187]: https://github.com/activeadmin/activeadmin/issues/4187
176
+ [#4173]: https://github.com/activeadmin/activeadmin/issues/4173
116
177
  [#4254]: https://github.com/activeadmin/activeadmin/issues/4254
178
+ [#5043]: https://github.com/activeadmin/activeadmin/issues/5043
179
+
117
180
  [#4477]: https://github.com/activeadmin/activeadmin/pull/4477
118
181
  [#4759]: https://github.com/activeadmin/activeadmin/pull/4759
119
182
  [#4768]: https://github.com/activeadmin/activeadmin/pull/4768
@@ -121,7 +184,23 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
121
184
  [#4851]: https://github.com/activeadmin/activeadmin/pull/4851
122
185
  [#4867]: https://github.com/activeadmin/activeadmin/pull/4867
123
186
  [#4882]: https://github.com/activeadmin/activeadmin/pull/4882
124
-
187
+ [#4940]: https://github.com/activeadmin/activeadmin/pull/4940
188
+ [#4950]: https://github.com/activeadmin/activeadmin/pull/4950
189
+ [#4951]: https://github.com/activeadmin/activeadmin/pull/4951
190
+ [#4989]: https://github.com/activeadmin/activeadmin/pull/4989
191
+ [#4996]: https://github.com/activeadmin/activeadmin/pull/4996
192
+ [#4997]: https://github.com/activeadmin/activeadmin/pull/4997
193
+ [#5029]: https://github.com/activeadmin/activeadmin/pull/5029
194
+ [#5002]: https://github.com/activeadmin/activeadmin/pull/5002
195
+ [#5037]: https://github.com/activeadmin/activeadmin/pull/5037
196
+ [#5044]: https://github.com/activeadmin/activeadmin/pull/5044
197
+ [#5046]: https://github.com/activeadmin/activeadmin/pull/5046
198
+ [#5060]: https://github.com/activeadmin/activeadmin/pull/5060
199
+ [#5069]: https://github.com/activeadmin/activeadmin/pull/5069
200
+ [#5088]: https://github.com/activeadmin/activeadmin/pull/5088
201
+ [#5093]: https://github.com/activeadmin/activeadmin/pull/5093
202
+
203
+ [@ajw725]: https://github.com/ajw725
125
204
  [@bolshakov]: https://github.com/bolshakov
126
205
  [@chancancode]: https://github.com/chancancode
127
206
  [@craigmcnamara]: https://github.com/craigmcnamara
@@ -130,6 +209,7 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
130
209
  [@drn]: https://github.com/drn
131
210
  [@Fivell]: https://github.com/Fivell
132
211
  [@gonzedge]: https://github.com/gonzedge
212
+ [@javierjulio]: https://github.com/javierjulio
133
213
  [@johnnyshields]: https://github.com/johnnyshields
134
214
  [@PChambino]: https://github.com/PChambino
135
215
  [@potatosalad]: https://github.com/potatosalad
@@ -140,3 +220,4 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
140
220
  [@TimPetricola]: https://github.com/TimPetricola
141
221
  [@varyonic]: https://github.com/varyonic
142
222
  [@zorab47]: https://github.com/zorab47
223
+ [@alex-bogomolov]: https://github.com/alex-bogomolov
@@ -27,40 +27,24 @@ git checkout -b 325-add-japanese-translations
27
27
  ### 3. Get the test suite running
28
28
 
29
29
  Make sure you're using a recent ruby and have the `bundler` gem installed, at
30
- least version `1.14.3`. The most reliable `bundler` version to use is the same
31
- Travis is using.
30
+ least version `1.14.3`.
32
31
 
33
- Install `appraisal` and the other common development dependencies:
32
+ Select the Gemfile for your preferred Rails version, preferably the latest:
34
33
 
35
34
  ```sh
36
- bundle install
35
+ export BUNDLE_GEMFILE=gemfiles/rails_51.gemfile
37
36
  ```
38
37
 
39
- Install the development dependencies:
38
+ Now install the development dependencies:
40
39
 
41
40
  ```sh
42
- bundle exec appraisal install
41
+ bundle install
43
42
  ```
44
43
 
45
44
  Now you should be able to run the entire suite using:
46
45
 
47
46
  ```sh
48
- bundle exec rake test
49
- ```
50
-
51
- This will automatically run the tests against Rails 5.0. But you can easily run
52
- tests against older versions of Rails too.
53
-
54
- For example, you can run all tests against Rails 4.2:
55
-
56
- ```sh
57
- bundle exec appraisal rails_42 rake test
58
- ```
59
-
60
- or even just run specific tests. For example:
61
-
62
- ```sh
63
- bundle exec appraisal rails_42 rspec spec/unit/belongs_to_spec.rb
47
+ bundle exec rake
64
48
  ```
65
49
 
66
50
  The test run will generate a sample Rails application in `spec/rails` to run the
@@ -70,26 +54,26 @@ If your tests are passing locally but they're failing on Travis, reset your test
70
54
  environment:
71
55
 
72
56
  ```sh
73
- rm -rf spec/rails && bundle exec appraisal update
57
+ rm -rf spec/rails && bundle update
74
58
  ```
75
59
 
76
- If you want to stick with a specific older Rails version for a while, you can
77
- also do `export BUNDLE_GEMFILE=gemfiles/rails_42.gemfile` and then run all
78
- commands directly (`bundle exec rake test`, `bundle exec rake setup`) without
79
- Appraisal.
60
+ ### 4. Did you find a bug?
80
61
 
81
- #### 4. Did you find a bug?
62
+ * **Ensure the bug was not already reported** by [searching all
63
+ issues](https://github.com/activeadmin/activeadmin/issues?q=).
82
64
 
83
- * **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/activeadmin/activeadmin/issues).
65
+ * If you're unable to find an open issue addressing the problem, [open a new
66
+ one](https://github.com/activeadmin/activeadmin/issues/new). Be sure to
67
+ include a **title and clear description**, as much relevant information as
68
+ possible, and a **code sample** or an **executable test case** demonstrating
69
+ the expected behavior that is not occurring.
84
70
 
85
- * If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/activeadmin/activeadmin/issues/new).
86
- Be sure to include a **title and clear description**, as much relevant information as possible,
87
- and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
88
-
89
- * If possible, use the relevant bug report templates to create the issue.
90
- Simply copy the content of the appropriate template into a .rb file, make the necessary changes to demonstrate the issue,
91
- and **paste the content into the issue description**:
92
- * [**Rails 5** issues](https://github.com/activeadmin/activeadmin/blob/master/lib/bug_report_templates/rails_5_master.rb)
71
+ * If possible, use the relevant bug report templates to create the issue.
72
+ Simply copy the content of the appropriate template into a .rb file, make the
73
+ necessary changes to demonstrate the issue, and **paste the content into the
74
+ issue description**:
75
+ * [**ActiveAdmin** master
76
+ issues](https://github.com/activeadmin/activeadmin/blob/master/lib/bug_report_templates/active_admin_master.rb)
93
77
 
94
78
  ### 5. Implement your fix or feature
95
79
 
@@ -113,10 +97,8 @@ in the `.test-rails-apps` folder.
113
97
  You should now be able to open <http://localhost:3000/admin> in your browser.
114
98
  You can log in using:
115
99
 
116
- ```
117
- User: admin@example.com
118
- Password: password
119
- ```
100
+ *User*: admin@example.com
101
+ *Password*: password
120
102
 
121
103
  If you need to perform any other commands on the test application, just pass
122
104
  them to the `local` rake task. For example, to boot the rails console:
@@ -131,20 +113,7 @@ Or to migrate the database:
131
113
  bundle exec rake local db:migrate
132
114
  ```
133
115
 
134
- ### 7. Run tests against major supported Rails versions
135
-
136
- Once you've implemented your code, got the tests passing, previewed it in a
137
- browser, you're ready to test it against multiple versions of Rails.
138
-
139
- ```sh
140
- bundle exec appraisal rake test
141
- ```
142
-
143
- This runs our test suite against a couple of major versions of Rails.
144
- Travis does essentially the same thing when you open a Pull Request.
145
- We care about quality, so your PR won't be merged until all tests pass.
146
-
147
- ### 8. Make a Pull Request
116
+ ### 7. Make a Pull Request
148
117
 
149
118
  At this point, you should switch back to your master branch and make sure it's
150
119
  up to date with Active Admin's master branch:
@@ -167,7 +136,14 @@ Finally, go to GitHub and
167
136
  [make a Pull Request](https://help.github.com/articles/creating-a-pull-request)
168
137
  :D
169
138
 
170
- ### 9. Keeping your Pull Request updated
139
+ Travis CI will run our test suite against all supported Rails versions. We care
140
+ about quality, so your PR won't be merged until all tests pass. It's unlikely,
141
+ but it's possible that your changes pass tests in one Rails version but fail in
142
+ another. In that case, you'll have to setup your development environment (as
143
+ explained in step 3) to use the problematic Rails version, and investigate
144
+ what's going on!
145
+
146
+ ### 8. Keeping your Pull Request updated
171
147
 
172
148
  If a maintainer asks you to "rebase" your PR, they're saying that a lot of code
173
149
  has changed, and that you need to update your branch so it's easier to merge.
@@ -183,7 +159,7 @@ git pull --rebase upstream master
183
159
  git push --force-with-lease 325-add-japanese-translations
184
160
  ```
185
161
 
186
- ### 10. Merging a PR (maintainers only)
162
+ ### 9. Merging a PR (maintainers only)
187
163
 
188
164
  A PR can only be merged into master by a maintainer if:
189
165