Sha256: 6c6ed8b021630fc08b8523fa95aeb93853886a8bb5c9e91a8cb91bb8e5a9404f

Contents?: true

Size: 889 Bytes

Versions: 10

Compression:

Stored size: 889 Bytes

Contents

require 'rake'
require 'fileutils'

def gemspec
  @gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec')
end

def gem_file
  "#{gemspec.name}-#{gemspec.version}#{ENV['GEM_PLATFORM'] == 'java' ? '-java' : ''}.gem"
end

desc "Build the gem"
task :gem=>:gemspec do
  sh "gem build .gemspec"
  FileUtils.mkdir_p 'pkg'
  FileUtils.mv gem_file, 'pkg'
end

desc "Build gems for the default and java platforms"
task :all_gems => :gem do
  ENV['GEM_PLATFORM'] = 'java'
  @gemspec = nil
  Rake::Task["gem"].reenable
  Rake::Task["gem"].invoke
end

desc "Install the gem locally"
task :install => :gem do
  sh %{gem install pkg/#{gem_file}}
end

desc "Generate the gemspec"
task :generate do
  puts gemspec.to_ruby
end

desc "Validate the gemspec"
task :gemspec do
  gemspec.validate
end

desc 'Run tests'
task :test do |t|
  sh 'bacon -q -Ilib -I. test/*_test.rb'
end

task :default => :test

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
bond-0.5.1 Rakefile
bond-0.5.1-java Rakefile
bond-0.5.0 Rakefile
bond-0.5.0-java Rakefile
rake-builder-0.8.0 examples/04_zlib/vendor/bundle/gems/bond-0.4.3/Rakefile
rake-builder-0.7.0 examples/04_zlib/vendor/bundle/gems/bond-0.4.3/Rakefile
bond-0.4.3 Rakefile
bond-0.4.3-java Rakefile
bond-0.4.2 Rakefile
bond-0.4.2-java Rakefile