Rakefile in gaptool-server-0.6.0.beta1 vs Rakefile in gaptool-server-0.6.0

- old
+ new

@@ -3,10 +3,11 @@ require 'shellwords' require 'rspec/core/rake_task' require_relative 'lib/helpers/redis' require_relative 'lib/helpers/init' +require_relative 'lib/helpers/rehash' DH = Gaptool::Data $stdout.sync = true def sys(cmd) @@ -18,18 +19,20 @@ $?.to_i end Dir.glob('tasks/*.rb').each { |r| load r} -desc "Start the shell" -task :shell do - exec "racksh #{Shellwords.join(ARGV[1..-1])}" -end -task :sh => :shell +unless File.exists?('/.dockerenv') + desc "Start the shell" + task :shell do + exec "racksh #{Shellwords.join(ARGV[1..-1])}" + end + task :sh => :shell -desc "Start the HTTP server" -task :server do - exec "unicorn #{Shellwords.join(ARGV[1..-1])}" + desc "Start the HTTP server" + task :server do + exec "unicorn #{Shellwords.join(ARGV[1..-1])}" + end end task :help do puts "Available tasks" exec "rake -T"