Sha256: 03fd33f44d4a131b7ff89013410bff7d615cc1d8ee2401f439b72a9bc3cc3ecd

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

require "rake/testtask"
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'coffee-script'


task :default => [:spec, 'evergreen:run']


desc 'run Rspec specs'
task :spec do
  sh 'rspec spec'
end


namespace :evergreen do
  desc 'run Evergreen specs'
  task :run do
    sh 'evergreen run'
  end

  desc 'start an Evergreen server'
  task :serve do
    sh 'evergreen serve'
  end
end


namespace :travis do
  desc 'Prepares evergreen and JS files for Travis CI'
  task :prepare do
    # Prepare directories
    sh "mkdir -p public/javascripts/vendor"
    sh "mkdir -p public/javascripts/firehose"

    # Precompile coffeescript
    Dir.glob 'lib/assets/javascripts/**/*.js.coffee' do |coffee_file|
      dest = coffee_file.gsub( 'lib/assets/', 'public/' ).gsub '.js.coffee', '.js'

      File.open dest, 'w' do |file|
        file.write ::CoffeeScript.compile File.read coffee_file
      end
    end

    # Copy JS vendor files into public
    Dir.glob [
      'spec/javascripts/support/*.js',
      'lib/assets/javascripts/vendor/*.js'
    ] do |js_file|
      sh "cp #{js_file} public/javascripts/vendor"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
firehose-1.2.20 Rakefile
firehose-1.2.13 Rakefile
firehose-1.2.12 Rakefile
firehose-1.2.11 Rakefile