Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ae2b49c663
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 74 lines (63 sloc) 1.934 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
# encoding: utf-8
require 'rubygems'
require 'rake/rdoctask'
require 'rake/gempackagetask'
gem 'rspec'
require 'spec/rake/spectask'

PKG_NAME = 'r18n-core'
require 'lib/r18n-core/version'

task :default => :spec

Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_opts = ['--format', 'specdoc', '--colour']
  t.spec_files = Dir['spec/**/*_spec.rb'].sort
end

Spec::Rake::SpecTask.new('rcov') do |t|
  t.spec_opts = ['--colour']
  t.spec_files = Dir['spec/**/*_spec.rb'].sort
  t.rcov = true
  t.rcov_opts = ['--text-summary']
end

Rake::RDocTask.new do |rdoc|
  rdoc.main = 'README.rdoc'
  rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'lib/**/*.rb')
  rdoc.title = 'R18n Documentation'
  rdoc.rdoc_dir = 'doc'
  rdoc.options << '-c utf-8'
  rdoc.options << '--all'
end

spec = Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  s.name = PKG_NAME
  s.version = R18n::VERSION
  s.summary = 'I18n tool to translate your Ruby application.'
  s.description = <<-EOF
R18n is a i18n tool to translate your Ruby application.
It can format numbers and time to the rules of the user locale,
has translation for common words, storage translation in YAML format with
pluralization and procedures and has special support for countries
with two official languages.
EOF
  
  s.files = FileList[
    'base/**/*',
    'lib/**/*',
    'locales/**/*',
    'LICENSE',
    'README.rdoc']
  s.test_files = FileList[
    'spec/**/*']
  s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
  s.require_path = 'lib'
  s.has_rdoc = true
  
  s.author = 'Andrey "A.I." Sitnik'
  s.email = 'andrey@sitnik.ru'
  s.homepage = 'http://r18n.rubyforge.org/'
  s.rubyforge_project = PKG_NAME
end

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end

desc 'Install as a gem'
task :install => [:package] do
  sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
  sh %{#{sudo} gem install pkg/#{PKG_NAME}-#{R18n::VERSION}}
end
Something went wrong with that request. Please try again.