cms-fortress 1.2.2 → 1.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/.gitignore +66 -0
  2. data/Gemfile +2 -17
  3. data/Gemfile.lock +80 -90
  4. data/README.rdoc +11 -0
  5. data/Rakefile +9 -39
  6. data/app/controllers/cms/fortress/admin_controller.rb +5 -0
  7. data/app/controllers/cms/fortress/roles_controller.rb +11 -21
  8. data/app/controllers/cms/fortress/users_controller.rb +48 -31
  9. data/app/helpers/cms/fortress/application_helper.rb +37 -5
  10. data/app/helpers/comfy/admin/cms/pages_helper.rb +22 -0
  11. data/app/models/cms/fortress/error.rb +17 -0
  12. data/app/models/cms/fortress/role.rb +2 -1
  13. data/app/models/cms/fortress/settings.rb +17 -0
  14. data/app/models/cms/fortress/user.rb +17 -0
  15. data/app/models/cms_ability.rb +29 -22
  16. data/app/views/cms/fortress/admin/dashboard.html.haml +12 -0
  17. data/app/views/cms/fortress/shared/_dashboard_widget.html.haml +29 -0
  18. data/app/views/cms/fortress/shared/_menu.html.haml +26 -26
  19. data/app/views/cms/fortress/shared/_navbar.html.haml +1 -1
  20. data/app/views/cms/fortress/shared/_page_extend.html.haml +3 -5
  21. data/app/views/cms/fortress/shared/_page_extend_js.html.haml +2 -14
  22. data/app/views/cms/fortress/themes/wide/_body.html.haml +9 -8
  23. data/app/views/cms/fortress/themes/wide/_menu.html.haml +70 -37
  24. data/app/views/cms/fortress/users/_form.html.haml +6 -1
  25. data/app/views/cms/fortress/users/edit.html.haml +1 -2
  26. data/app/views/cms/fortress/users/index.html.haml +14 -5
  27. data/app/views/cms/fortress/users/new.html.haml +1 -2
  28. data/app/views/comfy/admin/cms/pages/_form.html.haml +10 -4
  29. data/app/views/comfy/admin/cms/pages/edit.html.haml +25 -0
  30. data/app/views/layouts/comfy/admin/cms/_head.html.haml +1 -1
  31. data/app/views/layouts/comfy/admin/cms/_left.html.haml +15 -12
  32. data/bin/bundle +3 -0
  33. data/bin/rails +4 -0
  34. data/bin/rake +4 -0
  35. data/cms-fortress.gemspec +32 -171
  36. data/config.ru +4 -0
  37. data/config/application.rb +34 -0
  38. data/config/boot.rb +5 -0
  39. data/config/cms/fortress/global_settings.yml +12 -0
  40. data/config/cms_routes.rb +7 -0
  41. data/config/database.yml +11 -0
  42. data/config/environment.rb +5 -0
  43. data/config/environments/development.rb +29 -0
  44. data/config/environments/test.rb +36 -0
  45. data/config/initializers/devise.rb +256 -0
  46. data/config/initializers/secret_token.rb +14 -0
  47. data/config/locales/de.yml +28 -1
  48. data/config/locales/devise.en.yml +59 -0
  49. data/config/locales/en.yml +37 -1
  50. data/config/roles.yml +1 -0
  51. data/config/secrets.yml +14 -0
  52. data/db/migrate/06_add_type_to_users.rb +11 -0
  53. data/db/migrate/07_integrate_workflow_into_cms_pages.rb +37 -0
  54. data/db/schema.rb +182 -0
  55. data/lib/assets/.keep +0 -0
  56. data/lib/cms-fortress.rb +10 -1
  57. data/lib/cms/fortress/application_controller_methods.rb +5 -2
  58. data/lib/cms/fortress/page_methods.rb +52 -2
  59. data/lib/cms/fortress/pages_controller_methods.rb +17 -0
  60. data/lib/cms/fortress/rails/engine.rb +12 -3
  61. data/lib/cms/fortress/routes/admin.rb +9 -1
  62. data/lib/cms/fortress/site_methods.rb +29 -0
  63. data/lib/cms/fortress/sites_controller_methods.rb +22 -0
  64. data/lib/generators/cms/comfy/comfy_generator.rb +18 -0
  65. data/lib/generators/cms/fortress/fortress_generator.rb +30 -6
  66. data/lib/generators/cms/fortress/upgrade/USAGE +8 -0
  67. data/lib/generators/cms/fortress/upgrade/upgrade_generator.rb +24 -0
  68. data/lib/tasks/.keep +0 -0
  69. data/test/{functional → controllers}/cms/fortress/roles_controller_test.rb +9 -4
  70. data/test/{functional → controllers}/cms/fortress/users_controller_test.rb +10 -11
  71. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +115 -0
  72. data/test/fixtures/cms/fortress/role_details.yml +89 -8
  73. data/test/fixtures/cms/fortress/roles.yml +17 -0
  74. data/test/fixtures/cms/fortress/users.yml +14 -0
  75. data/test/fixtures/comfy/cms/blocks.yml +12 -0
  76. data/test/fixtures/comfy/cms/categories.yml +4 -0
  77. data/test/fixtures/comfy/cms/categorizations.yml +3 -0
  78. data/test/fixtures/comfy/cms/files.yml +9 -0
  79. data/test/fixtures/comfy/cms/layouts.yml +40 -0
  80. data/test/fixtures/comfy/cms/pages.yml +105 -0
  81. data/test/fixtures/comfy/cms/revisions.yml +21 -0
  82. data/test/fixtures/comfy/cms/sites.yml +6 -0
  83. data/test/fixtures/comfy/cms/snippets.yml +6 -0
  84. data/test/integration/cms/fortress/users_controller_test.rb +16 -0
  85. data/test/models/comfy/cms/page_test.rb +84 -0
  86. data/test/models/comfy/cms/settings_test.rb +16 -0
  87. data/test/test_helper.rb +25 -0
  88. metadata +157 -23
  89. data/app/models/cms/page_workflow.rb +0 -44
  90. data/app/models/error/missing_role_configuration_file.rb +0 -12
  91. data/lib/generators/comfy/cms/cms_generator.rb +0 -60
  92. data/test/fixtures/cms/page_workflows.yml +0 -11
  93. data/test/helper.rb +0 -18
  94. data/test/test_cms-fortress.rb +0 -7
  95. data/test/unit/cms/fortress/role_detail_test.rb +0 -7
  96. data/test/unit/cms/fortress/role_test.rb +0 -7
  97. data/test/unit/cms/fortress/role_user_test.rb +0 -7
  98. data/test/unit/helpers/cms/fortress/roles_helper_test.rb +0 -4
  99. data/test/unit/helpers/cms/fortress/users_helper_test.rb +0 -4
@@ -1,11 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
-
3
- one:
4
- cms_page_id: 1
5
- status_id: 1
6
- published_date: 2013-12-07 11:59:36
7
-
8
- two:
9
- cms_page_id: 1
10
- status_id: 1
11
- published_date: 2013-12-07 11:59:36
data/test/helper.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'cms-fortress'
16
-
17
- class Test::Unit::TestCase
18
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestCmsFortress < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Cms::Fortress::RoleDetailTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Cms::Fortress::RoleTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Cms::Fortress::RoleUserTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Cms::Fortress::RolesHelperTest < ActionView::TestCase
4
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Cms::Fortress::UsersHelperTest < ActionView::TestCase
4
- end