Sha256: 96ed83cc64e86aa184d50a445e5d5920f68cb1c532030a23d03e762f78189d72

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

require 'bundler/gem_tasks'
require 'rake/testtask'
require 'jslint/tasks'

JSLint.config_path = '.jslint.yml'

namespace :test do
  # Separate the unit and integration tests when running the entire suite.
  Rake::TestTask.new(:unit) do |t|
    t.libs.push('lib')
    t.test_files = FileList[File.expand_path('../test/unit/**/*_test.rb', __FILE__)]
    t.verbose = true
  end

  Rake::TestTask.new(integration: :unit) do |t|
    t.libs.push('lib')
    t.test_files = FileList[File.expand_path('../test/integration/**/*_test.rb', __FILE__)]
    t.verbose = true
  end
end

# Keep a default test task for manually running any test
Rake::TestTask.new do |t|
  t.libs.push('lib')
  t.test_files = FileList[File.expand_path('../test/**/*_test.rb', __FILE__)]
  t.verbose = true
end

desc 'Start the web interface for development'
task server: 'server:start'

namespace :server do
  task :start do
    sh('shotgun config.ru')
  end

  desc 'Copy the current configuration for use with the development web interface'
  task :copy_config do
    FileUtils.mkdir_p('./tmp/web')
    FileUtils.copy(
      File.expand_path('.gitdocs/config.db', ENV['HOME']),
      './tmp/web/config.db'
    )
  end
end

task default: 'test:integration'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitdocs-0.5.0 Rakefile