activeadmin 1.0.0.pre4 → 1.0.0.pre5
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -3
- data/.travis.yml +48 -26
- data/Appraisals +103 -0
- data/CHANGELOG.md +12 -1
- data/CONTRIBUTING.md +85 -32
- data/Gemfile +13 -38
- data/README.md +10 -26
- data/Rakefile +41 -9
- data/activeadmin.gemspec +7 -4
- data/app/assets/javascripts/active_admin/initializers/filters.js.coffee +10 -3
- data/app/assets/javascripts/active_admin/jquery_ui.js.erb +11 -4
- data/app/assets/javascripts/active_admin/lib/checkbox-toggler.js.coffee +8 -0
- data/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +1 -1
- data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +14 -3
- data/app/assets/stylesheets/active_admin/_forms.scss +1 -0
- data/app/views/active_admin/devise/registrations/new.html.erb +1 -1
- data/codecov.yml +23 -0
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/ru.yml +1 -0
- data/config/locales/sk.yml +110 -0
- data/docs/0-installation.md +3 -0
- data/docs/1-general-configuration.md +11 -0
- data/docs/10-custom-pages.md +25 -0
- data/docs/11-decorators.md +3 -0
- data/docs/12-arbre-components.md +3 -0
- data/docs/13-authorization-adapter.md +3 -0
- data/docs/14-gotchas.md +19 -0
- data/docs/2-resource-customization.md +21 -2
- data/docs/3-index-pages.md +21 -0
- data/docs/3-index-pages/custom-index.md +3 -0
- data/docs/3-index-pages/index-as-block.md +3 -0
- data/docs/3-index-pages/index-as-blog.md +3 -0
- data/docs/3-index-pages/index-as-grid.md +3 -0
- data/docs/3-index-pages/index-as-table.md +22 -0
- data/docs/4-csv-format.md +15 -0
- data/docs/5-forms.md +7 -3
- data/docs/6-show-pages.md +3 -0
- data/docs/7-sidebars.md +3 -0
- data/docs/8-custom-actions.md +3 -0
- data/docs/9-batch-actions.md +4 -1
- data/docs/CNAME +1 -0
- data/docs/Gemfile +2 -0
- data/docs/_config.yml +2 -0
- data/docs/_includes/footer.html +8 -0
- data/docs/_includes/google-analytics.html +16 -0
- data/docs/_includes/head.html +7 -0
- data/docs/_includes/toc.html +97 -0
- data/docs/_includes/top-menu.html +9 -0
- data/docs/_layouts/default.html +21 -0
- data/docs/documentation.md +62 -0
- data/docs/images/activeadmin.png +0 -0
- data/docs/images/code-header.png +0 -0
- data/docs/images/divider.png +0 -0
- data/docs/images/features.png +0 -0
- data/docs/index.html +130 -0
- data/docs/stylesheets/main.css +1199 -0
- data/features/action_item.feature +2 -2
- data/features/authorization_cancan.feature +3 -3
- data/features/belongs_to.feature +60 -2
- data/features/comments/commenting.feature +7 -7
- data/features/development_reloading.feature +1 -1
- data/features/edit_page.feature +9 -9
- data/features/footer.feature +28 -0
- data/features/i18n.feature +11 -0
- data/features/index/batch_actions.feature +28 -6
- data/features/index/filters.feature +31 -11
- data/features/index/format_as_csv.feature +13 -13
- data/features/index/formats.feature +4 -4
- data/features/index/index_as_block.feature +1 -1
- data/features/index/index_as_blog.feature +6 -6
- data/features/index/index_as_grid.feature +3 -3
- data/features/index/index_as_table.feature +11 -11
- data/features/index/index_blank_slate.feature +4 -4
- data/features/index/index_parameters.feature +10 -10
- data/features/index/index_scope_to.feature +3 -3
- data/features/index/index_scopes.feature +37 -18
- data/features/index/page_title.feature +3 -3
- data/features/index/pagination.feature +1 -1
- data/features/index/switch_index_view.feature +8 -8
- data/features/menu.feature +3 -3
- data/features/new_page.feature +8 -8
- data/features/registering_assets.feature +1 -1
- data/features/registering_pages.feature +73 -2
- data/features/registering_resources.feature +1 -1
- data/features/renamed_resource.feature +1 -1
- data/features/show/page_title.feature +3 -3
- data/features/sidebar_sections.feature +6 -6
- data/features/specifying_actions.feature +29 -4
- data/features/step_definitions/factory_steps.rb +1 -1
- data/features/step_definitions/footer_steps.rb +11 -0
- data/features/step_definitions/i18n_steps.rb +8 -0
- data/features/step_definitions/index_scope_steps.rb +4 -0
- data/features/step_definitions/sidebar_steps.rb +1 -3
- data/features/step_definitions/table_steps.rb +1 -5
- data/features/step_definitions/user_steps.rb +7 -0
- data/features/support/env.rb +6 -33
- data/features/support/paths.rb +5 -0
- data/features/users/logging_in.feature +2 -0
- data/gemfiles/rails_32.gemfile +54 -0
- data/gemfiles/rails_40.gemfile +53 -0
- data/gemfiles/rails_41.gemfile +53 -0
- data/gemfiles/rails_42.gemfile +53 -0
- data/gemfiles/rails_50.gemfile +46 -0
- data/lib/active_admin.rb +1 -0
- data/lib/active_admin/application.rb +11 -0
- data/lib/active_admin/batch_actions/resource_extension.rb +0 -8
- data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
- data/lib/active_admin/batch_actions/views/batch_action_selector.rb +1 -1
- data/lib/active_admin/dsl.rb +0 -6
- data/lib/active_admin/filters/active.rb +9 -1
- data/lib/active_admin/filters/formtastic_addons.rb +1 -1
- data/lib/active_admin/filters/humanized.rb +1 -1
- data/lib/active_admin/filters/resource_extension.rb +2 -4
- data/lib/active_admin/form_builder.rb +12 -6
- data/lib/active_admin/helpers/collection.rb +2 -0
- data/lib/active_admin/inputs.rb +1 -0
- data/lib/active_admin/inputs/filters/date_range_input.rb +9 -4
- data/lib/active_admin/inputs/filters/text_input.rb +26 -0
- data/lib/active_admin/localizers.rb +11 -0
- data/lib/active_admin/localizers/resource_localizer.rb +35 -0
- data/lib/active_admin/namespace.rb +1 -1
- data/lib/active_admin/order_clause.rb +29 -7
- data/lib/active_admin/page.rb +18 -4
- data/lib/active_admin/page_dsl.rb +4 -0
- data/lib/active_admin/resource.rb +16 -1
- data/lib/active_admin/resource/action_items.rb +7 -4
- data/lib/active_admin/resource/belongs_to.rb +4 -0
- data/lib/active_admin/resource/menu.rb +1 -1
- data/lib/active_admin/resource/ordering.rb +11 -0
- data/lib/active_admin/resource/routes.rb +34 -13
- data/lib/active_admin/resource/scopes.rb +1 -0
- data/lib/active_admin/resource_controller/data_access.rb +3 -10
- data/lib/active_admin/resource_dsl.rb +28 -1
- data/lib/active_admin/router.rb +5 -3
- data/lib/active_admin/scope.rb +3 -3
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_helpers/auto_link_helper.rb +2 -2
- data/lib/active_admin/view_helpers/display_helper.rb +8 -3
- data/lib/active_admin/view_helpers/method_or_proc_helper.rb +5 -1
- data/lib/active_admin/views/components/active_admin_form.rb +11 -10
- data/lib/active_admin/views/components/attributes_table.rb +1 -1
- data/lib/active_admin/views/components/columns.rb +3 -3
- data/lib/active_admin/views/components/dropdown_menu.rb +2 -2
- data/lib/active_admin/views/components/index_list.rb +4 -1
- data/lib/active_admin/views/components/paginated_collection.rb +1 -0
- data/lib/active_admin/views/components/scopes.rb +8 -1
- data/lib/active_admin/views/components/site_title.rb +2 -2
- data/lib/active_admin/views/components/table_for.rb +3 -3
- data/lib/active_admin/views/footer.rb +17 -3
- data/lib/active_admin/views/index_as_table.rb +3 -3
- data/lib/active_admin/views/pages/base.rb +4 -2
- data/lib/active_admin/views/pages/form.rb +2 -3
- data/lib/active_admin/views/pages/show.rb +2 -1
- data/lib/bug_report_templates/rails_5_master.rb +120 -0
- data/lib/generators/active_admin/devise/devise_generator.rb +6 -3
- data/lib/generators/active_admin/install/install_generator.rb +1 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +15 -1
- data/lib/generators/active_admin/install/templates/migrations/{create_active_admin_comments.rb → create_active_admin_comments.rb.erb} +14 -1
- data/lib/ransack_ext.rb +2 -2
- data/spec/bug_report_templates_spec.rb +27 -0
- data/spec/javascripts/support/jasmine_runner.rb +4 -17
- data/spec/rails_helper.rb +20 -109
- data/spec/requests/default_namespace_spec.rb +16 -28
- data/spec/requests/javascript_spec.rb +1 -1
- data/spec/requests/memory_spec.rb +5 -1
- data/spec/requests/stylesheets_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -10
- data/spec/support/active_admin_integration_spec_helper.rb +66 -0
- data/spec/support/active_admin_request_helpers.rb +12 -0
- data/spec/support/rails_template.rb +42 -15
- data/spec/support/rails_template_with_data.rb +24 -5
- data/spec/support/templates/manifest.js +3 -0
- data/spec/support/templates/policies/application_policy.rb +1 -1
- data/spec/unit/abstract_view_factory_spec.rb +1 -1
- data/spec/unit/action_builder_spec.rb +3 -12
- data/spec/unit/active_admin_spec.rb +1 -1
- data/spec/unit/application_spec.rb +5 -1
- data/spec/unit/asset_registration_spec.rb +1 -1
- data/spec/unit/authorization/authorization_adapter_spec.rb +1 -1
- data/spec/unit/authorization/controller_authorization_spec.rb +13 -9
- data/spec/unit/authorization/index_overriding_spec.rb +6 -6
- data/spec/unit/auto_link_spec.rb +48 -24
- data/spec/unit/batch_actions/resource_spec.rb +1 -14
- data/spec/unit/batch_actions/settings_spec.rb +1 -1
- data/spec/unit/belongs_to_spec.rb +9 -1
- data/spec/unit/cancan_adapter_spec.rb +1 -1
- data/spec/unit/comments_spec.rb +26 -19
- data/spec/unit/component_spec.rb +1 -1
- data/spec/unit/config_shared_examples.rb +1 -1
- data/spec/unit/controller_filters_spec.rb +1 -1
- data/spec/unit/csv_builder_spec.rb +5 -5
- data/spec/unit/dependency_spec.rb +1 -1
- data/spec/unit/devise_spec.rb +17 -3
- data/spec/unit/dsl_spec.rb +2 -2
- data/spec/unit/filters/active_spec.rb +21 -0
- data/spec/unit/filters/filter_form_builder_spec.rb +98 -31
- data/spec/unit/filters/humanized_spec.rb +9 -1
- data/spec/unit/filters/resource_spec.rb +5 -4
- data/spec/unit/form_builder_spec.rb +180 -33
- data/spec/unit/generators/install_spec.rb +12 -5
- data/spec/unit/helpers/collection_spec.rb +10 -7
- data/spec/unit/helpers/scope_chain_spec.rb +1 -1
- data/spec/unit/helpers/settings_spec.rb +1 -1
- data/spec/unit/i18n_spec.rb +1 -1
- data/spec/unit/localizers/resource_localizer_spec.rb +36 -0
- data/spec/unit/menu_collection_spec.rb +1 -1
- data/spec/unit/menu_item_spec.rb +1 -1
- data/spec/unit/menu_spec.rb +1 -1
- data/spec/unit/namespace/authorization_spec.rb +1 -1
- data/spec/unit/namespace/register_page_spec.rb +28 -2
- data/spec/unit/namespace/register_resource_spec.rb +3 -1
- data/spec/unit/namespace_spec.rb +23 -1
- data/spec/unit/order_clause_spec.rb +7 -7
- data/spec/unit/page_controller_spec.rb +1 -1
- data/spec/unit/page_spec.rb +55 -2
- data/spec/unit/pretty_format_spec.rb +8 -7
- data/spec/unit/pundit_adapter_spec.rb +1 -1
- data/spec/unit/resource/action_items_spec.rb +1 -1
- data/spec/unit/resource/includes_spec.rb +1 -1
- data/spec/unit/resource/menu_spec.rb +1 -1
- data/spec/unit/resource/naming_spec.rb +1 -1
- data/spec/unit/resource/ordering_spec.rb +38 -0
- data/spec/unit/resource/page_presenters_spec.rb +1 -1
- data/spec/unit/resource/pagination_spec.rb +1 -1
- data/spec/unit/resource/routes_spec.rb +101 -53
- data/spec/unit/resource/scopes_spec.rb +1 -1
- data/spec/unit/resource/sidebars_spec.rb +1 -1
- data/spec/unit/resource_collection_spec.rb +1 -1
- data/spec/unit/resource_controller/data_access_spec.rb +50 -1
- data/spec/unit/resource_controller/decorators_spec.rb +2 -2
- data/spec/unit/resource_controller/sidebars_spec.rb +16 -17
- data/spec/unit/resource_controller_spec.rb +50 -56
- data/spec/unit/resource_registration_spec.rb +9 -4
- data/spec/unit/resource_spec.rb +9 -1
- data/spec/unit/routing_spec.rb +30 -2
- data/spec/unit/scope_spec.rb +26 -2
- data/spec/unit/settings_spec.rb +2 -2
- data/spec/unit/view_factory_spec.rb +1 -1
- data/spec/unit/view_helpers/breadcrumbs_spec.rb +1 -1
- data/spec/unit/view_helpers/display_helper_spec.rb +18 -3
- data/spec/unit/view_helpers/download_format_links_helper_spec.rb +1 -1
- data/spec/unit/view_helpers/fields_for_spec.rb +1 -1
- data/spec/unit/view_helpers/flash_helper_spec.rb +1 -1
- data/spec/unit/view_helpers/form_helper_spec.rb +1 -1
- data/spec/unit/view_helpers/method_or_proc_helper_spec.rb +1 -1
- data/spec/unit/views/components/attributes_table_spec.rb +1 -1
- data/spec/unit/views/components/batch_action_selector_spec.rb +1 -1
- data/spec/unit/views/components/blank_slate_spec.rb +1 -1
- data/spec/unit/views/components/columns_spec.rb +1 -1
- data/spec/unit/views/components/index_list_spec.rb +18 -4
- data/spec/unit/views/components/index_table_for_spec.rb +1 -1
- data/spec/unit/views/components/paginated_collection_spec.rb +1 -1
- data/spec/unit/views/components/panel_spec.rb +1 -1
- data/spec/unit/views/components/sidebar_section_spec.rb +1 -1
- data/spec/unit/views/components/site_title_spec.rb +1 -1
- data/spec/unit/views/components/status_tag_spec.rb +1 -1
- data/spec/unit/views/components/table_for_spec.rb +9 -7
- data/spec/unit/views/components/tabs_spec.rb +1 -1
- data/spec/unit/views/components/unsupported_browser_spec.rb +3 -3
- data/spec/unit/views/index_as_blog_spec.rb +1 -1
- data/spec/unit/views/pages/form_spec.rb +1 -1
- data/spec/unit/views/pages/index_spec.rb +1 -1
- data/spec/unit/views/pages/layout_spec.rb +1 -1
- data/spec/unit/views/pages/show_spec.rb +1 -1
- data/spec/unit/views/tabbed_navigation_spec.rb +2 -2
- data/tasks/local.rake +25 -0
- data/tasks/parallel_tests.rake +4 -4
- data/tasks/test.rake +8 -53
- metadata +61 -18
- data/Guardfile +0 -8
- data/script/local +0 -53
- data/script/travis_cache +0 -107
- data/script/use_rails +0 -53
- data/spec/javascripts/support/jasmine_config.rb +0 -23
- data/spec/support/detect_rails_version.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 981348a279011a3812ddeb69db1213f2ff454b8e
|
4
|
+
data.tar.gz: b67a141f87026c494e0e76584d5abd973546dd2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e3662795d0ff12f6ea668f98163eb2ee596223e0f77dbc1291e42eaba43632e49e922cfb99ed3f7f6f44af372b35897325fdbcfb6912460b427cd45dcbe4564
|
7
|
+
data.tar.gz: 0e960135e5e217c886a3c7c262175bcc2ec3a47141fb611cb16360313db1aaf3803ebe79cdb82f52ca6598bd3d2e616b5338a901d2500bee629c0d96cc4f2714
|
data/.gitignore
CHANGED
@@ -33,17 +33,17 @@ doc
|
|
33
33
|
pkg
|
34
34
|
|
35
35
|
## Project (specific)
|
36
|
-
bin/
|
37
36
|
.bundle
|
38
37
|
spec/rails
|
39
38
|
*.sqlite3-journal
|
40
39
|
Gemfile.lock
|
41
|
-
|
40
|
+
gemfiles/rails_[3-5][0-9].gemfile.lock
|
42
41
|
capybara*
|
43
42
|
viewcumber
|
44
|
-
test-rails
|
43
|
+
.test-rails-apps
|
45
44
|
public
|
46
45
|
.rspec
|
47
46
|
.rails-version
|
48
47
|
.rbenv-version
|
49
48
|
.localeapp/*
|
49
|
+
lib/bug_report_templates/tmp
|
data/.travis.yml
CHANGED
@@ -1,46 +1,68 @@
|
|
1
|
+
---
|
2
|
+
|
1
3
|
language: ruby
|
4
|
+
|
2
5
|
sudo: false
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
|
7
|
+
bundler_args: --without development
|
8
|
+
|
9
|
+
cache: bundler
|
10
|
+
|
11
|
+
before_install:
|
12
|
+
- PATH=$(npm bin):$PATH # needed to install phantomjs via npm
|
13
|
+
- if [ $(phantomjs --version) != '2.1.1' ]; then npm install phantomjs-prebuilt@2.1; fi
|
14
|
+
- gem update --system # use the very latest Rubygems
|
15
|
+
- rvm @global do gem uninstall bundler -a -x
|
16
|
+
- rvm @global do gem install bundler -v 1.14.3 # latest version known to work
|
17
|
+
|
18
|
+
before_script:
|
9
19
|
- bundle exec rake setup
|
10
|
-
|
20
|
+
|
11
21
|
script:
|
12
|
-
- bundle exec rake
|
22
|
+
- bundle exec rake test
|
23
|
+
|
13
24
|
rvm:
|
14
|
-
- 1.
|
15
|
-
-
|
16
|
-
-
|
25
|
+
- jruby-9.1.7.0
|
26
|
+
- 1.9.3
|
27
|
+
- 2.2.6
|
28
|
+
- 2.3.3
|
29
|
+
- 2.4.0
|
30
|
+
|
31
|
+
gemfile:
|
32
|
+
- gemfiles/rails_32.gemfile
|
33
|
+
- gemfiles/rails_40.gemfile
|
34
|
+
- gemfiles/rails_41.gemfile
|
35
|
+
- gemfiles/rails_42.gemfile
|
36
|
+
- gemfiles/rails_50.gemfile
|
37
|
+
|
17
38
|
env:
|
18
|
-
matrix:
|
19
|
-
- RAILS=3.2.22
|
20
|
-
- RAILS=4.2.5
|
21
|
-
- RAILS="> 5.x"
|
22
39
|
global:
|
23
40
|
- JRUBY_OPTS="-J-Xmx1024m --debug"
|
41
|
+
|
24
42
|
matrix:
|
25
43
|
fast_finish: true
|
44
|
+
|
26
45
|
exclude:
|
27
|
-
- rvm: 1.9
|
28
|
-
|
29
|
-
|
30
|
-
- rvm: 2.
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
|
46
|
+
- rvm: 1.9.3
|
47
|
+
gemfile: gemfiles/rails_50.gemfile
|
48
|
+
|
49
|
+
- rvm: 2.4.0
|
50
|
+
gemfile: gemfiles/rails_32.gemfile
|
51
|
+
|
52
|
+
- rvm: 2.4.0
|
53
|
+
gemfile: gemfiles/rails_40.gemfile
|
54
|
+
|
55
|
+
- rvm: 2.4.0
|
56
|
+
gemfile: gemfiles/rails_41.gemfile
|
57
|
+
|
38
58
|
notifications:
|
39
59
|
irc:
|
40
60
|
channels:
|
41
61
|
- irc.freenode.org#activeadmin
|
62
|
+
|
42
63
|
on_success: change
|
43
64
|
on_failure: always
|
44
65
|
skip_join: true
|
66
|
+
|
45
67
|
template:
|
46
68
|
- "(%{branch}/%{commit} by %{author}): %{message} (%{build_url})"
|
data/Appraisals
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
appraise 'rails_32' do
|
2
|
+
gemspec
|
3
|
+
|
4
|
+
gem 'rails', '3.2.22'
|
5
|
+
gem 'jquery-ui-rails', '~> 4.0'
|
6
|
+
gem 'devise', '~> 3.5'
|
7
|
+
|
8
|
+
gem 'inherited_resources'
|
9
|
+
|
10
|
+
gem 'test-unit', '~> 3.0'
|
11
|
+
|
12
|
+
gem 'draper', '~> 2.1'
|
13
|
+
|
14
|
+
platforms :ruby_19 do # Remove this block when we drop support for Ruby 1.9
|
15
|
+
gem 'kaminari', '~> 0.15'
|
16
|
+
gem 'mime-types', '< 3'
|
17
|
+
gem 'nokogiri', '< 1.7'
|
18
|
+
gem 'public_suffix', '< 1.5'
|
19
|
+
end
|
20
|
+
|
21
|
+
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
|
22
|
+
end
|
23
|
+
|
24
|
+
appraise 'rails_40' do
|
25
|
+
gemspec
|
26
|
+
|
27
|
+
gem 'rails', '4.0.13'
|
28
|
+
gem 'jquery-ui-rails', '~> 5.0'
|
29
|
+
gem 'devise', '~> 3.5'
|
30
|
+
|
31
|
+
gem 'inherited_resources'
|
32
|
+
|
33
|
+
gem 'draper', '~> 2.1'
|
34
|
+
|
35
|
+
platforms :ruby_19 do # Remove this block when we drop support for Ruby 1.9
|
36
|
+
gem 'kaminari', '~> 0.15'
|
37
|
+
gem 'mime-types', '< 3'
|
38
|
+
gem 'nokogiri', '< 1.7'
|
39
|
+
gem 'public_suffix', '< 1.5'
|
40
|
+
end
|
41
|
+
|
42
|
+
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
|
43
|
+
end
|
44
|
+
|
45
|
+
appraise 'rails_41' do
|
46
|
+
gemspec
|
47
|
+
|
48
|
+
gem 'rails', '4.1.16'
|
49
|
+
gem 'jquery-ui-rails', '~> 5.0'
|
50
|
+
gem 'devise', '~> 3.5'
|
51
|
+
|
52
|
+
gem 'inherited_resources'
|
53
|
+
|
54
|
+
gem 'draper', '~> 2.1'
|
55
|
+
|
56
|
+
platforms :ruby_19 do # Remove this block when we drop support for Ruby 1.9
|
57
|
+
gem 'kaminari', '~> 0.15'
|
58
|
+
gem 'mime-types', '< 3'
|
59
|
+
gem 'nokogiri', '< 1.7'
|
60
|
+
gem 'public_suffix', '< 1.5'
|
61
|
+
end
|
62
|
+
|
63
|
+
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
|
64
|
+
end
|
65
|
+
|
66
|
+
appraise 'rails_42' do
|
67
|
+
gemspec
|
68
|
+
|
69
|
+
gem 'rails', '4.2.8.rc1'
|
70
|
+
gem 'jquery-ui-rails', '~> 5.0'
|
71
|
+
gem 'devise', '~> 3.5'
|
72
|
+
|
73
|
+
gem 'inherited_resources'
|
74
|
+
|
75
|
+
gem 'draper', '~> 2.1'
|
76
|
+
|
77
|
+
platforms :ruby_19 do # Remove this block when we drop support for Ruby 1.9
|
78
|
+
gem 'kaminari', '~> 0.15'
|
79
|
+
gem 'mime-types', '< 3'
|
80
|
+
gem 'nokogiri', '< 1.7'
|
81
|
+
gem 'public_suffix', '< 1.5'
|
82
|
+
end
|
83
|
+
|
84
|
+
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
|
85
|
+
end
|
86
|
+
|
87
|
+
appraise 'rails_50' do
|
88
|
+
gemspec
|
89
|
+
|
90
|
+
gem 'rails', '5.0.1'
|
91
|
+
gem 'jquery-ui-rails', '~> 5.0'
|
92
|
+
gem 'devise', '> 4.x'
|
93
|
+
|
94
|
+
# Note: when updating this list, be sure to also update the README
|
95
|
+
gem 'inherited_resources', git: 'https://github.com/activeadmin/inherited_resources'
|
96
|
+
|
97
|
+
gem 'draper', '> 3.x'
|
98
|
+
|
99
|
+
gem 'activerecord-jdbcsqlite3-adapter',
|
100
|
+
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
|
101
|
+
branch: 'rails-5',
|
102
|
+
platforms: :jruby
|
103
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
* JavaScript `window.AA` has been removed, use `window.ActiveAdmin` [#3606][] by [@timoschilling][]
|
8
8
|
* `f.form_buffers` has been removed [#3486][] by [@varyonic][]
|
9
9
|
* Iconic has been removed [#3553][] by [@timoschilling][]
|
10
|
-
* `config.show_comments_in_menu` has been removed [#4187][] by [@drn][]
|
10
|
+
* `config.show_comments_in_menu` has been removed, see `config.comments_menu` [#4187][] by [@drn][]
|
11
11
|
|
12
12
|
### Enhancements
|
13
13
|
|
@@ -19,6 +19,8 @@
|
|
19
19
|
|
20
20
|
#### Minor
|
21
21
|
|
22
|
+
* Page supports belongs_to [#4759][] by [@Fivell][] and [@zorab47][]
|
23
|
+
* Support for custom sorting strategies [#4768][] by [@Fivell][]
|
22
24
|
* Stream CSV downloads as they're generated [#3038][] by [@craigmcnamara][]
|
23
25
|
* Disable streaming in development for easier debugging [#3535][] by [@seanlinsley][]
|
24
26
|
* Improved code reloading [#3783][] by [@chancancode][]
|
@@ -47,6 +49,7 @@
|
|
47
49
|
index download_links: ->{ can?(:view_all_download_links) || [:pdf] }
|
48
50
|
```
|
49
51
|
* Comments menu can be customized via configuration passed to `config.comments_menu` [#4187][] by [@drn][]
|
52
|
+
* Added `config.route_options` to namespace to customize routes [#4467][] by [@stereoscott[]]
|
50
53
|
|
51
54
|
### Security Fixes
|
52
55
|
|
@@ -89,20 +92,27 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
|
|
89
92
|
[#2541]: https://github.com/activeadmin/activeadmin/issues/2541
|
90
93
|
[#2544]: https://github.com/activeadmin/activeadmin/issues/2544
|
91
94
|
[#2545]: https://github.com/activeadmin/activeadmin/issues/2545
|
95
|
+
[#3038]: https://github.com/activeadmin/activeadmin/issues/3038
|
92
96
|
[#3075]: https://github.com/activeadmin/activeadmin/issues/3075
|
93
97
|
[#3463]: https://github.com/activeadmin/activeadmin/issues/3463
|
94
98
|
[#3464]: https://github.com/activeadmin/activeadmin/issues/3464
|
95
99
|
[#3486]: https://github.com/activeadmin/activeadmin/issues/3486
|
96
100
|
[#3519]: https://github.com/activeadmin/activeadmin/issues/3519
|
101
|
+
[#3535]: https://github.com/activeadmin/activeadmin/issues/3535
|
97
102
|
[#3553]: https://github.com/activeadmin/activeadmin/issues/3553
|
98
103
|
[#3606]: https://github.com/activeadmin/activeadmin/issues/3606
|
99
104
|
[#3686]: https://github.com/activeadmin/activeadmin/issues/3686
|
100
105
|
[#3695]: https://github.com/activeadmin/activeadmin/issues/3695
|
101
106
|
[#3731]: https://github.com/activeadmin/activeadmin/issues/3731
|
102
107
|
[#3783]: https://github.com/activeadmin/activeadmin/issues/3783
|
108
|
+
[#4187]: https://github.com/activeadmin/activeadmin/issues/4187
|
109
|
+
[#4759]: https://github.com/activeadmin/activeadmin/pull/4759
|
110
|
+
[#4768]: https://github.com/activeadmin/activeadmin/pull/4768
|
103
111
|
[@PChambino]: https://github.com/PChambino
|
104
112
|
[@TimPetricola]: https://github.com/TimPetricola
|
105
113
|
[@chancancode]: https://github.com/chancancode
|
114
|
+
[@craigmcnamara]: https://github.com/craigmcnamara
|
115
|
+
[@drn]: https://github.com/drn
|
106
116
|
[@dmitry]: https://github.com/dmitry
|
107
117
|
[@gonzedge]: https://github.com/gonzedge
|
108
118
|
[@johnnyshields]: https://github.com/johnnyshields
|
@@ -113,3 +123,4 @@ Please check [0-6-stable](https://github.com/activeadmin/activeadmin/blob/0-6-st
|
|
113
123
|
[@timoschilling]: https://github.com/timoschilling
|
114
124
|
[@varyonic]: https://github.com/varyonic
|
115
125
|
[@zorab47]: https://github.com/zorab47
|
126
|
+
[@Fivell]: https://github.com/Fivell
|
data/CONTRIBUTING.md
CHANGED
@@ -26,32 +26,77 @@ git checkout -b 325-add-japanese-translations
|
|
26
26
|
|
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.
|
32
|
+
|
33
|
+
Install `appraisal` and the other common development dependencies:
|
30
34
|
|
31
35
|
```sh
|
32
36
|
bundle install
|
33
37
|
```
|
34
38
|
|
39
|
+
Install the development dependencies:
|
40
|
+
|
41
|
+
```sh
|
42
|
+
bundle exec appraisal install
|
43
|
+
```
|
44
|
+
|
35
45
|
Now you should be able to run the entire suite using:
|
36
46
|
|
37
47
|
```sh
|
38
|
-
rake test
|
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
|
39
64
|
```
|
40
65
|
|
41
|
-
|
66
|
+
The test run will generate a sample rails application in `spec/rails` to run the
|
67
|
+
tests against.
|
42
68
|
|
43
|
-
If your tests are passing locally but they're failing on Travis, reset your test
|
69
|
+
If your tests are passing locally but they're failing on Travis, reset your test
|
70
|
+
environment:
|
44
71
|
|
45
72
|
```sh
|
46
|
-
rm -rf spec/rails && bundle update
|
73
|
+
rm -rf spec/rails && bundle exec appraisal update
|
47
74
|
```
|
48
75
|
|
49
|
-
|
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.
|
80
|
+
|
81
|
+
#### 4. Did you find a bug?
|
82
|
+
|
83
|
+
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/activeadmin/activeadmin/issues).
|
84
|
+
|
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)
|
93
|
+
|
94
|
+
### 5. Implement your fix or feature
|
50
95
|
|
51
96
|
At this point, you're ready to make your changes! Feel free to ask for help;
|
52
97
|
everyone is a beginner at first :smile_cat:
|
53
98
|
|
54
|
-
###
|
99
|
+
### 6. View your changes in a Rails application
|
55
100
|
|
56
101
|
Active Admin is meant to be used by humans, not cucumbers. So make sure to take
|
57
102
|
a look at your changes in a browser.
|
@@ -59,54 +104,47 @@ a look at your changes in a browser.
|
|
59
104
|
To boot up a test Rails app:
|
60
105
|
|
61
106
|
```sh
|
62
|
-
|
107
|
+
bundle exec rake local server
|
63
108
|
```
|
64
109
|
|
65
|
-
This will automatically create a Rails app if none already exists, and store it
|
66
|
-
`.test-rails-apps` folder.
|
110
|
+
This will automatically create a Rails app if none already exists, and store it
|
111
|
+
in the `.test-rails-apps` folder.
|
67
112
|
|
68
|
-
|
69
|
-
|
113
|
+
You should now be able to open <http://localhost:3000/admin> in your browser.
|
114
|
+
You can log in using:
|
70
115
|
|
71
|
-
```
|
72
|
-
|
73
|
-
|
116
|
+
```
|
117
|
+
User: admin@example.com
|
118
|
+
Password: password
|
74
119
|
```
|
75
120
|
|
76
|
-
|
77
|
-
|
78
|
-
User: admin@example.com
|
79
|
-
Password: password
|
80
|
-
|
81
|
-
If you need to perform any other commands on the test application, use the
|
82
|
-
`local` script. For example:
|
83
|
-
|
84
|
-
To boot the rails console:
|
121
|
+
If you need to perform any other commands on the test application, just pass
|
122
|
+
them to the `local` rake task. For example, to boot the rails console:
|
85
123
|
|
86
124
|
```sh
|
87
|
-
|
125
|
+
bundle exec rake local console
|
88
126
|
```
|
89
127
|
|
90
128
|
Or to migrate the database:
|
91
129
|
|
92
130
|
```sh
|
93
|
-
|
131
|
+
bundle exec rake local db:migrate
|
94
132
|
```
|
95
133
|
|
96
|
-
###
|
134
|
+
### 7. Run tests against major supported rails versions
|
97
135
|
|
98
136
|
Once you've implemented your code, got the tests passing, previewed it in a
|
99
137
|
browser, you're ready to test it against multiple versions of Rails.
|
100
138
|
|
101
139
|
```sh
|
102
|
-
rake test
|
140
|
+
bundle exec appraisal rake test
|
103
141
|
```
|
104
142
|
|
105
143
|
This runs our test suite against a couple of major versions of Rails.
|
106
144
|
Travis does essentially the same thing when you open a Pull Request.
|
107
145
|
We care about quality, so your PR won't be merged until all tests pass.
|
108
146
|
|
109
|
-
###
|
147
|
+
### 8. Make a Pull Request
|
110
148
|
|
111
149
|
At this point, you should switch back to your master branch and make sure it's
|
112
150
|
up to date with Active Admin's master branch:
|
@@ -125,9 +163,11 @@ git rebase master
|
|
125
163
|
git push --set-upstream origin 325-add-japanese-translations
|
126
164
|
```
|
127
165
|
|
128
|
-
Finally, go to GitHub and
|
166
|
+
Finally, go to GitHub and
|
167
|
+
[make a Pull Request](https://help.github.com/articles/creating-a-pull-request)
|
168
|
+
:D
|
129
169
|
|
130
|
-
###
|
170
|
+
### 9. Keeping your Pull Request updated
|
131
171
|
|
132
172
|
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code
|
133
173
|
has changed, and that you need to update your branch so it's easier to merge.
|
@@ -140,5 +180,18 @@ but here's the suggested workflow:
|
|
140
180
|
```sh
|
141
181
|
git checkout 325-add-japanese-translations
|
142
182
|
git pull --rebase upstream master
|
143
|
-
git push -
|
183
|
+
git push --force-with-lease 325-add-japanese-translations
|
144
184
|
```
|
185
|
+
|
186
|
+
### 10. Merging a PR (maintainers only)
|
187
|
+
|
188
|
+
A PR can only be merged into master by a maintainer if:
|
189
|
+
|
190
|
+
* It is passing CI.
|
191
|
+
* It has been approved by at least two maintainers. If it was a maintainer who
|
192
|
+
opened the PR, only one extra approval is needed.
|
193
|
+
* It has no requested changes.
|
194
|
+
* It is up to date with current master.
|
195
|
+
|
196
|
+
Any maintainer is allowed to merge a PR if all of these conditions are
|
197
|
+
met.
|