public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Search Repo:
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
tweak mephisto_init to support the new ActionController::Dispatcher class. 
 [Rob Anderton]

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2989 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu Oct 04 10:53:46 -0700 2007
commit  bc12ff483c4f6f0434ab7a4d68764d94e2bef45f
tree    0f27b68b97d14c39a9892c9317db16dceae5372a
parent  c1006d0fcb6517e7a5e975fcc2fd1a341aca905e
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 * SVN *
0
 
0
+* tweak mephisto_init to support the new ActionController::Dispatcher class. [Rob Anderton]
0
+
0
 * Don't generate an article event for unversioned changes. [Marcus Brito]
0
 
0
 * Switch to will_paginate plugin [Mislav]
...
132
133
134
135
 
136
137
138
...
132
133
134
 
135
136
137
138
0
@@ -132,7 +132,7 @@ class MephistoController < ApplicationController
0
       show_404 and return unless @article || find_article
0
       Mephisto::Liquid::CommentForm.article = @article
0
       @article = @article.to_liquid(:mode => :single)
0
- render_liquid_template_for(:single, assigns.merge('articles' => [@article], 'article' => @article))
0
+ render_liquid_template_for(:single, assigns.update('articles' => [@article], 'article' => @article))
0
     end
0
     alias dispatch_single show_article_with
0
 end
...
20
21
22
 
 
 
23
24
25
...
20
21
22
23
24
25
26
27
28
0
@@ -20,6 +20,9 @@ Rails::Initializer.run do |config|
0
   config.frameworks -= [ :active_resource ]
0
 
0
   config.load_paths += %W( #{RAILS_ROOT}/app/cachers #{RAILS_ROOT}/app/drops #{RAILS_ROOT}/app/filters )
0
+
0
+ # NFI why this is here. find and eradicate the bug.
0
+ config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/actionwebservice/lib )
0
 
0
   # Force all environments to use the same logger level
0
   # (by default production uses :info, the others :debug)
...
1
2
3
4
 
5
6
7
8
9
10
11
12
 
 
13
14
15
16
17
18
 
 
19
20
21
22
23
 
24
25
26
27
28
29
30
 
31
32
33
...
1
2
3
 
4
5
6
7
8
9
10
 
 
11
12
13
14
15
16
 
 
17
18
19
20
21
22
 
23
24
25
26
27
28
29
 
30
31
32
33
0
@@ -1,33 +1,33 @@
0
 # this is for standard library loading and configurationg. All the hardcore monkey patching is in the mephisto plugin.
0
 require 'tzinfo'
0
 require 'zip/zipfilesystem'
0
-require 'dispatcher'
0
+require 'action_controller/dispatcher'
0
 require 'coderay'
0
 require 'ruby_pants'
0
 require 'xmlrpc_patch'
0
 
0
 ActiveRecord::Base.observers = [:article_observer, :comment_observer]
0
 
0
-class << Dispatcher
0
- def register_liquid_tags
0
+class ActionController::Dispatcher
0
+ def self.register_liquid_tags
0
     Mephisto.liquid_filters.each { |mod| Liquid::Template.register_filter mod }
0
     Mephisto.liquid_tags.each { |name, klass| Liquid::Template.register_tag name, klass }
0
   end
0
   
0
- def reset_application_with_plugins!
0
- returning reset_application_without_plugins! do
0
+ def cleanup_application_with_plugins(force = false)
0
+ returning cleanup_application_without_plugins(force) do
0
       register_liquid_tags
0
     end
0
   end
0
   
0
- alias_method_chain :reset_application!, :plugins
0
+ alias_method_chain :cleanup_application, :plugins
0
 end
0
 
0
 module Liquid
0
   AllowedVariableCharacters = /[a-zA-Z_.-]/ unless Liquid.const_defined?(:AllowedVariableCharacters)
0
 end
0
 
0
-Dispatcher.register_liquid_tags
0
+ActionController::Dispatcher.register_liquid_tags
0
 
0
 WhiteListHelper.tags.merge %w(table tr td)
0
 

Comments

    No one has commented yet.