[RM-644] install bundled gem and run "bundle exec" for extension

This commit is contained in:
Watson
2014-11-28 15:12:44 +09:00
committed by Eloy Durán
parent 5a3aa2023a
commit d12602ed50

View File

@@ -50,12 +50,22 @@ module Motion; module Project
# @return [Boolean] Whether or not invoking the rake task succeeded.
#
def rake(task)
command = "cd #{@full_path} && #{environment_variables} rake #{task}"
if App::VERBOSE
command << " --trace"
puts command
Dir.chdir(@full_path) do
ENV["PWD"] = @full_path
rake = "rake"
if File.exist?("Gemfile")
ENV["BUNDLE_GEMFILE"] = File.join(@full_path, "Gemfile")
system(ENV, "bundle install") unless File.exist?("Gemfile.lock")
rake = "bundle exec rake"
end
command = "#{environment_variables} #{rake} #{task}"
if App::VERBOSE
command << " --trace"
puts command
end
system(ENV, command)
end
system(command)
end
def build(platform)