Sha256: 978005864c9ecafb262ea3b546de1cbc82a3d086d52e739028783f7dc59fed72
Contents?: true
Size: 872 Bytes
Versions: 5
Compression:
Stored size: 872 Bytes
Contents
require_relative 'lib/hoosegow' require 'bundler/gem_tasks' require 'rspec/core/rake_task' begin require_relative 'config' rescue LoadError CONFIG = {} end inmate_dir = File.join(File.dirname(__FILE__), 'spec', 'test_inmate') CONFIG[:inmate_dir] = inmate_dir CONFIG[:image_name] = Hoosegow.new(CONFIG).image_name RSpec::Core::RakeTask.new(:spec) Rake::Task[:spec].prerequisites << :bootstrap_docker task :default => :spec def hoosegow @hoosgow ||= Hoosegow.new CONFIG end desc "Benchmark render_reverse run in docker" task :benchmark => :bootstrap_docker do 10.times do |i| sleep 0.5 start = Time.now hoosegow.render_reverse "foobar" puts "render_reverse run ##{i} took #{Time.now - start} seconds" end hoosegow.cleanup end desc "Building docker image." task :bootstrap_docker do hoosegow.build_image unless hoosegow.image_exists? end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
hoosegow-1.2.7 | Rakefile |
hoosegow-1.2.6 | Rakefile |
hoosegow-1.2.5 | Rakefile |
hoosegow-1.2.4 | Rakefile |
hoosegow-1.2.3 | Rakefile |