forked from Psli/weibo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scott Ballantyne
committed
Sep 23, 2011
1 parent
ebe2820
commit d1313ad
Showing
3 changed files
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
require 'rubygems' | ||
require 'bundler/setup' | ||
require 'rake' | ||
require 'rspec/core/rake_task' | ||
require 'cucumber/rake/task' | ||
|
||
desc 'Default: Run the specs' | ||
task :default => ['spec:unit', 'cucumber'] | ||
|
||
namespace :spec do | ||
desc 'Run unit specs' | ||
RSpec::Core::RakeTask.new('unit') do |t| | ||
t.pattern = 'spec/{*_spec.rb,weibo/**/*_spec.rb}' | ||
end | ||
end | ||
task :spec => 'spec:unit' | ||
|
||
desc 'Cucumber' | ||
Cucumber::Rake::Task.new(:cucumber) do |t| | ||
t.fork = true | ||
end | ||
|
||
begin | ||
require 'jeweler' | ||
|
@@ -29,6 +10,7 @@ begin | |
gem.email = "[email protected]" | ||
gem.homepage = "http://github.com/ballantyne/weibo" | ||
gem.authors = ["Scott Ballantyne"] | ||
gem.add_development_dependency "thoughtbot-shoulda", ">= 0" | ||
gem.add_dependency "oauth", "~> 0.4.1" | ||
gem.add_dependency "hashie" | ||
gem.add_dependency "httparty", ">= 0.5.2" | ||
|
@@ -38,3 +20,37 @@ begin | |
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" | ||
end | ||
|
||
require 'rake/testtask' | ||
Rake::TestTask.new(:test) do |test| | ||
test.libs << 'lib' << 'test' | ||
test.pattern = 'test/**/test_*.rb' | ||
test.verbose = true | ||
end | ||
|
||
begin | ||
require 'rcov/rcovtask' | ||
Rcov::RcovTask.new do |test| | ||
test.libs << 'test' | ||
test.pattern = 'test/**/test_*.rb' | ||
test.verbose = true | ||
end | ||
rescue LoadError | ||
task :rcov do | ||
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" | ||
end | ||
end | ||
|
||
task :test => :check_dependencies | ||
|
||
task :default => :test | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "weibo #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |