figured out engine loading i think, can be used as a stand-alone and a plugin
Oleg
committed Oct 14, 2010
commit ddbca209ff23f79a06ae47565c87390032e23261
Showing 8
changed files with
14 additions
and 42 deletions
comfortable_mexican_sofa.gemspec
+1
-0
| @@ | @@ -77,6 +77,7 @@ Gem::Specification.new do |s| |
| "doc/README_FOR_APP", | |
| "lib/comfortable_mexican_sofa.rb", | |
| "lib/comfortable_mexican_sofa/cms_acts_as_tree.rb", | |
| + | "lib/comfortable_mexican_sofa/cms_engine.rb", |
| "lib/comfortable_mexican_sofa/cms_form_builder.rb", | |
| "lib/comfortable_mexican_sofa/cms_rails_extensions.rb", | |
| "lib/comfortable_mexican_sofa/cms_tag.rb", | |
config/application.rb
+4
-0
| @@ | @@ -40,5 +40,9 @@ module ComfortableMexicanSofa |
| # Configure sensitive parameters which will be filtered from the log file. | |
| config.filter_parameters += [:password] | |
| + | |
| + | config.session_store :cookie_store, :key => '_comfortable_mexican_sofa_session' |
| + | config.secret_token = 'e0fef4ab56c1cacd8845864fe2cb2a27f5caad72823419f87b2774785187090a654b83229bf9cef70ce475a83bfa561dbbaa2015788181ea837c456964c1e0f6' |
| + | |
| end | |
| end | |
config/initializers/backtrace_silencers.rb
+0
-7
| @@ | @@ -1,7 +0,0 @@ |
| - | # Be sure to restart your server when you modify this file. |
| - | |
| - | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. |
| - | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } |
| - | |
| - | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. |
| - | # Rails.backtrace_cleaner.remove_silencers! |
config/initializers/inflections.rb
+0
-10
| @@ | @@ -1,10 +0,0 @@ |
| - | # Be sure to restart your server when you modify this file. |
| - | |
| - | # Add new inflection rules using the following format |
| - | # (all these examples are active by default): |
| - | # ActiveSupport::Inflector.inflections do |inflect| |
| - | # inflect.plural /^(ox)$/i, '\1en' |
| - | # inflect.singular /^(ox)en/i, '\1' |
| - | # inflect.irregular 'person', 'people' |
| - | # inflect.uncountable %w( fish sheep ) |
| - | # end |
config/initializers/secret_token.rb
+0
-7
| @@ | @@ -1,7 +0,0 @@ |
| - | # Be sure to restart your server when you modify this file. |
| - | |
| - | # Your secret key for verifying the integrity of signed cookies. |
| - | # If you change this key, all old signed cookies will become invalid! |
| - | # Make sure the secret is at least 30 characters and all random, |
| - | # no regular words or you'll be exposed to dictionary attacks. |
| - | ComfortableMexicanSofa::Application.config.secret_token = 'e0fef4ab56c1cacd8845864fe2cb2a27f5caad72823419f87b2774785187090a654b83229bf9cef70ce475a83bfa561dbbaa2015788181ea837c456964c1e0f6' |
config/initializers/session_store.rb
+0
-8
| @@ | @@ -1,8 +0,0 @@ |
| - | # Be sure to restart your server when you modify this file. |
| - | |
| - | ComfortableMexicanSofa::Application.config.session_store :cookie_store, :key => '_comfortable_mexican_sofa_session' |
| - | |
| - | # Use the database for sessions instead of the cookie-based default, |
| - | # which shouldn't be used to store highly confidential information |
| - | # (create the session table with "rake db:sessions:create") |
| - | # ComfortableMexicanSofa::Application.config.session_store :active_record_store |
comfortable_mexican_sofa.rb b/lib/comfortable_mexican_sofa.rb
+2
-8
| @@ | @@ -21,19 +21,13 @@ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :cms => [ |
| 'comfortable_mexican_sofa/jquery-ui', | |
| 'comfortable_mexican_sofa/rails', | |
| 'comfortable_mexican_sofa/cms', | |
| - | 'comfortable_mexican_sofa/tiny_mce/jquery.tinymce', |
| - | 'comfortable_mexican_sofa/tiny_mce/tiny_mce', |
| - | 'comfortable_mexican_sofa/codemirror/codemirror', |
| 'comfortable_mexican_sofa/plupload/plupload.full.min', | |
| - | 'comfortable_mexican_sofa/uploader', |
| - | 'comfortable_mexican_sofa/rteditor', |
| - | 'comfortable_mexican_sofa/syntax_highlighter' |
| + | 'comfortable_mexican_sofa/uploader' |
| ] | |
| ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :cms => [ | |
| 'comfortable_mexican_sofa/reset', | |
| 'comfortable_mexican_sofa/structure', | |
| - | 'comfortable_mexican_sofa/typography', |
| - | 'comfortable_mexican_sofa/jquery-ui' |
| + | 'comfortable_mexican_sofa/typography' |
| ] | |
| FILE_ICONS = Dir.glob(File.expand_path('public/images/cms/file_icons/*.png', Rails.root)).collect{|f| f.split('/').last.gsub('.png', '')} | |
comfortable_mexican_sofa/cms_engine.rb b/lib/comfortable_mexican_sofa/cms_engine.rb
+7
-2
| @@ | @@ -1,7 +1,12 @@ |
| require 'comfortable_mexican_sofa' | |
| require 'rails' | |
| + | require 'paperclip' |
| + | require 'active_link_to' |
| + | require 'mime/types' |
| - | class ComfortableMexicanSofa::CMSEngine < ::Rails::Engine |
| - | |
| + | module ComfortableMexicanSofa |
| + | class CMSEngine < ::Rails::Engine |
| + | |
| + | end |
| end | |