3fb14782a2
-- rspec 2.0.0 or greater now required (no one should be using the beta release anymore) -- activemodel and railties ~> 3.0.0 (no one should be using the beta releases anymore) -- remove 'require "couchrest_model"' dependency: -- version now read from jeweler default VERSION file. -- removing this requirement allows you to now run "rake install", to actually test out if the gem installs cleanly locally before doing any kind of push.
71 lines
2.3 KiB
Ruby
71 lines
2.3 KiB
Ruby
require 'rake'
|
|
require "rake/rdoctask"
|
|
|
|
begin
|
|
require 'rspec'
|
|
require 'rspec/core/rake_task'
|
|
rescue LoadError
|
|
puts <<-EOS
|
|
To use rspec for testing you must install rspec gem:
|
|
gem install rspec
|
|
EOS
|
|
exit(0)
|
|
end
|
|
|
|
begin
|
|
require 'jeweler'
|
|
Jeweler::Tasks.new do |gemspec|
|
|
gemspec.name = "couchrest_model"
|
|
gemspec.summary = "Extends the CouchRest Document for advanced modelling."
|
|
gemspec.description = "CouchRest Model provides aditional features to the standard CouchRest Document class such as properties, view designs, associations, callbacks, typecasting and validations."
|
|
gemspec.email = "jchris@apache.org"
|
|
gemspec.homepage = "http://github.com/couchrest/couchrest_model"
|
|
gemspec.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos", "Will Leinweber", "Sam Lown"]
|
|
gemspec.extra_rdoc_files = %w( README.md LICENSE THANKS.md )
|
|
gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt couchrest.gemspec) + Dir["{examples,lib,spec}/**/*"] - Dir["spec/tmp"]
|
|
gemspec.has_rdoc = true
|
|
gemspec.add_dependency("couchrest", "~> 1.0.1")
|
|
gemspec.add_dependency("mime-types", "~> 1.15")
|
|
gemspec.add_dependency("activemodel", "~> 3.0.0")
|
|
gemspec.add_dependency("tzinfo", "~> 0.3.22")
|
|
gemspec.add_dependency('railties', "~> 3.0.0")
|
|
gemspec.add_development_dependency('rspec', '>= 2.0.0')
|
|
gemspec.date = Time.now.strftime("%Y-%m-%d")
|
|
gemspec.require_path = "lib"
|
|
end
|
|
rescue LoadError
|
|
puts "Jeweler not available. Install it with: gem install jeweler"
|
|
end
|
|
|
|
desc "Run all specs"
|
|
Rspec::Core::RakeTask.new(:spec) do |spec|
|
|
spec.rspec_opts = ["--color"]
|
|
spec.pattern = 'spec/**/*_spec.rb'
|
|
end
|
|
|
|
desc "Print specdocs"
|
|
Rspec::Core::RakeTask.new(:doc) do |spec|
|
|
spec.rspec_opts = ["--format", "specdoc"]
|
|
spec.pattern = 'spec/*_spec.rb'
|
|
end
|
|
|
|
desc "Generate the rdoc"
|
|
Rake::RDocTask.new do |rdoc|
|
|
files = ["README.rdoc", "LICENSE", "lib/**/*.rb"]
|
|
rdoc.rdoc_files.add(files)
|
|
rdoc.main = "README.rdoc"
|
|
rdoc.title = "CouchRest: Ruby CouchDB, close to the metal"
|
|
end
|
|
|
|
desc "Run the rspec"
|
|
task :default => :spec
|
|
|
|
module Rake
|
|
def self.remove_task(task_name)
|
|
Rake.application.instance_variable_get('@tasks').delete(task_name.to_s)
|
|
end
|
|
end
|
|
|
|
Rake.remove_task("github:release")
|
|
Rake.remove_task("release")
|