Gem is rewrapped with Bundler instead of Jeweler. All tests are using RSpec. Reorganized lib structure. Tests are fixed.

This commit is contained in:
Gregory Eremin
2012-07-04 17:10:47 +04:00
parent 2ed4c869cb
commit 9121e7927e
34 changed files with 486 additions and 649 deletions
+6 -60
View File
@@ -1,62 +1,8 @@
# encoding: utf-8
#!/usr/bin/env rake
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'
RSpec::Core::RakeTask.new("spec")
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "musicbrainz"
gem.homepage = "http://github.com/magnolia-fan/musicbrainz"
gem.license = "MIT"
gem.summary = %Q{MusicBrainz Web Service wrapper}
gem.description = %Q{MusicBrainz Web Service wrapper with ActiveRecord-style models}
gem.email = "magnolia_fan@me.com"
gem.authors = ["Gregory Eremin"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |test|
test.verbose = true
end
desc "Run Test Unit with code coverage"
task :test_coverage do
ENV['COVERAGE'] = 'true'
Rake::Task["test"].execute
end
desc "Run RSpec with code coverage"
task :rspec_coverage do
ENV['COVERAGE'] = 'true'
Rake::Task["spec"].execute
end
task :default => :test
require 'rdoc/task'
RDoc::Task.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "musicbrainz #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
task :default => :spec
task :test => :spec