Sha256: 6896ba60ae5221338b519fc6893063ee6bb4c59ecf96eb957334e5db8130aafb

Contents?: true

Size: 942 Bytes

Versions: 8

Compression:

Stored size: 942 Bytes

Contents

require "bundler/gem_helper"

base_dir = File.join(File.dirname(__FILE__))

helper = Bundler::GemHelper.new(base_dir)
helper.install

FileList['tasks/**.rake'].each {|f| load f }

desc "Run tests"
task :test do
  cd(base_dir) do
    ruby("test/run-test.rb")
  end
end

task default: 'test'

namespace :docker do
  def root_dir
    @root_dir ||= File.expand_path("..", __FILE__)
  end

  task :build do
    container_name = "iruby_build"
    image_name = "mrkn/iruby"
    sh "docker", "run",
       "--name", container_name,
       "-v", "#{root_dir}:/tmp/iruby",
       "rubylang/ruby", "/bin/bash", "/tmp/iruby/docker/setup.sh"
    sh "docker", "commit", container_name, image_name
    sh "docker", "rm", container_name
  end

  task :test do
    root_dir = File.expand_path("..", __FILE__)
    sh "docker", "run", "-it", "--rm",
       "-v", "#{root_dir}:/tmp/iruby",
       "mrkn/iruby", "/bin/bash", "/tmp/iruby/docker/test.sh"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
iruby-0.7.4 Rakefile
iruby-0.7.3 Rakefile
iruby-0.7.2 Rakefile
iruby-0.7.1 Rakefile
iruby-0.7.0 Rakefile
iruby-0.6.1 Rakefile
iruby-0.6.0 Rakefile
iruby-0.5.0 Rakefile