Permalink
Browse files

[#492] Update to Rails 3.2.x compatible

* Fix scenarios that were hard coded to specific version of BrowserCMS.
* Update documentation for new release.
* Add a error.xml handler (for when file_browser.xml.builder throws an error).
* Fix deprecation warnings for no longer specifying file format with renderers.
* Fix deprecation warnings for inherited/auto picked up layouts (for controllers like 'Dashboard' which specified their own)
* Fix deprecation warning for set_table_name
* Update Sprocket silencer (to match new syntax)
* Update rvmrc to use new r3.2 gemset
* Fix scenarios related to Rail 3.2 changes to rails script and specific version numbers.
* Move page caching tests from functional to cucumber scenarios.
* Introduce Cms::WebApi for common web operations for scenarios.
  • Loading branch information...
1 parent 0e2fc1b commit d74b1e4c6aec275af7c7e25bb5e0704eb88a9dab @peakpg peakpg committed Mar 26, 2012
Showing with 437 additions and 400 deletions.
  1. +1 −1 .rvmrc
  2. +80 −87 Gemfile.lock
  3. +1 −1 Rakefile
  4. +11 −9 app/controllers/cms/dashboard_controller.rb
  5. +52 −44 app/controllers/cms/section_nodes_controller.rb
  6. +4 −2 app/controllers/cms/sections_controller.rb
  7. +12 −10 app/controllers/cms/toolbar_controller.rb
  8. +1 −1 app/models/cms/abstract_file_block.rb
  9. +8 −0 app/views/cms/shared/error.xml.erb
  10. +1 −1 browsercms.gemspec
  11. 0 { → doc}/performance_tuning_notes.md
  12. +1 −1 features/commands/new_projects.feature
  13. +1 −1 features/commands/upgrading_modules.feature
  14. +14 −0 features/content_pages.feature
  15. +0 −1 features/manage_users.feature
  16. +22 −14 features/step_definitions/command_line_steps.rb
  17. +20 −1 features/step_definitions/content_pages_steps.rb
  18. +3 −4 features/step_definitions/manage_user_steps.rb
  19. +1 −1 features/step_definitions/web_steps.rb
  20. +13 −0 features/support/cms_api.rb
  21. +11 −0 features/support/page_caching_support.rb
  22. +1 −1 lib/cms/behaviors/dynamic_attributes.rb
  23. +1 −1 lib/cms/version.rb
  24. +12 −1 script/rails
  25. +17 −3 test/dummy/config/application.rb
  26. +2 −0 test/dummy/config/boot.rb
  27. +9 −3 test/dummy/config/environments/development.rb
  28. +10 −1 test/dummy/config/environments/production.rb
  29. +5 −13 test/dummy/config/environments/test.rb
  30. +5 −0 test/dummy/config/initializers/inflections.rb
  31. +9 −6 test/dummy/config/initializers/quiet_sprocket_assets.rb
  32. +1 −1 test/dummy/config/routes.rb
  33. +66 −66 test/dummy/db/schema.rb
  34. +24 −17 test/factories.rb
  35. +0 −19 test/functional/cms/content_controller_test.rb
  36. +0 −70 test/support/rails_3_1_routes_hack.rb
  37. +1 −6 test/test_helper.rb
  38. +1 −1 test/unit/behaviors/namespacing_test.rb
  39. +16 −12 todo_list.markdown
View
2 .rvmrc
@@ -1,2 +1,2 @@
-rvm use 1.9.3@r3.1
+rvm use 1.9.3@r3.2
View
@@ -1,163 +1,156 @@
PATH
remote: .
specs:
- browsercms (3.4.2)
+ browsercms (3.5.0.alpha)
ancestry (~> 1.2.4)
ckeditor_rails (~> 3.6.2.2)
jquery-rails (~> 1.0.14)
- rails (~> 3.1.0)
+ rails (~> 3.2.0)
term-ansicolor
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.3)
- actionpack (= 3.1.3)
- mail (~> 2.3.0)
- actionpack (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.5)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
rack-cache (~> 1.1)
- rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.3)
- activemodel (3.1.3)
- activesupport (= 3.1.3)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- arel (~> 2.2.1)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- activesupport (3.1.3)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
multi_json (~> 1.0)
- addressable (2.2.6)
+ addressable (2.2.7)
ancestry (1.2.5)
activerecord (>= 2.2.2)
- arel (2.2.3)
- aruba (0.4.6)
- bcat (>= 0.6.1)
- childprocess (>= 0.2.0)
- cucumber (>= 1.0.2)
- rdiscount (>= 1.6.8)
- rspec (>= 2.6.0)
- bcat (0.6.2)
- rack (~> 1.0)
- bluecloth (2.1.0)
+ arel (3.0.2)
+ aruba (0.4.11)
+ childprocess (>= 0.2.3)
+ cucumber (>= 1.1.1)
+ ffi (>= 1.0.11)
+ rspec (>= 2.7.0)
+ bluecloth (2.2.0)
builder (3.0.0)
- capybara (1.1.1)
+ capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.2.2)
+ childprocess (0.3.1)
ffi (~> 1.0.6)
ckeditor_rails (3.6.2.2)
railties (~> 3.0)
thor (~> 0.14)
- cucumber (1.1.0)
+ cucumber (1.1.9)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
- gherkin (~> 2.5.0)
+ gherkin (~> 2.9.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
- cucumber-rails (1.1.1)
- capybara (>= 1.1.1)
- cucumber (>= 1.1.0)
+ cucumber-rails (1.3.0)
+ capybara (>= 1.1.2)
+ cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
- daemons (1.1.5)
- database_cleaner (0.6.7)
+ daemons (1.1.8)
+ database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
railties (>= 3.0.0)
- ffi (1.0.9)
- gherkin (2.5.1)
+ ffi (1.0.11)
+ gherkin (2.9.3)
json (>= 1.4.6)
hike (1.2.1)
i18n (0.6.0)
- jquery-rails (1.0.14)
+ journey (1.0.3)
+ jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
- json (1.6.3)
- json_pure (1.6.1)
- launchy (2.0.5)
+ json (1.6.6)
+ launchy (2.1.0)
addressable (~> 2.2.6)
- mail (2.3.3)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.17.2)
+ mime-types (1.18)
mocha (0.9.8)
rake
- multi_json (1.0.4)
- mysql2 (0.3.10)
- nokogiri (1.5.0)
+ multi_json (1.2.0)
+ mysql2 (0.3.11)
+ nokogiri (1.5.2)
polyglot (0.3.3)
- rack (1.3.5)
- rack-cache (1.1)
+ rack (1.4.1)
+ rack-cache (1.2)
rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.3)
- actionmailer (= 3.1.3)
- actionpack (= 3.1.3)
- activerecord (= 3.1.3)
- activeresource (= 3.1.3)
- activesupport (= 3.1.3)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
bundler (~> 1.0)
- railties (= 3.1.3)
- railties (3.1.3)
- actionpack (= 3.1.3)
- activesupport (= 3.1.3)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
- rdiscount (1.6.8)
- rdoc (3.11)
+ rdoc (3.12)
json (~> 1.4)
- rspec (2.7.0)
- rspec-core (~> 2.7.0)
- rspec-expectations (~> 2.7.0)
- rspec-mocks (~> 2.7.0)
- rspec-core (2.7.1)
- rspec-expectations (2.7.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.7.0)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
ruby-prof (0.10.8)
- rubyzip (0.9.4)
- selenium-webdriver (2.8.0)
- childprocess (>= 0.2.1)
- ffi (>= 1.0.7)
- json_pure
+ rubyzip (0.9.6.1)
+ selenium-webdriver (2.20.0)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ multi_json (~> 1.0)
rubyzip
- sprockets (2.0.3)
+ sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.4)
+ sqlite3 (1.3.5)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
- term-ansicolor (1.0.6)
+ term-ansicolor (1.0.7)
test-unit (2.1.1)
thin (1.3.1)
daemons (>= 1.0.9)
@@ -171,7 +164,7 @@ GEM
tzinfo (0.3.33)
xpath (0.1.4)
nokogiri (~> 1.3)
- yard (0.7.2)
+ yard (0.7.5)
PLATFORMS
ruby
View
@@ -27,7 +27,7 @@ Rake::TestTask.new('test:units' => 'app:test:prepare') do |t|
t.verbose = false
end
-Rake::TestTask.new('test:functionals') do |t|
+Rake::TestTask.new('test:functionals' => 'app:test:prepare') do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/functional/**/*_test.rb'
@@ -1,12 +1,14 @@
module Cms
-class DashboardController < Cms::BaseController
-
- def index
- @unpublished_pages = Page.unpublished.all(:order => "updated_at desc")
- @unpublished_pages = @unpublished_pages.select { |page| current_user.able_to_publish?(page) }
- @incomplete_tasks = current_user.tasks.incomplete.all(
- :include => :page,
- :order => "#{Task.table_name}.due_date desc, #{Page.table_name}.name")
+ class DashboardController < Cms::BaseController
+
+ layout 'cms/dashboard'
+
+ def index
+ @unpublished_pages = Page.unpublished.all(:order => "updated_at desc")
+ @unpublished_pages = @unpublished_pages.select { |page| current_user.able_to_publish?(page) }
+ @incomplete_tasks = current_user.tasks.incomplete.all(
+ :include => :page,
+ :order => "#{Task.table_name}.due_date desc, #{Page.table_name}.name")
+ end
end
-end
end
@@ -1,47 +1,55 @@
module Cms
-class SectionNodesController < Cms::BaseController
- check_permissions :publish_content, :except => [:index]
-
- def index
- @toolbar_tab = :sitemap
- @modifiable_sections = current_user.modifiable_sections
- @public_sections = Group.guest.sections.all # Load once here so that every section doesn't need to.
-
- @sitemap = Section.sitemap
- @root_section_node = @sitemap.keys.first
- @section = @root_section_node.node
- end
- def move_before
- move(:before)
- end
- def move_after
- move(:after)
- end
- def move_to_beginning
- move_to(:beginning)
- end
- def move_to_end
- move_to(:end)
- end
- def move_to_root
- @section_node = SectionNode.find(params[:id])
- @root = Section.root.find(params[:section_id])
- @section_node.move_to(@root, 0)
- render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved to '#{@root.name}'"}
- end
-
- private
- def move(to)
- @section_node = SectionNode.find(params[:id])
- @other_node = SectionNode.find(params[:section_node_id])
- @section_node.send("move_#{to}", @other_node)
- render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved #{to} '#{@other_node.node.name}'"}
- end
- def move_to(place)
- @section_node = SectionNode.find(params[:id])
- @other_node = SectionNode.find(params[:section_node_id])
- @section_node.send("move_to_#{place}", @other_node.node)
- render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved to the #{place} of '#{@other_node.node.name}'"}
+ class SectionNodesController < Cms::BaseController
+
+ layout 'cms/section_nodes'
+ check_permissions :publish_content, :except => [:index]
+
+ def index
+ @toolbar_tab = :sitemap
+ @modifiable_sections = current_user.modifiable_sections
+ @public_sections = Group.guest.sections.all # Load once here so that every section doesn't need to.
+
+ @sitemap = Section.sitemap
+ @root_section_node = @sitemap.keys.first
+ @section = @root_section_node.node
+ end
+
+ def move_before
+ move(:before)
+ end
+
+ def move_after
+ move(:after)
+ end
+
+ def move_to_beginning
+ move_to(:beginning)
+ end
+
+ def move_to_end
+ move_to(:end)
+ end
+
+ def move_to_root
+ @section_node = SectionNode.find(params[:id])
+ @root = Section.root.find(params[:section_id])
+ @section_node.move_to(@root, 0)
+ render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved to '#{@root.name}'"}
+ end
+
+ private
+ def move(to)
+ @section_node = SectionNode.find(params[:id])
+ @other_node = SectionNode.find(params[:section_node_id])
+ @section_node.send("move_#{to}", @other_node)
+ render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved #{to} '#{@other_node.node.name}'"}
+ end
+
+ def move_to(place)
+ @section_node = SectionNode.find(params[:id])
+ @other_node = SectionNode.find(params[:section_node_id])
+ @section_node.send("move_to_#{place}", @other_node.node)
+ render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved to the #{place} of '#{@other_node.node.name}'"}
+ end
end
end
-end
Oops, something went wrong.

0 comments on commit d74b1e4

Please sign in to comment.