Enable server to require i-mic-fps.rb without launching game, fixed missing update method from connection/server, update gemfile to add releasy and rake

This commit is contained in:
2020-05-04 09:28:57 -05:00
parent 85dd90b2f4
commit d524c21332
7 changed files with 42 additions and 25 deletions

View File

@@ -129,17 +129,20 @@ require_relative "lib/window"
require_relative "lib/tools/asset_viewer"
require_relative "lib/tools/map_editor"
if ARGV.join.include?("--profile")
begin
require "ruby-prof"
RubyProf.start
IMICFPS::Window.new.show
result = RubyProf.stop
printer = RubyProf::MultiPrinter.new(result)
printer.print(path: ".", profile: "profile", min_percent: 2)
rescue LoadError
puts "ruby-prof not installed!"
# Don't launch game if __FILE__ != launching command
if __FILE__ == $0
if ARGV.join.include?("--profile")
begin
require "ruby-prof"
RubyProf.start
IMICFPS::Window.new.show
result = RubyProf.stop
printer = RubyProf::MultiPrinter.new(result)
printer.print(path: ".", profile: "profile", min_percent: 2)
rescue LoadError
puts "ruby-prof not installed!"
end
else
IMICFPS::Window.new.show
end
else
IMICFPS::Window.new.show
end
end