activeadmin 0.1.0 → 0.1.1

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.

@@ -0,0 +1,8 @@
1
+ == 0.1.1
2
+
3
+ * Bug Fixes
4
+ * Fixed issues running on Ruby 1.9.2
5
+
6
+ == 0.1.0
7
+
8
+ * Initial release
@@ -14,7 +14,6 @@ Although Active Admin is very young in its development cycle, here are its curre
14
14
  4. Build administration interfaces for common rails plugins as gems and share with the
15
15
  community (ie: devise admin)
16
16
 
17
-
18
17
  == Status
19
18
 
20
19
  Active Admin is very young. Although the code is well tested and is being used in production,
@@ -23,12 +22,13 @@ we will begin numbered releases starting with a 0.1 release.
23
22
 
24
23
  == Installation (Rails 3)
25
24
 
25
+ Active Admin is released as a Gem. Installing the gem deals with all its dependencies, however
26
+ WillPaginate seems to have some Rails 3 issues still. For now:
27
+
26
28
  Add the following to your Gemfile:
27
29
 
28
- gem 'formtastic', :git => "git://github.com/justinfrench/formtastic.git", :branch => 'rails3'
29
30
  gem 'will_paginate', :git => "git://github.com/mislav/will_paginate.git", :branch => 'rails3'
30
- gem 'meta_search', :git => "git://github.com/ernie/meta_search.git"
31
- gem 'active_admin', :git => "git://github.com/gregbell/active_admin.git"
31
+ gem 'activeadmin'
32
32
 
33
33
  Then, run the installer:
34
34
 
@@ -0,0 +1,174 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{activeadmin}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Greg Bell"]
12
+ s.date = %q{2010-09-15}
13
+ s.description = %q{The administration framework for Ruby on Rails.}
14
+ s.email = %q{gregdbell@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "CHANGELOG.rdoc",
23
+ "Gemfile",
24
+ "LICENSE",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "active_admin.gemspec",
28
+ "activeadmin.gemspec",
29
+ "lib/active_admin.rb",
30
+ "lib/active_admin/action_builder.rb",
31
+ "lib/active_admin/action_items.rb",
32
+ "lib/active_admin/asset_registration.rb",
33
+ "lib/active_admin/breadcrumbs.rb",
34
+ "lib/active_admin/dashboards.rb",
35
+ "lib/active_admin/dashboards/dashboard_controller.rb",
36
+ "lib/active_admin/dashboards/renderer.rb",
37
+ "lib/active_admin/dashboards/section.rb",
38
+ "lib/active_admin/dashboards/section_renderer.rb",
39
+ "lib/active_admin/filters.rb",
40
+ "lib/active_admin/form_builder.rb",
41
+ "lib/active_admin/helpers/optional_display.rb",
42
+ "lib/active_admin/menu.rb",
43
+ "lib/active_admin/menu_item.rb",
44
+ "lib/active_admin/namespace.rb",
45
+ "lib/active_admin/page_config.rb",
46
+ "lib/active_admin/pages.rb",
47
+ "lib/active_admin/pages/base.rb",
48
+ "lib/active_admin/pages/edit.rb",
49
+ "lib/active_admin/pages/index.rb",
50
+ "lib/active_admin/pages/index/blog.rb",
51
+ "lib/active_admin/pages/index/table.rb",
52
+ "lib/active_admin/pages/index/thumbnails.rb",
53
+ "lib/active_admin/pages/new.rb",
54
+ "lib/active_admin/pages/show.rb",
55
+ "lib/active_admin/renderer.rb",
56
+ "lib/active_admin/resource.rb",
57
+ "lib/active_admin/resource_controller.rb",
58
+ "lib/active_admin/sidebar.rb",
59
+ "lib/active_admin/table_builder.rb",
60
+ "lib/active_admin/tabs_renderer.rb",
61
+ "lib/active_admin/version.rb",
62
+ "lib/active_admin/view_helpers.rb",
63
+ "lib/active_admin/views/active_admin_dashboard/index.html.erb",
64
+ "lib/active_admin/views/active_admin_default/edit.html.erb",
65
+ "lib/active_admin/views/active_admin_default/index.csv.erb",
66
+ "lib/active_admin/views/active_admin_default/index.html.erb",
67
+ "lib/active_admin/views/active_admin_default/new.html.erb",
68
+ "lib/active_admin/views/active_admin_default/show.html.erb",
69
+ "lib/active_admin/views/layouts/active_admin.html.erb",
70
+ "lib/activeadmin.rb",
71
+ "lib/generators/active_admin/install/install_generator.rb",
72
+ "lib/generators/active_admin/install/templates/active_admin.css",
73
+ "lib/generators/active_admin/install/templates/active_admin.js",
74
+ "lib/generators/active_admin/install/templates/active_admin.rb",
75
+ "lib/generators/active_admin/install/templates/active_admin_vendor.js",
76
+ "lib/generators/active_admin/install/templates/dashboards.rb",
77
+ "lib/generators/active_admin/install/templates/images/orderable.gif",
78
+ "lib/generators/active_admin/resource/resource_generator.rb",
79
+ "lib/generators/active_admin/resource/templates/admin.rb",
80
+ "spec/integration/dashboard_spec.rb",
81
+ "spec/integration/index_as_blog_spec.rb",
82
+ "spec/integration/index_as_csv_spec.rb",
83
+ "spec/integration/index_as_table_spec.rb",
84
+ "spec/integration/index_as_thumbnails_spec.rb",
85
+ "spec/integration/layout_spec.rb",
86
+ "spec/integration/new_view_spec.rb",
87
+ "spec/integration/show_view_spec.rb",
88
+ "spec/spec_helper.rb",
89
+ "spec/support/rails_template.rb",
90
+ "spec/unit/action_builder_spec.rb",
91
+ "spec/unit/action_items_spec.rb",
92
+ "spec/unit/active_admin_spec.rb",
93
+ "spec/unit/asset_registration_spec.rb",
94
+ "spec/unit/controller_filters_spec.rb",
95
+ "spec/unit/dashboard_section_spec.rb",
96
+ "spec/unit/dashboards_spec.rb",
97
+ "spec/unit/filter_form_builder_spec.rb",
98
+ "spec/unit/form_builder_spec.rb",
99
+ "spec/unit/menu_item_spec.rb",
100
+ "spec/unit/menu_spec.rb",
101
+ "spec/unit/namespace_spec.rb",
102
+ "spec/unit/registration_spec.rb",
103
+ "spec/unit/renderer_spec.rb",
104
+ "spec/unit/resource_controller_spec.rb",
105
+ "spec/unit/resource_spec.rb",
106
+ "spec/unit/routing_spec.rb",
107
+ "spec/unit/sidebar_spec.rb",
108
+ "spec/unit/table_builder_spec.rb",
109
+ "spec/unit/tabs_renderer_spec.rb"
110
+ ]
111
+ s.homepage = %q{http://github.com/gregbell/active_admin}
112
+ s.rdoc_options = ["--charset=UTF-8"]
113
+ s.require_paths = ["lib"]
114
+ s.rubygems_version = %q{1.3.7}
115
+ s.summary = %q{The administration framework for Ruby on Rails.}
116
+ s.test_files = [
117
+ "spec/integration/dashboard_spec.rb",
118
+ "spec/integration/index_as_blog_spec.rb",
119
+ "spec/integration/index_as_csv_spec.rb",
120
+ "spec/integration/index_as_table_spec.rb",
121
+ "spec/integration/index_as_thumbnails_spec.rb",
122
+ "spec/integration/layout_spec.rb",
123
+ "spec/integration/new_view_spec.rb",
124
+ "spec/integration/show_view_spec.rb",
125
+ "spec/spec_helper.rb",
126
+ "spec/support/rails_template.rb",
127
+ "spec/unit/action_builder_spec.rb",
128
+ "spec/unit/action_items_spec.rb",
129
+ "spec/unit/active_admin_spec.rb",
130
+ "spec/unit/asset_registration_spec.rb",
131
+ "spec/unit/controller_filters_spec.rb",
132
+ "spec/unit/dashboard_section_spec.rb",
133
+ "spec/unit/dashboards_spec.rb",
134
+ "spec/unit/filter_form_builder_spec.rb",
135
+ "spec/unit/form_builder_spec.rb",
136
+ "spec/unit/menu_item_spec.rb",
137
+ "spec/unit/menu_spec.rb",
138
+ "spec/unit/namespace_spec.rb",
139
+ "spec/unit/registration_spec.rb",
140
+ "spec/unit/renderer_spec.rb",
141
+ "spec/unit/resource_controller_spec.rb",
142
+ "spec/unit/resource_spec.rb",
143
+ "spec/unit/routing_spec.rb",
144
+ "spec/unit/sidebar_spec.rb",
145
+ "spec/unit/table_builder_spec.rb",
146
+ "spec/unit/tabs_renderer_spec.rb"
147
+ ]
148
+
149
+ if s.respond_to? :specification_version then
150
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
151
+ s.specification_version = 3
152
+
153
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
154
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
155
+ s.add_runtime_dependency(%q<formtastic>, [">= 1.1.0.beta"])
156
+ s.add_runtime_dependency(%q<will_paginate>, [">= 3.0.pre2"])
157
+ s.add_runtime_dependency(%q<meta_search>, [">= 0.9.2"])
158
+ s.add_runtime_dependency(%q<inherited_views>, [">= 0"])
159
+ else
160
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
161
+ s.add_dependency(%q<formtastic>, [">= 1.1.0.beta"])
162
+ s.add_dependency(%q<will_paginate>, [">= 3.0.pre2"])
163
+ s.add_dependency(%q<meta_search>, [">= 0.9.2"])
164
+ s.add_dependency(%q<inherited_views>, [">= 0"])
165
+ end
166
+ else
167
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
168
+ s.add_dependency(%q<formtastic>, [">= 1.1.0.beta"])
169
+ s.add_dependency(%q<will_paginate>, [">= 3.0.pre2"])
170
+ s.add_dependency(%q<meta_search>, [">= 0.9.2"])
171
+ s.add_dependency(%q<inherited_views>, [">= 0"])
172
+ end
173
+ end
174
+
@@ -153,13 +153,13 @@ module ActiveAdmin
153
153
 
154
154
  # Default Action Item Links
155
155
  action_item :only => :show do
156
- if controller.public_methods.include?('edit')
156
+ if controller.action_methods.include?('edit')
157
157
  link_to "Edit #{active_admin_config.resource_name}", edit_resource_path(resource)
158
158
  end
159
159
  end
160
160
 
161
161
  action_item :only => :show do
162
- if controller.public_methods.include?("destroy")
162
+ if controller.action_methods.include?("destroy")
163
163
  link_to "Delete #{active_admin_config.resource_name}",
164
164
  resource_path(resource),
165
165
  :method => :delete, :confirm => "Are you sure you want to delete this?"
@@ -167,7 +167,7 @@ module ActiveAdmin
167
167
  end
168
168
 
169
169
  action_item :except => [:new, :show] do
170
- if controller.public_methods.include?('new')
170
+ if controller.action_methods.include?('new')
171
171
  link_to "New #{active_admin_config.resource_name}", new_resource_path
172
172
  end
173
173
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdmin
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -75,6 +75,8 @@ if ENV['RAILS'] == '3.0.0'
75
75
  config.use_instantiated_fixtures = false
76
76
  end
77
77
 
78
+ # Ensure this is defined for Ruby 1.8
79
+ module MiniTest; class Assertion < Exception; end; end
78
80
 
79
81
  Rspec::Matchers.define :have_tag do |*args|
80
82
 
@@ -89,12 +91,18 @@ if ENV['RAILS'] == '3.0.0'
89
91
  options[:content] = content if content
90
92
 
91
93
  begin
92
- assert_tag(options)
93
- rescue NoMethodError
94
- # We are not in a controller, so let's do the checking ourselves
95
- doc = HTML::Document.new(response, false, false)
96
- tag = doc.find(options)
97
- assert tag, "expected tag, but no tag found matching #{options.inspect} in:\n#{response.inspect}"
94
+ begin
95
+ assert_tag(options)
96
+ rescue NoMethodError
97
+ # We are not in a controller, so let's do the checking ourselves
98
+ doc = HTML::Document.new(response, false, false)
99
+ tag = doc.find(options)
100
+ assert tag, "expected tag, but no tag found matching #{options.inspect} in:\n#{response.inspect}"
101
+ end
102
+ # In Ruby 1.9, MiniTest::Assertion get's raised, so we'll
103
+ # handle raising a Test::Unit::AssertionFailedError
104
+ rescue MiniTest::Assertion => e
105
+ raise Test::Unit::AssertionFailedError, e.message
98
106
  end
99
107
  end
100
108
  end
@@ -22,20 +22,20 @@ describe ActiveAdmin::ActionBuilder do
22
22
  end
23
23
 
24
24
  it "should create a new public instance method" do
25
- controller.public_instance_methods.should include("comment")
25
+ controller.public_instance_methods.collect(&:to_s).should include("comment")
26
26
  end
27
27
  it "should add itself to the member actions config" do
28
28
  controller.active_admin_config.member_actions.size.should == 1
29
29
  end
30
30
  it "should create a new named route" do
31
- Rails.application.routes.url_helpers.methods.should include("comment_admin_post_path")
31
+ Rails.application.routes.url_helpers.methods.collect(&:to_s).should include("comment_admin_post_path")
32
32
  end
33
33
  end
34
34
 
35
35
  context "without a block" do
36
36
  let(:action!){ controller.member_action :comment }
37
37
  it "should still generate a new empty action" do
38
- controller.public_instance_methods.should include("comment")
38
+ controller.public_instance_methods.collect(&:to_s).should include("comment")
39
39
  end
40
40
  end
41
41
  end
@@ -56,19 +56,19 @@ describe ActiveAdmin::ActionBuilder do
56
56
  end
57
57
  end
58
58
  it "should create a new public instance method" do
59
- controller.public_instance_methods.should include("comments")
59
+ controller.public_instance_methods.collect(&:to_s).should include("comments")
60
60
  end
61
61
  it "should add itself to the member actions config" do
62
62
  controller.active_admin_config.collection_actions.size.should == 1
63
63
  end
64
64
  it "should create a new named route" do
65
- Rails.application.routes.url_helpers.methods.should include("comments_admin_posts_path")
65
+ Rails.application.routes.url_helpers.methods.collect(&:to_s).should include("comments_admin_posts_path")
66
66
  end
67
67
  end
68
68
  context "without a block" do
69
69
  let(:action!){ controller.collection_action :comments }
70
70
  it "should still generate a new empty action" do
71
- controller.public_instance_methods.should include("comments")
71
+ controller.public_instance_methods.collect(&:to_s).should include("comments")
72
72
  end
73
73
  end
74
74
  end
@@ -23,7 +23,7 @@ describe "Registering an object to administer" do
23
23
  it "should generate a path to the dashboard" do
24
24
  ActiveAdmin.register Category, :namespace => :hello_world
25
25
  reload_routes!
26
- Rails.application.routes.url_helpers.methods.should include("hello_world_dashboard_path")
26
+ Rails.application.routes.url_helpers.methods.collect(&:to_s).should include("hello_world_dashboard_path")
27
27
  end
28
28
  end
29
29
 
@@ -39,7 +39,7 @@ describe "Registering an object to administer" do
39
39
  it "should generate a path to the dashboard" do
40
40
  ActiveAdmin.register Category, :namespace => false
41
41
  reload_routes!
42
- Rails.application.routes.url_helpers.methods.should include("dashboard_path")
42
+ Rails.application.routes.url_helpers.methods.collect(&:to_s).should include("dashboard_path")
43
43
  end
44
44
  end
45
45
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Greg Bell
@@ -14,11 +14,13 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-07 00:00:00 -07:00
17
+ date: 2010-09-15 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
+ name: rails
21
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
22
24
  requirements:
23
25
  - - ">="
24
26
  - !ruby/object:Gem::Version
@@ -27,12 +29,13 @@ dependencies:
27
29
  - 0
28
30
  - 0
29
31
  version: 3.0.0
30
- prerelease: false
31
32
  type: :runtime
32
- name: rails
33
+ prerelease: false
33
34
  version_requirements: *id001
34
35
  - !ruby/object:Gem::Dependency
36
+ name: formtastic
35
37
  requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
36
39
  requirements:
37
40
  - - ">="
38
41
  - !ruby/object:Gem::Version
@@ -42,12 +45,13 @@ dependencies:
42
45
  - 0
43
46
  - beta
44
47
  version: 1.1.0.beta
45
- prerelease: false
46
48
  type: :runtime
47
- name: formtastic
49
+ prerelease: false
48
50
  version_requirements: *id002
49
51
  - !ruby/object:Gem::Dependency
52
+ name: will_paginate
50
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
51
55
  requirements:
52
56
  - - ">="
53
57
  - !ruby/object:Gem::Version
@@ -56,12 +60,13 @@ dependencies:
56
60
  - 0
57
61
  - pre2
58
62
  version: 3.0.pre2
59
- prerelease: false
60
63
  type: :runtime
61
- name: will_paginate
64
+ prerelease: false
62
65
  version_requirements: *id003
63
66
  - !ruby/object:Gem::Dependency
67
+ name: meta_search
64
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
65
70
  requirements:
66
71
  - - ">="
67
72
  - !ruby/object:Gem::Version
@@ -70,21 +75,21 @@ dependencies:
70
75
  - 9
71
76
  - 2
72
77
  version: 0.9.2
73
- prerelease: false
74
78
  type: :runtime
75
- name: meta_search
79
+ prerelease: false
76
80
  version_requirements: *id004
77
81
  - !ruby/object:Gem::Dependency
82
+ name: inherited_views
78
83
  requirement: &id005 !ruby/object:Gem::Requirement
84
+ none: false
79
85
  requirements:
80
86
  - - ">="
81
87
  - !ruby/object:Gem::Version
82
88
  segments:
83
89
  - 0
84
90
  version: "0"
85
- prerelease: false
86
91
  type: :runtime
87
- name: inherited_views
92
+ prerelease: false
88
93
  version_requirements: *id005
89
94
  description: The administration framework for Ruby on Rails.
90
95
  email: gregdbell@gmail.com
@@ -98,11 +103,13 @@ extra_rdoc_files:
98
103
  files:
99
104
  - .document
100
105
  - .gitignore
106
+ - CHANGELOG.rdoc
101
107
  - Gemfile
102
108
  - LICENSE
103
109
  - README.rdoc
104
110
  - Rakefile
105
111
  - active_admin.gemspec
112
+ - activeadmin.gemspec
106
113
  - lib/active_admin.rb
107
114
  - lib/active_admin/action_builder.rb
108
115
  - lib/active_admin/action_items.rb
@@ -194,13 +201,16 @@ rdoc_options:
194
201
  require_paths:
195
202
  - lib
196
203
  required_ruby_version: !ruby/object:Gem::Requirement
204
+ none: false
197
205
  requirements:
198
206
  - - ">="
199
207
  - !ruby/object:Gem::Version
208
+ hash: -2461466702103168228
200
209
  segments:
201
210
  - 0
202
211
  version: "0"
203
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
+ none: false
204
214
  requirements:
205
215
  - - ">="
206
216
  - !ruby/object:Gem::Version
@@ -210,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
220
  requirements: []
211
221
 
212
222
  rubyforge_project:
213
- rubygems_version: 1.3.6
223
+ rubygems_version: 1.3.7
214
224
  signing_key:
215
225
  specification_version: 3
216
226
  summary: The administration framework for Ruby on Rails.