Sha256: 75117e331389cf4aa42eccbbc873d03b5ca07413ae8681a274e056b34ed56180
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
require 'rake' require 'rake/testtask' require 'sprockets' require 'tilt' require 'fileutils' task :default => [:test] desc "Run basic tests" Rake::TestTask.new(:test) do |t| t.libs << "test" << "lib" t.test_files = FileList['test/**/*_test.rb'] t.verbose = true end namespace :doc do desc "Generate JS from CoffeeScript" task :generate_js do ctx = Sprockets::Environment.new(File.expand_path("../", __FILE__)) Tilt::CoffeeScriptTemplate.default_bare=true ctx.append_path "app/assets/javascripts" api = ctx.find_asset('patient') Dir.mkdir('tmp') unless Dir.exists?( 'tmp') File.open('tmp/patient.js', 'w+') do |js_file| js_file.write api end end desc "Generate docs for patient API" task :js => :generate_js do system 'java -jar ./doc/jsdoc-toolkit/jsrun.jar ./doc/jsdoc-toolkit/app/run.js -t=doc/jsdoc-toolkit/templates/jsdoc -a tmp/patient.js -d=doc/patient-api' end task :copydir do Dir.mkdir('patientapi') unless Dir.exists? ('patientapi') cp_r "doc/patient-api", "../query-composer/public/patientapi" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hquery-patient-api-1.1.1 | Rakefile |
hquery-patient-api-1.1.0 | Rakefile |