Skip to content
This repository
Browse code

Consolidate gemspec into Rakefile and add specs task

  • Loading branch information...
commit e54b06f8af306aa9a14ac3247678fccdc74ec089 1 parent e6928c8
Loren Segal authored

Showing 2 changed files with 24 additions and 18 deletions. Show diff stats Hide diff stats

  1. +24 1 Rakefile
  2. +0 17 yard.gemspec
25 Rakefile
... ... @@ -1,6 +1,23 @@
  1 +require 'rubygems'
1 2 require 'rake/gempackagetask'
2   -load 'yard.gemspec'
  3 +require 'spec'
  4 +require 'spec/rake/spectask'
3 5
  6 +SPEC = Gem::Specification.new do |s|
  7 + s.name = "yard"
  8 + s.version = "0.2.1"
  9 + s.date = "2007-05-20"
  10 + s.author = "Loren Segal"
  11 + s.email = "lsegal@soen.ca"
  12 + s.homepage = "http://yard.soen.ca"
  13 + s.platform = Gem::Platform::RUBY
  14 + s.summary = "A documentation tool for consistent and usable documentation in Ruby."
  15 + s.files = Dir.glob("{bin,lib,test,templates}/**/*") + ['LICENSE.txt', 'README.txt', 'help.pdf']
  16 + s.executables = [ 'yardoc', 'yri', 'yard-graph' ]
  17 + s.add_dependency 'erubis'
  18 + s.has_rdoc = false
  19 +end
  20 +
4 21 task :default => :gem
5 22
6 23 Rake::GemPackageTask.new(SPEC) do |pkg|
@@ -11,4 +28,10 @@ end
11 28 task :install do
12 29 puts(install = "sudo gem install pkg/#{SPEC.name}-#{SPEC.version}.gem --local")
13 30 `rake gem && #{install}`
  31 +end
  32 +
  33 +desc "Run all specs"
  34 +Spec::Rake::SpecTask.new("specs") do |t|
  35 + t.spec_opts = ["--format", "specdoc", "--colour"]
  36 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
14 37 end
17 yard.gemspec
... ... @@ -1,17 +0,0 @@
1   -require 'rubygems'
2   -SPEC = Gem::Specification.new do |s|
3   - s.name = "yard"
4   - s.version = "0.2.1"
5   - s.date = "2007-05-20"
6   - s.author = "Loren Segal"
7   - s.email = "lsegal@soen.ca"
8   - s.homepage = "http://yard.soen.ca"
9   - s.platform = Gem::Platform::RUBY
10   - s.summary = "A documentation tool for consistent and usable documentation in Ruby."
11   - s.files = Dir.glob("{bin,lib,test,templates}/**/*") + ['LICENSE.txt', 'README.txt', 'help.pdf']
12   - s.executables = [ 'yardoc', 'yri', 'yard-graph' ]
13   - s.add_dependency 'erubis'
14   - s.has_rdoc = false
15   -end
16   -
17   -

0 comments on commit e54b06f

Please sign in to comment.
Something went wrong with that request. Please try again.