Sha256: 181e02df4c6b6839aaa7eead1b6d03577c48fe097e49df7af46ff39da8c66708
Contents?: true
Size: 886 Bytes
Versions: 6
Compression:
Stored size: 886 Bytes
Contents
module DependencyHelpers def build_gem(gem_name, version) FileUtils.mkdir_p "tmp/aruba/#{gem_name}/lib" FileUtils.cd "tmp/aruba/#{gem_name}" do gemspec = "#{gem_name}.gemspec" lib_file = "lib/#{gem_name}.rb" File.open gemspec, 'w' do |file| file.puts <<-gemspec Gem::Specification.new do |s| s.name = #{gem_name.inspect} s.version = #{version.inspect} s.authors = 'Mr. Smith' s.summary = 'summary' s.files = #{lib_file.inspect} end gemspec end File.open lib_file, 'w' do |file| file.puts "$#{gem_name}_version = '#{version}'" end `gem build #{gemspec} 2>&1` ENV['GEM_HOME'] = TMP_GEM_ROOT `gem install #{gem_name}-#{version}.gem 2>&1` end end end if respond_to?(:World) World(DependencyHelpers) end
Version data entries
6 entries across 4 versions & 2 rubygems