Sha256: ed8221bfa7e6c600b47714eea1a58f98efc119a0730725a7736f5eb706b6928f

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

# Rakefile for google-translate

require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'rake/rdoctask'
require 'rcov/rcovtask'

task :default => :package

begin
  require 'bundler'
  
  begin
    require 'jeweler'
    
    Jeweler::Tasks.new do |gemspec|
      gemspec.name = "google-translate"
      gemspec.summary = "Simple client for Google Translate API (Summary)."
      gemspec.description = "Simple client for Google Translate API."
      gemspec.email = "alexander.shvets@gmail.com"
      gemspec.homepage = "http://github.com/shvets/google-translate"
      gemspec.authors = ["Alexander Shvets"]
      gemspec.files = FileList["CHANGES", "google-translate.gemspec", "Rakefile", "README", "VERSION",
                               "lib/**/*", "bin/**/*"]
      gemspec.add_dependency "json_pure", ">= 1.1.4"   

      gemspec.executables = ['translate', 't']
      gemspec.requirements = ["none"]
      gemspec.bindir = "bin"
    
      gemspec.add_bundler_dependencies
    end
  rescue LoadError
    puts "Jeweler not available. Install it s with: [sudo] gem install jeweler"
  end
rescue LoadError
  puts "Bundler not available. Install it s with: [sudo] gem install bundler"
end

desc "Run gem code locally"
task :"run:gem" do
  command = "bin/translate " + (ENV['params'].nil? ? '' : ENV['params'])
  puts ruby("#{command}")
end

Spec::Rake::SpecTask.new do |task|
  task.libs << 'lib'
  task.pattern = 'spec/**/*_spec.rb'
  task.verbose = false
end

Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'teststuff'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

Rcov::RcovTask.new do |task|
  task.libs << 'test'
  task.test_files = FileList['test/**/*_test.rb']
  task.verbose = true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
google-translate-0.7.0 Rakefile