exe/weaver in weaver-0.5.4 vs exe/weaver in weaver-0.6.0
- old
+ new
@@ -5,11 +5,11 @@
require 'sinatra/base'
class Website < Sinatra::Base
set :static, true # set up static file routing
- set :public_folder, Gem.datadir("weaver") # set up the static dir (with images/js/css inside)
+ set :public_folder, File.join(Gem.loaded_specs['weaver'].full_gem_path, "data", "weaver") # set up the static dir (with images/js/css inside)
set :bind, '0.0.0.0'
def getWeavefile(viewname)
pathToFile = viewname.split("/").delete_if(&:empty?)
@@ -97,10 +97,10 @@
puts "Building site..."
buildDir = "#{Dir.pwd}/build"
FileUtils::rm_rf buildDir
- FileUtils.cp_r(Gem.datadir("weaver"), buildDir)
+ FileUtils.cp_r(File.join(Gem.loaded_specs['weaver'].full_gem_path, "data", "weaver"), buildDir)
if Dir.exist? "images"
FileUtils.cp_r("images", buildDir)
end
if Dir.exist? "js"
Dir["js/*.*"].each do |x|
\ No newline at end of file