Permalink
Browse files

Added gitnesse:push_results feature

  • Loading branch information...
1 parent ded1276 commit a16d0d5692ea2cea6010582974b9efd5f8336e16 @stewart stewart committed Dec 5, 2012
Showing with 17 additions and 0 deletions.
  1. +2 −0 bin/gitnesse
  2. +9 −0 lib/gitnesse.rb
  3. +6 −0 lib/gitnesse/tasks.rake
View
2 bin/gitnesse
@@ -26,6 +26,8 @@ when "run"
Gitnesse.run
when "info"
puts Gitnesse.configuration.to_yaml
+when "push_results"
+ Gitnesse.push_results
when "help"
print_help
else
View
9 lib/gitnesse.rb
@@ -36,6 +36,14 @@ def run
end
end
+ def push_results
+ if push
+ Hooks.create
+ puts "Now going to run cucumber..."
+ exec("cucumber #{Gitnesse.configuration.target_directory}/*.feature")
+ end
+ end
+
# pull features from git wiki, and sync up with features dir
def pull
Dependencies.check
@@ -76,6 +84,7 @@ def push
end
end
puts " Done pushing features."
+ true
end
def clone_feature_repo(dir)
View
6 lib/gitnesse/tasks.rake
@@ -20,6 +20,12 @@ namespace :gitnesse do
Gitnesse.push
end
+ desc "Push features to remote git wiki repository, run cucumber, and push results to wiki"
+ task :push => :environment do
+ Gitnesse::Configuration.load_using_search
+ Gitnesse.push_results
+ end
+
desc "Dump the current config info to the console."
task :info => :environment do
Gitnesse::Configuration.load_using_search

0 comments on commit a16d0d5

Please sign in to comment.