Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Consolidate gemspec into Rakefile and add specs task

  • Loading branch information...
commit e54b06f8af306aa9a14ac3247678fccdc74ec089 1 parent e6928c8
@lsegal authored
Showing with 24 additions and 18 deletions.
  1. +24 −1 Rakefile
  2. +0 −17 yard.gemspec
View
25 Rakefile
@@ -1,6 +1,23 @@
+require 'rubygems'
require 'rake/gempackagetask'
-load 'yard.gemspec'
+require 'spec'
+require 'spec/rake/spectask'
+SPEC = Gem::Specification.new do |s|
+ s.name = "yard"
+ s.version = "0.2.1"
+ s.date = "2007-05-20"
+ s.author = "Loren Segal"
+ s.email = "lsegal@soen.ca"
+ s.homepage = "http://yard.soen.ca"
+ s.platform = Gem::Platform::RUBY
+ s.summary = "A documentation tool for consistent and usable documentation in Ruby."
+ s.files = Dir.glob("{bin,lib,test,templates}/**/*") + ['LICENSE.txt', 'README.txt', 'help.pdf']
+ s.executables = [ 'yardoc', 'yri', 'yard-graph' ]
+ s.add_dependency 'erubis'
+ s.has_rdoc = false
+end
+
task :default => :gem
Rake::GemPackageTask.new(SPEC) do |pkg|
@@ -11,4 +28,10 @@ end
task :install do
puts(install = "sudo gem install pkg/#{SPEC.name}-#{SPEC.version}.gem --local")
`rake gem && #{install}`
+end
+
+desc "Run all specs"
+Spec::Rake::SpecTask.new("specs") do |t|
+ t.spec_opts = ["--format", "specdoc", "--colour"]
+ t.spec_files = Dir["spec/**/*_spec.rb"].sort
end
View
17 yard.gemspec
@@ -1,17 +0,0 @@
-require 'rubygems'
-SPEC = Gem::Specification.new do |s|
- s.name = "yard"
- s.version = "0.2.1"
- s.date = "2007-05-20"
- s.author = "Loren Segal"
- s.email = "lsegal@soen.ca"
- s.homepage = "http://yard.soen.ca"
- s.platform = Gem::Platform::RUBY
- s.summary = "A documentation tool for consistent and usable documentation in Ruby."
- s.files = Dir.glob("{bin,lib,test,templates}/**/*") + ['LICENSE.txt', 'README.txt', 'help.pdf']
- s.executables = [ 'yardoc', 'yri', 'yard-graph' ]
- s.add_dependency 'erubis'
- s.has_rdoc = false
-end
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.