Sha256: 5196ffb6374b2fb042235e3c0b9c432a8d3f9ebb3f791603f90147df74875881
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
# -*- coding: utf-8 -*- require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) ENV['DEFAULT_HTTP_PORT'] ||= '3000' ENV['DEFAULT_HTTPS_PORT'] ||= '3001' require 'fileutils' def system!(cmd) puts "now executing: #{cmd}" IO.popen("#{cmd} 2>&1") do |io| while line = io.gets puts line end end if $?.exitstatus != 0 exit(1) end end desc "test with fontana-LibgssTest" task :test do fileutils = FileUtils::Verbose __dir__ = File.expand_path("..", __FILE__) sample_dir = File.join(__dir__, "fontana_sample") if Dir["#{sample_dir}/*"].empty? raise "#{sample_dir} is empty. You have to do `git submodule update --init` before `rake test`" end fileutils.chdir(sample_dir){ system!("rake vendor:fontana:reset servers:start") } begin fileutils.chdir(__dir__) do Rake::Task["spec"].execute end ensure fileutils.chdir(sample_dir){ system!("rake servers:stop") } end # 最後の子プロセスの終了ステータスで終了します exit($?.exitstatus || 1) end task :default => :test
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
libgss-0.5.0 | Rakefile |
libgss-0.4.1 | Rakefile |
libgss-0.4.0 | Rakefile |