Sha256: ec2b167286ed69182bc39e862303058893e8eac80ba05e48d8d4153a1bdb8bea
Contents?: true
Size: 895 Bytes
Versions: 2
Compression:
Stored size: 895 Bytes
Contents
# -*- encoding: utf-8 -*- require 'pathname' require 'tmpdir' require 'busser/runner_plugin' # A Busser runner plugin for Shpec. class Busser::RunnerPlugin::Shpec < Busser::RunnerPlugin::Base postinstall do tmp_root = Pathname.new(Dir.mktmpdir("shpec")) tarball_url = "https://github.com/shpec/shpec/archive/master.tar.gz" tarball_file = tmp_root.join("shpec.tar.gz") extract_root = tmp_root.join("shpec") dest_path = vendor_path("shpec") empty_directory(extract_root) get(tarball_url, tarball_file) inside(extract_root) do run!(%{gunzip -c "#{tarball_file}" | tar xf - --strip-components=1}) ENV['PREFIX'] = dest_path.to_s run!(%{make install}) end remove_dir(tmp_root) end def test suite_files = suite_path('shpec').join('*') run!("#{vendor_path('shpec').join("bin/shpec")} #{suite_files}") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
busser-shpec-0.1.0 | lib/busser/runner_plugin/shpec.rb |
busser-shpec-0.1.0.dev | lib/busser/runner_plugin/shpec.rb |