Sha256: 737d2ef671a38849a702af2ad680a4efbed5d7c9c1c8bcdf530e2cefd2e6e4df

Contents?: true

Size: 956 Bytes

Versions: 17

Compression:

Stored size: 956 Bytes

Contents

#!/usr/bin/env rake

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new :spec

desc 'Build and copy Mocha and Chai assets from submodules into vendor/assets'
task :assets => ['assets:build', 'assets:copy']

namespace :assets do
  task :build do
    sh 'git submodule update --init' unless File.exist?('mocha/Makefile') || File.exist?('chai/Makefile')
    sh 'cd mocha && npm install && make clean && make'
    sh 'cd chai && npm install && make clean && make'
  end

  task :copy do
    sh 'git submodule update --init' unless File.exist?('mocha/Makefile') || File.exist?('chai/Makefile')
    mkdir_p 'vendor/assets/javascripts'
    mkdir_p 'vendor/assets/stylesheets'
    cp 'mocha/mocha.js',  'vendor/assets/javascripts/'
    cp 'mocha/mocha.css', 'vendor/assets/stylesheets/'
    cp 'chai/chai.js',    'vendor/assets/javascripts/'
  end
end

task :default => :spec

task :server do
  sh 'rackup -p 3500 config.ru'
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
konacha-4.0.0 Rakefile
konacha-3.7.0 Rakefile
konacha-3.6.0 Rakefile
konacha-3.5.1 Rakefile
konacha-3.5.0 Rakefile
konacha-3.4.0 Rakefile
konacha-3.3.0 Rakefile
konacha-3.2.5 Rakefile
konacha-3.2.4 Rakefile
konacha-3.2.3 Rakefile
konacha-3.2.2 Rakefile
konacha-3.2.1 Rakefile
konacha-3.2.0 Rakefile
konacha-3.1.0 Rakefile
konacha-3.0.0 Rakefile
konacha-2.7.0 Rakefile
konacha-2.6.0 Rakefile