Sha256: b5f07b499d4e845cdd29b02ff0ddd185b84aaa1d1f983e4550c74bdc02793337

Contents?: true

Size: 734 Bytes

Versions: 2

Compression:

Stored size: 734 Bytes

Contents

require 'bundler/gem_tasks'
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
  t.libs << 'test'
  t.libs << 'lib'
  t.test_files = FileList['test/**/*_test.rb']
end

task default: :test

namespace :dummy_site do
  DUMMY_SITE_PATH = File.expand_path('test/dummy_site', __dir__)
  DIAGRAMS = %w(apt cabal cargo java npm pip)

  %w(build serve).each do |action|
    desc "#{action.capitalize} the dummy site"
    task action.to_sym, :diagram do |t, args|
      args.with_defaults(diagram: '')
      diagram = args[:diagram]
      path = File.join(DUMMY_SITE_PATH, diagram)

      Dir.chdir(DUMMY_SITE_PATH) do
        %x(bundle install && bundle exec jekyll #{action} --config _config.yml -s #{path})
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-diagrams-0.9.0 Rakefile
jekyll-diagrams-0.8.0 Rakefile