Sha256: e24bf42e368457a72d9c57e1178670e40757f9a1449d98550e0564bfdc2a5d53
Contents?: true
Size: 1.36 KB
Versions: 1
Compression:
Stored size: 1.36 KB
Contents
require 'rake' require 'fileutils' current_dir = File.expand_path(File.dirname(__FILE__)) Dir.chdir current_dir # # Specs # require 'spec/rake/spectask' task :default => :spec Spec::Rake::SpecTask.new('spec') do |t| t.spec_files = FileList["spec/**/*_spec.rb"].select{|f| f !~ /\/_/} t.libs = ["#{current_dir}/lib"] end # # Gem # require 'rake/clean' require 'rake/gempackagetask' gem_options = { :name => "ruby-ext", :version => "0.4.6", :summary => "Ruby language extensions", :dependencies => %w(facets) } spec = Gem::Specification.new do |s| gem_options.delete(:dependencies).each{|d| s.add_dependency d} gem_options.each{|k, v| s.send "#{k}=", v} s.author = "Alexey Petrushin" s.homepage = "http://github.com/alexeypetrushin/ruby_ext" # "#{gem_options[:name]}" s.require_path = "lib" s.files = (%w{Rakefile readme.md} + Dir.glob("{lib,spec}/**/*")) s.platform = Gem::Platform::RUBY s.has_rdoc = true end package_dir = "#{current_dir}/build" Rake::GemPackageTask.new(spec) do |p| p.need_tar = true if RUBY_PLATFORM !~ /mswin/ p.need_zip = true p.package_dir = package_dir end task :push do # dir = Dir.chdir package_dir do gem_file = Dir.glob("#{package_dir}/#{gem_options[:name]}*.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.6 | Rakefile |