lib/rbundle.rb in rbundle-0.2.5 vs lib/rbundle.rb in rbundle-0.2.6
- old
+ new
@@ -1,8 +1,7 @@
require "rbundle/version"
require "yaml"
-require "parallel"
def with_retries(retries = 3, back_off = 60, args, &block)
counter = 1
until counter > retries do
begin
@@ -18,11 +17,11 @@
end
class RBundler
def self.bundle
install_installer
- Parallel.map(self.read_requirements, in_processes: 5) {|d| install(d)}
+ self.read_requirements.each {|d| install(d)}
end
def self.read_requirements
dependencies_definitions = "#{Dir.pwd}/dependencies.txt"
puts "Reading Dependencies to install from #{Dir.pwd}/dependencies.txt"
@@ -48,10 +47,10 @@
def self.install(dependency)
with_retries(args = [dependency]) do |dependency|
puts "Installing #{dependency['package']}"
command = %{
- R --slave --vanilla -e "options(warn=2); options(install.lock=F); library(devtools); if ((!'#{dependency['package']}' %in% installed.packages()[,'Package']) || packageVersion('#{dependency['package']}') < '#{dependency['version']}') install_version('#{dependency['package']}', version='#{dependency['version']}', repos=c('https://cloud.r-project.org'), quiet=F)"
+ R --slave --vanilla -e "options(warn=2); library(devtools); if ((!'#{dependency['package']}' %in% installed.packages()[,'Package']) || packageVersion('#{dependency['package']}') < '#{dependency['version']}') install_version('#{dependency['package']}', version='#{dependency['version']}', repos=c('https://cloud.r-project.org'), quiet=F)"
}
puts "Executing #{command}"
`#{command}`
command_inspector($?.exitstatus)
end
\ No newline at end of file