Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

we dont need this configurable file extension nonesense

  • Loading branch information...
commit 27ec544c02e9b16d92535647378f89791f1a4643 1 parent 3bf8b7b
@pote authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/planet.rb
View
7 lib/planet.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.