deluxe_publisher 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +29 -0
- data/LICENSE +20 -0
- data/README.rdoc +127 -0
- data/Rakefile +61 -0
- data/VERSION +1 -0
- data/app/controllers/deluxe_publisher/comments_controller.rb +93 -0
- data/app/controllers/deluxe_publisher/page_types_controller.rb +115 -0
- data/app/controllers/deluxe_publisher/pages_controller.rb +191 -0
- data/app/controllers/deluxe_publisher/presenter_controller.rb +185 -0
- data/app/controllers/deluxe_publisher/redirects_controller.rb +90 -0
- data/app/controllers/deluxe_publisher/sitemap_controller.rb +10 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/comments_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/page_types_helper.rb +13 -0
- data/app/helpers/deluxe_publisher/pages_helper.rb +41 -0
- data/app/helpers/deluxe_publisher/presenter_helper.rb +111 -0
- data/app/helpers/deluxe_publisher/redirects_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/sitemap_helper.rb +2 -0
- data/app/models/ckeditor/asset.rb +88 -0
- data/app/models/ckeditor/attachment_file.rb +40 -0
- data/app/models/ckeditor/picture.rb +23 -0
- data/app/models/deluxe_publisher/comment.rb +6 -0
- data/app/models/deluxe_publisher/content.rb +6 -0
- data/app/models/deluxe_publisher/content_descriptor.rb +4 -0
- data/app/models/deluxe_publisher/page.rb +206 -0
- data/app/models/deluxe_publisher/page_type.rb +55 -0
- data/app/models/deluxe_publisher/redirect.rb +6 -0
- data/app/models/deluxe_publisher.rb +5 -0
- data/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/app/views/deluxe_publisher/pages/_form.html.erb +39 -0
- data/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/app/views/deluxe_publisher/pages/edit.html.erb +5 -0
- data/app/views/deluxe_publisher/pages/index.html.erb +11 -0
- data/app/views/deluxe_publisher/pages/new.html.erb +6 -0
- data/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/app/views/deluxe_publisher/redirects/_form.html.erb +29 -0
- data/app/views/deluxe_publisher/redirects/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/redirects/index.html.erb +27 -0
- data/app/views/deluxe_publisher/redirects/new.html.erb +5 -0
- data/app/views/deluxe_publisher/redirects/show.html.erb +20 -0
- data/app/views/deluxe_publisher/sitemap/index.xml.builder +12 -0
- data/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/deluxe_publisher.html.erb +36 -0
- data/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/config/routes.rb +49 -0
- data/deluxe_publisher.gemspec +466 -0
- data/lib/deluxe_publisher/deluxe_publisher_authentication.rb +37 -0
- data/lib/deluxe_publisher/engine.rb +5 -0
- data/lib/deluxe_publisher.rb +40 -0
- data/lib/generators/deluxe_publisher/base/USAGE +8 -0
- data/lib/generators/deluxe_publisher/base/base_generator.rb +45 -0
- data/lib/generators/deluxe_publisher/base/templates/images/add.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_addNewPage.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_cancel.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_preview.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_save.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/bullet.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/content_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/delete.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/edit.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/header_background.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_published.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_unpublished.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/logo.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/minus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/plus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/show.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tab_bg.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tabs_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/initializer.rb +23 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_presenter.js +25 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_publisher.js +86 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/jquery-rails.js +158 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_blog.html.erb +74 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_simple.html.erb +47 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_presenter.css +458 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_publisher.css +202 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.html.erb +19 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.rss.builder +23 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog_story.html.erb +12 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_page.html.erb +4 -0
- data/lib/generators/deluxe_publisher/migration/USAGE +0 -0
- data/lib/generators/deluxe_publisher/migration/migration_generator.rb +18 -0
- data/lib/generators/deluxe_publisher/migration/templates/migration.rb +98 -0
- data/lib/generators/deluxe_publisher/sample_site/sample_site_generator.rb +316 -0
- data/spec/controllers/deluxe_publisher/comments_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/page_types_controller_spec.rb +125 -0
- data/spec/controllers/deluxe_publisher/pages_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/presenter_controller_spec.rb +19 -0
- data/spec/controllers/deluxe_publisher/redirects_controller_spec.rb +118 -0
- data/spec/deluxe_publisher_spec.rb +7 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_form.html.erb +36 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/edit.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/index.html.erb +10 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher.html.erb +31 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/deluxe_publisher.rb +23 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +104 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20110405190943_create_deluxe_publisher.rb +135 -0
- data/spec/dummy/db/schema.rb +130 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +191 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/comment_factory.rb +4 -0
- data/spec/factories/content_descriptor_factory.rb +5 -0
- data/spec/factories/content_factory.rb +24 -0
- data/spec/factories/page_factory.rb +26 -0
- data/spec/factories/page_type_factory.rb +10 -0
- data/spec/factories/redirect_factory.rb +4 -0
- data/spec/helpers/deluxe_publisher/comments_helper_spec.rb +15 -0
- data/spec/helpers/deluxe_publisher/page_types_helper_spec.rb +26 -0
- data/spec/helpers/deluxe_publisher/pages_helper_spec.rb +65 -0
- data/spec/helpers/deluxe_publisher/presenter_helper_spec.rb +19 -0
- data/spec/helpers/deluxe_publisher/redirects_helper_spec.rb +15 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/models/deluxe_publisher/comment_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_descriptor_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_spec.rb +5 -0
- data/spec/models/deluxe_publisher/page_spec.rb +358 -0
- data/spec/models/deluxe_publisher/page_type_spec.rb +62 -0
- data/spec/models/deluxe_publisher/redirect_spec.rb +17 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_comments_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_page_types_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_redirects_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/pages_spec.rb +11 -0
- data/spec/routing/deluxe_publisher/comments_routing_spec.rb +35 -0
- data/spec/routing/deluxe_publisher/page_types_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/pages_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/presenter_routing_spec.rb +66 -0
- data/spec/routing/deluxe_publisher/redirects_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +234 -0
- data/spec/views/deluxe_publisher/comments/edit.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/index.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/comments/new.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/show.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/page_types/edit.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/index.html.erb_spec.rb +48 -0
- data/spec/views/deluxe_publisher/page_types/new.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/show.html.erb_spec.rb +36 -0
- data/spec/views/deluxe_publisher/pages/edit.html.erb_spec.rb +58 -0
- data/spec/views/deluxe_publisher/pages/index.html.erb_spec.rb +100 -0
- data/spec/views/deluxe_publisher/pages/new.html.erb_spec.rb +81 -0
- data/spec/views/deluxe_publisher/pages/show.html.erb_spec.rb +75 -0
- data/spec/views/deluxe_publisher/presenter/present.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/presenter/preview.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/redirects/edit.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/index.html.erb_spec.rb +28 -0
- data/spec/views/deluxe_publisher/redirects/new.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/show.html.erb_spec.rb +21 -0
- metadata +1006 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title><%= @page.browser_title %></title>
|
6
|
+
<%= stylesheet_link_tag "deluxe_presenter" %>
|
7
|
+
<%= javascript_include_tag "jquery.min", "jquery-ui.min", "application", "rails" %>
|
8
|
+
<%= csrf_meta_tag %>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
12
|
+
|
13
|
+
<header>
|
14
|
+
<h1><%= @page.page_title %></h1>
|
15
|
+
<nav class="main">
|
16
|
+
<%=raw main_navigation(@root_page, @page, 3 ) %>
|
17
|
+
</nav>
|
18
|
+
</header>
|
19
|
+
<section class="content">
|
20
|
+
<%= yield %>
|
21
|
+
</section>
|
22
|
+
<section class="secondary_nav">
|
23
|
+
<nav class="secondary">
|
24
|
+
<%=raw secondary_navigation(@page, @page, 2 ) %>
|
25
|
+
</nav>
|
26
|
+
</section>
|
27
|
+
<footer>
|
28
|
+
</footer>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require
|
10
|
+
require "deluxe_publisher"
|
11
|
+
|
12
|
+
module Dummy
|
13
|
+
class Application < Rails::Application
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
+
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
+
|
25
|
+
# Activate observers that should always be running.
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
+
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
+
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
+
# config.i18n.default_locale = :de
|
35
|
+
|
36
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
37
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
38
|
+
|
39
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
40
|
+
config.encoding = "utf-8"
|
41
|
+
|
42
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
43
|
+
config.filter_parameters += [:password]
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Dummy::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 webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Dummy::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
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
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!
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# config for deluxe publisher
|
2
|
+
DeluxePublisher.setup do |config|
|
3
|
+
config.publisher_title = "Testy Test"
|
4
|
+
|
5
|
+
# authentication procedure for public facing pages
|
6
|
+
#use :none, :basic, :method
|
7
|
+
config.publisher_authorization_procedure = :none
|
8
|
+
#for :basic authorization procedure
|
9
|
+
config.publisher_username = "Bob"
|
10
|
+
config.publisher_password = "isyouruncle"
|
11
|
+
#for :method authorization procedure
|
12
|
+
config.publisher_authorization_method = :publisher_authorization
|
13
|
+
|
14
|
+
#Authentication procedure for deluxe publisher admin pages
|
15
|
+
#use :none, :basic, :method
|
16
|
+
config.admin_authorization_procedure = :none
|
17
|
+
#for :basic authorization procedure
|
18
|
+
config.admin_username = "admin" ########## Please Please Please ##########
|
19
|
+
config.admin_password = "nimda" ########## Change username and password ##########
|
20
|
+
#for :method authorization procedure ########## Or better yet use ##########
|
21
|
+
config.admin_authorization_method = :authenticate_admin! ########## an Authorization method ##########
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '957b4cf0c175c0990b14becc5a80783a82582c2d1532d2c5cce0db953ff3e5a34e7583aa63ddf1e35cc632cee839eed4df3b279770dcaad7eef463c6a56d83e9'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,104 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
namespace :deluxe_publisher do
|
6
|
+
resources :redirects
|
7
|
+
resources :pages do
|
8
|
+
resources :comments
|
9
|
+
member do
|
10
|
+
put 'page_type_change'
|
11
|
+
end
|
12
|
+
collection do
|
13
|
+
post 'page_type_change'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
resources :page_types do
|
17
|
+
member do
|
18
|
+
put 'content_areas_change'
|
19
|
+
end
|
20
|
+
collection do
|
21
|
+
post 'content_areas_change'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
match 'presenter/preview' => 'presenter#preview'
|
27
|
+
end
|
28
|
+
|
29
|
+
root :to => 'deluxe_publisher/presenter#home'
|
30
|
+
|
31
|
+
match '*page_path/new_comment(:format)' => "deluxe_publisher/presenter#new_comment",
|
32
|
+
:via => :get, :as => :new_comment
|
33
|
+
match '*page_path/create_comment' => "deluxe_publisher/presenter#create_comment",
|
34
|
+
:via => :post, :as => :create_comment
|
35
|
+
match '*page_path/blog-tag/:tag' => "deluxe_publisher/presenter#blog_tag",
|
36
|
+
:via => :get, :as => :blog_tag
|
37
|
+
match '*page_path/blog-archive/(:year)/(:month)/(:day)' => "deluxe_publisher/presenter#blog_archives",
|
38
|
+
:via => :get, :as => :blog_archive
|
39
|
+
match '*page_path/index(.:format)' => "deluxe_publisher/presenter#present", :via => :get
|
40
|
+
match '*page_path.:format' => "deluxe_publisher/presenter#present", :via => :get, :as => :deluxe_publisher_present
|
41
|
+
match '*page_path' => "deluxe_publisher/presenter#present", :via => :get
|
42
|
+
|
43
|
+
# The priority is based upon order of creation:
|
44
|
+
# first created -> highest priority.
|
45
|
+
|
46
|
+
# Sample of regular route:
|
47
|
+
# match 'products/:id' => 'catalog#view'
|
48
|
+
# Keep in mind you can assign values other than :controller and :action
|
49
|
+
|
50
|
+
# Sample of named route:
|
51
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
52
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
53
|
+
|
54
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
55
|
+
# resources :products
|
56
|
+
|
57
|
+
# Sample resource route with options:
|
58
|
+
# resources :products do
|
59
|
+
# member do
|
60
|
+
# get 'short'
|
61
|
+
# post 'toggle'
|
62
|
+
# end
|
63
|
+
#
|
64
|
+
# collection do
|
65
|
+
# get 'sold'
|
66
|
+
# end
|
67
|
+
# end
|
68
|
+
|
69
|
+
# Sample resource route with sub-resources:
|
70
|
+
# resources :products do
|
71
|
+
# resources :comments, :sales
|
72
|
+
# resource :seller
|
73
|
+
# end
|
74
|
+
|
75
|
+
# Sample resource route with more complex sub-resources
|
76
|
+
# resources :products do
|
77
|
+
# resources :comments
|
78
|
+
# resources :sales do
|
79
|
+
# get 'recent', :on => :collection
|
80
|
+
# end
|
81
|
+
# end
|
82
|
+
|
83
|
+
# Sample resource route within a namespace:
|
84
|
+
# namespace :admin do
|
85
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
86
|
+
# # (app/controllers/admin/products_controller.rb)
|
87
|
+
# resources :products
|
88
|
+
# end
|
89
|
+
|
90
|
+
# You can have the root of your site routed with "root"
|
91
|
+
# just remember to delete public/index.html.
|
92
|
+
# root :to => "welcome#index"
|
93
|
+
|
94
|
+
# See how all your routes lay out with "rake routes"
|
95
|
+
|
96
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
97
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
98
|
+
# match ':controller(/:action(/:id(.:format)))'
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
class CreateDeluxePublisher < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
|
4
|
+
create_table "ckeditor_assets", :force => true do |t|
|
5
|
+
t.string "data_file_name", :null => false
|
6
|
+
t.string "data_content_type"
|
7
|
+
t.integer "data_file_size"
|
8
|
+
t.integer "assetable_id"
|
9
|
+
t.string "assetable_type", :limit => 30
|
10
|
+
t.string "type", :limit => 25
|
11
|
+
t.string "guid", :limit => 10
|
12
|
+
t.integer "locale", :limit => 1, :default => 0
|
13
|
+
t.integer "user_id"
|
14
|
+
t.datetime "created_at"
|
15
|
+
t.datetime "updated_at"
|
16
|
+
end
|
17
|
+
|
18
|
+
add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "fk_assetable"
|
19
|
+
add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_assetable_type"
|
20
|
+
add_index "ckeditor_assets", ["user_id"], :name => "fk_user"
|
21
|
+
|
22
|
+
create_table "deluxe_publisher_comments", :force => true do |t|
|
23
|
+
t.integer "page_id"
|
24
|
+
t.string "author"
|
25
|
+
t.text "body", :limit => 255
|
26
|
+
t.string "status"
|
27
|
+
t.datetime "posted_at"
|
28
|
+
t.datetime "created_at"
|
29
|
+
t.datetime "updated_at"
|
30
|
+
end
|
31
|
+
|
32
|
+
create_table "deluxe_publisher_content_descriptors", :force => true do |t|
|
33
|
+
t.integer "page_type_id"
|
34
|
+
t.integer "position"
|
35
|
+
t.string "title"
|
36
|
+
t.string "content_type", :default => "text"
|
37
|
+
t.datetime "created_at"
|
38
|
+
t.datetime "updated_at"
|
39
|
+
end
|
40
|
+
|
41
|
+
create_table "deluxe_publisher_contents", :force => true do |t|
|
42
|
+
t.integer "page_id"
|
43
|
+
t.text "html"
|
44
|
+
t.integer "position"
|
45
|
+
t.datetime "created_at"
|
46
|
+
t.datetime "updated_at"
|
47
|
+
end
|
48
|
+
|
49
|
+
create_table "deluxe_publisher_page_types", :force => true do |t|
|
50
|
+
t.integer "site_id", :default => 1
|
51
|
+
t.string "name"
|
52
|
+
t.text "description"
|
53
|
+
t.boolean "is_published", :default => true
|
54
|
+
t.integer "position", :default => 0
|
55
|
+
t.string "function_as", :default => "web_page"
|
56
|
+
t.integer "number_of_content_areas", :default => 1
|
57
|
+
t.string "template"
|
58
|
+
t.string "layout"
|
59
|
+
t.datetime "created_at"
|
60
|
+
t.datetime "updated_at"
|
61
|
+
end
|
62
|
+
|
63
|
+
create_table "deluxe_publisher_pages", :force => true do |t|
|
64
|
+
t.integer "site_id", :default => 1
|
65
|
+
t.integer "parent_id"
|
66
|
+
t.integer "lft"
|
67
|
+
t.integer "rgt"
|
68
|
+
t.integer "alias_page_id"
|
69
|
+
t.integer "page_type_id"
|
70
|
+
t.integer "position", :default => 0
|
71
|
+
t.integer "footer_position", :default => 0
|
72
|
+
t.string "browser_title"
|
73
|
+
t.string "page_title"
|
74
|
+
t.string "menu_title"
|
75
|
+
t.string "file_name"
|
76
|
+
t.string "path"
|
77
|
+
t.boolean "is_shown_in_main_navigation", :default => false
|
78
|
+
t.boolean "is_shown_in_secondary_navigation", :default => false
|
79
|
+
t.boolean "is_published", :default => false
|
80
|
+
t.boolean "is_landing_page", :default => false
|
81
|
+
t.datetime "publish_at"
|
82
|
+
t.boolean "is_navigation_locked", :default => false
|
83
|
+
t.boolean "is_content_locked", :default => false
|
84
|
+
t.text "meta_keywords"
|
85
|
+
t.text "meta_description"
|
86
|
+
t.boolean "is_included_in_sitemap", :default => true
|
87
|
+
t.float "sitemap_priority", :default => 0.5
|
88
|
+
t.string "sitemap_change_freq", :default => "monthly"
|
89
|
+
t.datetime "created_at"
|
90
|
+
t.datetime "updated_at"
|
91
|
+
t.boolean "allow_comments", :default => false
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
create_table :deluxe_publisher_redirects do |t|
|
96
|
+
t.string :incoming_url
|
97
|
+
t.string :direct_to_url
|
98
|
+
t.text :description
|
99
|
+
|
100
|
+
t.timestamps
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
create_table "taggings", :force => true do |t|
|
105
|
+
t.integer "tag_id"
|
106
|
+
t.integer "taggable_id"
|
107
|
+
t.string "taggable_type"
|
108
|
+
t.integer "tagger_id"
|
109
|
+
t.string "tagger_type"
|
110
|
+
t.string "context"
|
111
|
+
t.datetime "created_at"
|
112
|
+
end
|
113
|
+
|
114
|
+
add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
|
115
|
+
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
116
|
+
|
117
|
+
create_table "tags", :force => true do |t|
|
118
|
+
t.string "name"
|
119
|
+
end
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.down
|
124
|
+
|
125
|
+
drop_table "ckeditor_assets"
|
126
|
+
drop_table "deluxe_publisher_comments"
|
127
|
+
drop_table "deluxe_publisher_content_descriptors"
|
128
|
+
drop_table "deluxe_publisher_contents"
|
129
|
+
drop_table "deluxe_publisher_page_types"
|
130
|
+
drop_table "deluxe_publisher_pages"
|
131
|
+
drop_table "taggings"
|
132
|
+
drop_table :deluxe_publisher_redirects
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|