Rakefile in cap_gun-0.0.9 vs Rakefile in cap_gun-0.2.0

- old
+ new

@@ -1,19 +1,36 @@ -require 'rubygems' -gem 'echoe', '~> 3.0.1' -require 'echoe' -require './lib/cap_gun.rb' +begin + require 'jeweler' + Jeweler::Tasks.new do |gemspec| + gemspec.name = "cap_gun" + gemspec.summary = "Bang! You're deployed." + gemspec.email = "opensource@thinkrelevance.com" + gemspec.homepage = "http://github.com/relevance/cap_gun" + gemspec.description = 'Super simple capistrano deployment notifications.' + gemspec.authors = ["Rob Sanheim", "Muness Alrubaie", "Relevance"] + gemspec.add_development_dependency "micronaut" + gemspec.add_development_dependency "mocha" + end + Jeweler::GemcutterTasks.new +rescue LoadError + puts "Jeweler not available. Install it with: sudo gem install jeweler" +end -echoe = Echoe.new('cap_gun') do |p| - p.rubyforge_name = 'thinkrelevance' - p.author = ["Rob Sanheim", "Relevance"] - p.email = 'opensource@thinkrelevance.com' - p.version = CapGun::VERSION - p.summary = "Bang! You're deployed!" - p.description = 'Super simple capistrano deployments.' - p.url = "http://opensource.thinkrelevance.com/wiki/cap_gun" - p.rdoc_pattern = /^(lib|bin|ext)|txt|rdoc|CHANGELOG|MIT-LICENSE$/ - rdoc_template = `allison --path`.strip << ".rb" - p.rdoc_template = rdoc_template - p.test_pattern = 'spec/**/*_spec.rb' - p.manifest_name = 'manifest.txt' -end \ No newline at end of file +begin + require 'micronaut/rake_task' + Micronaut::RakeTask.new(:examples) do |examples| + examples.pattern = 'examples/**/*_example.rb' + examples.ruby_opts << '-Ilib -Iexamples' + end + + Micronaut::RakeTask.new(:rcov) do |examples| + examples.pattern = 'examples/**/*_example.rb' + examples.rcov_opts = %[-Ilib -Iexamples --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage] + examples.rcov = true + end +end + +if RUBY_VERSION =~ /1.8/ + task :default => [:check_dependencies, :rcov] +else + task :default => [:check_dependencies, :examples] +end