2 desc "Import json format license data in license engine"
3 task :import => :environment do
4 Pettanr::Application.manifest = JSON.parse(open(Rails.root + 'public/manifest.json').read)
5 licenses = Pettanr::Application.manifest.system_resources.license_groups
6 licenses.each do |klass, name|
8 system 'rake ' + name + ':import'
12 desc "Copy migration file for license "
13 task :install => :environment do
14 Pettanr::Application.manifest = JSON.parse(open(Rails.root + 'public/manifest.json').read)
15 licenses = Pettanr::Application.manifest.system_resources.license_groups
16 licenses.each do |klass, name|
18 system 'rake ' + name + ':install:migrations'
20 puts "run 'rake db:migrate' if you can migrate database\n"