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
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
restructure liquid drops/filters

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2195 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sun Sep 17 14:32:07 -0700 2006
commit  f868a1b6851080593ef09ed78823e6a39a40aca4
tree    66d02ce01769e038e19f3e3759e3cce427d514bf
parent  17e675b8e5519dbc91d6a6e5dad390b3dbe39ce6
...
95
96
97
98
 
99
100
101
...
95
96
97
 
98
99
100
101
0
@@ -95,7 +95,7 @@ class Article < Content
0
   # :mode - single / list. Specifies whether the body is only the excerpt or not
0
   # :page - true / false. Specifies whether the article is the main section page.
0
   def to_liquid(options = {})
0
- Mephisto::Liquid::ArticleDrop.new self, options
0
+ ArticleDrop.new self, options
0
   end
0
 
0
   def filter=(new_filter)
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ class Comment < Content
0
   attr_protected :approved
0
 
0
   def to_liquid
0
- Mephisto::Liquid::CommentDrop.new self
0
+ CommentDrop.new self
0
   end
0
   
0
   def approved=(value)
...
44
45
46
47
 
48
49
50
...
44
45
46
 
47
48
49
50
0
@@ -44,7 +44,7 @@ class Section < ActiveRecord::Base
0
   end
0
 
0
   def to_liquid(current = false)
0
- Mephisto::Liquid::SectionDrop.new self, current
0
+ SectionDrop.new self, current
0
   end
0
 
0
   def order!(*article_ids)
...
131
132
133
134
 
135
136
137
...
131
132
133
 
134
135
136
137
0
@@ -131,7 +131,7 @@ class Site < ActiveRecord::Base
0
   end
0
 
0
   def to_liquid(current_section = nil)
0
- Mephisto::Liquid::SiteDrop.new self, current_section
0
+ SiteDrop.new self, current_section
0
   end
0
 
0
   composed_of :timezone, :class_name => 'TZInfo::Timezone', :mapping => %w(timezone name)
...
19
20
21
22
 
23
24
25
...
19
20
21
 
22
23
24
25
0
@@ -19,7 +19,7 @@ Rails::Initializer.run do |config|
0
   # Skip frameworks you're not going to use
0
   # config.frameworks -= [ :action_web_service ]
0
 
0
- config.autoload_paths += %W( #{RAILS_ROOT}/app/cachers )
0
+ config.autoload_paths += %W( #{RAILS_ROOT}/app/cachers #{RAILS_ROOT}/app/drops #{RAILS_ROOT}/app/filters )
0
 
0
   # Force all environments to use the same logger level
0
   # (by default production uses :info, the others :debug)
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ end
0
 
0
 class << Dispatcher
0
   def register_liquid_tags
0
- Liquid::Template.register_filter(Mephisto::Liquid::Filters)
0
+ Liquid::Template.register_filter(Filters)
0
     Liquid::Template.register_tag(:textile, Mephisto::Liquid::Textile)
0
     Liquid::Template.register_tag(:commentform, Mephisto::Liquid::CommentForm)
0
     Liquid::Template.register_tag(:head, Mephisto::Liquid::Head)
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@ class ArticleDropTest < Test::Unit::TestCase
0
   end
0
   
0
   def test_should_list_tags
0
- assert_equal %w(rails), Mephisto::Liquid::ArticleDrop.new(contents(:another)).tags
0
+ assert_equal %w(rails), ArticleDrop.new(contents(:another)).tags
0
   end
0
   
0
   def test_should_list_only_blog_sections
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ class CommentDropTest < Test::Unit::TestCase
0
   fixtures :contents, :sites
0
   
0
   def setup
0
- @comment = Mephisto::Liquid::CommentDrop.new(contents(:welcome_comment))
0
+ @comment = CommentDrop.new(contents(:welcome_comment))
0
   end
0
   
0
   def test_should_convert_comment_to_drop
...
1
2
3
4
 
5
6
7
...
16
17
18
19
 
20
21
22
...
62
63
64
65
 
66
67
68
...
1
2
3
 
4
5
6
7
...
16
17
18
 
19
20
21
22
...
62
63
64
 
65
66
67
68
0
@@ -1,7 +1,7 @@
0
 require File.dirname(__FILE__) + '/../test_helper'
0
 
0
 context "Basic Filters" do
0
- include Mephisto::Liquid::Filters
0
+ include Filters
0
 
0
   def setup
0
     @context = {}
0
@@ -16,7 +16,7 @@ end
0
 
0
 context "Url Filters" do
0
   fixtures :sites, :sections, :contents
0
- include Mephisto::Liquid::Filters
0
+ include Filters
0
 
0
   def setup
0
     @context = {'site' => sites(:first).to_liquid, 'section' => sections(:about).to_liquid}
0
@@ -62,7 +62,7 @@ end
0
 
0
 context "Drop Filters" do
0
   fixtures :sites, :sections, :contents, :assigned_sections
0
- include Mephisto::Liquid::Filters
0
+ include Filters
0
 
0
   def setup
0
     @context = {'site' => sites(:first).to_liquid, 'section' => sections(:about).to_liquid}
...
26
27
28
29
 
30
31
32
...
26
27
28
 
29
30
31
32
0
@@ -26,7 +26,7 @@ class SiteDropTest < Test::Unit::TestCase
0
   end
0
   
0
   def test_should_show_current_section
0
- @site = Mephisto::Liquid::SiteDrop.new(sites(:first), sections(:about))
0
+ @site = SiteDrop.new(sites(:first), sections(:about))
0
     assert_equal sections(:about), @site.current_section.source
0
     assert_equal [false, true], @site.sections.collect(&:current)
0
   end

Comments

    No one has commented yet.