lib/vandal_ui/tasks.rb in vandal_ui-0.3.3 vs lib/vandal_ui/tasks.rb in vandal_ui-0.4.0
- old
+ new
@@ -1,9 +1,11 @@
namespace :vandal do
task :install do
cfg = YAML.load_file("#{Rails.root}/.graphiticfg.yml")
namespace = cfg['namespace']
- schema_path = "#{namespace}/schema.json"
+
+ vandal_path = VandalUi::Engine.routes.find_script_name({})
+ schema_path = "#{vandal_path}/schema.json"
source = File.join(File.dirname(__FILE__), 'static')
destination = "#{Rails.root}/public/#{namespace}"
FileUtils.rm_rf "#{destination}/vandal"
FileUtils.mkdir_p destination