trusty-cms 2.0.2 → 2.0.3.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.gitignore +0 -2
- data/CONTRIBUTORS.md +1 -3
- data/Gemfile +1 -6
- data/Gemfile.lock +80 -100
- data/INSTALL.md +6 -7
- data/README.md +1 -3
- data/Rakefile +4 -24
- data/app/assets/javascripts/admin/jquery-ui.js +2339 -3787
- data/app/assets/javascripts/admin/page-edit.js +3 -3
- data/app/assets/javascripts/admin/tabcontrol.js.erb +16 -16
- data/app/assets/javascripts/admin/treetable.js +2 -4
- data/app/assets/stylesheets/admin/_base.scss +4 -4
- data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
- data/app/assets/stylesheets/admin/partials/_content.scss +2 -9
- data/app/assets/stylesheets/admin/partials/_forms.scss +29 -97
- data/app/assets/stylesheets/admin/partials/_header.scss +3 -2
- data/app/assets/stylesheets/admin/partials/_index.scss +6 -9
- data/app/assets/stylesheets/admin/partials/_layout.scss +2 -1
- data/app/assets/stylesheets/admin/partials/_popup.scss +11 -0
- data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +4 -4
- data/app/assets/stylesheets/admin/partials/_typography.scss +0 -4
- data/app/controllers/admin/pages_controller.rb +1 -9
- data/app/controllers/admin/references_controller.rb +1 -8
- data/app/controllers/admin/users_controller.rb +1 -1
- data/app/controllers/admin/welcome_controller.rb +3 -3
- data/app/controllers/application_controller.rb.rails2 +113 -0
- data/app/controllers/site_controller.rb +1 -1
- data/app/helpers/admin/node_helper.rb +4 -4
- data/app/helpers/application_helper.rb.rails2 +242 -0
- data/app/models/trusty_cms/config.rb +1 -2
- data/app/views/admin/configuration/edit.html.haml +2 -2
- data/app/views/admin/configuration/show.html.haml +1 -1
- data/app/views/admin/layouts/_form.html.haml +1 -1
- data/app/views/admin/layouts/remove.html.haml +1 -1
- data/app/views/admin/pages/_fields.html.haml +1 -1
- data/app/views/admin/pages/_node.html.haml +2 -2
- data/app/views/admin/pages/edit.html.haml +1 -1
- data/app/views/admin/pages/remove.html.haml +2 -2
- data/app/views/admin/preferences/edit.html.haml +36 -36
- data/app/views/admin/users/_form.html.haml +1 -1
- data/app/views/admin/users/_password_fields.html.haml +1 -1
- data/app/views/admin/users/remove.html.haml +1 -1
- data/app/views/admin/welcome/login.html.haml +1 -1
- data/app/views/layouts/application.html.haml +16 -18
- data/config/application.rb +1 -2
- data/config/boot.rb +1 -0
- data/config/database.mysql.yml +3 -3
- data/{spec/dummy/config/database.yml → config/database.yml.rails2} +4 -4
- data/config/environment.rb.rails2 +89 -0
- data/config/environments/development.rb +0 -1
- data/config/environments/development.rb.rails2 +17 -0
- data/config/environments/production.rb.rails2 +24 -0
- data/config/environments/test.rb +4 -2
- data/config/initializers/trusty_cms_config.rb +0 -1
- data/config/routes.rb +0 -1
- data/config/routes.rb.rails2 +41 -0
- data/db/migrate/001_create_radiant_tables.rb +0 -1
- data/db/migrate/003_rename_behavior_column.rb +9 -0
- data/db/migrate/019_add_salt_to_users.rb +11 -0
- data/db/migrate/20100805155020_convert_page_metas.rb +13 -0
- data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +4 -0
- data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +1 -0
- data/lib/generators/instance/templates/databases/mysql.yml +3 -3
- data/lib/generators/instance/templates/instance_gemfile +2 -2
- data/lib/generators/trusty_cms/templates/database.yml.erb +4 -4
- data/lib/generators/trusty_cms/templates/routes.rb.erb +1 -0
- data/lib/login_system.rb +1 -1
- data/lib/tasks/database.rake +3 -1
- data/lib/tasks/framework.rake +1 -1
- data/lib/trusty_cms/admin_ui.rb +0 -2
- data/lib/trusty_cms/extension_migrator.rb +2 -1
- data/lib/trusty_cms/initializer.rb +1 -1
- data/lib/trusty_cms/setup.rb +1 -1
- data/lib/trusty_cms.rb +1 -1
- data/public/stylesheets/admin/main.css +1 -0
- data/{spec/dummy/config/routes.rb → public/stylesheets/admin/overrides.css} +0 -0
- data/spec/ci/database.mysql.yml +1 -1
- data/spec/features/pages_spec.rb +2 -2
- data/spec/helpers/regions_helper_spec.rb +16 -0
- data/spec/rails_helper.rb +4 -3
- data/spec/spec_helper.rb +77 -13
- data/spec/support/custom_actions.rb +0 -1
- data/test/test_helper.rb.rails2 +64 -0
- data/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
- data/tmp/cache_files_test/a.txt +1 -0
- data/tmp/cache_files_test/all.txt +3 -0
- data/tmp/cache_files_test/b.txt +1 -0
- data/tmp/config/radiant_config.yml +27 -0
- data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_boxes.sassc +0 -0
- data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_gradients.sassc +0 -0
- data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_links.sassc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_appearance.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-clip.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-origin.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-size.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_border-radius.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-shadow.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-sizing.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_columns.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_filter.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_font-face.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_hyphenation.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_images.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_inline-block.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_opacity.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_regions.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_shared.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_text-shadow.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transform.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transition.scssc +0 -0
- data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_user-interface.scssc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_actions.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_avatars.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_content.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dateinput.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_deprecated.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dropdown.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_footer.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_forms.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_header.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_index.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_layout.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_messages.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_popup.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_tabcontrol.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_toolbar.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_typography.sassc +0 -0
- data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_validations.sassc +0 -0
- data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_color.scssc +0 -0
- data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_general.scssc +0 -0
- data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_sprites.scssc +0 -0
- data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_tables.scssc +0 -0
- data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_base.scssc +0 -0
- data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_sprite-img.scssc +0 -0
- data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_alternating-rows-and-columns.scssc +0 -0
- data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_borders.scssc +0 -0
- data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_scaffolding.scssc +0 -0
- data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_links.scssc +0 -0
- data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_lists.scssc +0 -0
- data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_text.scssc +0 -0
- data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_vertical_rhythm.scssc +0 -0
- data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_hover-link.scssc +0 -0
- data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_link-colors.scssc +0 -0
- data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_unstyled-link.scssc +0 -0
- data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_css3.scssc +0 -0
- data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_support.scssc +0 -0
- data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_typography.scssc +0 -0
- data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_utilities.scssc +0 -0
- data/tmp/sass-cache/92844cd19a320f87ef960171cea4f33d1a07339c/_contrast.scssc +0 -0
- data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_ellipsis.scssc +0 -0
- data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_force-wrap.scssc +0 -0
- data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_nowrap.scssc +0 -0
- data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_replacement.scssc +0 -0
- data/tmp/sass-cache/b3d80baefd48593d8c08815ba2d83e209f5dad6f/_grid-background.scssc +0 -0
- data/tmp/sass-cache/b92bfc773efa04d930ffa0b3331244a1f378caa7/_compass.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_clearfix.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_float.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_hacks.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_min.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_reset.scssc +0 -0
- data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_tag-cloud.scssc +0 -0
- data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/_base.sassc +0 -0
- data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/main.sassc +0 -0
- data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/overrides.sassc +0 -0
- data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_bullets.scssc +0 -0
- data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_horizontal-list.scssc +0 -0
- data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-block-list.scssc +0 -0
- data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-list.scssc +0 -0
- data/tmp/sass-cache/dc9647e96d50c02214aff50e88308a74bf56d1d7/_utilities.scssc +0 -0
- data/trusty_cms.gemspec +2 -4
- metadata +180 -171
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -5
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -29
- data/spec/dummy/config/application.rb +0 -152
- data/spec/dummy/config/boot.rb +0 -6
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -49
- data/spec/dummy/config/environments/production.rb +0 -79
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/initializers/assets.rb +0 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/trusty_cms_config.rb +0 -20
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/schema.rb +0 -122
- data/spec/dummy/log/test.log +0 -25081
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
- data/spec/dummy/tmp/radiant_config_cache.txt +0 -0
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
DELETED
data/spec/dummy/bin/bundle
DELETED
data/spec/dummy/bin/rails
DELETED
data/spec/dummy/bin/rake
DELETED
data/spec/dummy/bin/setup
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
-
|
7
|
-
Dir.chdir APP_ROOT do
|
8
|
-
# This script is a starting point to setup your application.
|
9
|
-
# Add necessary setup steps to this file:
|
10
|
-
|
11
|
-
puts "== Installing dependencies =="
|
12
|
-
system "gem install bundler --conservative"
|
13
|
-
system "bundle check || bundle install"
|
14
|
-
|
15
|
-
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?("config/database.yml")
|
17
|
-
# system "cp config/database.yml.sample config/database.yml"
|
18
|
-
# end
|
19
|
-
|
20
|
-
puts "\n== Preparing database =="
|
21
|
-
system "bin/rake db:setup"
|
22
|
-
|
23
|
-
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system "rm -f log/*"
|
25
|
-
system "rm -rf tmp/cache"
|
26
|
-
|
27
|
-
puts "\n== Restarting application server =="
|
28
|
-
system "touch tmp/restart.txt"
|
29
|
-
end
|
@@ -1,152 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
require 'acts_as_tree'
|
5
|
-
require "trusty_cms"
|
6
|
-
require 'ckeditor'
|
7
|
-
require 'radius'
|
8
|
-
require 'trusty_cms/extension_loader'
|
9
|
-
require 'trusty_cms/initializer'
|
10
|
-
require 'string_extensions/string_extensions'
|
11
|
-
require 'active_record_extensions/active_record_extensions'
|
12
|
-
require 'configuration_extensions/configuration_extensions'
|
13
|
-
require 'compass'
|
14
|
-
require 'rack/cache'
|
15
|
-
require "sass-rails"
|
16
|
-
|
17
|
-
if defined?(Bundler)
|
18
|
-
# If you precompile assets before deploying to production, use this line
|
19
|
-
require 'rake'
|
20
|
-
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
21
|
-
# If you want your assets lazily compiled in production, use this line
|
22
|
-
# Bundler.require(:default, :assets, Rails.env)
|
23
|
-
end
|
24
|
-
|
25
|
-
module TrustyCms
|
26
|
-
class Application < Rails::Application
|
27
|
-
include TrustyCms::Initializer
|
28
|
-
|
29
|
-
config.autoload_paths += %W(#{TRUSTY_CMS_ROOT}/lib)
|
30
|
-
config.autoload_paths += %W(#{config.root}/lib)
|
31
|
-
config.autoload_paths += %W(#{config.root}/app/helpers)
|
32
|
-
|
33
|
-
Sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
|
34
|
-
|
35
|
-
# Initialize extension paths
|
36
|
-
config.initialize_extension_paths
|
37
|
-
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
38
|
-
extension_loader.paths(:load).reverse_each do |path, value|
|
39
|
-
config.autoload_paths.unshift path
|
40
|
-
$LOAD_PATH.unshift path
|
41
|
-
end
|
42
|
-
# config.add_plugin_paths(extension_loader.paths(:plugin))
|
43
|
-
# TODO: Come back and look at this.
|
44
|
-
radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
45
|
-
config.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
|
46
|
-
|
47
|
-
config.encoding = 'utf-8'
|
48
|
-
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
49
|
-
# To use Rails without a database, you must remove the Active Record framework
|
50
|
-
# config.frameworks -= [ :action_mailer ]
|
51
|
-
|
52
|
-
# Only load the extensions named here, in the order given. By default all
|
53
|
-
# extensions in vendor/extensions are loaded, in alphabetical order. :all
|
54
|
-
# can be used as a placeholder for all extensions not explicitly named.
|
55
|
-
|
56
|
-
# An example of how to add extensions:
|
57
|
-
# config.extensions = [ :snippets, :clipped, :layouts, :reorder, :multi_site, :rad_social]
|
58
|
-
|
59
|
-
config.extensions = []
|
60
|
-
config.extensions_migration_order = []
|
61
|
-
|
62
|
-
# By default, only English translations are loaded. Remove any of these from
|
63
|
-
# the list below if you'd like to provide any of the additional options
|
64
|
-
# config.ignore_extensions []
|
65
|
-
|
66
|
-
# Your secret key for verifying cookie session data integrity.
|
67
|
-
# If you change this key, all old sessions will become invalid!
|
68
|
-
# Make sure the secret is at least 30 characters and all random,
|
69
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
70
|
-
|
71
|
-
# Comment out this line if you want to turn off all caching, or
|
72
|
-
# add options to modify the behavior. In the majority of deployment
|
73
|
-
# scenarios it is desirable to leave TrustyCms's cache enabled and in
|
74
|
-
# the default configuration.
|
75
|
-
#
|
76
|
-
# Additional options:
|
77
|
-
# :use_x_sendfile => true
|
78
|
-
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
79
|
-
# :use_x_accel_redirect => '/some/virtual/path'
|
80
|
-
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
81
|
-
# a path that corresponds to a virtual location in your webserver
|
82
|
-
# configuration.
|
83
|
-
# :entitystore => "radiant:tmp/cache/entity"
|
84
|
-
# Sets the entity store type (preceding the colon) and storage
|
85
|
-
# location (following the colon, relative to Rails.root).
|
86
|
-
# We recommend you use radiant: since this will enable manual expiration.
|
87
|
-
# :metastore => "radiant:tmp/cache/meta"
|
88
|
-
# Sets the meta store type and storage location. We recommend you use
|
89
|
-
# radiant: since this will enable manual expiration and acceleration headers.
|
90
|
-
|
91
|
-
# TODO: We're not sure this is actually working, but we can't really test this until the app initializes.
|
92
|
-
config.middleware.use Rack::Cache,
|
93
|
-
:private_headers => ['Authorization'],
|
94
|
-
:entitystore => "radiant:tmp/cache/entity",
|
95
|
-
:metastore => "radiant:tmp/cache/meta",
|
96
|
-
:verbose => false,
|
97
|
-
:allow_reload => false,
|
98
|
-
:allow_revalidate => false
|
99
|
-
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
100
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
101
|
-
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
102
|
-
config.assets.enabled = true
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
config.filter_parameters += [:password, :password_confirmation]
|
107
|
-
|
108
|
-
# Use the database for sessions instead of the cookie-based default,
|
109
|
-
# which shouldn't be used to store highly confidential information
|
110
|
-
# (create the session table with 'rake db:sessions:create')
|
111
|
-
# config.action_controller.session_store = :cookie_store DEPRECATED
|
112
|
-
|
113
|
-
# Activate observers that should always be running
|
114
|
-
#config.active_record.observers = :user_action_observer
|
115
|
-
|
116
|
-
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
117
|
-
# All files from config/locales/*.rb,yml are added automatically.
|
118
|
-
# config.i18n.load_path << Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')]
|
119
|
-
# config.i18n.default_locale = :'en'
|
120
|
-
|
121
|
-
# Make Active Record use UTC-base instead of local time
|
122
|
-
config.time_zone = 'UTC'
|
123
|
-
|
124
|
-
# Set the default field error proc
|
125
|
-
config.action_view.field_error_proc = Proc.new do |html, instance|
|
126
|
-
if html !~ /label/
|
127
|
-
%{<span class="error-with-fieldxxxx">#{html} <span class="error">#{[instance.error_message].flatten.first}</span></span>}.html_safe
|
128
|
-
else
|
129
|
-
html
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
config.after_initialize do
|
134
|
-
extension_loader.load_extensions
|
135
|
-
extension_loader.load_extension_initalizers
|
136
|
-
|
137
|
-
#Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
138
|
-
# load(initializer)
|
139
|
-
#end
|
140
|
-
|
141
|
-
extension_loader.activate_extensions # also calls initialize_views
|
142
|
-
#config.add_controller_paths(extension_loader.paths(:controller))
|
143
|
-
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
144
|
-
|
145
|
-
# Add new inflection rules using the following format:
|
146
|
-
ActiveSupport::Inflector.inflections do |inflect|
|
147
|
-
inflect.uncountable 'config'
|
148
|
-
end
|
149
|
-
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
TrustyCms::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
config.whiny_nils = true
|
13
|
-
|
14
|
-
# Show full error reports and disable caching.
|
15
|
-
config.consider_all_requests_local = true
|
16
|
-
config.action_controller.perform_caching = false
|
17
|
-
|
18
|
-
# Don't care if the mailer can't send.
|
19
|
-
config.action_mailer.raise_delivery_errors = false
|
20
|
-
config.domain = ".local"
|
21
|
-
|
22
|
-
# Print deprecation notices to the Rails logger.
|
23
|
-
config.active_support.deprecation = :log
|
24
|
-
|
25
|
-
# Raise an error on page load if there are pending migrations.
|
26
|
-
config.active_record.migration_error = :page_load
|
27
|
-
|
28
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
29
|
-
# This option may cause significant delays in view rendering with a large
|
30
|
-
# number of complex assets.
|
31
|
-
#config.assets.debug = true
|
32
|
-
|
33
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
34
|
-
# yet still be able to expire them through the digest params.
|
35
|
-
#config.assets.digest = true
|
36
|
-
|
37
|
-
# Adds additional error checking when serving assets at runtime.
|
38
|
-
# Checks for improperly declared sprockets dependencies.
|
39
|
-
# Raises helpful error messages.
|
40
|
-
#config.assets.raise_runtime_errors = true
|
41
|
-
|
42
|
-
# Raises error for missing translations
|
43
|
-
# config.action_view.raise_on_missing_translations = true
|
44
|
-
|
45
|
-
config.after_initialize do
|
46
|
-
SiteController.cache_timeout = 0.minutes
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# Code is not reloaded between requests.
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both threaded web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
-
# NGINX, varnish or squid.
|
21
|
-
# config.action_dispatch.rack_cache = true
|
22
|
-
|
23
|
-
# Disable serving static files from the `/public` folder by default since
|
24
|
-
# Apache or NGINX already handles this.
|
25
|
-
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
|
-
|
27
|
-
# Compress JavaScripts and CSS.
|
28
|
-
config.assets.js_compressor = :uglifier
|
29
|
-
# config.assets.css_compressor = :sass
|
30
|
-
|
31
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
-
config.assets.compile = false
|
33
|
-
|
34
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
-
# yet still be able to expire them through the digest params.
|
36
|
-
config.assets.digest = true
|
37
|
-
|
38
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
|
-
|
40
|
-
# Specifies the header that your server uses for sending files.
|
41
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
43
|
-
|
44
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
-
# config.force_ssl = true
|
46
|
-
|
47
|
-
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
-
# when problems arise.
|
49
|
-
config.log_level = :debug
|
50
|
-
|
51
|
-
# Prepend all log lines with the following tags.
|
52
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
53
|
-
|
54
|
-
# Use a different logger for distributed setups.
|
55
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
56
|
-
|
57
|
-
# Use a different cache store in production.
|
58
|
-
# config.cache_store = :mem_cache_store
|
59
|
-
|
60
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
|
-
|
63
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
-
# config.action_mailer.raise_delivery_errors = false
|
66
|
-
|
67
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
-
# the I18n.default_locale when a translation cannot be found).
|
69
|
-
config.i18n.fallbacks = true
|
70
|
-
|
71
|
-
# Send deprecation notices to registered listeners.
|
72
|
-
config.active_support.deprecation = :notify
|
73
|
-
|
74
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
-
config.log_formatter = ::Logger::Formatter.new
|
76
|
-
|
77
|
-
# Do not dump schema after migrations.
|
78
|
-
config.active_record.dump_schema_after_migration = false
|
79
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
TrustyCms::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure static file server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_files = true
|
17
|
-
config.static_cache_control = 'public, max-age=3600'
|
18
|
-
|
19
|
-
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local = true
|
21
|
-
config.action_controller.perform_caching = false
|
22
|
-
|
23
|
-
# Raise exceptions instead of rendering exception templates.
|
24
|
-
config.action_dispatch.show_exceptions = false
|
25
|
-
|
26
|
-
# Disable request forgery protection in test environment.
|
27
|
-
config.action_controller.allow_forgery_protection = false
|
28
|
-
|
29
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
-
# The :test delivery method accumulates sent emails in the
|
31
|
-
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
33
|
-
|
34
|
-
# Randomize the order test cases are executed.
|
35
|
-
config.active_support.test_order = :random
|
36
|
-
|
37
|
-
# Print deprecation notices to the stderr.
|
38
|
-
config.active_support.deprecation = :stderr
|
39
|
-
|
40
|
-
# Raises error for missing translations
|
41
|
-
# config.action_view.raise_on_missing_translations = true
|
42
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version = '1.0'
|
5
|
-
|
6
|
-
# Add additional assets to the asset load path
|
7
|
-
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
-
|
9
|
-
# Precompile additional assets.
|
10
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
-
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
TrustyCms.config do |config|
|
2
|
-
config.define 'admin.title', :default => "TrustyCms CMS"
|
3
|
-
config.define 'dev.host'
|
4
|
-
config.define 'local.timezone', :allow_change => true, :select_from => lambda { ActiveSupport::TimeZone::MAPPING.keys.sort }
|
5
|
-
config.define 'defaults.locale', :select_from => lambda { TrustyCms::AvailableLocales.locales }, :allow_blank => true
|
6
|
-
config.define 'defaults.page.parts', :default => "Body,Extended"
|
7
|
-
config.define 'defaults.page.status', :select_from => lambda { Status.selectable_values }, :allow_blank => false, :default => "Draft"
|
8
|
-
config.define 'defaults.page.filter', :select_from => lambda { TextFilter.descendants.map { |s| s.filter_name }.sort }, :allow_blank => true
|
9
|
-
config.define 'defaults.page.fields'
|
10
|
-
config.define 'pagination.param_name', :default => 'page'
|
11
|
-
config.define 'pagination.per_page_param_name', :default => 'per_page'
|
12
|
-
config.define 'admin.pagination.per_page', :type => :integer, :default => 50
|
13
|
-
config.define 'site.title', :default => "Your site title", :allow_blank => false
|
14
|
-
config.define 'site.host', :default => "www.example.com", :allow_blank => false
|
15
|
-
config.define 'user.allow_password_reset?', :default => true
|
16
|
-
end
|
17
|
-
|
18
|
-
TrustyCms::Application.config do |config|
|
19
|
-
|
20
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: 6af75efd2eb1645d2015a8ec98330874f11196e5301decbc067b40fadf71051d9f872cba2eab9eecbf96d07a64749e8d2cef2542413365ebb381755b4a44a237
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: fb2e882d635c7a6d1e86cfbf6bcd240812b005a345b61ef321cba66169b565b9a814fa0678cc463fce3c61acd7437bcc6f26aa64339cc893655df6785ef94b93
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
data/spec/dummy/config.ru
DELETED