bcms_blog 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. data/LICENSE.txt +165 -0
  2. data/README.markdown +113 -2
  3. data/app/controllers/application_controller.rb +10 -0
  4. data/app/controllers/cms/blog_comments_controller.rb +1 -1
  5. data/app/controllers/cms/blog_posts_controller.rb +34 -1
  6. data/app/controllers/cms/blogs_controller.rb +10 -1
  7. data/app/controllers/feeds_controller.rb +8 -0
  8. data/app/helpers/application_helper.rb +3 -0
  9. data/app/helpers/cms/blog_helper.rb +17 -0
  10. data/app/helpers/feeds_helper.rb +2 -0
  11. data/app/models/blog.rb +70 -14
  12. data/app/models/blog_comment.rb +15 -9
  13. data/app/models/blog_group_membership.rb +4 -0
  14. data/app/models/blog_observer.rb +135 -0
  15. data/app/models/blog_post.rb +76 -32
  16. data/app/portlets/blog_post_portlet.rb +23 -9
  17. data/app/portlets/blog_posts_portlet.rb +50 -0
  18. data/app/views/cms/blog_posts/_form.html.erb +9 -4
  19. data/app/views/cms/blog_posts/no_access.html.erb +9 -0
  20. data/app/views/cms/blog_posts/render.html.erb +1 -5
  21. data/app/views/cms/blogs/_form.html.erb +27 -1
  22. data/app/views/cms/blogs/admin_only.html.erb +9 -0
  23. data/app/views/cms/blogs/render.html.erb +2 -3
  24. data/app/views/feeds/index.rss.builder +18 -0
  25. data/app/views/partials/_blog_post.html.erb +102 -0
  26. data/app/views/partials/_blog_post.html.haml +91 -0
  27. data/app/views/portlets/blog_post/_form.html.erb +2 -1
  28. data/app/views/portlets/blog_post/render.html.erb +33 -36
  29. data/app/views/portlets/blog_posts/_form.html.erb +13 -0
  30. data/app/views/portlets/blog_posts/render.html.haml +9 -0
  31. data/db/migrate/20090415000000_create_blogs.rb +31 -18
  32. data/db/migrate/20090415000001_create_blog_posts.rb +5 -30
  33. data/db/migrate/20090415000002_create_blog_comments.rb +2 -1
  34. data/db/migrate/20090415000003_add_attachment_to_blog_posts.rb +23 -0
  35. data/db/migrate/20100521042244_add_moderate_comments_to_blog.rb +10 -0
  36. data/doc/README_FOR_APP +2 -0
  37. data/doc/migrate_to_20100427.rb +77 -0
  38. data/doc/release_notes.txt +40 -0
  39. data/lib/bcms_blog/routes.rb +3 -0
  40. data/rails/init.rb +6 -1
  41. data/test/factories.rb +47 -1
  42. data/test/functional/blog_post_test.rb +19 -17
  43. data/test/functional/blog_test.rb +47 -25
  44. data/test/functional/cms/blog_posts_controller_test.rb +44 -0
  45. data/test/functional/cms/blogs_controller_test.rb +25 -0
  46. data/test/functional/feeds_controller_test.rb +8 -0
  47. data/test/test_helper.rb +64 -120
  48. data/test/unit/blog_comment_test.rb +34 -0
  49. data/test/unit/blog_observer_test.rb +61 -0
  50. data/test/unit/blog_post_test.rb +43 -0
  51. data/test/unit/blog_test.rb +42 -0
  52. data/test/unit/helpers/feeds_helper_test.rb +4 -0
  53. metadata +64 -7
  54. data/app/views/portlets/blog_post/_blog_post.html.erb +0 -29
data/test/test_helper.rb CHANGED
@@ -1,137 +1,81 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
- ENV['BACKTRACE'] = "YES PLEASE"
3
2
  require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
4
3
  require 'test_help'
4
+ require 'factory_girl'
5
+ require 'mocha'
5
6
 
6
7
  class ActiveSupport::TestCase
7
8
  require File.dirname(__FILE__) + '/test_logging'
8
9
  include TestLogging
9
- # Transactional fixtures accelerate your tests by wrapping each test method
10
- # in a transaction that's rolled back on completion. This ensures that the
11
- # test database remains unchanged so your fixtures don't have to be reloaded
12
- # between every test method. Fewer database queries means faster tests.
13
- #
14
- # Read Mike Clark's excellent walkthrough at
15
- # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
16
- #
17
- # Every Active Record database supports transactions except MyISAM tables
18
- # in MySQL. Turn off transactional fixtures in this case; however, if you
19
- # don't care one way or the other, switching from MyISAM to InnoDB tables
20
- # is recommended.
21
- #
22
- # The only drawback to using transactional fixtures is when you actually
23
- # need to test transactions. Since your test is bracketed by a transaction,
24
- # any transactions started in your code will be automatically rolled back.
25
- self.use_transactional_fixtures = true
10
+ include Cms::DataLoader
26
11
 
27
- # Instantiated fixtures are slow, but give you @david where otherwise you
28
- # would need people(:david). If you don't want to migrate your existing
29
- # test cases which use the @david style and don't mind the speed hit (each
30
- # instantiated fixtures translates to a database query per test method),
31
- # then set this back to true.
12
+ self.use_transactional_fixtures = true
32
13
  self.use_instantiated_fixtures = false
33
14
 
34
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
35
- #
36
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
37
- # -- they do not yet inherit this setting
38
15
  fixtures :all
39
16
 
40
- # Add more helper methods to be used by all tests here...
41
17
  def create_baseline_data
42
- @section = Section.create!(:name => "My Site", :path => "/")
43
- Group.create!(:name => "Guest", :code => "guest", :sections => [@section])
44
- @page_template = PageTemplate.create!(:name => "test", :format => "html", :handler => "erb", :body => %q{<html>
45
- <head>
46
- <title>
47
- <%= page_title %>
48
- </title>
49
- <%= yield :html_head %>
50
- </head>
51
- <body>
52
- <%= cms_toolbar %>
53
- <%= container :main %>
54
- </body>
55
- </html>})
56
-
57
- @blog_page = Page.create!(:name => "My Blog Page", :section => @section, :path => "/", :template_file_name => "test.html.erb")
58
- @blog_post_page = Page.create!(:name => "Blog Post Page", :section => @section, :path => "/blog/post", :template_file_name => "test.html.erb")
59
-
60
- @blog_posts_with_tag_route = @blog_page.page_routes.create(
61
- :name => "Blog Posts With Tag",
62
- :pattern => "/articles/tag/:tag")
63
-
64
- @blog_posts_in_category_route = @blog_page.page_routes.create(
65
- :name => "Blog Posts In Category",
66
- :pattern => "/articles/category/:category")
67
-
68
- @blog_post_route = @blog_post_page.page_routes.build(
69
- :name => "Blog Post",
70
- :pattern => "/articles/:year/:month/:day/:slug",
71
- :code => "@blog_post = BlogPost.published_on(params).with_slug(params[:slug]).first")
72
- @blog_post_route.add_condition(:method, "get")
73
- @blog_post_route.add_requirement(:year, '\d{4,}')
74
- @blog_post_route.add_requirement(:month, '\d{2,}')
75
- @blog_post_route.add_requirement(:day, '\d{2,}')
76
- @blog_post_route.save!
77
-
78
- @blog_page.publish!
79
- @blog_post_page.publish!
80
-
81
- @category_type = CategoryType.create!(:name => "Blog Post")
82
- @stuff = Category.create!(:name => "Stuff", :category_type => @category_type)
83
- @general = Category.create!(:name => "General", :category_type => @category_type)
84
-
85
- @blog = Blog.create!(
86
- :name => "My Blog",
87
- :template => Blog.default_template,
88
- :connect_to_page_id => @blog_page.id,
89
- :connect_to_container => "main",
90
- :publish_on_save => true)
91
-
92
- @first_post = BlogPost.create!(
93
- :name => "First Post",
94
- :blog => @blog,
95
- :category => @general,
96
- :summary => "This is the first post",
97
- :body => "Yadda Yadda Yadda",
98
- :publish_on_save => true)
99
-
100
- @foo_post_1 = BlogPost.create!(
101
- :name => "Foo #1",
102
- :blog => @blog,
103
- :category => @stuff,
104
- :tag_list => "foo stuff",
105
- :summary => "This is the first foo post",
106
- :body => "Foo 1 Foo 1 Foo 1",
107
- :publish_on_save => true)
108
-
109
- @foo_post_2 = BlogPost.create!(
110
- :name => "Foo #2",
111
- :blog => @blog,
112
- :category => @general,
113
- :tag_list => "foo",
114
- :summary => "This is the second foo post",
115
- :body => "Foo 2 Foo 2 Foo 2",
116
- :publish_on_save => true)
117
-
118
- @bar_post_1 = BlogPost.create!(
119
- :name => "Bar #1",
120
- :blog => @blog,
121
- :category => @stuff,
122
- :tag_list => "bar things",
123
- :summary => "This is the first bar post",
124
- :body => "Bar 1 Bar 1 Bar 1",
125
- :publish_on_save => true)
18
+ load_bcms_seed_data
19
+
20
+ @blog = Blog.create!(:name => "MyBlog")
21
+ @blog.publish!
22
+ Page.all.each(&:publish)
23
+ @category_type = Factory(:category_type)
24
+
25
+ # For some reason this is necessary otherwise the relevant page routes aren't loaded when
26
+ # the tests are run via "rake" (as opposed to running them directly). I don't know exactly
27
+ # why this is the case.
28
+ # ActionController::Routing::Routes.load!
29
+
30
+ @stuff = Category.create!(:name => "Stuff", :category_type => @category_type)
31
+ @general = Category.create!(:name => "General", :category_type => @category_type)
32
+
33
+ @first_post = Factory(:blog_post, :blog => @blog, :category => @general,
34
+ :published_at => Time.utc(2008, 7, 5, 6), :publish_on_save => true)
35
+
36
+ @foo_post_1 = Factory(:blog_post, :blog => @blog, :category => @stuff,
37
+ :published_at => Time.utc(2008, 7, 5, 12), :tag_list => "foo stuff", :publish_on_save => true)
38
+
39
+ @foo_post_2 = Factory(:blog_post, :blog => @blog, :category => @general,
40
+ :published_at => Time.utc(2008, 7, 21), :publish_on_save => true)
41
+
42
+ @bar_post_1 = Factory(:blog_post, :blog => @blog, :category => @stuff,
43
+ :published_at => Time.utc(2008, 9, 2), :tag_list => "foo stuff", :publish_on_save => true)
44
+
45
+ @bar_post_2 = Factory(:blog_post, :blog => @blog, :category => @general,
46
+ :published_at => Time.utc(2009, 3, 18), :publish_on_save => true)
47
+ end
126
48
 
127
- @bar_post_2 = BlogPost.create!(
128
- :name => "Bar #2",
129
- :blog => @blog,
130
- :category => @general,
131
- :tag_list => "bar",
132
- :summary => "This is the second bar post",
133
- :body => "Bar 2 Bar 2 Bar 2",
134
- :publish_on_save => true)
49
+ def setup_stubs
50
+ Blog.any_instance.stubs(:reload_routes)
51
+ @section = Section.new
52
+ Section.stubs(:create! => @section)
53
+ @section.stubs(:groups => [], :save! => true)
54
+ Page.stubs(:create! => Page.new)
55
+ Page.any_instance.stubs(:create_connector)
56
+ end
57
+
58
+ def login_as(user)
59
+ @request.session[:user_id] = user ? user.id : nil
60
+ end
61
+
62
+ private
63
+ # TODO Find a better way to load this data
64
+ def load_bcms_seed_data
65
+ require File.join(Rails.root, 'db', 'migrate', '20081114172307_load_seed_data.rb')
66
+ LoadSeedData.up
135
67
  end
136
68
 
69
+ #Cms::DataLoader defines methods create_group and create_user
70
+ def _create_group
71
+ @group = Factory(:group, :name => "Test", :group_type => Factory(:group_type, :name => "CMS User", :cms_access => true))
72
+ @group.permissions << Factory(:permission, :name => "edit_content")
73
+ @group.permissions << Factory(:permission, :name => "publish_content")
74
+ end
75
+
76
+ def _create_user(opts = {})
77
+ _create_group
78
+ @group.permissions << Factory(:permission, :name => "administrate") if opts[:admin]
79
+ @user = Factory(:user, :groups => [@group])
80
+ end
137
81
  end
@@ -0,0 +1,34 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class BlogCommentTest < ActiveSupport::TestCase
4
+
5
+ def setup
6
+ setup_stubs
7
+ end
8
+
9
+ test "crates a valid instance" do
10
+ assert Factory.build(:blog_comment).valid?
11
+ end
12
+
13
+ test "requires post" do
14
+ assert Factory.build(:blog_comment, :post => nil).invalid?
15
+ end
16
+
17
+ test "requires author" do
18
+ assert Factory.build(:blog_comment, :author => nil).invalid?
19
+ end
20
+
21
+ test "requires body" do
22
+ assert Factory.build(:blog_comment, :body => nil).invalid?
23
+ end
24
+
25
+ test "should not be published if Blog#moderate_comments is true" do
26
+ assert !Factory(:blog_comment).published?
27
+ end
28
+
29
+ test "should be published if Blog#moderate_comments is false" do
30
+ blog = Factory(:blog, :moderate_comments => false)
31
+ post = Factory(:blog_post, :blog => blog)
32
+ assert Factory(:blog_comment, :post => post).published?
33
+ end
34
+ end
@@ -0,0 +1,61 @@
1
+ require 'test_helper'
2
+
3
+ class BlogObserverTest < ActiveSupport::TestCase
4
+
5
+ def setup
6
+ setup_stubs
7
+ [Section, PageRoute, Page].each {|klass| klass.stubs(:find_by_name)}
8
+ BlogPostPortlet.stubs(:create!)
9
+ @blog = Factory(:blog, :name => 'TestBlog')
10
+ end
11
+
12
+ test "does not update section, pageroute and pages if name did not change when updated" do
13
+ [Section, PageRoute, Page].each {|klass| klass.expects(:find_by_name).never}
14
+ @blog.toggle!(:moderate_comments)
15
+ end
16
+
17
+ test "updates section, pageroute and pages if name changed" do
18
+ route = mock('page_route', :update_attribute => true)
19
+ page = mock('page')
20
+ Section.expects(:find_by_name).returns(Section.new)
21
+ PageRoute.expects(:find_by_name).returns(route)
22
+ Page.expects(:find_by_name).twice.returns(page)
23
+ page.expects(:update_attribute).twice.returns(true)
24
+ page.expects(:publish).twice.returns(true)
25
+
26
+ @blog.update_attribute(:name, "OtherName")
27
+ end
28
+
29
+ test "should create a section with the same name and route" do
30
+ Section.expects(:create!).with(:name => 'Test', :path => '/test', :parent_id => 1).returns(@section)
31
+ Factory(:blog, :name => 'Test')
32
+ end
33
+
34
+ test "should create a hidden page with the same name in the section with the blog's name" do
35
+ Page.expects(:create!).with(:name => 'Test',
36
+ :path => '/test',
37
+ :section => @section,
38
+ :template_file_name => 'default.html.erb',
39
+ :hidden => true).returns(Page.new)
40
+ Factory(:blog, :name => 'Test')
41
+ end
42
+
43
+ test "should create a page to hold the BlogPostPortlet" do
44
+ Page.expects(:create!).with(:name => 'Test: Post',
45
+ :path => '/test/post',
46
+ :section => @section,
47
+ :template_file_name => 'default.html.erb',
48
+ :hidden => true).returns(Page.new)
49
+ Factory(:blog, :name => 'Test')
50
+ end
51
+
52
+ test "should create an instance of BlogPostPortlet" do
53
+ BlogPostPortlet.expects(:create!).with(:name => 'Test: Post Portlet',
54
+ :blog_id => 2,
55
+ :template => BlogPostPortlet.default_template,
56
+ :connect_to_page_id => nil,
57
+ :connect_to_container => 'main',
58
+ :publish_on_save => true).returns(BlogPostPortlet.new)
59
+ Factory(:blog, :name => 'Test')
60
+ end
61
+ end
@@ -0,0 +1,43 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class BlogPostTest < ActiveSupport::TestCase
4
+
5
+ def setup
6
+ setup_stubs
7
+ @post = Factory(:blog_post, :name => "This is the first Post")
8
+ end
9
+
10
+ test "cretates a valid instance" do
11
+ assert @post.valid?
12
+ end
13
+
14
+ test "requires name" do
15
+ assert Factory.build(:blog_post, :name => nil).invalid?
16
+ end
17
+
18
+ test "requires blog_id" do
19
+ assert Factory.build(:blog_post, :blog => nil).invalid?
20
+ end
21
+
22
+ test "requires author_id" do
23
+ assert Factory.build(:blog_post, :author => nil).invalid?
24
+ end
25
+
26
+ test "should set slug" do
27
+ assert_equal('this-is-the-first-post', @post.slug)
28
+ end
29
+
30
+ test "should set published_at when published" do
31
+ assert_nil @post.published_at
32
+ @post.publish!
33
+ assert_not_nil @post.published_at
34
+ end
35
+
36
+ test "BlogPost should find posts published between 2 given dates" do
37
+ @post.publish!
38
+ Factory(:blog_post, :published_at => 5.days.ago)
39
+ Factory(:blog_post, :published_at => 10.days.ago)
40
+ assert_equal(1, BlogPost.published_between(6.days.ago, 4.days.ago).count)
41
+ end
42
+
43
+ end
@@ -0,0 +1,42 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class BlogTest < ActiveSupport::TestCase
4
+
5
+ def setup
6
+ setup_stubs
7
+ @blog = Factory(:blog, :name => 'TestBlog')
8
+ end
9
+
10
+ test "creates a valid instance" do
11
+ assert @blog.valid?
12
+ end
13
+
14
+ test "requires name" do
15
+ assert Factory.build(:blog, :name => nil).invalid?
16
+ end
17
+
18
+ test "should be editable by user" do
19
+ group = Factory(:group, :group_type => Factory(:group_type,:cms_access => true))
20
+ user = Factory(:user, :groups => [group])
21
+ blog = Factory.build(:blog, :groups => [group])
22
+ assert blog.editable_by?(user)
23
+ assert !@blog.editable_by?(user)
24
+ end
25
+
26
+ test "should be editable by administrators" do
27
+ admin = Factory(:user)
28
+ admin.expects(:able_to?).with(:administrate).returns(true)
29
+ assert @blog.editable_by?(admin)
30
+ end
31
+
32
+ test "should create an instance of BlogPostPortlet" do
33
+ BlogPostPortlet.expects(:create!).with(:name => 'Test: Post Portlet',
34
+ :blog_id => 2,
35
+ :template => BlogPostPortlet.default_template,
36
+ :connect_to_page_id => nil,
37
+ :connect_to_container => 'main',
38
+ :publish_on_save => true).returns(BlogPostPortlet.new)
39
+ Factory(:blog, :name => 'Test')
40
+ end
41
+
42
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class FeedsHelperTest < ActionView::TestCase
4
+ end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcms_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 0
10
+ version: 1.1.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - BrowserMedia
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-07-02 00:00:00 -04:00
18
+ date: 2010-07-02 00:00:00 -05:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -20,61 +26,112 @@ executables: []
20
26
  extensions: []
21
27
 
22
28
  extra_rdoc_files:
29
+ - LICENSE.txt
23
30
  - README.markdown
24
31
  files:
32
+ - app/controllers/application_controller.rb
25
33
  - app/controllers/cms/blog_comments_controller.rb
26
34
  - app/controllers/cms/blog_posts_controller.rb
27
35
  - app/controllers/cms/blogs_controller.rb
36
+ - app/controllers/feeds_controller.rb
37
+ - app/helpers/application_helper.rb
38
+ - app/helpers/cms/blog_helper.rb
39
+ - app/helpers/feeds_helper.rb
28
40
  - app/models/blog.rb
29
41
  - app/models/blog_comment.rb
42
+ - app/models/blog_group_membership.rb
43
+ - app/models/blog_observer.rb
30
44
  - app/models/blog_post.rb
31
45
  - app/portlets/blog_post_portlet.rb
46
+ - app/portlets/blog_posts_portlet.rb
32
47
  - app/views/cms/blog_comments/_form.html.erb
33
48
  - app/views/cms/blog_comments/render.html.erb
34
49
  - app/views/cms/blog_posts/_form.html.erb
50
+ - app/views/cms/blog_posts/no_access.html.erb
35
51
  - app/views/cms/blog_posts/render.html.erb
36
52
  - app/views/cms/blogs/_form.html.erb
53
+ - app/views/cms/blogs/admin_only.html.erb
37
54
  - app/views/cms/blogs/render.html.erb
38
- - app/views/portlets/blog_post/_blog_post.html.erb
55
+ - app/views/feeds/index.rss.builder
56
+ - app/views/partials/_blog_post.html.erb
57
+ - app/views/partials/_blog_post.html.haml
39
58
  - app/views/portlets/blog_post/_form.html.erb
40
59
  - app/views/portlets/blog_post/render.html.erb
60
+ - app/views/portlets/blog_posts/_form.html.erb
61
+ - app/views/portlets/blog_posts/render.html.haml
41
62
  - db/migrate/20090415000000_create_blogs.rb
42
63
  - db/migrate/20090415000001_create_blog_posts.rb
43
64
  - db/migrate/20090415000002_create_blog_comments.rb
65
+ - db/migrate/20090415000003_add_attachment_to_blog_posts.rb
66
+ - db/migrate/20100521042244_add_moderate_comments_to_blog.rb
67
+ - doc/README_FOR_APP
68
+ - doc/migrate_to_20100427.rb
69
+ - doc/release_notes.txt
44
70
  - lib/bcms_blog.rb
45
71
  - lib/bcms_blog/routes.rb
46
72
  - rails/init.rb
73
+ - LICENSE.txt
47
74
  - README.markdown
75
+ - test/factories.rb
76
+ - test/functional/blog_post_test.rb
77
+ - test/functional/blog_test.rb
78
+ - test/functional/cms/blog_posts_controller_test.rb
79
+ - test/functional/cms/blogs_controller_test.rb
80
+ - test/functional/feeds_controller_test.rb
81
+ - test/performance/browsing_test.rb
82
+ - test/test_helper.rb
83
+ - test/test_logging.rb
84
+ - test/unit/blog_comment_test.rb
85
+ - test/unit/blog_observer_test.rb
86
+ - test/unit/blog_post_test.rb
87
+ - test/unit/blog_test.rb
88
+ - test/unit/helpers/feeds_helper_test.rb
48
89
  has_rdoc: true
49
90
  homepage: http://browsercms.org
91
+ licenses: []
92
+
50
93
  post_install_message:
51
94
  rdoc_options:
52
95
  - --charset=UTF-8
53
96
  require_paths:
54
97
  - lib
55
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
+ none: false
56
100
  requirements:
57
101
  - - ">="
58
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
59
106
  version: "0"
60
- version:
61
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
62
109
  requirements:
63
110
  - - ">="
64
111
  - !ruby/object:Gem::Version
112
+ hash: 3
113
+ segments:
114
+ - 0
65
115
  version: "0"
66
- version:
67
116
  requirements: []
68
117
 
69
118
  rubyforge_project: browsercms
70
- rubygems_version: 1.3.1
119
+ rubygems_version: 1.3.7
71
120
  signing_key:
72
- specification_version: 2
121
+ specification_version: 3
73
122
  summary: The Blog Module for BrowserCMS
74
123
  test_files:
75
124
  - test/factories.rb
76
125
  - test/functional/blog_post_test.rb
77
126
  - test/functional/blog_test.rb
127
+ - test/functional/cms/blog_posts_controller_test.rb
128
+ - test/functional/cms/blogs_controller_test.rb
129
+ - test/functional/feeds_controller_test.rb
78
130
  - test/performance/browsing_test.rb
79
131
  - test/test_helper.rb
80
132
  - test/test_logging.rb
133
+ - test/unit/blog_comment_test.rb
134
+ - test/unit/blog_observer_test.rb
135
+ - test/unit/blog_post_test.rb
136
+ - test/unit/blog_test.rb
137
+ - test/unit/helpers/feeds_helper_test.rb
@@ -1,29 +0,0 @@
1
- <div id="blog_post_<%= blog_post.id %>" class="blog_post">
2
- <h2>
3
- <% if blog_post.published_at %>
4
- <%= link_to h(blog_post.name), blog_post_path(blog_post.route_params) %>
5
- <% else %>
6
- <%=h blog_post.name %>
7
- <% end %>
8
- </h2>
9
- <% if blog_post.published_at %>
10
- <p class="date"><%= blog_post.published_at.to_s(:long) %></p>
11
- <% end %>
12
- <p class="body">
13
- <%= blog_post.body %>
14
- </p>
15
- <p class="meta">
16
- <% unless blog_post.category_id.blank? %>
17
- Posted in <%= link_to h(blog_post.category_name), blog_posts_in_category_path(:category => blog_post.category_name) %>
18
- <strong>|</strong>
19
- <% end %>
20
- Tags
21
- <span class="tags">
22
- <%= blog_post.tags.map{|t| link_to(h(t.name), blog_posts_with_tag_path(:tag => t.name)) }.join(", ") %>
23
- </span>
24
- <strong>|</strong>
25
- <% if blog_post.published_at %>
26
- <%= link_to h(pluralize(blog_post.comments_count, "Comment")), "#{blog_post_path(blog_post.route_params)}#comments" %>
27
- <% end %>
28
- </p>
29
- </div>