activeadmin 1.0.0.pre1 → 1.0.0.pre2

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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +18 -16
  3. data/CHANGELOG.md +18 -1013
  4. data/Gemfile +18 -11
  5. data/LICENSE +0 -5
  6. data/README.md +0 -2
  7. data/activeadmin.gemspec +3 -1
  8. data/app/assets/javascripts/active_admin/application.js.coffee +8 -3
  9. data/app/assets/javascripts/active_admin/base.js.coffee +1 -6
  10. data/app/assets/javascripts/active_admin/jquery_ui.js.erb +11 -0
  11. data/app/assets/javascripts/active_admin/lib/flash.js.coffee +1 -1
  12. data/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +11 -3
  13. data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +5 -1
  14. data/app/assets/stylesheets/active_admin/_base.scss +1 -4
  15. data/app/assets/stylesheets/active_admin/_forms.scss +13 -8
  16. data/app/assets/stylesheets/active_admin/components/_buttons.scss +0 -5
  17. data/app/assets/stylesheets/active_admin/mixins/_all.scss +0 -1
  18. data/app/assets/stylesheets/active_admin/mixins/_sections.scss +0 -1
  19. data/app/assets/stylesheets/active_admin/mixins/_typography.scss +1 -1
  20. data/app/assets/stylesheets/active_admin/mixins/_variables.scss +1 -1
  21. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +0 -5
  22. data/app/views/layouts/active_admin_logged_out.html.erb +4 -0
  23. data/config/locales/ar.yml +14 -2
  24. data/config/locales/de-CH.yml +2 -0
  25. data/config/locales/de.yml +15 -0
  26. data/config/locales/en.yml +10 -2
  27. data/config/locales/es.yml +26 -4
  28. data/config/locales/fr.yml +5 -0
  29. data/config/locales/id.yml +135 -0
  30. data/config/locales/ja.yml +21 -3
  31. data/config/locales/ko.yml +66 -36
  32. data/config/locales/nl.yml +14 -1
  33. data/config/locales/pt-BR.yml +11 -0
  34. data/config/locales/ru.yml +15 -1
  35. data/config/locales/sv-SE.yml +45 -5
  36. data/config/locales/uk.yml +16 -4
  37. data/config/locales/zh-CN.yml +5 -0
  38. data/config/locales/zh-TW.yml +32 -1
  39. data/docs/0-installation.md +7 -1
  40. data/docs/1-general-configuration.md +9 -0
  41. data/docs/10-custom-pages.md +10 -0
  42. data/docs/12-arbre-components.md +1 -1
  43. data/docs/14-gotchas.md +2 -2
  44. data/docs/2-resource-customization.md +5 -3
  45. data/docs/3-index-pages.md +7 -0
  46. data/docs/3-index-pages/index-as-table.md +4 -0
  47. data/docs/6-show-pages.md +1 -1
  48. data/docs/7-sidebars.md +8 -0
  49. data/features/index/batch_actions.feature +21 -2
  50. data/features/index/pagination.feature +16 -12
  51. data/features/meta_tags.feature +21 -0
  52. data/features/registering_assets.feature +1 -2
  53. data/features/show/columns.feature +40 -0
  54. data/features/show/default_content.feature +2 -1
  55. data/features/step_definitions/asset_steps.rb +3 -3
  56. data/features/step_definitions/batch_action_steps.rb +11 -2
  57. data/features/step_definitions/column_steps.rb +8 -0
  58. data/features/step_definitions/configuration_steps.rb +2 -2
  59. data/features/step_definitions/factory_steps.rb +3 -2
  60. data/features/step_definitions/meta_tag_steps.rb +3 -0
  61. data/features/step_definitions/pagination_steps.rb +8 -0
  62. data/features/step_definitions/table_steps.rb +2 -1
  63. data/lib/active_admin.rb +3 -3
  64. data/lib/active_admin/application.rb +66 -16
  65. data/lib/active_admin/batch_actions.rb +0 -1
  66. data/lib/active_admin/batch_actions/controller.rb +2 -2
  67. data/lib/active_admin/batch_actions/resource_extension.rb +3 -1
  68. data/lib/active_admin/callbacks.rb +1 -1
  69. data/lib/active_admin/csv_builder.rb +2 -2
  70. data/lib/active_admin/dependency.rb +18 -16
  71. data/lib/active_admin/devise.rb +1 -1
  72. data/lib/active_admin/dsl.rb +1 -1
  73. data/lib/active_admin/event.rb +8 -17
  74. data/lib/active_admin/filters/active.rb +29 -0
  75. data/lib/active_admin/filters/forms.rb +6 -1
  76. data/lib/active_admin/filters/humanized.rb +68 -0
  77. data/lib/active_admin/filters/resource_extension.rb +48 -1
  78. data/lib/active_admin/form_builder.rb +4 -4
  79. data/lib/active_admin/generators/boilerplate.rb +37 -0
  80. data/lib/active_admin/helpers/routes/url_helpers.rb +1 -1
  81. data/lib/active_admin/inputs.rb +1 -0
  82. data/lib/active_admin/inputs/filters/date_picker_input.rb +13 -0
  83. data/lib/active_admin/inputs/filters/date_range_input.rb +1 -1
  84. data/lib/active_admin/menu.rb +1 -0
  85. data/lib/active_admin/menu_item.rb +1 -1
  86. data/lib/active_admin/namespace.rb +5 -5
  87. data/lib/active_admin/orm/active_record/comments.rb +10 -1
  88. data/lib/active_admin/orm/active_record/comments/comment.rb +1 -1
  89. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +11 -0
  90. data/lib/active_admin/resource.rb +9 -3
  91. data/lib/active_admin/resource/action_items.rb +13 -3
  92. data/lib/active_admin/resource/belongs_to.rb +6 -2
  93. data/lib/active_admin/resource/pagination.rb +4 -0
  94. data/lib/active_admin/resource_collection.rb +3 -1
  95. data/lib/active_admin/resource_controller/data_access.rb +6 -11
  96. data/lib/active_admin/resource_controller/decorators.rb +1 -1
  97. data/lib/active_admin/resource_dsl.rb +8 -2
  98. data/lib/active_admin/sidebar_section.rb +4 -12
  99. data/lib/active_admin/version.rb +1 -1
  100. data/lib/active_admin/view_factory.rb +1 -2
  101. data/lib/active_admin/view_helpers.rb +0 -1
  102. data/lib/active_admin/view_helpers/display_helper.rb +3 -4
  103. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +3 -3
  104. data/lib/active_admin/views/components/active_admin_form.rb +3 -3
  105. data/lib/active_admin/views/components/columns.rb +9 -4
  106. data/lib/active_admin/views/components/dropdown_menu.rb +0 -2
  107. data/lib/active_admin/views/components/paginated_collection.rb +35 -13
  108. data/lib/active_admin/views/components/panel.rb +1 -3
  109. data/lib/active_admin/views/components/sidebar_section.rb +6 -1
  110. data/lib/active_admin/views/components/status_tag.rb +3 -2
  111. data/lib/active_admin/views/components/table_for.rb +2 -1
  112. data/lib/active_admin/views/index_as_table.rb +2 -2
  113. data/lib/active_admin/views/pages/base.rb +4 -0
  114. data/lib/active_admin/views/pages/show.rb +1 -1
  115. data/lib/generators/active_admin/assets/assets_generator.rb +1 -1
  116. data/lib/generators/active_admin/assets/templates/{active_admin.css.scss → active_admin.scss} +0 -0
  117. data/lib/generators/active_admin/devise/devise_generator.rb +7 -19
  118. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +29 -0
  119. data/lib/generators/active_admin/page/templates/page.rb +1 -1
  120. data/lib/generators/active_admin/resource/resource_generator.rb +6 -0
  121. data/lib/generators/active_admin/resource/templates/admin.rb +34 -13
  122. data/spec/rails_helper.rb +6 -2
  123. data/spec/requests/memory_spec.rb +1 -3
  124. data/spec/support/active_admin_request_helpers.rb +27 -0
  125. data/spec/support/detect_rails_version.rb +1 -1
  126. data/spec/support/rails_template.rb +7 -0
  127. data/spec/unit/application_spec.rb +29 -4
  128. data/spec/unit/batch_actions/resource_spec.rb +5 -0
  129. data/spec/unit/belongs_to_spec.rb +14 -0
  130. data/spec/unit/comments_spec.rb +24 -2
  131. data/spec/unit/controller_filters_spec.rb +25 -28
  132. data/spec/unit/dsl_spec.rb +1 -1
  133. data/spec/unit/filters/humanized_spec.rb +56 -0
  134. data/spec/unit/filters/resource_spec.rb +1 -1
  135. data/spec/unit/form_builder_spec.rb +71 -11
  136. data/spec/unit/generators/install_spec.rb +3 -2
  137. data/spec/unit/pretty_format_spec.rb +15 -1
  138. data/spec/unit/resource_collection_spec.rb +17 -0
  139. data/spec/unit/resource_controller_spec.rb +2 -2
  140. data/spec/unit/resource_registration_spec.rb +3 -3
  141. data/spec/unit/resource_spec.rb +53 -2
  142. data/spec/unit/view_factory_spec.rb +0 -2
  143. data/spec/unit/view_helpers/display_name_spec.rb +6 -4
  144. data/spec/unit/views/components/{batch_action_popover_spec.rb → batch_action_selector_spec.rb} +9 -13
  145. data/spec/unit/views/components/columns_spec.rb +17 -0
  146. data/spec/unit/views/components/paginated_collection_spec.rb +16 -2
  147. data/spec/unit/views/components/panel_spec.rb +1 -5
  148. data/spec/unit/views/components/sidebar_section_spec.rb +21 -0
  149. data/spec/unit/views/components/status_tag_spec.rb +15 -1
  150. data/spec/unit/views/components/table_for_spec.rb +45 -0
  151. data/tasks/parallel_tests.rake +1 -1
  152. data/tasks/test.rake +4 -4
  153. metadata +29 -30
  154. data/app/assets/javascripts/active_admin/lib/popover.js.coffee +0 -68
  155. data/app/assets/stylesheets/active_admin/components/_popovers.scss +0 -122
  156. data/app/assets/stylesheets/active_admin/mixins/_icons.scss +0 -20
  157. data/lib/active_admin/batch_actions/views/batch_action_popover.rb +0 -28
  158. data/lib/active_admin/iconic.rb +0 -53
  159. data/lib/active_admin/iconic/icons.rb +0 -142
  160. data/lib/active_admin/view_helpers/icon_helper.rb +0 -12
  161. data/lib/active_admin/views/components/action_list_popover.rb +0 -29
  162. data/lib/active_admin/views/components/popover.rb +0 -27
  163. data/spec/javascripts/coffeescripts/jquery.aa.popover-spec.js.coffee +0 -82
  164. data/spec/support/integration_example_group.rb +0 -31
  165. data/spec/unit/event_spec.rb +0 -47
  166. data/spec/unit/views/components/action_list_popover_spec.rb +0 -40
  167. data/spec/unit/views/components/popover_spec.rb +0 -33
@@ -1,40 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe ActiveAdmin::Views::ActionListPopover do
4
-
5
- let(:the_popover) do
6
- arbre {
7
- action_list_popover id: "my_awesome_action_list_popover" do
8
- action "My First Great Action", "#"
9
- action "My Second Great Action", "http://www.google.com"
10
- end
11
- }.children.first
12
- end
13
-
14
- it "should have an id" do
15
- expect(the_popover.id).to eq "my_awesome_action_list_popover"
16
- end
17
-
18
- describe "the action list" do
19
- subject do
20
- the_popover.find_by_class("popover_contents").first
21
- end
22
-
23
- describe '#tag_name' do
24
- subject { super().tag_name }
25
- it { is_expected.to eql("ul") }
26
- end
27
-
28
- describe '#content' do
29
- subject { super().content }
30
- it{ is_expected.to include("<li><a href=\"#\">My First Great Action</a></li>") }
31
- end
32
-
33
- describe '#content' do
34
- subject { super().content }
35
- it{ is_expected.to include("<li><a href=\"http://www.google.com\">My Second Great Action</a></li>") }
36
- end
37
-
38
- end
39
-
40
- end
@@ -1,33 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe ActiveAdmin::Views::Popover do
4
-
5
- let(:the_popover) do
6
- render_arbre_component do
7
- popover id: "my_awesome_popover" do
8
- para "Hello World, this is popover content baby."
9
- end
10
- end
11
- end
12
-
13
- it "should have the class of 'sidebar_section'" do
14
- expect(the_popover.class_list).to include("popover")
15
- end
16
-
17
- it "should have an inner content element class of 'popover_contents'" do
18
- expect(the_popover.find_by_tag("div").first.class_list).to include("popover_contents")
19
- end
20
-
21
- it "should have the popover content in the inner content element" do
22
- expect(the_popover.find_by_class("popover_contents").first.content).to include("Hello World, this is popover content baby.")
23
- end
24
-
25
- it "should have an id" do
26
- expect(the_popover.id).to eq "my_awesome_popover"
27
- end
28
-
29
- it "should be hidden" do
30
- expect(the_popover.attributes).to include(style: "display: none");
31
- end
32
-
33
- end