activeadmin 0.2.1 → 0.2.2
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.
- data/CHANGELOG.rdoc +60 -11
- data/Gemfile +7 -3
- data/README.rdoc +118 -8
- data/Rakefile +5 -1
- data/activeadmin.gemspec +20 -13
- data/cucumber.yml +1 -0
- data/features/comments/commenting.feature +5 -1
- data/features/dashboard.feature +26 -0
- data/features/menu.feature +26 -0
- data/features/step_definitions/dashboard_steps.rb +11 -0
- data/features/step_definitions/menu_steps.rb +7 -0
- data/features/sti_resource.feature +49 -0
- data/lib/active_admin.rb +20 -13
- data/lib/active_admin/arbre/tag.rb +10 -2
- data/lib/active_admin/comments.rb +15 -0
- data/lib/active_admin/form_builder.rb +1 -1
- data/lib/active_admin/resource.rb +9 -4
- data/lib/active_admin/resource_controller.rb +4 -4
- data/lib/active_admin/resource_controller/collection.rb +3 -2
- data/lib/active_admin/stylesheets/active_admin.scss +9 -2
- data/lib/active_admin/stylesheets/active_admin/_forms.scss +2 -2
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_helpers/filter_form_helper.rb +1 -1
- data/lib/active_admin/views/components/table_for.rb +1 -1
- data/lib/active_admin/views/index_as_table.rb +3 -3
- data/lib/active_admin/views/pages/base.rb +8 -1
- data/lib/active_admin/views/pages/dashboard.rb +0 -2
- data/lib/active_admin/views/pages/index.rb +3 -1
- data/lib/active_admin/views/templates/active_admin/devise/sessions/new.html.erb +1 -1
- data/lib/active_admin/views/templates/layouts/active_admin_logged_out.html.erb +1 -1
- data/lib/generators/active_admin/devise/devise_generator.rb +7 -3
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +7 -6
- data/lib/generators/active_admin/install/templates/dashboards.rb +4 -3
- data/spec/{integration → controllers}/index_as_csv_spec.rb +8 -13
- data/spec/integration/belongs_to_spec.rb +1 -1
- data/spec/spec_helper.rb +10 -4
- data/spec/support/integration_example_group.rb +0 -4
- data/spec/support/rails_template.rb +2 -1
- data/spec/unit/action_builder_spec.rb +1 -1
- data/spec/unit/action_items_spec.rb +1 -1
- data/spec/unit/active_admin_spec.rb +19 -6
- data/spec/unit/arbre/html_spec.rb +26 -1
- data/spec/unit/asset_registration_spec.rb +1 -1
- data/spec/unit/belongs_to_spec.rb +1 -1
- data/spec/unit/breadcrumbs_spec.rb +1 -1
- data/spec/unit/comments_spec.rb +1 -1
- data/spec/unit/controller_filters_spec.rb +1 -1
- data/spec/unit/dashboard_controller_spec.rb +1 -1
- data/spec/unit/dashboard_section_spec.rb +1 -1
- data/spec/unit/dashboards_spec.rb +1 -1
- data/spec/unit/filter_form_builder_spec.rb +1 -1
- data/spec/unit/form_builder_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_spec.rb +1 -1
- data/spec/unit/registration_spec.rb +1 -1
- data/spec/unit/renderer_spec.rb +1 -1
- data/spec/unit/resource_controller/collection_spec.rb +34 -0
- data/spec/unit/resource_controller_spec.rb +1 -1
- data/spec/unit/resource_spec.rb +23 -2
- data/spec/unit/routing_spec.rb +1 -1
- data/spec/unit/tabs_renderer_spec.rb +1 -1
- metadata +36 -13
- data/spec/integration/dashboard_spec.rb +0 -44
- data/spec/integration/index_as_table_spec.rb +0 -41
- data/spec/integration/layout_spec.rb +0 -48
data/CHANGELOG.rdoc
CHANGED
@@ -1,26 +1,75 @@
|
|
1
|
+
== 0.2.2 (2011-05-26)
|
2
|
+
|
3
|
+
68 Commits by 13 Contributors
|
4
|
+
|
5
|
+
=== Features & Enhancements
|
6
|
+
|
7
|
+
* Arbre includes self closing tags (#100)
|
8
|
+
* Controller class & action added to body as CSS classes (#99)
|
9
|
+
* HAML is not required by default (#92)
|
10
|
+
* Devise login now respects Devise.authentication_keys (#69)
|
11
|
+
* Active Admin no longer uses <tt>ActiveRecord::Base#search</tt> (#28)
|
12
|
+
* Resource's can now override the label in the menu (#48)
|
13
|
+
* Subdirectories are now loaded in the Active Admin load path
|
14
|
+
|
15
|
+
=== Bug Fixes
|
16
|
+
|
17
|
+
* Sort order now includes table name (#38)
|
18
|
+
* Fixed table_for 'odd', 'even' row classes (#96)
|
19
|
+
* Fixed Devise installation if AdminUser already exists (#95)
|
20
|
+
* Fixed issues when ActiveAdmin.default_namespaces is false (#32)
|
21
|
+
* Added styles for missing HTML 5 inputs (#31)
|
22
|
+
* Fixed issue if adding empty Active Admin Comment (#21)
|
23
|
+
* Fixed layout issues in FF 4 (#22)
|
24
|
+
* Use Sass::Plugin.options[:css_location] instead of Rails.root (#55)
|
25
|
+
|
26
|
+
=== Test Suite
|
27
|
+
|
28
|
+
* Update RSpec to latest & fix specs (Thanks Ben Marini & Jeremt Ruppel!) (#100)
|
29
|
+
* Added tests for STI models (#52)
|
30
|
+
|
31
|
+
=== Contributors
|
32
|
+
|
33
|
+
* Ben Marini
|
34
|
+
* Bookis Smuin
|
35
|
+
* Caley Woods
|
36
|
+
* Doug Puchalski
|
37
|
+
* Federico Romero
|
38
|
+
* Greg Bell
|
39
|
+
* Ian MacLeod
|
40
|
+
* Jeremy Ruppel
|
41
|
+
* Jordan Sitkin
|
42
|
+
* Juha Suuraho
|
43
|
+
* Mathieu Martin
|
44
|
+
* Paul Annesley
|
45
|
+
* Philippe Creux
|
46
|
+
|
1
47
|
== 0.2.1 (2011-05-12)
|
2
48
|
|
3
|
-
|
4
|
-
|
49
|
+
=== Bug Fixes
|
50
|
+
* Fixed issue with dashboard rendering a sidebar
|
5
51
|
|
6
52
|
== 0.2.0 (2011-05-12)
|
7
53
|
|
8
54
|
0.2.0 is essentially an entire re-write of Active Admin. Here are some
|
9
55
|
of the highlights. 250 commits. Enough said.
|
10
56
|
|
11
|
-
|
12
|
-
* Full visual redesign
|
13
|
-
* Integrated Devise for authentication
|
14
|
-
* Brand new view and component layer called Arbre (Project coming soon)
|
15
|
-
* Added ActiveAdmin::Comments
|
57
|
+
=== Features & Enhancements
|
16
58
|
|
17
|
-
*
|
18
|
-
|
59
|
+
* Full visual redesign
|
60
|
+
* Integrated Devise for authentication
|
61
|
+
* Brand new view and component layer called Arbre (Project coming soon)
|
62
|
+
* Added ActiveAdmin::Comments
|
63
|
+
|
64
|
+
=== Bug Fixes
|
65
|
+
|
66
|
+
* Too many to list! Been in production for close to a year
|
19
67
|
|
20
68
|
== 0.1.1 (2010-09-15)
|
21
69
|
|
22
|
-
|
23
|
-
|
70
|
+
=== Bug Fixes
|
71
|
+
|
72
|
+
* Fixed issues running on Ruby 1.9.2
|
24
73
|
|
25
74
|
== 0.1.0
|
26
75
|
|
data/Gemfile
CHANGED
@@ -17,6 +17,8 @@ when "3.0.5"
|
|
17
17
|
gem 'rails', '= 3.0.5'
|
18
18
|
when "3.0.6"
|
19
19
|
gem 'rails', '= 3.0.6'
|
20
|
+
when "3.0.7"
|
21
|
+
gem 'rails', '= 3.0.7'
|
20
22
|
else
|
21
23
|
# Default gems for in the gemspec
|
22
24
|
gem 'rails', '>= 3.0.0'
|
@@ -27,16 +29,18 @@ gem 'devise', '>= 1.1.2'
|
|
27
29
|
gem 'formtastic', '>= 1.1.0'
|
28
30
|
gem 'will_paginate', '>= 3.0.pre2'
|
29
31
|
gem 'inherited_views'
|
30
|
-
gem '
|
32
|
+
gem 'sass', '>= 3.1.0'
|
31
33
|
|
32
34
|
group :development, :test do
|
33
35
|
gem 'sqlite3-ruby', :require => 'sqlite3'
|
34
36
|
gem 'jeweler', '1.5.2'
|
37
|
+
gem 'rake', '0.8.7', :require => false
|
38
|
+
gem 'haml', '~> 3.1.1', :require => false
|
35
39
|
end
|
36
40
|
|
37
41
|
group :test do
|
38
|
-
gem 'rspec', '2.
|
39
|
-
gem 'rspec-rails', '2.
|
42
|
+
gem 'rspec', '~> 2.6.0'
|
43
|
+
gem 'rspec-rails', '~> 2.6.0'
|
40
44
|
gem 'capybara', '0.3.9'
|
41
45
|
gem 'cucumber', '0.9.2'
|
42
46
|
gem 'cucumber-rails', '0.3.2'
|
data/README.rdoc
CHANGED
@@ -96,6 +96,42 @@ it is set to the name of your Rails.application class name.
|
|
96
96
|
# config/initializers/active_admin.rb
|
97
97
|
config.site_title = "My Admin Site"
|
98
98
|
|
99
|
+
== Customize The Resource
|
100
|
+
|
101
|
+
=== Rename the Resource
|
102
|
+
|
103
|
+
By default, any references to the resource (menu, routes, buttons, etc) in the
|
104
|
+
interface will use the name of the class. You can rename the resource by using
|
105
|
+
the <tt>:as</tt> option.
|
106
|
+
|
107
|
+
ActiveAdmin.register Post, :as => "Article"
|
108
|
+
|
109
|
+
The resource will then be available as /admin/articles
|
110
|
+
|
111
|
+
=== Customize the Navigation
|
112
|
+
|
113
|
+
The resource will be displayed in the global navigation by default.
|
114
|
+
|
115
|
+
To disable the resource from being displayed in the global navigation:
|
116
|
+
|
117
|
+
ActiveAdmin.register Post do
|
118
|
+
menu false
|
119
|
+
end
|
120
|
+
|
121
|
+
To change the name of the label in the menu:
|
122
|
+
|
123
|
+
ActiveAdmin.register Post do
|
124
|
+
menu :label => "My Posts"
|
125
|
+
end
|
126
|
+
|
127
|
+
To add the menu as a child of another menu:
|
128
|
+
|
129
|
+
ActiveAdmin.register Post do
|
130
|
+
menu :parent => "Blog"
|
131
|
+
end
|
132
|
+
|
133
|
+
This will create the menu item if it doesn't exist yet.
|
134
|
+
|
99
135
|
== Customizing the Index Page
|
100
136
|
|
101
137
|
Filtering and listing resources is one of the most important tasks for
|
@@ -221,10 +257,39 @@ resource.
|
|
221
257
|
end
|
222
258
|
end
|
223
259
|
|
224
|
-
|
225
260
|
=== Index Filters
|
226
261
|
|
227
|
-
|
262
|
+
By default the index screen includes a "Filters" sidebar on the right hand side
|
263
|
+
with a filter for each attribute of the registered model. You can customize the
|
264
|
+
filters that are displayed as well as the type of widgets they use.
|
265
|
+
|
266
|
+
To dislay a filter for an attribute, use the filter method
|
267
|
+
|
268
|
+
ActiveAdmin.register Post do
|
269
|
+
filter :title
|
270
|
+
end
|
271
|
+
|
272
|
+
Out of the box, Active Admin supports the following filter types:
|
273
|
+
|
274
|
+
* *:string* - A search field
|
275
|
+
* *:date_range* - A start and end date field with calendar inputs
|
276
|
+
* *:numeric* - A drop down for selecting "Equal To", "Greater Than" or "Less
|
277
|
+
Than" and an input for a value.
|
278
|
+
* *:select* - A drop down which filters based on a selected item in a collection
|
279
|
+
or all.
|
280
|
+
* *:check_boxes* - A list of check boxes users can turn on and off to filter
|
281
|
+
|
282
|
+
By default, Active Admin will pick the most relevant filter based on the
|
283
|
+
attribute type. You can force the type by passing the :as option.
|
284
|
+
|
285
|
+
filter :author, :as => :check_boxes
|
286
|
+
|
287
|
+
The :check_boxes and :select types accept options for the collection. By default
|
288
|
+
it attempts to create a collection based on an association. But you can pass in
|
289
|
+
the collection as a proc to be called at render time.
|
290
|
+
|
291
|
+
# Will call available
|
292
|
+
filter :author, :as => :check_boxes, :collection => proc { Author.all }
|
228
293
|
|
229
294
|
== Customizing the Form
|
230
295
|
|
@@ -253,18 +318,63 @@ http://github.com/justinfrench/formtastic
|
|
253
318
|
|
254
319
|
== Customizing the Show Screen
|
255
320
|
|
256
|
-
|
321
|
+
Customizing the show screen is as simple as implementing the show block:
|
322
|
+
|
323
|
+
ActiveAdmin.register Post do
|
324
|
+
show do
|
325
|
+
h3 post.title
|
326
|
+
div do
|
327
|
+
simple_format post.body
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
The show block is rendered within the context of the view and uses the Arbre HTML DSL. You
|
333
|
+
can also render a partial at any point.
|
334
|
+
|
335
|
+
ActiveAdmin.register Post do
|
336
|
+
show do
|
337
|
+
# renders app/views/admin/posts/_some_partial.html.erb
|
338
|
+
render "some_partial"
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
257
342
|
|
258
343
|
== Sidebar Sections
|
259
344
|
|
260
|
-
|
345
|
+
To add a sidebar section to all the screen within a section, use the sidebar method:
|
261
346
|
|
262
|
-
|
347
|
+
sidebar :help do
|
348
|
+
"Need help? Email us at help@example.com"
|
349
|
+
end
|
263
350
|
|
264
|
-
|
351
|
+
This will generate a sidebar section on each screen of the resource. With the block as
|
352
|
+
the contents of the section. The first argument is the section title.
|
265
353
|
|
266
|
-
|
354
|
+
You can also use Arbre syntax to define the content.
|
267
355
|
|
356
|
+
sidebar :help do
|
357
|
+
ul do
|
358
|
+
li "Second List First Item"
|
359
|
+
li "Second List Second Item"
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
Sidebar sections can be rendered on a specific action by using the :only or :except
|
364
|
+
options.
|
365
|
+
|
366
|
+
sidebar :help, :only => :index do
|
367
|
+
"Need help? Email us at help@example.com"
|
368
|
+
end
|
369
|
+
|
370
|
+
If you only pass a symbol, Active Admin will attempt to locate a partial to render.
|
371
|
+
|
372
|
+
# Will render app/views/admin/posts/_help_sidebar.html.erb
|
373
|
+
sidebar :help
|
374
|
+
|
375
|
+
Or you can pass your own custom partial to render.
|
376
|
+
|
377
|
+
sidebar :help, :partial => "custom_help_partial"
|
268
378
|
|
269
379
|
== Tools Being Used
|
270
380
|
|
@@ -301,7 +411,7 @@ Iconic Icons::
|
|
301
411
|
We are using the awesome Github issues!
|
302
412
|
|
303
413
|
== Note on Patches/Pull Requests
|
304
|
-
|
414
|
+
|
305
415
|
* Fork the project.
|
306
416
|
* Make your feature addition or bug fix on a new topic branch
|
307
417
|
* Add specs and cukes for it. This is important so I don't break it in a
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
desc "Install all supported versions of rails"
|
13
13
|
task :install_all_rails do
|
14
|
-
(0..
|
14
|
+
(0..7).to_a.each do |v|
|
15
15
|
system "rm Gemfile.lock"
|
16
16
|
puts "Installing for RAILS=3.0.#{v}"
|
17
17
|
cmd "RAILS=3.0.#{v} bundle install"
|
@@ -71,6 +71,10 @@ namespace :cucumber do
|
|
71
71
|
Cucumber::Rake::Task.new(:all) do |t|
|
72
72
|
t.profile = 'default'
|
73
73
|
end
|
74
|
+
|
75
|
+
Cucumber::Rake::Task.new(:wip) do |t|
|
76
|
+
t.profile = 'wip'
|
77
|
+
end
|
74
78
|
end
|
75
79
|
|
76
80
|
task :cucumber => "cucumber:all"
|
data/activeadmin.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{activeadmin}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Greg Bell"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-27}
|
13
13
|
s.description = %q{The administration framework for Ruby on Rails.}
|
14
14
|
s.email = %q{gregdbell@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"cucumber.yml",
|
28
28
|
"features/comments/commenting.feature",
|
29
29
|
"features/comments/viewing_index.feature",
|
30
|
+
"features/dashboard.feature",
|
30
31
|
"features/edit_page.feature",
|
31
32
|
"features/first_boot.feature",
|
32
33
|
"features/global_navigation.feature",
|
@@ -37,6 +38,7 @@ Gem::Specification.new do |s|
|
|
37
38
|
"features/index/index_as_table.feature",
|
38
39
|
"features/index/index_scopes.feature",
|
39
40
|
"features/index/pagination.feature",
|
41
|
+
"features/menu.feature",
|
40
42
|
"features/new_page.feature",
|
41
43
|
"features/registering_assets.feature",
|
42
44
|
"features/registering_resources.feature",
|
@@ -50,15 +52,18 @@ Gem::Specification.new do |s|
|
|
50
52
|
"features/step_definitions/attribute_steps.rb",
|
51
53
|
"features/step_definitions/comment_steps.rb",
|
52
54
|
"features/step_definitions/configuration_steps.rb",
|
55
|
+
"features/step_definitions/dashboard_steps.rb",
|
53
56
|
"features/step_definitions/factory_steps.rb",
|
54
57
|
"features/step_definitions/flash_steps.rb",
|
55
58
|
"features/step_definitions/format_steps.rb",
|
56
59
|
"features/step_definitions/index_scope_steps.rb",
|
60
|
+
"features/step_definitions/menu_steps.rb",
|
57
61
|
"features/step_definitions/pagination_steps.rb",
|
58
62
|
"features/step_definitions/sidebar_steps.rb",
|
59
63
|
"features/step_definitions/tab_steps.rb",
|
60
64
|
"features/step_definitions/user_steps.rb",
|
61
65
|
"features/step_definitions/web_steps.rb",
|
66
|
+
"features/sti_resource.feature",
|
62
67
|
"features/support/env.rb",
|
63
68
|
"features/support/paths.rb",
|
64
69
|
"features/users/logging_in.feature",
|
@@ -206,11 +211,8 @@ Gem::Specification.new do |s|
|
|
206
211
|
"lib/generators/active_admin/install/templates/migrations/2_move_admin_notes_to_comments.rb",
|
207
212
|
"lib/generators/active_admin/resource/resource_generator.rb",
|
208
213
|
"lib/generators/active_admin/resource/templates/admin.rb",
|
214
|
+
"spec/controllers/index_as_csv_spec.rb",
|
209
215
|
"spec/integration/belongs_to_spec.rb",
|
210
|
-
"spec/integration/dashboard_spec.rb",
|
211
|
-
"spec/integration/index_as_csv_spec.rb",
|
212
|
-
"spec/integration/index_as_table_spec.rb",
|
213
|
-
"spec/integration/layout_spec.rb",
|
214
216
|
"spec/spec_helper.rb",
|
215
217
|
"spec/support/integration_example_group.rb",
|
216
218
|
"spec/support/rails_template.rb",
|
@@ -250,6 +252,7 @@ Gem::Specification.new do |s|
|
|
250
252
|
"spec/unit/pretty_format_spec.rb",
|
251
253
|
"spec/unit/registration_spec.rb",
|
252
254
|
"spec/unit/renderer_spec.rb",
|
255
|
+
"spec/unit/resource_controller/collection_spec.rb",
|
253
256
|
"spec/unit/resource_controller_spec.rb",
|
254
257
|
"spec/unit/resource_spec.rb",
|
255
258
|
"spec/unit/routing_spec.rb",
|
@@ -262,11 +265,8 @@ Gem::Specification.new do |s|
|
|
262
265
|
s.rubygems_version = %q{1.7.2}
|
263
266
|
s.summary = %q{The administration framework for Ruby on Rails.}
|
264
267
|
s.test_files = [
|
268
|
+
"spec/controllers/index_as_csv_spec.rb",
|
265
269
|
"spec/integration/belongs_to_spec.rb",
|
266
|
-
"spec/integration/dashboard_spec.rb",
|
267
|
-
"spec/integration/index_as_csv_spec.rb",
|
268
|
-
"spec/integration/index_as_table_spec.rb",
|
269
|
-
"spec/integration/layout_spec.rb",
|
270
270
|
"spec/spec_helper.rb",
|
271
271
|
"spec/support/integration_example_group.rb",
|
272
272
|
"spec/support/rails_template.rb",
|
@@ -306,6 +306,7 @@ Gem::Specification.new do |s|
|
|
306
306
|
"spec/unit/pretty_format_spec.rb",
|
307
307
|
"spec/unit/registration_spec.rb",
|
308
308
|
"spec/unit/renderer_spec.rb",
|
309
|
+
"spec/unit/resource_controller/collection_spec.rb",
|
309
310
|
"spec/unit/resource_controller_spec.rb",
|
310
311
|
"spec/unit/resource_spec.rb",
|
311
312
|
"spec/unit/routing_spec.rb",
|
@@ -324,9 +325,11 @@ Gem::Specification.new do |s|
|
|
324
325
|
s.add_runtime_dependency(%q<formtastic>, [">= 1.1.0"])
|
325
326
|
s.add_runtime_dependency(%q<will_paginate>, [">= 3.0.pre2"])
|
326
327
|
s.add_runtime_dependency(%q<inherited_views>, [">= 0"])
|
327
|
-
s.add_runtime_dependency(%q<
|
328
|
+
s.add_runtime_dependency(%q<sass>, [">= 3.1.0"])
|
328
329
|
s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
|
329
330
|
s.add_development_dependency(%q<jeweler>, ["= 1.5.2"])
|
331
|
+
s.add_development_dependency(%q<rake>, ["= 0.8.7"])
|
332
|
+
s.add_development_dependency(%q<haml>, ["~> 3.1.1"])
|
330
333
|
else
|
331
334
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
332
335
|
s.add_dependency(%q<meta_search>, [">= 0.9.2"])
|
@@ -334,9 +337,11 @@ Gem::Specification.new do |s|
|
|
334
337
|
s.add_dependency(%q<formtastic>, [">= 1.1.0"])
|
335
338
|
s.add_dependency(%q<will_paginate>, [">= 3.0.pre2"])
|
336
339
|
s.add_dependency(%q<inherited_views>, [">= 0"])
|
337
|
-
s.add_dependency(%q<
|
340
|
+
s.add_dependency(%q<sass>, [">= 3.1.0"])
|
338
341
|
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
339
342
|
s.add_dependency(%q<jeweler>, ["= 1.5.2"])
|
343
|
+
s.add_dependency(%q<rake>, ["= 0.8.7"])
|
344
|
+
s.add_dependency(%q<haml>, ["~> 3.1.1"])
|
340
345
|
end
|
341
346
|
else
|
342
347
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
@@ -345,9 +350,11 @@ Gem::Specification.new do |s|
|
|
345
350
|
s.add_dependency(%q<formtastic>, [">= 1.1.0"])
|
346
351
|
s.add_dependency(%q<will_paginate>, [">= 3.0.pre2"])
|
347
352
|
s.add_dependency(%q<inherited_views>, [">= 0"])
|
348
|
-
s.add_dependency(%q<
|
353
|
+
s.add_dependency(%q<sass>, [">= 3.1.0"])
|
349
354
|
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
350
355
|
s.add_dependency(%q<jeweler>, ["= 1.5.2"])
|
356
|
+
s.add_dependency(%q<rake>, ["= 0.8.7"])
|
357
|
+
s.add_dependency(%q<haml>, ["~> 3.1.1"])
|
351
358
|
end
|
352
359
|
end
|
353
360
|
|
data/cucumber.yml
CHANGED
@@ -73,9 +73,13 @@ Feature: Commenting
|
|
73
73
|
Then I should see a flash with "Comment was successfully created"
|
74
74
|
And I should be in the resource section for articles
|
75
75
|
|
76
|
+
Scenario: Create an empty comment
|
77
|
+
When I add a comment ""
|
78
|
+
Then I should see a flash with "Comment wasn't saved, text was empty."
|
79
|
+
And I should see "Comments (0)"
|
80
|
+
|
76
81
|
Scenario: Viewing all commments for a namespace
|
77
82
|
When I add a comment "Hello from Comment"
|
78
83
|
When I am on the index page for comments
|
79
84
|
Then I should see a table header for "Body"
|
80
85
|
And I should see "Hello from Comment"
|
81
|
-
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Feature: Dashboard
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am logged in
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: With no configuration
|
8
|
+
Given a configuration of:
|
9
|
+
"""
|
10
|
+
"""
|
11
|
+
When I go to the dashboard
|
12
|
+
Then I should see the default welcome message
|
13
|
+
|
14
|
+
Scenario: Displaying a dashboard widget
|
15
|
+
Given a configuration of:
|
16
|
+
"""
|
17
|
+
ActiveAdmin::Dashboards.build do
|
18
|
+
section 'Hello World' do
|
19
|
+
para "Hello world from the content"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
"""
|
23
|
+
When I go to the dashboard
|
24
|
+
Then I should not see the default welcome message
|
25
|
+
And I should see a dashboard widget "Hello World"
|
26
|
+
And I should see "Hello world from the content"
|