Sha256: 457593edcd8514b2a766e722a40fe29e5b3fdecb8c012a8b78771f662b6d503b

Contents?: true

Size: 1.57 KB

Versions: 1

Compression:

Stored size: 1.57 KB

Contents

require 'rake'
require 'spec/rake/spectask'

Dir.chdir File.dirname(__FILE__)  

# Specs
task :default => :spec

Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_files = FileList["spec/**/*_spec.rb"].select{|f| f !~ /\/_/}
  t.libs = ['lib'].collect{|f| "#{File.dirname __FILE__}/#{f}"}
end

# Gem
require 'rake/clean'
require 'rake/gempackagetask'
require 'fileutils'

spec = Gem::Specification.new do |s|
  s.name = "ruby-ext"
  s.version = "0.4.2" 
  s.summary = "Set of common Ruby language extensions"
  s.description = "Set of common Ruby language extensions"
  s.author = "Alexey Petrushin"
  #  s.email = ""
  s.homepage = "http://github.com/alexeypetrushin/ruby-ext"
  # s.rubyforge_project = "RubyExt"
  
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  # s.extra_rdoc_files = ["README.rdoc"]
  
  s.files = (%w{Rakefile readme.md .gitignore} + Dir.glob("{lib,spec,old,.git}/**/*"))
  #  s.executables = ['restclient']
  #  s.add_dependency("BlueCloth", ">= 0.0.4")
  s.add_dependency "facets"
  
  s.require_path = "lib"
end

PACKAGE_DIR = "#{File.expand_path File.dirname(__FILE__)}/build"

Rake::GemPackageTask.new(spec) do |p|
  package_dir = PACKAGE_DIR
#  FileUtils.mkdir package_dir unless File.exist? package_dir  
  p.need_tar = true if RUBY_PLATFORM !~ /mswin/
  p.need_zip = true
  p.package_dir = package_dir
end

# CLEAN.include [ 'pkg', '*.gem']

task :push do
  dir = Dir.chdir PACKAGE_DIR do
    gem_file = Dir.glob("ruby-ext*.gem").first
    system "gem push #{gem_file}"
  end
end

task :clean do
  system "rm -r #{PACKAGE_DIR}"
end

task :release => [:gem, :push, :clean]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-ext-0.4.2 Rakefile