Rakefile in enigma-0.0.1 vs Rakefile in enigma-0.0.3
- old
+ new
@@ -1,26 +1,49 @@
-require 'rubygems'
-gem 'hoe', '>= 2.1.0'
-require 'hoe'
-require 'fileutils'
-require './lib/enigma'
-
-Hoe.plugin :newgem
-# Hoe.plugin :website
-# Hoe.plugin :cucumberfeatures
-
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.spec 'enigma' do
- self.developer 'T.J. VanSlyke', 'teejay.vanslyke@gmail.com'
- self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
- self.rubyforge_name = self.name # TODO this is default value
- self.extra_deps = [['ezcrypto', '>= 0.7.2']]
-
-end
-
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
-
-# TODO - want other tests/tasks run by default? Add them to the list
-# remove_task :default
-# task :default => [:spec, :features]
+require 'rubygems'
+require 'rake'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "enigma"
+ gem.summary = %Q{Key/secret authentication gem for your web services}
+ gem.description = %Q{Key/secret authentication gem for your web services}
+ gem.email = "teejay.vanslyke@gmail.com"
+ gem.homepage = "http://github.com/teejayvanslyke/enigma"
+ gem.authors = ["teejayvanslyke"]
+ gem.add_development_dependency "rspec", ">= 2.0.0"
+ gem.add_development_dependency 'rack-test'
+ gem.add_development_dependency 'sinatra'
+ gem.add_dependency 'rack'
+ gem.add_dependency 'httparty'
+ gem.add_dependency 'addressable'
+ gem.add_dependency 'rest_client'
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+end
+
+Jeweler::RubygemsDotOrgTasks.new
+
+require 'rspec/core'
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
+end
+
+RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+end
+
+task :default => :spec
+
+require 'rdoc/task'
+RDoc::Task.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "campistrano #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end