Skip to content

Commit

Permalink
Features for version 0.3.1.
Browse files Browse the repository at this point in the history
* Added individual tasks.
* Added default settings to fix errors.
  • Loading branch information
Hallison Batista committed Jul 9, 2009
1 parent 598b731 commit 8d188ab
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.session
*.tmp
test.*
config/settings.yml
posts
*.html

pkg
8 changes: 0 additions & 8 deletions .pkgignore

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion lib/postview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Postview
class << self

def version
[ 0, 3, 0, nil ].compact.join('.')
[ 0, 3, 1, nil ].compact.join('.')
end

def tagged
Expand Down
2 changes: 0 additions & 2 deletions lib/postview/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def self.load
new(SETTINGS)
end

private

def file_names_for(directory, pattern = "**.*")
Dir[File.join(directory_for(directory), pattern)]
end
Expand Down
25 changes: 22 additions & 3 deletions rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
require 'rake/testtask'
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))

Rake::TestTask.new
require 'lib/postview'

def banner(message)
printf "\n%s\n", Postview
printf "\n%s\n\n", message
end

def prompt(label, default = nil)
while true
printf((default ? "%s [%s]: " : "%s: "), "#{label}", "#{default}")
value = $stdin.readline.chomp.strip
value = default if value.empty?
return value unless value.nil? || value.to_s.empty?
end
end

Dir["tasks/*.rake"].each do |task|
load task
end

task :default => :test

task :default => [ :test ]
4 changes: 4 additions & 0 deletions tasks/test.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'rake/testtask'

Rake::TestTask.new

0 comments on commit 8d188ab

Please sign in to comment.