Skip to content

Commit

Permalink
Implement rake gitnesse:info
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Hurtado committed Nov 10, 2012
1 parent da7a323 commit f84d4c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Rakefile
Expand Up @@ -13,16 +13,19 @@ task :default => :test
namespace :gitnesse do
desc "Push local features to remote git-based wiki."
task :push do
abort("Please provide a config file. Example: rake gitnesse:push CONFIG='./gitneese.rb'") unless ENV['CONFIG']
load(ENV['CONFIG'])
Gitnesse.load_config
Gitnesse.push
end

desc "Pull remote features from git-based wiki to local."
task :pull do
abort("Please provide a config file. Example: rake gitnesse:push CONFIG='./gitneese.rb'") unless ENV['CONFIG']
load(ENV['CONFIG'])
Gitnesse.load_config
Gitnesse.pull
end

desc "Dump the current config info to the console."
task :info do
Gitnesse.load_config
puts Gitnesse.config_to_hash.to_yaml
end
end
5 changes: 5 additions & 0 deletions lib/gitnesse.rb
Expand Up @@ -272,4 +272,9 @@ def load_config
end
end

def config_to_hash
{ "repository_url" => Gitnesse.repository_url,
"branch" => Gitnesse.branch,
"target_directory" => Gitnesse.target_directory }
end
end

0 comments on commit f84d4c9

Please sign in to comment.