trusty-cms 2.0.2.pre.beta → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +2 -0
  3. data/CONTRIBUTORS.md +3 -1
  4. data/Gemfile +6 -1
  5. data/Gemfile.lock +100 -80
  6. data/INSTALL.md +7 -6
  7. data/README.md +3 -1
  8. data/Rakefile +24 -4
  9. data/app/assets/javascripts/admin/jquery-ui.js +3787 -2339
  10. data/app/assets/javascripts/admin/page-edit.js +3 -3
  11. data/app/assets/javascripts/admin/tabcontrol.js.erb +16 -16
  12. data/app/assets/javascripts/admin/treetable.js +4 -2
  13. data/app/assets/stylesheets/admin/_base.scss +4 -4
  14. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  15. data/app/assets/stylesheets/admin/partials/_content.scss +9 -2
  16. data/app/assets/stylesheets/admin/partials/_forms.scss +97 -29
  17. data/app/assets/stylesheets/admin/partials/_header.scss +2 -3
  18. data/app/assets/stylesheets/admin/partials/_index.scss +9 -6
  19. data/app/assets/stylesheets/admin/partials/_layout.scss +1 -2
  20. data/app/assets/stylesheets/admin/partials/_popup.scss +0 -11
  21. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +4 -4
  22. data/app/assets/stylesheets/admin/partials/_typography.scss +4 -0
  23. data/app/controllers/admin/pages_controller.rb +9 -1
  24. data/app/controllers/admin/references_controller.rb +8 -1
  25. data/app/controllers/admin/users_controller.rb +1 -1
  26. data/app/controllers/admin/welcome_controller.rb +3 -3
  27. data/app/controllers/site_controller.rb +1 -1
  28. data/app/helpers/admin/node_helper.rb +4 -4
  29. data/app/models/trusty_cms/config.rb +2 -1
  30. data/app/views/admin/configuration/edit.html.haml +2 -2
  31. data/app/views/admin/configuration/show.html.haml +1 -1
  32. data/app/views/admin/layouts/_form.html.haml +1 -1
  33. data/app/views/admin/layouts/remove.html.haml +1 -1
  34. data/app/views/admin/pages/_fields.html.haml +1 -1
  35. data/app/views/admin/pages/_node.html.haml +2 -2
  36. data/app/views/admin/pages/edit.html.haml +1 -1
  37. data/app/views/admin/pages/remove.html.haml +2 -2
  38. data/app/views/admin/preferences/edit.html.haml +36 -36
  39. data/app/views/admin/users/_form.html.haml +1 -1
  40. data/app/views/admin/users/_password_fields.html.haml +1 -1
  41. data/app/views/admin/users/remove.html.haml +1 -1
  42. data/app/views/admin/welcome/login.html.haml +1 -1
  43. data/app/views/layouts/application.html.haml +18 -16
  44. data/config/application.rb +2 -1
  45. data/config/boot.rb +0 -1
  46. data/config/database.mysql.yml +3 -3
  47. data/config/environments/development.rb +1 -0
  48. data/config/environments/test.rb +2 -4
  49. data/config/initializers/trusty_cms_config.rb +1 -0
  50. data/config/routes.rb +1 -0
  51. data/db/migrate/001_create_radiant_tables.rb +2 -1
  52. data/db/migrate/20100805155020_convert_page_metas.rb +0 -13
  53. data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +0 -4
  54. data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +0 -1
  55. data/lib/generators/instance/templates/databases/mysql.yml +3 -3
  56. data/lib/generators/instance/templates/instance_gemfile +2 -2
  57. data/lib/generators/trusty_cms/templates/database.yml.erb +4 -4
  58. data/lib/generators/trusty_cms/templates/routes.rb.erb +0 -1
  59. data/lib/login_system.rb +1 -1
  60. data/lib/tasks/database.rake +1 -3
  61. data/lib/tasks/framework.rake +1 -1
  62. data/lib/trusty_cms.rb +1 -1
  63. data/lib/trusty_cms/admin_ui.rb +2 -0
  64. data/lib/trusty_cms/extension_migrator.rb +1 -2
  65. data/lib/trusty_cms/initializer.rb +1 -1
  66. data/lib/trusty_cms/setup.rb +1 -1
  67. data/spec/ci/database.mysql.yml +1 -1
  68. data/spec/dummy/README.rdoc +28 -0
  69. data/spec/dummy/Rakefile +5 -0
  70. data/spec/dummy/bin/bundle +3 -0
  71. data/spec/dummy/bin/rails +4 -0
  72. data/spec/dummy/bin/rake +4 -0
  73. data/spec/dummy/bin/setup +29 -0
  74. data/spec/dummy/config.ru +4 -0
  75. data/spec/dummy/config/application.rb +152 -0
  76. data/spec/dummy/config/boot.rb +6 -0
  77. data/spec/dummy/config/database.yml +28 -0
  78. data/spec/dummy/config/environment.rb +5 -0
  79. data/spec/dummy/config/environments/development.rb +49 -0
  80. data/spec/dummy/config/environments/production.rb +79 -0
  81. data/spec/dummy/config/environments/test.rb +42 -0
  82. data/spec/dummy/config/initializers/assets.rb +11 -0
  83. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  84. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  85. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  86. data/spec/dummy/config/initializers/inflections.rb +16 -0
  87. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  88. data/spec/dummy/config/initializers/session_store.rb +3 -0
  89. data/spec/dummy/config/initializers/trusty_cms_config.rb +20 -0
  90. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  91. data/spec/dummy/config/locales/en.yml +23 -0
  92. data/spec/dummy/config/routes.rb +0 -0
  93. data/spec/dummy/config/secrets.yml +22 -0
  94. data/spec/dummy/db/schema.rb +122 -0
  95. data/spec/dummy/public/404.html +67 -0
  96. data/spec/dummy/public/422.html +67 -0
  97. data/spec/dummy/public/500.html +66 -0
  98. data/spec/dummy/public/favicon.ico +0 -0
  99. data/spec/features/pages_spec.rb +2 -2
  100. data/spec/rails_helper.rb +3 -4
  101. data/spec/spec_helper.rb +13 -77
  102. data/spec/support/custom_actions.rb +1 -0
  103. data/trusty_cms.gemspec +4 -2
  104. metadata +171 -182
  105. data/db/migrate/003_rename_behavior_column.rb +0 -9
  106. data/db/migrate/010_merge_behaviors_and_pages.rb +0 -57
  107. data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +0 -9
  108. data/db/migrate/019_add_salt_to_users.rb +0 -11
  109. data/spec/helpers/regions_helper_spec.rb +0 -16
@@ -1,9 +0,0 @@
1
- class RenameBehaviorColumn < ActiveRecord::Migration
2
- def self.up
3
- rename_column :pages, :behavior, :behavior_id
4
- end
5
-
6
- def self.down
7
- rename_column :pages, :behavior_id, :behavior
8
- end
9
- end
@@ -1,57 +0,0 @@
1
- class MergeBehaviorsAndPages < ActiveRecord::Migration
2
- class OldPage < ActiveRecord::Base
3
- set_table_name 'pages'
4
- end
5
-
6
- @@page_map = {
7
- "Page Missing" => "FileNotFoundPage"
8
- }
9
-
10
- @@behavior_map = @@page_map.invert
11
-
12
- def self.up
13
- announce "converting behavior names to class names"
14
- OldPage.find(:all).each do |page|
15
- unless page.behavior_id.blank?
16
- page.behavior_id = page_name(page.behavior_id)
17
- page.save!
18
- end
19
- end
20
- rename_column :pages, :behavior_id, :type
21
- end
22
-
23
- def self.down
24
- rename_column :pages, :type, :behavior_id
25
- OldPage.reset_column_information
26
- announce "converting class names back to behavior names"
27
- OldPage.find(:all).each do |page|
28
- unless page.behavior_id.blank?
29
- page.behavior_id = behavior_name(page.behavior_id)
30
- page.save!
31
- end
32
- end
33
- end
34
-
35
- def self.page_name(behavior_name)
36
- if @@page_map.has_key?(behavior_name)
37
- @@page_map[behavior_name]
38
- else
39
- name = behavior_name.scan(/\w+/).map { |word| word.capitalize }.join
40
- name = $1 if name =~ /^(.*?)Behavior$/
41
- name += "Page" unless name =~ /Page$/
42
- name
43
- end
44
- end
45
-
46
- def self.behavior_name(page_name)
47
- if @@behavior_map.has_key?(page_name)
48
- @@behavior_map[page_name]
49
- else
50
- name = page_name.gsub(/(^.|[A-Z])/, ' \1').strip
51
- name = $1 if name =~ /^(.*)Page$/
52
- name
53
- end
54
- end
55
-
56
-
57
- end
@@ -1,9 +0,0 @@
1
- class RenameTypeColumnOnPageToClassName < ActiveRecord::Migration
2
- def self.up
3
- rename_column 'pages', 'type', 'class_name'
4
- end
5
-
6
- def self.down
7
- rename_column 'pages', 'class_name', 'type'
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- class AddSaltToUsers < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :salt, :string
4
- User.reset_column_information
5
- User.update_all :salt => "sweet harmonious biscuits"
6
- end
7
-
8
- def self.down
9
- remove_column :users, :salt
10
- end
11
- end
@@ -1,16 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe Admin::RegionsHelper do
4
-
5
- describe "#render_region" do
6
-
7
- before :each do
8
- allow(controller).to receive(:controller_name).and_return("page")
9
- allow(controller).to receive(:template_name).and_return("index")
10
- end
11
-
12
- it "outputs html_safe string" do
13
- expect(helper.render_region :foo).to be_html_safe
14
- end
15
- end
16
- end