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