Sha256: 0f421f76af84908edbe66a511b59a3842b6878a9a2e5d6e0059141f12c1deec5
Contents?: true
Size: 1.12 KB
Versions: 7
Compression:
Stored size: 1.12 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!("export FONTANA_APP_MODE=test && bundle exec rake vendor:fontana:prepare test:servers:start") } begin fileutils.chdir(__dir__) do Rake::Task["spec"].execute end ensure fileutils.chdir(sample_dir){ system!("rake test:servers:stop") } end # 最後の子プロセスの終了ステータスで終了します exit($?.exitstatus || 1) end task :default => :test
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
libgss-0.7.5 | Rakefile |
libgss-0.7.4 | Rakefile |
libgss-0.7.3 | Rakefile |
libgss-0.7.2 | Rakefile |
libgss-0.7.1 | Rakefile |
libgss-0.7.0 | Rakefile |
libgss-0.6.2 | Rakefile |