Skip to content

Commit

Permalink
Move gemspec out of rake. Simplify Rakefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
threedaymonk committed Nov 2, 2011
1 parent 643f95d commit 55af084
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 40 deletions.
40 changes: 0 additions & 40 deletions Rakefile
@@ -1,48 +1,8 @@
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rcov/rcovtask'
require 'rake/rdoctask'

$:.unshift(File.dirname(__FILE__) + '/lib')
require 'text/version'

gemspec = Gem::Specification.new do |s|
s.name = 'text'
s.version = Text::VERSION::STRING
s.summary = 'A collection of text algorithms'
s.description = 'A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Figlet, Porter Stemming'
s.files = FileList['{lib,test}/**/*', 'README.rdoc', 'Rakefile']
s.require_path = 'lib'
s.has_rdoc = true
s.extra_rdoc_files = %w[README.rdoc]
s.rubyforge_project = 'text'
s.homepage = 'http://github.com/threedaymonk/text'
s.authors = ['Paul Battley', 'Michael Neumann', 'Tim Fletcher']
s.email = "pbattley@gmail.com"
end

Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.need_tar_gz = true
end

Rake::PackageTask.new(gemspec.name, gemspec.version) do |pkg|
pkg.need_tar_gz = true
pkg.package_files.include gemspec.files
end

Rake::TestTask.new do |t|
t.verbose = false
end

Rcov::RcovTask.new do |t|
t.rcov_opts = []
end

Rake::RDocTask.new do |t|
t.main = 'README.rdoc'
t.rdoc_files.include 'README.rdoc', 'lib/**/*.rb'
end

task :default => :test
16 changes: 16 additions & 0 deletions text.gemspec
@@ -0,0 +1,16 @@
require File.expand_path('../lib/text/version', __FILE__)

gemspec = Gem::Specification.new do |s|
s.name = 'text'
s.version = Text::VERSION::STRING
s.summary = 'A collection of text algorithms'
s.description = 'A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Figlet, Porter Stemming'
s.files = FileList['{lib,test}/**/*', 'README.rdoc', 'Rakefile']
s.require_path = 'lib'
s.has_rdoc = true
s.extra_rdoc_files = %w[README.rdoc]
s.rubyforge_project = 'text'
s.homepage = 'http://github.com/threedaymonk/text'
s.authors = ['Paul Battley', 'Michael Neumann', 'Tim Fletcher']
s.email = "pbattley@gmail.com"
end

0 comments on commit 55af084

Please sign in to comment.