Rakefile in ShadowBelmolve-money-2.3.4 vs Rakefile in ShadowBelmolve-money-2.3.5
- old
+ new
@@ -1,27 +1,48 @@
-%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
-require File.dirname(__FILE__) + '/lib/money'
+require 'rubygems'
+require 'rake'
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.new('money', Money::VERSION) do |p|
- p.developer('Money Team', 'see@readme')
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
- p.rubyforge_name = p.name
- p.summary = "This library aids one in handling money and different currencies."
- p.description = "This library aids one in handling money and different currencies."
- p.url = "http://github.com/nofxx/money"
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "money"
+ gem.summary = "This library aids one in handling money and different currencies."
+ gem.description = "This library aids one in handling money and different currencies."
+ gem.email = "see@reame"
+ gem.homepage = "http://github.com/nofxx/money"
+ gem.authors = ["Money Team"]
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+end
- p.extra_dev_deps = [
- ['newgem', ">= #{::Newgem::VERSION}"]
- ]
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+end
- p.clean_globs |= %w[**/.DS_Store *.log]
- path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
- p.rsync_args = '-av --delete --ignore-errors'
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
-require 'newgem/tasks' # load /tasks/*.rake
-Dir['tasks/**/*.rake'].each { |t| load t }
+task :default => :spec
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ if File.exist?('VERSION.yml')
+ config = YAML.load(File.read('VERSION.yml'))
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
+ else
+ version = ""
+ end
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "money #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end