activeadmin 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +8 -5
- data/CHANGELOG.md +151 -0
- data/Gemfile +16 -16
- data/LICENSE +1 -1
- data/activeadmin.gemspec +1 -0
- data/app/assets/images/active_admin/index_list_icons/block_icon.svg +10 -0
- data/app/assets/images/active_admin/index_list_icons/blog_icon.svg +4 -0
- data/app/assets/images/active_admin/index_list_icons/grid_icon.svg +13 -0
- data/app/assets/images/active_admin/index_list_icons/table_icon.svg +3 -0
- data/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee +17 -44
- data/app/assets/javascripts/active_admin/components/jquery.aa.dropdown-menu.js.coffee +2 -4
- data/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee +0 -3
- data/app/assets/javascripts/active_admin/components/jquery.aa.table-checkbox-toggler.js.coffee +10 -12
- data/app/assets/javascripts/active_admin/pages/application.js.coffee +13 -10
- data/app/assets/javascripts/active_admin/pages/batch_actions.js.coffee +3 -3
- data/app/assets/stylesheets/active_admin/_base.css.scss +1 -0
- data/app/assets/stylesheets/active_admin/_header.css.scss +5 -2
- data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +2 -2
- data/app/assets/stylesheets/active_admin/components/_index_list.scss +12 -0
- data/app/assets/stylesheets/active_admin/components/_popovers.css.scss +2 -2
- data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +2 -2
- data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +4 -4
- data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +5 -4
- data/app/assets/stylesheets/active_admin/mixins/_sections.css.scss +1 -1
- data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +1 -1
- data/app/assets/stylesheets/active_admin/print.css.scss +2 -2
- data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +1 -1
- data/app/views/active_admin/devise/unlocks/new.html.erb +14 -12
- data/docs/1-general-configuration.md +13 -0
- data/docs/10-custom-pages.md +40 -28
- data/docs/11-decorators.md +6 -4
- data/docs/12-arbre-components.md +1 -1
- data/docs/13-authorization-adapter.md +206 -0
- data/docs/2-resource-customization.md +129 -14
- data/docs/3-index-pages.md +65 -0
- data/docs/3-index-pages/create-an-index.md +29 -0
- data/docs/3-index-pages/index-as-table.md +35 -11
- data/docs/5-forms.md +2 -2
- data/features/authorization.feature +64 -0
- data/features/authorization_cancan.feature +52 -0
- data/features/belongs_to.feature +41 -5
- data/features/index/batch_actions.feature +27 -3
- data/features/index/formats.feature +27 -0
- data/features/index/index_as_table.feature +74 -2
- data/features/index/index_parameters.feature +69 -0
- data/features/index/index_scopes.feature +7 -11
- data/features/index/page_title.feature +18 -0
- data/features/index/switch_index_view.feature +73 -0
- data/features/menu.feature +27 -0
- data/features/registering_pages.feature +21 -0
- data/features/step_definitions/additional_web_steps.rb +4 -0
- data/features/step_definitions/batch_action_steps.rb +16 -6
- data/features/step_definitions/index_scope_steps.rb +3 -3
- data/features/step_definitions/index_views_steps.rb +3 -0
- data/features/step_definitions/menu_steps.rb +4 -0
- data/features/support/env.rb +4 -0
- data/features/support/paths.rb +3 -0
- data/lib/active_admin.rb +4 -0
- data/lib/active_admin/application.rb +43 -76
- data/lib/active_admin/authorization_adapter.rb +128 -0
- data/lib/active_admin/base_controller.rb +18 -1
- data/lib/active_admin/base_controller/authorization.rb +153 -0
- data/lib/active_admin/base_controller/menu.rb +8 -3
- data/lib/active_admin/batch_actions/resource_extension.rb +8 -7
- data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
- data/lib/active_admin/cancan_adapter.rb +40 -0
- data/lib/active_admin/dashboards.rb +4 -5
- data/lib/active_admin/dashboards/dashboard_controller.rb +1 -1
- data/lib/active_admin/devise.rb +22 -7
- data/lib/active_admin/dsl.rb +18 -5
- data/lib/active_admin/engine.rb +1 -1
- data/lib/active_admin/filters/dsl.rb +1 -1
- data/lib/active_admin/filters/forms.rb +9 -7
- data/lib/active_admin/filters/resource_extension.rb +20 -15
- data/lib/active_admin/form_builder.rb +44 -49
- data/lib/active_admin/helpers/optional_display.rb +4 -8
- data/lib/active_admin/inputs/filter_boolean_input.rb +1 -1
- data/lib/active_admin/inputs/filter_string_input.rb +5 -1
- data/lib/active_admin/locales/bg.yml +1 -1
- data/lib/active_admin/locales/ca.yml +1 -1
- data/lib/active_admin/locales/cs.yml +26 -25
- data/lib/active_admin/locales/da.yml +1 -1
- data/lib/active_admin/locales/de.yml +1 -1
- data/lib/active_admin/locales/en.yml +11 -1
- data/lib/active_admin/locales/es.yml +16 -16
- data/lib/active_admin/locales/fr.yml +1 -1
- data/lib/active_admin/locales/he.yml +1 -1
- data/lib/active_admin/locales/hr.yml +1 -1
- data/lib/active_admin/locales/hu.yml +1 -1
- data/lib/active_admin/locales/it.yml +1 -1
- data/lib/active_admin/locales/ja.yml +4 -1
- data/lib/active_admin/locales/ko.yml +1 -1
- data/lib/active_admin/locales/lt.yml +1 -1
- data/lib/active_admin/locales/lv.yml +12 -1
- data/lib/active_admin/locales/nl.yml +2 -2
- data/lib/active_admin/locales/no-NB.yml +22 -1
- data/lib/active_admin/locales/pl.yml +1 -1
- data/lib/active_admin/locales/pt-BR.yml +1 -1
- data/lib/active_admin/locales/pt-PT.yml +81 -0
- data/lib/active_admin/locales/ro.yml +1 -1
- data/lib/active_admin/locales/ru.yml +1 -1
- data/lib/active_admin/locales/sv-SE.yml +1 -1
- data/lib/active_admin/locales/tr.yml +1 -1
- data/lib/active_admin/locales/vi.yml +1 -1
- data/lib/active_admin/locales/zh-CN.yml +1 -1
- data/lib/active_admin/locales/zh-TW.yml +1 -1
- data/lib/active_admin/menu.rb +76 -38
- data/lib/active_admin/menu_collection.rb +96 -0
- data/lib/active_admin/menu_item.rb +61 -71
- data/lib/active_admin/namespace.rb +67 -5
- data/lib/active_admin/page.rb +6 -0
- data/lib/active_admin/page_controller.rb +13 -3
- data/lib/active_admin/resource.rb +11 -20
- data/lib/active_admin/resource/action_items.rb +3 -3
- data/lib/active_admin/resource/controllers.rb +0 -17
- data/lib/active_admin/resource/menu.rb +52 -24
- data/lib/active_admin/resource/naming.rb +6 -10
- data/lib/active_admin/resource/page_presenters.rb +57 -3
- data/lib/active_admin/resource/routes.rb +46 -0
- data/lib/active_admin/resource_controller.rb +2 -17
- data/lib/active_admin/resource_controller/data_access.rb +299 -0
- data/lib/active_admin/resource_controller/decorators.rb +2 -1
- data/lib/active_admin/resource_dsl.rb +12 -14
- data/lib/active_admin/router.rb +61 -56
- data/lib/active_admin/scope.rb +28 -18
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_factory.rb +0 -1
- data/lib/active_admin/view_helpers/breadcrumb_helper.rb +13 -19
- data/lib/active_admin/view_helpers/fields_for.rb +2 -0
- data/lib/active_admin/view_helpers/form_helper.rb +1 -1
- data/lib/active_admin/view_helpers/method_or_proc_helper.rb +66 -11
- data/lib/active_admin/views/components/attributes_table.rb +7 -4
- data/lib/active_admin/views/components/index_list.rb +68 -0
- data/lib/active_admin/views/components/paginated_collection.rb +13 -9
- data/lib/active_admin/views/components/scopes.rb +2 -8
- data/lib/active_admin/views/components/table_for.rb +1 -1
- data/lib/active_admin/views/footer.rb +1 -1
- data/lib/active_admin/views/header.rb +3 -2
- data/lib/active_admin/views/index_as_block.rb +4 -0
- data/lib/active_admin/views/index_as_blog.rb +4 -0
- data/lib/active_admin/views/index_as_grid.rb +4 -0
- data/lib/active_admin/views/index_as_table.rb +49 -7
- data/lib/active_admin/views/pages/index.rb +19 -4
- data/lib/active_admin/views/tabbed_navigation.rb +10 -54
- data/lib/generators/active_admin/install/install_generator.rb +5 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +58 -0
- data/spec/integration/{default_namespace.rb → default_namespace_spec.rb} +0 -16
- data/spec/spec_helper.rb +3 -0
- data/spec/support/detect_rails_version.rb +10 -3
- data/spec/support/rails_template.rb +1 -1
- data/spec/support/templates/post_decorator.rb +6 -6
- data/spec/unit/application_spec.rb +5 -5
- data/spec/unit/authorization/authorization_adapter_spec.rb +61 -0
- data/spec/unit/authorization/controller_authorization_spec.rb +47 -0
- data/spec/unit/base_controller_spec.rb +0 -2
- data/spec/unit/batch_actions/resource_spec.rb +1 -1
- data/spec/unit/breadcrumbs_spec.rb +3 -3
- data/spec/unit/cancan_adapter_spec.rb +35 -0
- data/spec/unit/config_shared_examples.rb +9 -30
- data/spec/unit/devise_spec.rb +29 -0
- data/spec/unit/dsl_spec.rb +61 -0
- data/spec/unit/filters/filter_form_builder_spec.rb +58 -4
- data/spec/unit/filters/resource_spec.rb +17 -5
- data/spec/unit/form_builder_spec.rb +15 -0
- data/spec/unit/menu_collection_spec.rb +62 -0
- data/spec/unit/menu_item_spec.rb +51 -37
- data/spec/unit/menu_spec.rb +33 -29
- data/spec/unit/namespace/authorization_spec.rb +31 -0
- data/spec/unit/namespace/register_page_spec.rb +6 -28
- data/spec/unit/namespace/register_resource_spec.rb +11 -34
- data/spec/unit/namespace_spec.rb +63 -2
- data/spec/unit/page_controller_spec.rb +0 -3
- data/spec/unit/reloader_spec.rb +5 -5
- data/spec/unit/resource/menu_spec.rb +1 -13
- data/spec/unit/resource/naming_spec.rb +20 -2
- data/spec/unit/resource/page_presenters_spec.rb +14 -2
- data/spec/unit/resource_controller/{collection_spec.rb → data_access_spec.rb} +31 -13
- data/spec/unit/resource_controller_spec.rb +4 -5
- data/spec/unit/resource_spec.rb +33 -11
- data/spec/unit/routing_spec.rb +43 -0
- data/spec/unit/scope_spec.rb +13 -0
- data/spec/unit/view_factory_spec.rb +0 -1
- data/spec/unit/view_helpers/fields_for_spec.rb +4 -0
- data/spec/unit/view_helpers/form_helper_spec.rb +6 -2
- data/spec/unit/view_helpers/method_or_proc_helper_spec.rb +97 -0
- data/spec/unit/views/components/attributes_table_spec.rb +11 -0
- data/spec/unit/views/components/index_list_spec.rb +32 -0
- data/spec/unit/views/tabbed_navigation_spec.rb +42 -40
- data/tasks/test.rake +1 -1
- metadata +127 -40
- data/lib/active_admin/menu_builder.rb +0 -65
- data/lib/active_admin/resource_controller/callbacks.rb +0 -59
- data/lib/active_admin/resource_controller/collection.rb +0 -158
- data/lib/active_admin/views/utility_nav.rb +0 -41
- data/spec/unit/base_controller_shared_examples.rb +0 -25
- data/spec/unit/dsl_include_spec.rb +0 -20
data/spec/unit/scope_spec.rb
CHANGED
|
@@ -43,6 +43,19 @@ describe ActiveAdmin::Scope do
|
|
|
43
43
|
its(:scope_method) { should == nil }
|
|
44
44
|
its(:scope_block) { should be_a(Proc)}
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
context "with a proc as the label" do
|
|
48
|
+
it "should raise an exception if a second argument isn't provided" do
|
|
49
|
+
expect{ ActiveAdmin::Scope.new proc{ Date.today.strftime '%A' }
|
|
50
|
+
}.to raise_error
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it "should properly render the proc" do
|
|
54
|
+
scope = ActiveAdmin::Scope.new proc{ Date.today.strftime '%A' }, :foobar
|
|
55
|
+
scope.name.should eq Date.today.strftime '%A'
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
46
59
|
end # describe "creating a scope"
|
|
47
60
|
|
|
48
61
|
describe "#display_if_block" do
|
|
@@ -9,7 +9,6 @@ end
|
|
|
9
9
|
describe ActiveAdmin::ViewFactory do
|
|
10
10
|
|
|
11
11
|
it_should_have_view :global_navigation, ActiveAdmin::Views::TabbedNavigation
|
|
12
|
-
it_should_have_view :utility_navigation, ActiveAdmin::Views::UtilityNav
|
|
13
12
|
it_should_have_view :site_title, ActiveAdmin::Views::SiteTitle
|
|
14
13
|
it_should_have_view :action_items, ActiveAdmin::Views::ActionItems
|
|
15
14
|
it_should_have_view :header, ActiveAdmin::Views::Header
|
|
@@ -43,4 +43,8 @@ describe ActiveAdmin::ViewHelpers::FormHelper, ".fields_for" do
|
|
|
43
43
|
fields_for_params(:filter => :id).
|
|
44
44
|
should == [ { :filter => "id" } ]
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
it "should work with booleans" do
|
|
48
|
+
fields_for_params(:booleantest => false).should == [ { :booleantest => false } ]
|
|
49
|
+
end
|
|
46
50
|
end
|
|
@@ -6,12 +6,16 @@ describe ActiveAdmin::ViewHelpers::FormHelper do
|
|
|
6
6
|
|
|
7
7
|
it "should render hidden field tags for params" do
|
|
8
8
|
view.hidden_field_tags_for(:scope => "All", :filter => "None").should ==
|
|
9
|
-
%{<input id="
|
|
9
|
+
%{<input id="hidden_active_admin_scope" name="scope" type="hidden" value="All" />\n<input id="hidden_active_admin_filter" name="filter" type="hidden" value="None" />}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it "should generate not default id for hidden input" do
|
|
13
|
+
view.hidden_field_tags_for(:scope => "All")[/id="([^"]+)"/, 1].should_not == "scope"
|
|
10
14
|
end
|
|
11
15
|
|
|
12
16
|
it "should filter out the field passed via the option :except" do
|
|
13
17
|
view.hidden_field_tags_for({:scope => "All", :filter => "None"}, :except => :filter).should ==
|
|
14
|
-
%{<input id="
|
|
18
|
+
%{<input id="hidden_active_admin_scope" name="scope" type="hidden" value="All" />}
|
|
15
19
|
end
|
|
16
20
|
end
|
|
17
21
|
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe MethodOrProcHelper do
|
|
4
|
+
let(:receiver) { mock }
|
|
5
|
+
|
|
6
|
+
let(:context) do
|
|
7
|
+
obj = mock(:receiver_in_context => receiver)
|
|
8
|
+
obj.extend MethodOrProcHelper
|
|
9
|
+
obj
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
describe "#call_method_or_exec_proc" do
|
|
13
|
+
|
|
14
|
+
it "should call the method in the context when a symbol" do
|
|
15
|
+
context.call_method_or_exec_proc(:receiver_in_context).
|
|
16
|
+
should == receiver
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it "should call the method in the context when a string" do
|
|
20
|
+
context.call_method_or_exec_proc("receiver_in_context").
|
|
21
|
+
should == receiver
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "should exec a proc in the context" do
|
|
25
|
+
test_proc = Proc.new{ raise "Success" if receiver_in_context }
|
|
26
|
+
|
|
27
|
+
expect {
|
|
28
|
+
context.call_method_or_exec_proc(test_proc)
|
|
29
|
+
}.to raise_error("Success")
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe "#call_method_or_proc_on" do
|
|
35
|
+
|
|
36
|
+
context "when a symbol" do
|
|
37
|
+
|
|
38
|
+
it 'should call the method on the receiver' do
|
|
39
|
+
receiver.should_receive(:hello).and_return("hello")
|
|
40
|
+
|
|
41
|
+
context.call_method_or_proc_on(receiver, "hello").
|
|
42
|
+
should == "hello"
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "should receive additional arguments" do
|
|
46
|
+
receiver.should_receive(:hello).with("world").and_return("hello world")
|
|
47
|
+
|
|
48
|
+
context.call_method_or_proc_on(receiver, :hello, "world").
|
|
49
|
+
should == "hello world"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
context "when a proc" do
|
|
55
|
+
|
|
56
|
+
it "should exec the block in the context and pass in the receiver" do
|
|
57
|
+
test_proc = Proc.new do |arg|
|
|
58
|
+
raise "Success!" if arg == receiver_in_context
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
expect {
|
|
62
|
+
context.call_method_or_proc_on(receiver,test_proc)
|
|
63
|
+
}.to raise_error("Success!")
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it "should receive additional arguments" do
|
|
67
|
+
test_proc = Proc.new do |arg1, arg2|
|
|
68
|
+
raise "Success!" if arg1 == receiver_in_context && arg2 == "Hello"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
expect {
|
|
72
|
+
context.call_method_or_proc_on(receiver, test_proc, "Hello")
|
|
73
|
+
}.to raise_error("Success!")
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
context "when a proc and :exec => false" do
|
|
79
|
+
|
|
80
|
+
it "should call the proc and pass in the receiver" do
|
|
81
|
+
obj_not_in_context = mock
|
|
82
|
+
|
|
83
|
+
test_proc = Proc.new do |arg|
|
|
84
|
+
raise "Success!" if arg == receiver && obj_not_in_context
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
expect {
|
|
88
|
+
context.call_method_or_proc_on(receiver,test_proc, :exec => false)
|
|
89
|
+
}.to raise_error("Success!")
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
end
|
|
@@ -90,6 +90,17 @@ describe ActiveAdmin::Views::AttributesTable do
|
|
|
90
90
|
end
|
|
91
91
|
end # describe dsl styles
|
|
92
92
|
|
|
93
|
+
it "should allow html options for the row itself" do
|
|
94
|
+
table = render_arbre_component(assigns) {
|
|
95
|
+
attributes_table_for(post) do
|
|
96
|
+
row("Wee", :class => "custom_row", :style => "custom_style") { }
|
|
97
|
+
end
|
|
98
|
+
}
|
|
99
|
+
table.find_by_tag("tr").first.to_s.
|
|
100
|
+
split("\n").first.lstrip.
|
|
101
|
+
should == '<tr class="custom_row" style="custom_style">'
|
|
102
|
+
end
|
|
103
|
+
|
|
93
104
|
it "should allow html content inside the attributes table" do
|
|
94
105
|
table = render_arbre_component(assigns) {
|
|
95
106
|
attributes_table_for(post) do
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe ActiveAdmin::Views::IndexList do
|
|
4
|
+
|
|
5
|
+
describe "#index_list_renderer" do
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
let(:index_classes) { [ActiveAdmin::Views::IndexAsTable, ActiveAdmin::Views::IndexAsBlock] }
|
|
9
|
+
|
|
10
|
+
let(:helpers) do
|
|
11
|
+
helpers = mock_action_view
|
|
12
|
+
helpers.stub! :url_for => "/"
|
|
13
|
+
helpers.stub!(:params).and_return({:as => "table"})
|
|
14
|
+
helpers
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
subject do
|
|
18
|
+
render_arbre_component({:index_classes => index_classes}, helpers) do
|
|
19
|
+
index_list_renderer(index_classes)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
its(:tag_name) { should == 'ul' }
|
|
24
|
+
|
|
25
|
+
it "should contain the names of available indexes in links" do
|
|
26
|
+
a_tags = subject.find_by_tag("a")
|
|
27
|
+
a_tags.size.should == 2
|
|
28
|
+
a_tags.first.to_s.should include("Table")
|
|
29
|
+
a_tags.last.to_s.should include("List")
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -23,30 +23,31 @@ describe ActiveAdmin::Views::TabbedNavigation do
|
|
|
23
23
|
describe "rendering a menu" do
|
|
24
24
|
|
|
25
25
|
before do
|
|
26
|
-
menu.add
|
|
27
|
-
|
|
28
|
-
menu.add
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
menu.add :label => "Blog Posts", :url => :admin_posts_path
|
|
27
|
+
|
|
28
|
+
menu.add :label => "Reports", :url => "/admin/reports" do |reports|
|
|
29
|
+
reports.add :label => "A Sub Reports", :url => "/admin/a-sub-reports"
|
|
30
|
+
reports.add :label => "B Sub Reports", :url => "/admin/b-sub-reports"
|
|
31
|
+
reports.add :label => proc{ "Label Proc Sub Reports" }, :url => "/admin/label-proc-sub-reports", :id => "Label Proc Sub Reports"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
menu.add :label => "Administration", :url => "/admin/administration" do |administration|
|
|
35
|
+
administration.add :label => "User administration",
|
|
36
|
+
:url => '/admin/user-administration',
|
|
37
|
+
:priority => 10,
|
|
38
|
+
:if => proc { false }
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
menu.add :label => "Management", :url => "#" do |management|
|
|
42
|
+
management.add :label => "Order management",
|
|
43
|
+
:url => '/admin/order-management',
|
|
44
|
+
:priority => 10,
|
|
45
|
+
:if => proc { false }
|
|
46
|
+
management.add :label => "Bill management",
|
|
47
|
+
:url => '/admin/bill-management',
|
|
48
|
+
:priority => 10,
|
|
49
|
+
:if => :admin_logged_in?
|
|
50
|
+
end
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
it "should generate a ul" do
|
|
@@ -70,6 +71,10 @@ describe ActiveAdmin::Views::TabbedNavigation do
|
|
|
70
71
|
html.should have_tag("li", :parent => { :tag => "ul" }, :attributes => {:id => "b_sub_reports"})
|
|
71
72
|
end
|
|
72
73
|
|
|
74
|
+
it "should generate a valid id from a label proc" do
|
|
75
|
+
html.should have_tag("li", :parent => { :tag => "ul" }, :attributes => {:id => "label_proc_sub_reports"})
|
|
76
|
+
end
|
|
77
|
+
|
|
73
78
|
it "should not generate a link for user administration" do
|
|
74
79
|
html.should_not have_tag("a", "User administration", :attributes => { :href => '/admin/user-administration' })
|
|
75
80
|
end
|
|
@@ -110,38 +115,35 @@ describe ActiveAdmin::Views::TabbedNavigation do
|
|
|
110
115
|
|
|
111
116
|
describe "returning the menu items to display" do
|
|
112
117
|
|
|
113
|
-
it "should
|
|
114
|
-
menu.add
|
|
118
|
+
it "should return one item with no if block" do
|
|
119
|
+
menu.add :label => "Hello World", :url => "/"
|
|
115
120
|
tabbed_navigation.menu_items.should == menu.items
|
|
116
121
|
end
|
|
117
122
|
|
|
118
|
-
it "should not include
|
|
119
|
-
menu.add
|
|
120
|
-
tabbed_navigation.menu_items.should
|
|
123
|
+
it "should not include menu items with an if block that returns false" do
|
|
124
|
+
menu.add :label => "Don't Show", :url => "/", :priority => 10, :if => proc{ false }
|
|
125
|
+
tabbed_navigation.menu_items.should be_empty
|
|
121
126
|
end
|
|
122
127
|
|
|
123
128
|
it "should not include menu items with an if block that calls a method that returns false" do
|
|
124
|
-
menu.add
|
|
125
|
-
tabbed_navigation.menu_items.should
|
|
129
|
+
menu.add :label => "Don't Show", :url => "/", :priority => 10, :if => :admin_logged_in?
|
|
130
|
+
tabbed_navigation.menu_items.should be_empty
|
|
126
131
|
end
|
|
127
132
|
|
|
128
133
|
it "should not display any items that have no children to display" do
|
|
129
|
-
|
|
130
|
-
p.add
|
|
134
|
+
menu.add :label => "Parent", :url => "#" do |p|
|
|
135
|
+
p.add :label => "Child", :url => "/", :priority => 10, :if => proc{ false }
|
|
131
136
|
end
|
|
132
|
-
|
|
133
|
-
tabbed_navigation.menu_items.should == []
|
|
137
|
+
tabbed_navigation.menu_items.should be_empty
|
|
134
138
|
end
|
|
135
139
|
|
|
136
140
|
it "should display a parent that has a child to display" do
|
|
137
|
-
|
|
138
|
-
p.add
|
|
139
|
-
p.add
|
|
141
|
+
menu.add :label => "Parent", :url => "#" do |p|
|
|
142
|
+
p.add :label => "Hidden Child", :url => "/", :priority => 10, :if => proc{ false }
|
|
143
|
+
p.add :label => "Child", :url => "/"
|
|
140
144
|
end
|
|
141
|
-
menu.add item
|
|
142
145
|
tabbed_navigation.should have(1).menu_items
|
|
143
146
|
end
|
|
144
147
|
|
|
145
148
|
end
|
|
146
|
-
|
|
147
149
|
end
|
data/tasks/test.rake
CHANGED
|
@@ -30,7 +30,7 @@ namespace :test do
|
|
|
30
30
|
|
|
31
31
|
desc "Run the full suite against the important versions of rails"
|
|
32
32
|
task :major_supported_rails do
|
|
33
|
-
run_tests_against
|
|
33
|
+
run_tests_against *TRAVIS_RAILS_VERSIONS
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
desc "Alias for major_supported_rails"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeadmin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
16
|
-
requirement:
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,15 @@ dependencies:
|
|
|
21
21
|
version: 3.0.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 3.0.0
|
|
25
30
|
- !ruby/object:Gem::Dependency
|
|
26
31
|
name: jquery-rails
|
|
27
|
-
requirement:
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
28
33
|
none: false
|
|
29
34
|
requirements:
|
|
30
35
|
- - ! '>='
|
|
@@ -32,10 +37,15 @@ dependencies:
|
|
|
32
37
|
version: 1.0.0
|
|
33
38
|
type: :runtime
|
|
34
39
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 1.0.0
|
|
36
46
|
- !ruby/object:Gem::Dependency
|
|
37
47
|
name: bourbon
|
|
38
|
-
requirement:
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
39
49
|
none: false
|
|
40
50
|
requirements:
|
|
41
51
|
- - ! '>='
|
|
@@ -43,10 +53,15 @@ dependencies:
|
|
|
43
53
|
version: 1.0.0
|
|
44
54
|
type: :runtime
|
|
45
55
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 1.0.0
|
|
47
62
|
- !ruby/object:Gem::Dependency
|
|
48
63
|
name: meta_search
|
|
49
|
-
requirement:
|
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
65
|
none: false
|
|
51
66
|
requirements:
|
|
52
67
|
- - ! '>='
|
|
@@ -54,10 +69,15 @@ dependencies:
|
|
|
54
69
|
version: 0.9.2
|
|
55
70
|
type: :runtime
|
|
56
71
|
prerelease: false
|
|
57
|
-
version_requirements:
|
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
+
none: false
|
|
74
|
+
requirements:
|
|
75
|
+
- - ! '>='
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: 0.9.2
|
|
58
78
|
- !ruby/object:Gem::Dependency
|
|
59
79
|
name: devise
|
|
60
|
-
requirement:
|
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
|
61
81
|
none: false
|
|
62
82
|
requirements:
|
|
63
83
|
- - ! '>='
|
|
@@ -65,10 +85,15 @@ dependencies:
|
|
|
65
85
|
version: 1.1.2
|
|
66
86
|
type: :runtime
|
|
67
87
|
prerelease: false
|
|
68
|
-
version_requirements:
|
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
+
none: false
|
|
90
|
+
requirements:
|
|
91
|
+
- - ! '>='
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: 1.1.2
|
|
69
94
|
- !ruby/object:Gem::Dependency
|
|
70
95
|
name: formtastic
|
|
71
|
-
requirement:
|
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
97
|
none: false
|
|
73
98
|
requirements:
|
|
74
99
|
- - ! '>='
|
|
@@ -76,10 +101,15 @@ dependencies:
|
|
|
76
101
|
version: 2.0.0
|
|
77
102
|
type: :runtime
|
|
78
103
|
prerelease: false
|
|
79
|
-
version_requirements:
|
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
+
none: false
|
|
106
|
+
requirements:
|
|
107
|
+
- - ! '>='
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 2.0.0
|
|
80
110
|
- !ruby/object:Gem::Dependency
|
|
81
111
|
name: inherited_resources
|
|
82
|
-
requirement:
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
83
113
|
none: false
|
|
84
114
|
requirements:
|
|
85
115
|
- - ! '>='
|
|
@@ -87,10 +117,15 @@ dependencies:
|
|
|
87
117
|
version: 1.3.1
|
|
88
118
|
type: :runtime
|
|
89
119
|
prerelease: false
|
|
90
|
-
version_requirements:
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
none: false
|
|
122
|
+
requirements:
|
|
123
|
+
- - ! '>='
|
|
124
|
+
- !ruby/object:Gem::Version
|
|
125
|
+
version: 1.3.1
|
|
91
126
|
- !ruby/object:Gem::Dependency
|
|
92
127
|
name: kaminari
|
|
93
|
-
requirement:
|
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
|
94
129
|
none: false
|
|
95
130
|
requirements:
|
|
96
131
|
- - ! '>='
|
|
@@ -98,10 +133,15 @@ dependencies:
|
|
|
98
133
|
version: 0.13.0
|
|
99
134
|
type: :runtime
|
|
100
135
|
prerelease: false
|
|
101
|
-
version_requirements:
|
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
+
none: false
|
|
138
|
+
requirements:
|
|
139
|
+
- - ! '>='
|
|
140
|
+
- !ruby/object:Gem::Version
|
|
141
|
+
version: 0.13.0
|
|
102
142
|
- !ruby/object:Gem::Dependency
|
|
103
143
|
name: sass
|
|
104
|
-
requirement:
|
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
|
105
145
|
none: false
|
|
106
146
|
requirements:
|
|
107
147
|
- - ! '>='
|
|
@@ -109,10 +149,15 @@ dependencies:
|
|
|
109
149
|
version: 3.1.0
|
|
110
150
|
type: :runtime
|
|
111
151
|
prerelease: false
|
|
112
|
-
version_requirements:
|
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
+
none: false
|
|
154
|
+
requirements:
|
|
155
|
+
- - ! '>='
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: 3.1.0
|
|
113
158
|
- !ruby/object:Gem::Dependency
|
|
114
159
|
name: fastercsv
|
|
115
|
-
requirement:
|
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
|
116
161
|
none: false
|
|
117
162
|
requirements:
|
|
118
163
|
- - ! '>='
|
|
@@ -120,10 +165,15 @@ dependencies:
|
|
|
120
165
|
version: '0'
|
|
121
166
|
type: :runtime
|
|
122
167
|
prerelease: false
|
|
123
|
-
version_requirements:
|
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
169
|
+
none: false
|
|
170
|
+
requirements:
|
|
171
|
+
- - ! '>='
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0'
|
|
124
174
|
- !ruby/object:Gem::Dependency
|
|
125
175
|
name: arbre
|
|
126
|
-
requirement:
|
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
177
|
none: false
|
|
128
178
|
requirements:
|
|
129
179
|
- - ! '>='
|
|
@@ -131,7 +181,12 @@ dependencies:
|
|
|
131
181
|
version: 1.0.1
|
|
132
182
|
type: :runtime
|
|
133
183
|
prerelease: false
|
|
134
|
-
version_requirements:
|
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
185
|
+
none: false
|
|
186
|
+
requirements:
|
|
187
|
+
- - ! '>='
|
|
188
|
+
- !ruby/object:Gem::Version
|
|
189
|
+
version: 1.0.1
|
|
135
190
|
description: The administration framework for Ruby on Rails.
|
|
136
191
|
email:
|
|
137
192
|
- gregdbell@gmail.com
|
|
@@ -157,6 +212,10 @@ files:
|
|
|
157
212
|
- app/assets/images/active_admin/datepicker/datepicker-next-link-icon.png
|
|
158
213
|
- app/assets/images/active_admin/datepicker/datepicker-nipple.png
|
|
159
214
|
- app/assets/images/active_admin/datepicker/datepicker-prev-link-icon.png
|
|
215
|
+
- app/assets/images/active_admin/index_list_icons/block_icon.svg
|
|
216
|
+
- app/assets/images/active_admin/index_list_icons/blog_icon.svg
|
|
217
|
+
- app/assets/images/active_admin/index_list_icons/grid_icon.svg
|
|
218
|
+
- app/assets/images/active_admin/index_list_icons/table_icon.svg
|
|
160
219
|
- app/assets/images/active_admin/loading.gif
|
|
161
220
|
- app/assets/images/active_admin/nested_menu_arrow.gif
|
|
162
221
|
- app/assets/images/active_admin/nested_menu_arrow_dark.gif
|
|
@@ -185,6 +244,7 @@ files:
|
|
|
185
244
|
- app/assets/stylesheets/active_admin/components/_dropdown_menu.scss
|
|
186
245
|
- app/assets/stylesheets/active_admin/components/_flash_messages.css.scss
|
|
187
246
|
- app/assets/stylesheets/active_admin/components/_grid.scss
|
|
247
|
+
- app/assets/stylesheets/active_admin/components/_index_list.scss
|
|
188
248
|
- app/assets/stylesheets/active_admin/components/_links.scss
|
|
189
249
|
- app/assets/stylesheets/active_admin/components/_pagination.scss
|
|
190
250
|
- app/assets/stylesheets/active_admin/components/_panels.scss
|
|
@@ -232,8 +292,10 @@ files:
|
|
|
232
292
|
- docs/10-custom-pages.md
|
|
233
293
|
- docs/11-decorators.md
|
|
234
294
|
- docs/12-arbre-components.md
|
|
295
|
+
- docs/13-authorization-adapter.md
|
|
235
296
|
- docs/2-resource-customization.md
|
|
236
297
|
- docs/3-index-pages.md
|
|
298
|
+
- docs/3-index-pages/create-an-index.md
|
|
237
299
|
- docs/3-index-pages/index-as-block.md
|
|
238
300
|
- docs/3-index-pages/index-as-blog.md
|
|
239
301
|
- docs/3-index-pages/index-as-grid.md
|
|
@@ -245,6 +307,8 @@ files:
|
|
|
245
307
|
- docs/8-custom-actions.md
|
|
246
308
|
- docs/9-batch-actions.md
|
|
247
309
|
- features/action_item.feature
|
|
310
|
+
- features/authorization.feature
|
|
311
|
+
- features/authorization_cancan.feature
|
|
248
312
|
- features/belongs_to.feature
|
|
249
313
|
- features/breadcrumb.feature
|
|
250
314
|
- features/comments/commenting.feature
|
|
@@ -270,6 +334,7 @@ files:
|
|
|
270
334
|
- features/index/index_scopes.feature
|
|
271
335
|
- features/index/page_title.feature
|
|
272
336
|
- features/index/pagination.feature
|
|
337
|
+
- features/index/switch_index_view.feature
|
|
273
338
|
- features/menu.feature
|
|
274
339
|
- features/new_page.feature
|
|
275
340
|
- features/registering_assets.feature
|
|
@@ -297,6 +362,7 @@ files:
|
|
|
297
362
|
- features/step_definitions/format_steps.rb
|
|
298
363
|
- features/step_definitions/i18n_steps.rb
|
|
299
364
|
- features/step_definitions/index_scope_steps.rb
|
|
365
|
+
- features/step_definitions/index_views_steps.rb
|
|
300
366
|
- features/step_definitions/layout_steps.rb
|
|
301
367
|
- features/step_definitions/member_link_steps.rb
|
|
302
368
|
- features/step_definitions/menu_steps.rb
|
|
@@ -318,7 +384,9 @@ files:
|
|
|
318
384
|
- lib/active_admin/abstract_view_factory.rb
|
|
319
385
|
- lib/active_admin/application.rb
|
|
320
386
|
- lib/active_admin/asset_registration.rb
|
|
387
|
+
- lib/active_admin/authorization_adapter.rb
|
|
321
388
|
- lib/active_admin/base_controller.rb
|
|
389
|
+
- lib/active_admin/base_controller/authorization.rb
|
|
322
390
|
- lib/active_admin/base_controller/menu.rb
|
|
323
391
|
- lib/active_admin/batch_actions.rb
|
|
324
392
|
- lib/active_admin/batch_actions/controller.rb
|
|
@@ -328,6 +396,7 @@ files:
|
|
|
328
396
|
- lib/active_admin/batch_actions/views/batch_action_selector.rb
|
|
329
397
|
- lib/active_admin/batch_actions/views/selection_cells.rb
|
|
330
398
|
- lib/active_admin/callbacks.rb
|
|
399
|
+
- lib/active_admin/cancan_adapter.rb
|
|
331
400
|
- lib/active_admin/comments.rb
|
|
332
401
|
- lib/active_admin/comments/comment.rb
|
|
333
402
|
- lib/active_admin/comments/namespace_helper.rb
|
|
@@ -388,6 +457,7 @@ files:
|
|
|
388
457
|
- lib/active_admin/locales/no-NB.yml
|
|
389
458
|
- lib/active_admin/locales/pl.yml
|
|
390
459
|
- lib/active_admin/locales/pt-BR.yml
|
|
460
|
+
- lib/active_admin/locales/pt-PT.yml
|
|
391
461
|
- lib/active_admin/locales/ro.yml
|
|
392
462
|
- lib/active_admin/locales/ru.yml
|
|
393
463
|
- lib/active_admin/locales/sv-SE.yml
|
|
@@ -396,7 +466,7 @@ files:
|
|
|
396
466
|
- lib/active_admin/locales/zh-CN.yml
|
|
397
467
|
- lib/active_admin/locales/zh-TW.yml
|
|
398
468
|
- lib/active_admin/menu.rb
|
|
399
|
-
- lib/active_admin/
|
|
469
|
+
- lib/active_admin/menu_collection.rb
|
|
400
470
|
- lib/active_admin/menu_item.rb
|
|
401
471
|
- lib/active_admin/namespace.rb
|
|
402
472
|
- lib/active_admin/page.rb
|
|
@@ -412,14 +482,14 @@ files:
|
|
|
412
482
|
- lib/active_admin/resource/naming.rb
|
|
413
483
|
- lib/active_admin/resource/page_presenters.rb
|
|
414
484
|
- lib/active_admin/resource/pagination.rb
|
|
485
|
+
- lib/active_admin/resource/routes.rb
|
|
415
486
|
- lib/active_admin/resource/scopes.rb
|
|
416
487
|
- lib/active_admin/resource/sidebars.rb
|
|
417
488
|
- lib/active_admin/resource_collection.rb
|
|
418
489
|
- lib/active_admin/resource_controller.rb
|
|
419
490
|
- lib/active_admin/resource_controller/action_builder.rb
|
|
420
491
|
- lib/active_admin/resource_controller/actions.rb
|
|
421
|
-
- lib/active_admin/resource_controller/
|
|
422
|
-
- lib/active_admin/resource_controller/collection.rb
|
|
492
|
+
- lib/active_admin/resource_controller/data_access.rb
|
|
423
493
|
- lib/active_admin/resource_controller/decorators.rb
|
|
424
494
|
- lib/active_admin/resource_controller/resource_class_methods.rb
|
|
425
495
|
- lib/active_admin/resource_controller/scoping.rb
|
|
@@ -455,6 +525,7 @@ files:
|
|
|
455
525
|
- lib/active_admin/views/components/blank_slate.rb
|
|
456
526
|
- lib/active_admin/views/components/columns.rb
|
|
457
527
|
- lib/active_admin/views/components/dropdown_menu.rb
|
|
528
|
+
- lib/active_admin/views/components/index_list.rb
|
|
458
529
|
- lib/active_admin/views/components/paginated_collection.rb
|
|
459
530
|
- lib/active_admin/views/components/panel.rb
|
|
460
531
|
- lib/active_admin/views/components/popover.rb
|
|
@@ -479,7 +550,6 @@ files:
|
|
|
479
550
|
- lib/active_admin/views/pages/show.rb
|
|
480
551
|
- lib/active_admin/views/tabbed_navigation.rb
|
|
481
552
|
- lib/active_admin/views/title_bar.rb
|
|
482
|
-
- lib/active_admin/views/utility_nav.rb
|
|
483
553
|
- lib/activeadmin.rb
|
|
484
554
|
- lib/generators/active_admin/assets/assets_generator.rb
|
|
485
555
|
- lib/generators/active_admin/assets/templates/3.0/active_admin.js
|
|
@@ -496,7 +566,7 @@ files:
|
|
|
496
566
|
- lib/generators/active_admin/resource/templates/admin.rb
|
|
497
567
|
- script/local
|
|
498
568
|
- script/use_rails
|
|
499
|
-
- spec/integration/
|
|
569
|
+
- spec/integration/default_namespace_spec.rb
|
|
500
570
|
- spec/integration/javascript_spec.rb
|
|
501
571
|
- spec/integration/memory_spec.rb
|
|
502
572
|
- spec/integration/stylesheets_spec.rb
|
|
@@ -534,13 +604,15 @@ files:
|
|
|
534
604
|
- spec/unit/active_admin_spec.rb
|
|
535
605
|
- spec/unit/application_spec.rb
|
|
536
606
|
- spec/unit/asset_registration_spec.rb
|
|
607
|
+
- spec/unit/authorization/authorization_adapter_spec.rb
|
|
608
|
+
- spec/unit/authorization/controller_authorization_spec.rb
|
|
537
609
|
- spec/unit/auto_link_spec.rb
|
|
538
|
-
- spec/unit/base_controller_shared_examples.rb
|
|
539
610
|
- spec/unit/base_controller_spec.rb
|
|
540
611
|
- spec/unit/batch_actions/resource_spec.rb
|
|
541
612
|
- spec/unit/batch_actions/settings_spec.rb
|
|
542
613
|
- spec/unit/belongs_to_spec.rb
|
|
543
614
|
- spec/unit/breadcrumbs_spec.rb
|
|
615
|
+
- spec/unit/cancan_adapter_spec.rb
|
|
544
616
|
- spec/unit/comments_spec.rb
|
|
545
617
|
- spec/unit/component_spec.rb
|
|
546
618
|
- spec/unit/config_shared_examples.rb
|
|
@@ -551,7 +623,7 @@ files:
|
|
|
551
623
|
- spec/unit/dashboards_spec.rb
|
|
552
624
|
- spec/unit/devise_spec.rb
|
|
553
625
|
- spec/unit/display_name_spec.rb
|
|
554
|
-
- spec/unit/
|
|
626
|
+
- spec/unit/dsl_spec.rb
|
|
555
627
|
- spec/unit/event_spec.rb
|
|
556
628
|
- spec/unit/filters/filter_form_builder_spec.rb
|
|
557
629
|
- spec/unit/filters/resource_spec.rb
|
|
@@ -560,8 +632,10 @@ files:
|
|
|
560
632
|
- spec/unit/helpers/collection_spec.rb
|
|
561
633
|
- spec/unit/helpers/scope_chain_spec.rb
|
|
562
634
|
- spec/unit/helpers/settings_spec.rb
|
|
635
|
+
- spec/unit/menu_collection_spec.rb
|
|
563
636
|
- spec/unit/menu_item_spec.rb
|
|
564
637
|
- spec/unit/menu_spec.rb
|
|
638
|
+
- spec/unit/namespace/authorization_spec.rb
|
|
565
639
|
- spec/unit/namespace/register_page_spec.rb
|
|
566
640
|
- spec/unit/namespace/register_resource_spec.rb
|
|
567
641
|
- spec/unit/namespace_spec.rb
|
|
@@ -578,7 +652,7 @@ files:
|
|
|
578
652
|
- spec/unit/resource/scopes_spec.rb
|
|
579
653
|
- spec/unit/resource/sidebars_spec.rb
|
|
580
654
|
- spec/unit/resource_collection_spec.rb
|
|
581
|
-
- spec/unit/resource_controller/
|
|
655
|
+
- spec/unit/resource_controller/data_access_spec.rb
|
|
582
656
|
- spec/unit/resource_controller/sidebars_spec.rb
|
|
583
657
|
- spec/unit/resource_controller_spec.rb
|
|
584
658
|
- spec/unit/resource_registration_spec.rb
|
|
@@ -590,11 +664,13 @@ files:
|
|
|
590
664
|
- spec/unit/view_helpers/download_format_links_helper_spec.rb
|
|
591
665
|
- spec/unit/view_helpers/fields_for_spec.rb
|
|
592
666
|
- spec/unit/view_helpers/form_helper_spec.rb
|
|
667
|
+
- spec/unit/view_helpers/method_or_proc_helper_spec.rb
|
|
593
668
|
- spec/unit/views/components/action_list_popover_spec.rb
|
|
594
669
|
- spec/unit/views/components/attributes_table_spec.rb
|
|
595
670
|
- spec/unit/views/components/batch_action_popover_spec.rb
|
|
596
671
|
- spec/unit/views/components/blank_slate_spec.rb
|
|
597
672
|
- spec/unit/views/components/columns_spec.rb
|
|
673
|
+
- spec/unit/views/components/index_list_spec.rb
|
|
598
674
|
- spec/unit/views/components/paginated_collection_spec.rb
|
|
599
675
|
- spec/unit/views/components/panel_spec.rb
|
|
600
676
|
- spec/unit/views/components/popover_spec.rb
|
|
@@ -611,7 +687,8 @@ files:
|
|
|
611
687
|
- tasks/test.rake
|
|
612
688
|
- tasks/yard.rake
|
|
613
689
|
homepage: http://activeadmin.info
|
|
614
|
-
licenses:
|
|
690
|
+
licenses:
|
|
691
|
+
- MIT
|
|
615
692
|
post_install_message:
|
|
616
693
|
rdoc_options: []
|
|
617
694
|
require_paths:
|
|
@@ -624,7 +701,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
624
701
|
version: '0'
|
|
625
702
|
segments:
|
|
626
703
|
- 0
|
|
627
|
-
hash: -
|
|
704
|
+
hash: -3751499823018813299
|
|
628
705
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
629
706
|
none: false
|
|
630
707
|
requirements:
|
|
@@ -633,15 +710,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
633
710
|
version: '0'
|
|
634
711
|
segments:
|
|
635
712
|
- 0
|
|
636
|
-
hash: -
|
|
713
|
+
hash: -3751499823018813299
|
|
637
714
|
requirements: []
|
|
638
715
|
rubyforge_project:
|
|
639
|
-
rubygems_version: 1.8.
|
|
716
|
+
rubygems_version: 1.8.23
|
|
640
717
|
signing_key:
|
|
641
718
|
specification_version: 3
|
|
642
719
|
summary: The administration framework for Ruby on Rails.
|
|
643
720
|
test_files:
|
|
644
721
|
- features/action_item.feature
|
|
722
|
+
- features/authorization.feature
|
|
723
|
+
- features/authorization_cancan.feature
|
|
645
724
|
- features/belongs_to.feature
|
|
646
725
|
- features/breadcrumb.feature
|
|
647
726
|
- features/comments/commenting.feature
|
|
@@ -667,6 +746,7 @@ test_files:
|
|
|
667
746
|
- features/index/index_scopes.feature
|
|
668
747
|
- features/index/page_title.feature
|
|
669
748
|
- features/index/pagination.feature
|
|
749
|
+
- features/index/switch_index_view.feature
|
|
670
750
|
- features/menu.feature
|
|
671
751
|
- features/new_page.feature
|
|
672
752
|
- features/registering_assets.feature
|
|
@@ -694,6 +774,7 @@ test_files:
|
|
|
694
774
|
- features/step_definitions/format_steps.rb
|
|
695
775
|
- features/step_definitions/i18n_steps.rb
|
|
696
776
|
- features/step_definitions/index_scope_steps.rb
|
|
777
|
+
- features/step_definitions/index_views_steps.rb
|
|
697
778
|
- features/step_definitions/layout_steps.rb
|
|
698
779
|
- features/step_definitions/member_link_steps.rb
|
|
699
780
|
- features/step_definitions/menu_steps.rb
|
|
@@ -711,7 +792,7 @@ test_files:
|
|
|
711
792
|
- features/users/logging_in.feature
|
|
712
793
|
- features/users/logging_out.feature
|
|
713
794
|
- features/users/resetting_password.feature
|
|
714
|
-
- spec/integration/
|
|
795
|
+
- spec/integration/default_namespace_spec.rb
|
|
715
796
|
- spec/integration/javascript_spec.rb
|
|
716
797
|
- spec/integration/memory_spec.rb
|
|
717
798
|
- spec/integration/stylesheets_spec.rb
|
|
@@ -749,13 +830,15 @@ test_files:
|
|
|
749
830
|
- spec/unit/active_admin_spec.rb
|
|
750
831
|
- spec/unit/application_spec.rb
|
|
751
832
|
- spec/unit/asset_registration_spec.rb
|
|
833
|
+
- spec/unit/authorization/authorization_adapter_spec.rb
|
|
834
|
+
- spec/unit/authorization/controller_authorization_spec.rb
|
|
752
835
|
- spec/unit/auto_link_spec.rb
|
|
753
|
-
- spec/unit/base_controller_shared_examples.rb
|
|
754
836
|
- spec/unit/base_controller_spec.rb
|
|
755
837
|
- spec/unit/batch_actions/resource_spec.rb
|
|
756
838
|
- spec/unit/batch_actions/settings_spec.rb
|
|
757
839
|
- spec/unit/belongs_to_spec.rb
|
|
758
840
|
- spec/unit/breadcrumbs_spec.rb
|
|
841
|
+
- spec/unit/cancan_adapter_spec.rb
|
|
759
842
|
- spec/unit/comments_spec.rb
|
|
760
843
|
- spec/unit/component_spec.rb
|
|
761
844
|
- spec/unit/config_shared_examples.rb
|
|
@@ -766,7 +849,7 @@ test_files:
|
|
|
766
849
|
- spec/unit/dashboards_spec.rb
|
|
767
850
|
- spec/unit/devise_spec.rb
|
|
768
851
|
- spec/unit/display_name_spec.rb
|
|
769
|
-
- spec/unit/
|
|
852
|
+
- spec/unit/dsl_spec.rb
|
|
770
853
|
- spec/unit/event_spec.rb
|
|
771
854
|
- spec/unit/filters/filter_form_builder_spec.rb
|
|
772
855
|
- spec/unit/filters/resource_spec.rb
|
|
@@ -775,8 +858,10 @@ test_files:
|
|
|
775
858
|
- spec/unit/helpers/collection_spec.rb
|
|
776
859
|
- spec/unit/helpers/scope_chain_spec.rb
|
|
777
860
|
- spec/unit/helpers/settings_spec.rb
|
|
861
|
+
- spec/unit/menu_collection_spec.rb
|
|
778
862
|
- spec/unit/menu_item_spec.rb
|
|
779
863
|
- spec/unit/menu_spec.rb
|
|
864
|
+
- spec/unit/namespace/authorization_spec.rb
|
|
780
865
|
- spec/unit/namespace/register_page_spec.rb
|
|
781
866
|
- spec/unit/namespace/register_resource_spec.rb
|
|
782
867
|
- spec/unit/namespace_spec.rb
|
|
@@ -793,7 +878,7 @@ test_files:
|
|
|
793
878
|
- spec/unit/resource/scopes_spec.rb
|
|
794
879
|
- spec/unit/resource/sidebars_spec.rb
|
|
795
880
|
- spec/unit/resource_collection_spec.rb
|
|
796
|
-
- spec/unit/resource_controller/
|
|
881
|
+
- spec/unit/resource_controller/data_access_spec.rb
|
|
797
882
|
- spec/unit/resource_controller/sidebars_spec.rb
|
|
798
883
|
- spec/unit/resource_controller_spec.rb
|
|
799
884
|
- spec/unit/resource_registration_spec.rb
|
|
@@ -805,11 +890,13 @@ test_files:
|
|
|
805
890
|
- spec/unit/view_helpers/download_format_links_helper_spec.rb
|
|
806
891
|
- spec/unit/view_helpers/fields_for_spec.rb
|
|
807
892
|
- spec/unit/view_helpers/form_helper_spec.rb
|
|
893
|
+
- spec/unit/view_helpers/method_or_proc_helper_spec.rb
|
|
808
894
|
- spec/unit/views/components/action_list_popover_spec.rb
|
|
809
895
|
- spec/unit/views/components/attributes_table_spec.rb
|
|
810
896
|
- spec/unit/views/components/batch_action_popover_spec.rb
|
|
811
897
|
- spec/unit/views/components/blank_slate_spec.rb
|
|
812
898
|
- spec/unit/views/components/columns_spec.rb
|
|
899
|
+
- spec/unit/views/components/index_list_spec.rb
|
|
813
900
|
- spec/unit/views/components/paginated_collection_spec.rb
|
|
814
901
|
- spec/unit/views/components/panel_spec.rb
|
|
815
902
|
- spec/unit/views/components/popover_spec.rb
|