Permalink
Browse files

we dont need this configurable file extension nonesense

  • Loading branch information...
1 parent 3bf8b7b commit 27ec544c02e9b16d92535647378f89791f1a4643 @pote committed Apr 14, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/planet.rb
View
@@ -6,17 +6,15 @@
feed: 'http://blog.cuboxlabs.com/atom.xml',
author: 'Cubox',
image: 'http://cuboxlabs.com/img/cubox-humans/could-be-you.png',
- file_extension: '.markdown'
},
{
feed: 'http://feeds.feedburner.com/picandocodigo',
author: 'Fernando Briano',
image: 'http://www.gravatar.com/avatar/49c5bd577a2d7ef0628c8ceb90b8c7ae?s=128&d=identicon&r=PG',
- file_extension: '.markdown'
}
]
-class Blog < Struct.new(:feed, :author, :image, :file_extension, :posts)
+class Blog < Struct.new(:feed, :author, :image, :posts)
end
class Post < Struct.new(:title, :content, :date, :link, :blog)
@@ -94,7 +92,6 @@ def aggregate
blog[:feed],
blog[:author],
blog[:image],
- blog[:file_extension],
[]
)
@@ -119,7 +116,7 @@ def write_posts
posts(filter: {date: true, order: :date}).each do |post|
file_name = '_posts/'.concat post.file_name
- File.open(file_name + post.blog.file_extension, "w+") { |f|
+ File.open(file_name + '.markdown', "w+") { |f|
f.write(post.header)
f.write(post.content)
f.close

0 comments on commit 27ec544

Please sign in to comment.