Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.8.1
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (66 sloc) 2.414 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
require 'rubygems'
require 'rake'

begin
  require 'jeweler'
  JEWLER = Jeweler::Tasks.new do |gem|
    gem.name = "ruby-stemmer"
    gem.version = File.read(File.expand_path(File.join(File.dirname(__FILE__),"VERSION"))).strip!
    gem.summary = %Q{Expose libstemmer_c to Ruby.}
    gem.description = %Q{Expose the bundled libstemmer_c library to Ruby.}
    gem.email = "oancea@gmail.com"
    gem.homepage = "http://github.com/aurelian/ruby-stemmer"
    gem.authors = ["Aurelian Oancea", "Yury Korolev"]
    gem.extensions = ["ext/lingua/extconf.rb"]
    gem.rubyforge_project = "ruby-stemmer"
    gem.files = FileList['lib/**/*.rb', 'README.rdoc', 'MIT-LICENSE', 'VERSION', 'Rakefile', 'libstemmer_c/**/*', 'ext/**/*', 'test/**/*']
    %w(ext/lingua/*.so ext/lingua/*.bundle ext/lingua/Makefile ext/lingua/mkmf.log ext/lingua/*.o libstemmer_c/**/*.o libstemmer_c/stemwords).each do | f |
      gem.files.exclude f
    end
  end
  Jeweler::GemcutterTasks.new
  Jeweler::RubyforgeTasks.new do |rubyforge|
    rubyforge.doc_task = "rdoc"
  end
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.pattern = 'test/**/test_*.rb'
  test.verbose = true
end

begin
  require 'rcov/rcovtask'
  Rcov::RcovTask.new do |test|
    test.libs << 'test'
    test.pattern = 'test/**/test_*.rb'
    test.verbose = true
  end
rescue LoadError
  task :rcov do
    abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
  end
end

task :test => :check_dependencies

task :default => :test

gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"

CLOBBER.include("libstemmer_c/**/*.o")

Rake::ExtensionTask.new(JEWLER.gemspec.name, JEWLER.gemspec) do |ext|
  ext.lib_dir = File.join(*['lib', 'lingua', ENV['FAT_DIR']].compact)
  ext.ext_dir = File.join 'ext', 'lingua'
  ext.cross_compile = true
  ext.name = 'stemmer_native'
end

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
  rdoc.rdoc_dir = 'rdoc'
  rdoc.options << '--charset' << 'utf-8'
  rdoc.title = "Ruby-Stemmer #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
  rdoc.rdoc_files.include('ext/lingua/stemmer.c')
  rdoc.rdoc_files.include('MIT-LICENSE')
end
Something went wrong with that request. Please try again.