Sha256: f3024d0f5a7ec03b25d9e49d04cc53f1c2fba8be6c2be74b985b62bfebffddf1
Contents?: true
Size: 985 Bytes
Versions: 9
Compression:
Stored size: 985 Bytes
Contents
require 'bundler/setup' require 'rake/clean' CLEAN.include 'src/*.gem' CLOBBER.include '*.4.8' CLOBBER.include '*.4.8.gz' CLOBBER.include '*.4.8.Z' CLOBBER.include 'gems/' CLOBBER.include 'quick/' # Target directory directory 'gems' # Run `gem` command without bundler's environment to avoid indexing # whole bundle def gem(command, dir='.') Dir.chdir(dir) do Bundler.with_clean_env do sh "gem #{command}" end end end # Build all gems in src/ GEMS = Dir['src/*.gemspec'].map do |gemspec| gem_name = File.basename(gemspec, '.gemspec') gem_filename = "#{gem_name}-0.gem" file "gems/#{gem_filename}" => [ gemspec, 'gems' ] do gem "build #{File.basename(gemspec)}", 'src' mv "src/#{gem_filename}", "gems/#{gem_filename}" end end # Fetch a "Hello, World" gem GEMS << file("gems/hello-0.0.1.gem" => 'gems') do gem 'fetch hello', 'gems' end # Regenerate index file 'specs.4.8' => GEMS do gem "generate_index" end # task :default => 'specs.4.8'
Version data entries
9 entries across 9 versions & 1 rubygems