forked from sanger/sm_workflow_lims
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
45 lines (36 loc) · 938 Bytes
/
Rakefile
File metadata and controls
45 lines (36 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require "sinatra/activerecord/rake"
# Rakefile
APP_FILE = './app.rb'
APP_CLASS = 'SmWorkflowLims'
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :spec => %w[db:create db:test:prepare]
rescue LoadError
end
require 'sinatra/assetpack/rake'
task :default => :test
task :test => :spec
namespace :db do
task :load_config do
require "./app"
end
end
namespace :build do
task :manifest do
puts "Building manifest!"
File.open('./app/manifest.rb','w') do |file|
`git ls-files app | grep -e [\.]rb`.split.each do |req|
next if req == 'app/manifest.rb'
file.puts "require './#{req.gsub(/\.rb$/,'')}'"
print '.'
end
end
puts '.'
puts 'Manifest Built:'
puts `cat ./app/manifest.rb`
end
task :assets => ['assetpack:build'] do
`cp -r $(bundle show bootstrap-sass)/vendor/assets/fonts/bootstrap public/assets/stylesheets/`
end
end