Rakefile in gravatarify-0.7.0 vs Rakefile in gravatarify-1.0.0
- old
+ new
@@ -1,9 +1,13 @@
require 'rake'
require 'rake/testtask'
require 'yard'
+def gravatarify_version
+ @gravatarify_version ||= (tmp = YAML.load(File.read('VERSION.yml'))) && [tmp[:major], tmp[:minor], tmp[:patch]] * '.'
+end
+
desc 'Default: run unit tests.'
task :default => :test
desc 'Test the gravatarify plugin.'
Rake::TestTask.new(:test) do |t|
@@ -16,31 +20,39 @@
desc 'Generate documentation for gravatarify. (requires yard)'
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = ['lib/**/*.rb']
t.options = [
"--readme", "README.md",
- "--title", "Gravatarify API Documentation"
+ "--title", "gravatarify (v#{gravatarify_version}) API Documentation"
]
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "gravatarify"
- gemspec.summary = "Gravatar URLs for your ruby"
+ gemspec.summary = "Awesome gravatar support for ruby (and rails)."
+ description = <<-DESC
+ Yet another ruby/rails gravatar plugin - though, one with unique options like
+ `Proc`s for default images, or support for gravatar.com's multiple host names.
+ DESC
+ gemspec.description = description.strip
gemspec.email = "lukas.westermann@gmail.com"
gemspec.homepage = "http://github.com/lwe/gravatarify"
gemspec.authors = ["Lukas Westermann"]
+ gemspec.licenses = %w{LICENSE}
+ gemspec.extra_rdoc_files = %w{README.md}
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
desc 'Clean all generated files (.yardoc and doc/*)'
task :clean do |t|
FileUtils.rm_rf "doc"
FileUtils.rm_rf "pkg"
+ FileUtils.rm_rf "gravatarify.gemspec"
FileUtils.rm_rf ".yardoc"
end
namespace :metrics do
desc 'Report all metrics, i.e. stats and code coverage.'