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
data/Gemfile
CHANGED
@@ -1,75 +1,50 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
require File.expand_path 'spec/support/detect_rails_version', File.dirname(__FILE__)
|
6
|
-
|
7
|
-
rails_version = detect_rails_version
|
8
|
-
gem 'rails', rails_version
|
9
|
-
|
10
|
-
gem 'jquery-ui-rails', rails_version[0] == '3' ? '~> 4.0' : '~> 5.0'
|
11
|
-
|
12
|
-
gem 'test-unit', '~> 3.0' if rails_version[0] == '3'
|
13
|
-
|
14
|
-
if rails_version == '> 5.x'
|
15
|
-
# Note: when updating this list, be sure to also update the README
|
16
|
-
gem 'ransack', github: 'activerecord-hackery/ransack'
|
17
|
-
gem 'kaminari', github: 'amatsuda/kaminari', branch: '0-17-stable'
|
18
|
-
gem 'draper', github: 'audionerd/draper', branch: 'rails5', ref: 'e816e0e587'
|
19
|
-
gem 'formtastic', github: 'justinfrench/formtastic'
|
20
|
-
gem 'activemodel-serializers-xml', github: 'rails/activemodel-serializers-xml' # drapergem/draper#697
|
21
|
-
gem 'rack-mini-profiler', github: 'MiniProfiler/rack-mini-profiler'
|
22
|
-
gem 'database_cleaner', github: 'DatabaseCleaner/database_cleaner'
|
23
|
-
gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', platforms: :jruby
|
24
|
-
end
|
25
|
-
|
26
|
-
gem 'mime-types', '< 3' # Remove this line when we drop support for Ruby 1.9
|
27
|
-
|
28
3
|
# Optional dependencies
|
29
4
|
gem 'cancan'
|
30
|
-
gem 'devise', rails_version == '> 5.x' ? '> 4.x' : '~> 3.5'
|
31
|
-
gem 'draper' if rails_version != '> 5.x'
|
32
5
|
gem 'pundit'
|
33
6
|
|
7
|
+
# Until https://github.com/erikhuda/thor/issues/538 fixed
|
8
|
+
gem 'thor', '<= 0.19.1'
|
9
|
+
|
34
10
|
# Utility gems used in both development & test environments
|
35
|
-
gem 'rake'
|
36
|
-
gem 'parallel_tests'
|
11
|
+
gem 'rake'
|
12
|
+
gem 'parallel_tests', '< 2.10' #2.10 requires ruby '>= 2.0.0'
|
37
13
|
|
38
14
|
# Debugging
|
39
15
|
gem 'pry' # Easily debug from your console with `binding.pry`
|
40
16
|
|
41
17
|
group :development do
|
42
18
|
# Debugging
|
43
|
-
gem 'better_errors'
|
19
|
+
gem 'better_errors', # Web UI to debug exceptions. Go to /__better_errors to access the latest one
|
20
|
+
platforms: [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
|
21
|
+
|
44
22
|
gem 'binding_of_caller', platforms: :mri # Retrieve the binding of a method's caller in MRI Ruby >= 1.9.2
|
45
23
|
|
46
24
|
# Performance
|
47
|
-
gem 'rack-mini-profiler'
|
48
|
-
gem 'flamegraph', platforms: :mri # Flamegraph visualiztion: ?pp=flamegraph
|
25
|
+
gem 'rack-mini-profiler' # Inline app profiler. See ?pp=help for options.
|
49
26
|
|
50
27
|
# Documentation
|
51
28
|
gem 'yard' # Documentation generator
|
52
29
|
gem 'redcarpet', platforms: :mri # Markdown implementation (for yard)
|
53
30
|
gem 'kramdown', platforms: :jruby # Markdown implementation (for yard)
|
31
|
+
gem 'appraisal', require: false
|
54
32
|
end
|
55
33
|
|
56
34
|
group :test do
|
57
35
|
gem 'capybara'
|
58
36
|
gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
|
59
|
-
gem '
|
37
|
+
gem 'codecov', require: false # Test coverage website. Go to https://codecov.io
|
60
38
|
gem 'cucumber-rails', require: false
|
61
39
|
gem 'cucumber', '1.3.20'
|
62
|
-
gem 'database_cleaner'
|
63
|
-
gem 'guard-rspec', require: false
|
64
|
-
gem 'listen', '~> 2.7', platforms: :ruby_19
|
40
|
+
gem 'database_cleaner'
|
65
41
|
gem 'jasmine'
|
66
42
|
gem 'jslint_on_rails'
|
67
43
|
gem 'launchy'
|
68
44
|
gem 'rails-i18n' # Provides default i18n for many languages
|
69
|
-
gem 'rspec-rails'
|
45
|
+
gem 'rspec-rails'
|
70
46
|
gem 'i18n-spec'
|
71
47
|
gem 'shoulda-matchers', '<= 2.8.0'
|
72
48
|
gem 'sqlite3', platforms: :mri
|
73
|
-
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby if rails_version != '> 5.x'
|
74
49
|
gem 'poltergeist'
|
75
50
|
end
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Active Admin is a Ruby on Rails framework for creating elegant backends for webs
|
|
5
5
|
[![Version ](http://img.shields.io/gem/v/activeadmin.svg) ](https://rubygems.org/gems/activeadmin)
|
6
6
|
[![Travis CI ](http://img.shields.io/travis/activeadmin/activeadmin/master.svg) ](https://travis-ci.org/activeadmin/activeadmin)
|
7
7
|
[![Quality ](http://img.shields.io/codeclimate/github/activeadmin/activeadmin.svg) ](https://codeclimate.com/github/activeadmin/activeadmin)
|
8
|
-
[![Coverage ](
|
8
|
+
[![Coverage ](https://codecov.io/gh/activeadmin/activeadmin/branch/master/graph/badge.svg)](https://codecov.io/gh/activeadmin/activeadmin)
|
9
9
|
[![Inch CI ](http://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master) ](http://inch-ci.org/github/activeadmin/activeadmin)
|
10
10
|
|
11
11
|
## State of the project
|
@@ -17,12 +17,12 @@ which as far as dependencies, moves us from meta_search to Ransack and adds Rail
|
|
17
17
|
|
18
18
|
You can get it by tracking master:
|
19
19
|
```ruby
|
20
|
-
gem 'activeadmin',
|
20
|
+
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin'
|
21
21
|
```
|
22
22
|
|
23
23
|
Or you can using rubygems:
|
24
24
|
```ruby
|
25
|
-
gem 'activeadmin', '~> 1.0.0.
|
25
|
+
gem 'activeadmin', '~> 1.0.0.pre5'
|
26
26
|
```
|
27
27
|
|
28
28
|
*Keep in mind that during the time where we use `pre`-release label, things can break in each release!*
|
@@ -32,23 +32,9 @@ gem 'activeadmin', '~> 1.0.0.pre4'
|
|
32
32
|
Active Admin master has preliminary support for Rails 5. To give it a try, these Gemfile changes may be needed:
|
33
33
|
|
34
34
|
```ruby
|
35
|
-
gem '
|
36
|
-
gem 'rspec-rails', '>= 3.5.0.beta1'
|
37
|
-
gem 'ransack', github: 'activerecord-hackery/ransack'
|
38
|
-
gem 'kaminari', github: 'amatsuda/kaminari', branch: '0-17-stable'
|
39
|
-
gem 'formtastic', github: 'justinfrench/formtastic'
|
40
|
-
gem 'draper', github: 'audionerd/draper', branch: 'rails5', ref: 'e816e0e587'
|
41
|
-
# To fix a Draper deprecation error
|
42
|
-
gem 'activemodel-serializers-xml', github: 'rails/activemodel-serializers-xml'
|
43
|
-
# Optional -- only if you already include these gems
|
44
|
-
gem 'rack-mini-profiler', github: 'MiniProfiler/rack-mini-profiler'
|
45
|
-
gem 'database_cleaner', github: 'pschambacher/database_cleaner', branch: 'rails5.0', ref: '8dd9fa4'
|
46
|
-
# Only for JRuby:
|
47
|
-
gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', platforms: :jruby
|
35
|
+
gem 'inherited_resources', git: 'https://github.com/activeadmin/inherited_resources'
|
48
36
|
```
|
49
37
|
|
50
|
-
If something isn't working for you please report it on [#4177](https://github.com/activeadmin/activeadmin/issues/4177).
|
51
|
-
|
52
38
|
### 0.6.x
|
53
39
|
|
54
40
|
The plan is to follow [semantic versioning](http://semver.org/) as of 1.0.0. The 0.6.x line will
|
@@ -56,17 +42,16 @@ still be maintained, and we will backport bug fixes into future 0.6.x releases.
|
|
56
42
|
to have to wait for a release, you can track the branch instead:
|
57
43
|
|
58
44
|
```ruby
|
59
|
-
gem 'activeadmin',
|
45
|
+
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin', branch: '0-6-stable'
|
60
46
|
```
|
61
47
|
|
62
48
|
## Documentation
|
63
49
|
|
64
|
-
|
65
|
-
Github [docs](https://github.com/activeadmin/activeadmin/tree/master/docs#activeadmin-documentation) and the [wiki](https://github.com/activeadmin/activeadmin/wiki).
|
50
|
+
For the latest docs, check out the Github <http://activeadmin.info> and the [wiki](https://github.com/activeadmin/activeadmin/wiki).
|
66
51
|
|
67
52
|
## Links
|
68
53
|
|
69
|
-
* Website: <http://
|
54
|
+
* Website: <http://activeadmin.info>
|
70
55
|
* Live demo: <http://demo.activeadmin.info/admin>
|
71
56
|
* Documentation
|
72
57
|
* Guides: <https://github.com/activeadmin/activeadmin/tree/master/docs>
|
@@ -81,7 +66,7 @@ Github [docs](https://github.com/activeadmin/activeadmin/tree/master/docs#active
|
|
81
66
|
|
82
67
|
## Getting started
|
83
68
|
|
84
|
-
Check out [the docs](
|
69
|
+
Check out [the docs](http://activeadmin.info/0-installation.html)!
|
85
70
|
|
86
71
|
## Need help?
|
87
72
|
|
@@ -92,8 +77,7 @@ Ask us in IRC ([#activeadmin](https://webchat.freenode.net/?channels=activeadmin
|
|
92
77
|
## Want to contribute?
|
93
78
|
|
94
79
|
The [contributing guide](https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md)
|
95
|
-
is a good place to start. If you have questions, feel free to ask
|
96
|
-
[@seanlinsley](https://twitter.com/seanlinsley) or [@captainhagbard](https://twitter.com/captainhagbard).
|
80
|
+
is a good place to start. If you have questions, feel free to ask.
|
97
81
|
|
98
82
|
## Dependencies
|
99
83
|
|
@@ -112,5 +96,5 @@ Tool | Description
|
|
112
96
|
[Devise]: https://github.com/plataformatec/devise
|
113
97
|
[Formtastic]: https://github.com/justinfrench/formtastic
|
114
98
|
[Inherited Resources]: https://github.com/josevalim/inherited_resources
|
115
|
-
[Kaminari]: https://github.com/
|
99
|
+
[Kaminari]: https://github.com/kaminari/kaminari
|
116
100
|
[Ransack]: https://github.com/activerecord-hackery/ransack
|
data/Rakefile
CHANGED
@@ -1,14 +1,46 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
task :enforce_version do
|
4
|
+
if ENV['BUNDLE_GEMFILE'] == File.expand_path('../Gemfile', __FILE__)
|
5
|
+
gemfile_path = File.expand_path('../gemfiles/rails_50.gemfile', __FILE__)
|
6
|
+
|
7
|
+
command = ['bundle', 'exec', 'rake', *ARGV].join(' ')
|
8
|
+
env = { 'BUNDLE_GEMFILE' => gemfile_path }
|
9
|
+
|
10
|
+
Bundler.with_clean_env { Kernel.exec(env, command) }
|
11
|
+
end
|
9
12
|
end
|
10
13
|
|
11
|
-
|
14
|
+
desc 'Creates a test rails app for the specs to run against'
|
15
|
+
task :setup, [:parallel, :dir, :template] => [:enforce_version] do |_t, opts|
|
16
|
+
require 'rails/version'
|
17
|
+
|
18
|
+
base_dir = opts[:dir] || 'spec/rails'
|
19
|
+
app_dir = "#{base_dir}/rails-#{Rails::VERSION::STRING}"
|
20
|
+
template = opts[:template] || 'rails_template'
|
21
|
+
|
22
|
+
if File.exist? app_dir
|
23
|
+
puts "test app #{app_dir} already exists; skipping"
|
24
|
+
else
|
25
|
+
system "mkdir -p #{base_dir}"
|
26
|
+
args = %W(
|
27
|
+
-m spec/support/#{template}.rb
|
28
|
+
--skip-bundle
|
29
|
+
--skip-listen
|
30
|
+
--skip-turbolinks
|
31
|
+
--skip-test-unit
|
32
|
+
)
|
33
|
+
|
34
|
+
command = ['bundle', 'exec', 'rails', 'new', app_dir, *args].join(' ')
|
35
|
+
|
36
|
+
env = { 'BUNDLE_GEMFILE' => ENV['BUNDLE_GEMFILE'] }
|
37
|
+
env['INSTALL_PARALLEL'] = 'yes' if opts[:parallel]
|
38
|
+
|
39
|
+
Bundler.with_clean_env { Kernel.exec(env, command) }
|
40
|
+
|
41
|
+
Rake::Task['parallel:after_setup_hook'].invoke if opts[:parallel]
|
42
|
+
end
|
43
|
+
end
|
12
44
|
|
13
45
|
# Import all our rake tasks
|
14
46
|
FileList['tasks/**/*.rake'].each { |task| import task }
|
data/activeadmin.gemspec
CHANGED
@@ -10,7 +10,10 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = 'The administration framework for Ruby on Rails.'
|
11
11
|
s.summary = 'The administration framework for Ruby on Rails.'
|
12
12
|
|
13
|
-
s.files = `git ls-files`.split("\
|
13
|
+
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
14
|
+
f.match(%r{^(spec|features)/})
|
15
|
+
end
|
16
|
+
|
14
17
|
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
15
18
|
|
16
19
|
s.required_ruby_version = '>= 1.9.3'
|
@@ -23,9 +26,9 @@ Gem::Specification.new do |s|
|
|
23
26
|
s.add_dependency 'inherited_resources', '~> 1.6'
|
24
27
|
s.add_dependency 'jquery-rails'
|
25
28
|
s.add_dependency 'jquery-ui-rails'
|
26
|
-
s.add_dependency 'kaminari', '
|
27
|
-
s.add_dependency '
|
29
|
+
s.add_dependency 'kaminari', '>= 0.15', '< 2.0'
|
30
|
+
s.add_dependency 'railties', '>= 3.2', '< 5.1'
|
28
31
|
s.add_dependency 'ransack', '~> 1.3'
|
29
32
|
s.add_dependency 'sass-rails'
|
30
|
-
s.add_dependency 'sprockets', '< 4'
|
33
|
+
s.add_dependency 'sprockets', '< 4.1'
|
31
34
|
end
|
@@ -1,13 +1,20 @@
|
|
1
1
|
$(document).on 'ready page:load turbolinks:load', ->
|
2
2
|
# Clear Filters button
|
3
|
-
$('.clear_filters_btn').click ->
|
3
|
+
$('.clear_filters_btn').click (e) ->
|
4
4
|
params = window.location.search.slice(1).split('&')
|
5
5
|
regex = /^(q\[|q%5B|q%5b|page|commit)/
|
6
|
-
|
6
|
+
if typeof Turbolinks != 'undefined'
|
7
|
+
Turbolinks.visit(window.location.href.split('?')[0] + '?' + (param for param in params when not param.match(regex)).join('&'))
|
8
|
+
e.preventDefault()
|
9
|
+
else
|
10
|
+
window.location.search = (param for param in params when not param.match(regex)).join('&')
|
7
11
|
|
8
12
|
# Filter form: don't send any inputs that are empty
|
9
|
-
$('.filter_form').submit ->
|
13
|
+
$('.filter_form').submit (e) ->
|
10
14
|
$(@).find(':input').filter(-> @value is '').prop 'disabled', true
|
15
|
+
if typeof Turbolinks != 'undefined'
|
16
|
+
Turbolinks.visit(window.location.href.split('?')[0] + '?' + $( this ).serialize())
|
17
|
+
e.preventDefault()
|
11
18
|
|
12
19
|
# Filter form: for filters that let you choose the query method from
|
13
20
|
# a dropdown, apply that choice to the filter input field.
|
@@ -4,8 +4,15 @@
|
|
4
4
|
"jquery.ui."
|
5
5
|
end
|
6
6
|
%>
|
7
|
-
<%
|
8
|
-
|
9
|
-
|
7
|
+
<% jquery_ui_widgets_path =
|
8
|
+
if Jquery::Ui::Rails::VERSION >= "6"
|
9
|
+
jquery_ui_path + "widgets/"
|
10
|
+
else
|
11
|
+
jquery_ui_path
|
12
|
+
end
|
13
|
+
%>
|
14
|
+
<% require_asset "#{jquery_ui_widgets_path}datepicker" %>
|
15
|
+
<% require_asset "#{jquery_ui_widgets_path}dialog" %>
|
16
|
+
<% require_asset "#{jquery_ui_widgets_path}sortable" %>
|
17
|
+
<% require_asset "#{jquery_ui_widgets_path}tabs" %>
|
10
18
|
<% require_asset "#{jquery_ui_path}widget" %>
|
11
|
-
<% require_asset "#{jquery_ui_path}tabs" %>
|
@@ -33,4 +33,12 @@ class ActiveAdmin.CheckboxToggler
|
|
33
33
|
$(el).prop checked: setting
|
34
34
|
@_didChangeCheckbox(el)
|
35
35
|
|
36
|
+
option: (key, value) ->
|
37
|
+
if $.isPlainObject(key)
|
38
|
+
@options = $.extend(true, @options, key)
|
39
|
+
else if key?
|
40
|
+
@options[key]
|
41
|
+
else
|
42
|
+
@options[key] = value
|
43
|
+
|
36
44
|
$.widget.bridge 'checkboxToggler', ActiveAdmin.CheckboxToggler
|
@@ -1,7 +1,7 @@
|
|
1
1
|
ActiveAdmin.modal_dialog = (message, inputs, callback)->
|
2
2
|
html = """<form id="dialog_confirm" title="#{message}"><ul>"""
|
3
3
|
for name, type of inputs
|
4
|
-
if /^(datepicker|checkbox|text)$/.test type
|
4
|
+
if /^(datepicker|checkbox|text|number)$/.test type
|
5
5
|
wrapper = 'input'
|
6
6
|
else if type is 'textarea'
|
7
7
|
wrapper = 'textarea'
|
@@ -11,7 +11,10 @@ class ActiveAdmin.PerPage
|
|
11
11
|
@$element.change =>
|
12
12
|
@$params['per_page'] = @$element.val()
|
13
13
|
delete @$params['page']
|
14
|
-
|
14
|
+
if typeof Turbolinks != 'undefined'
|
15
|
+
Turbolinks.visit(window.location.href.split('?')[0] + '?' + $.param(@$params))
|
16
|
+
else
|
17
|
+
location.search = $.param(@$params)
|
15
18
|
|
16
19
|
_queryParams: ->
|
17
20
|
query = window.location.search.substring(1)
|
@@ -23,9 +26,17 @@ class ActiveAdmin.PerPage
|
|
23
26
|
|
24
27
|
_decode: (value) ->
|
25
28
|
#replace "+" before decodeURIComponent
|
26
|
-
decodeURIComponent(value.replace(/\+/g, '%20'))
|
29
|
+
decodeURIComponent(value.replace(/\+/g, '%20'))
|
30
|
+
|
31
|
+
option: (key, value) ->
|
32
|
+
if $.isPlainObject(key)
|
33
|
+
@options = $.extend(true, @options, key)
|
34
|
+
else if key?
|
35
|
+
@options[key]
|
36
|
+
else
|
37
|
+
@options[key] = value
|
27
38
|
|
28
39
|
$.widget.bridge 'perPage', ActiveAdmin.PerPage
|
29
40
|
|
30
|
-
$ ->
|
41
|
+
$(document).on 'ready page:load turbolinks:load', ->
|
31
42
|
$('.pagination_per_page select').perPage()
|
@@ -9,7 +9,7 @@
|
|
9
9
|
f.input key, label: t('active_admin.devise.'+key.to_s+'.title'), input_html: { autofocus: index.zero? }
|
10
10
|
}
|
11
11
|
f.input :password, label: t('active_admin.devise.password.title')
|
12
|
-
f.input :password_confirmation,
|
12
|
+
f.input :password_confirmation, label: t('active_admin.devise.password_confirmation.title')
|
13
13
|
end
|
14
14
|
f.actions do
|
15
15
|
f.action :submit, label: t('active_admin.devise.login.submit'), button_html: { value: t('active_admin.devise.sign_up.submit') }
|
data/codecov.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
codecov:
|
2
|
+
notify:
|
3
|
+
require_ci_to_pass: true
|
4
|
+
comment: off
|
5
|
+
coverage:
|
6
|
+
precision: 2
|
7
|
+
range:
|
8
|
+
- 70.0
|
9
|
+
- 100.0
|
10
|
+
round: down
|
11
|
+
status:
|
12
|
+
changes: false
|
13
|
+
patch: true
|
14
|
+
project: true
|
15
|
+
parsers:
|
16
|
+
gcov:
|
17
|
+
branch_detection:
|
18
|
+
conditional: true
|
19
|
+
loop: true
|
20
|
+
macro: false
|
21
|
+
method: false
|
22
|
+
javascript:
|
23
|
+
enable_partials: false
|
data/config/locales/es-MX.yml
CHANGED
@@ -59,7 +59,7 @@ es-MX:
|
|
59
59
|
other: "Se han destruido %{count} %{plural_model} con éxito"
|
60
60
|
selection_toggle_explanation: "(Cambiar selección)"
|
61
61
|
link: "Añadir"
|
62
|
-
action_label: "%{title}
|
62
|
+
action_label: "%{title} seleccionados"
|
63
63
|
labels:
|
64
64
|
destroy: "Borrar"
|
65
65
|
comments:
|
data/config/locales/es.yml
CHANGED
@@ -69,7 +69,7 @@ es:
|
|
69
69
|
other: "Se han destruido %{count} %{plural_model} con éxito"
|
70
70
|
selection_toggle_explanation: "(Cambiar selección)"
|
71
71
|
link: "Añadir"
|
72
|
-
action_label: "%{title}
|
72
|
+
action_label: "%{title} seleccionados"
|
73
73
|
labels:
|
74
74
|
destroy: "Borrar"
|
75
75
|
comments:
|
data/config/locales/ru.yml
CHANGED
@@ -0,0 +1,110 @@
|
|
1
|
+
sk:
|
2
|
+
active_admin:
|
3
|
+
dashboard: Úvod
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Vitajte v Active Admin. Toto je nástenka."
|
6
|
+
call_to_action: "Pre pridanie sekcie na nástenku se pozrite do súboru 'app/admin/dashboard.rb'"
|
7
|
+
view: "Zobraziť"
|
8
|
+
edit: "Upraviť"
|
9
|
+
delete: "Zmazať"
|
10
|
+
delete_confirmation: "Ste si istí, že chcete túto položku zmazať?"
|
11
|
+
new_model: "Vytvoriť"
|
12
|
+
edit_model: "Upraviť"
|
13
|
+
delete_model: "Zmazať"
|
14
|
+
details: "Detaily"
|
15
|
+
cancel: "Zrušiť"
|
16
|
+
empty: "Prázdne"
|
17
|
+
previous: "Predchádzajúce"
|
18
|
+
next: "Nasledujúce"
|
19
|
+
download: "Stiahnúť:"
|
20
|
+
has_many_new: "Pridať nový"
|
21
|
+
has_many_delete: "Zmazať"
|
22
|
+
has_many_remove: "Odstrániť"
|
23
|
+
filters:
|
24
|
+
buttons:
|
25
|
+
filter: "Filtrovať"
|
26
|
+
clear: "Vyčistiť filtre"
|
27
|
+
predicates:
|
28
|
+
contains: "Obsahuje"
|
29
|
+
equals: "Je presne"
|
30
|
+
starts_with: "Začína na"
|
31
|
+
ends_with: "Končí na"
|
32
|
+
greater_than: "Väčší ako"
|
33
|
+
less_than: "Menší ako"
|
34
|
+
status_tag:
|
35
|
+
"yes": "Áno"
|
36
|
+
"no": "Nie"
|
37
|
+
main_content: "Implementujte prosím %{model}#main_content pre zobrazenie obsahu."
|
38
|
+
logout: "Odhlásiť"
|
39
|
+
powered_by: "%{active_admin} %{version}"
|
40
|
+
sidebars:
|
41
|
+
filters: "Filtre"
|
42
|
+
pagination:
|
43
|
+
empty: "Nenájdený."
|
44
|
+
one: "Zobrazená <b>1</b> položka"
|
45
|
+
one_page: "Počet zobrazených položiek %{n}"
|
46
|
+
multiple: "<b>%{from} - %{to}</b> z <b>%{total}</b>"
|
47
|
+
multiple_without_total: "<b>%{from} - %{to}</b>"
|
48
|
+
entry:
|
49
|
+
one: "položka"
|
50
|
+
few: "položky"
|
51
|
+
other: "položky"
|
52
|
+
any: "Akákoľvek"
|
53
|
+
blank_slate:
|
54
|
+
content: "Zatiaľ tu nie je žiadny obsah."
|
55
|
+
link: "Vytvoriť"
|
56
|
+
dropdown_actions:
|
57
|
+
button_label: "Akcie"
|
58
|
+
batch_actions:
|
59
|
+
button_label: "Hromadné akcie"
|
60
|
+
default_confirmation: "Ste si istí, že to chcete spraviť?"
|
61
|
+
delete_confirmation: "Ste si istí, že chcete zmazať tieto %{plural_model}?"
|
62
|
+
succesfully_destroyed:
|
63
|
+
zero: "Nebol zmazaný žiaden %{model}"
|
64
|
+
one: "Úspešne zmazaný %{model}"
|
65
|
+
few: "Úspešne zmazané %{count} %{plural_model}"
|
66
|
+
other: "Úspešne zmazaných %{count} %{plural_model}"
|
67
|
+
selection_toggle_explanation: "(Zmeniť výber)"
|
68
|
+
link: "Vytvoriť"
|
69
|
+
action_label: "%{title}"
|
70
|
+
labels:
|
71
|
+
destroy: "Vymazať"
|
72
|
+
comments:
|
73
|
+
resource_type: "Typ zdroja"
|
74
|
+
author_type: "Typ autora"
|
75
|
+
body: "Telo"
|
76
|
+
author: "Autor"
|
77
|
+
title: "Komentár"
|
78
|
+
add: "Pridať komentár"
|
79
|
+
resource: "Zdroj"
|
80
|
+
no_comments_yet: "Žiadny komentár"
|
81
|
+
author_missing: "Anonymný"
|
82
|
+
title_content: "Komentáre administrátorov (%{count})"
|
83
|
+
errors:
|
84
|
+
empty_text: "Komentár nebol uložený, je prázdny."
|
85
|
+
devise:
|
86
|
+
login:
|
87
|
+
title: "Prihlásenie"
|
88
|
+
remember_me: "Zapamätať si ma"
|
89
|
+
submit: "Prihlásiť"
|
90
|
+
reset_password:
|
91
|
+
title: "Zabudli ste heslo?"
|
92
|
+
submit: "Obnoviť heslo"
|
93
|
+
change_password:
|
94
|
+
title: "Zmeniť heslo"
|
95
|
+
submit: "Zmeniť svoje heslo"
|
96
|
+
unlock:
|
97
|
+
title: "Zaslanie inštrukcií k odomknutiu účtu"
|
98
|
+
submit: "Zaslať inštrukcií k odomknutiu účtu"
|
99
|
+
links:
|
100
|
+
sign_in: "Prihlásiť sa"
|
101
|
+
sign_up: "Registrovať sa"
|
102
|
+
forgot_your_password: "Zabudli ste heslo?"
|
103
|
+
sign_in_with_omniauth_provider: "Prihlásiť sa cez %{provider}"
|
104
|
+
access_denied:
|
105
|
+
message: "Nemáte oprávnenie k vykonaniu tejto akcie."
|
106
|
+
index_list:
|
107
|
+
table: "Tabuľka"
|
108
|
+
block: "Zoznam"
|
109
|
+
grid: "Tabuľka"
|
110
|
+
blog: "Blog"
|