diff options
| -rw-r--r-- | Rakefile | 2 | ||||
| -rwxr-xr-x | bin/ruby2d | 12 | ||||
| -rw-r--r-- | lib/ruby2d/image.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/music.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/sound.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/sprite.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/text.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/window.rb | 2 |
8 files changed, 13 insertions, 13 deletions
@@ -24,7 +24,7 @@ end def run_int_test(file) print_task "Running interpreted test: #{file}.rb" - run_cmd "( cd test/ && ruby #{file}.rb )" + run_cmd "( cd test/ && ruby -w #{file}.rb )" end def run_native_test(file) @@ -36,7 +36,7 @@ def check_build_src_file(rb_file) if !rb_file puts "Please provide a Ruby file to build" exit - elsif !File.exists? rb_file + elsif !File.exist? rb_file puts "Can't find file: #{rb_file}" exit end @@ -155,7 +155,7 @@ def build_apple(rb_file, device) check_build_src_file(rb_file) # Check for Simple 2D framework, - unless File.exists?('/usr/local/Frameworks/Simple2D/iOS/Simple2D.framework') && File.exists?('/usr/local/Frameworks/Simple2D/tvOS/Simple2D.framework') + unless File.exist?('/usr/local/Frameworks/Simple2D/iOS/Simple2D.framework') && File.exist?('/usr/local/Frameworks/Simple2D/tvOS/Simple2D.framework') puts "#{'Error:'.error} Simple 2D iOS and tvOS frameworks not found. Install them and try again.\n" exit end @@ -220,7 +220,7 @@ end # Launch a native app def launch_native - if !File.exists? 'build/app' + if !File.exist? 'build/app' puts "No native app built!" exit end @@ -230,7 +230,7 @@ end # Launch a web app def launch_web - if !File.exists? 'build/app.html' + if !File.exist? 'build/app.html' puts "No web app built!" exit end @@ -249,7 +249,7 @@ end def launch_apple(device) case device when 'ios' - if !File.exists? 'build/ios/build/Release-iphonesimulator/MyApp.app' + if !File.exist? 'build/ios/build/Release-iphonesimulator/MyApp.app' puts "No iOS app built!" exit end @@ -257,7 +257,7 @@ def launch_apple(device) simple2d simulator --install "build/ios/build/Release-iphonesimulator/MyApp.app" && simple2d simulator --launch "Ruby2D.MyApp"` when 'tvos' - if !File.exists? 'build/tvos/build/Release-appletvsimulator/MyApp.app' + if !File.exist? 'build/tvos/build/Release-appletvsimulator/MyApp.app' puts "No tvOS app built!" exit end diff --git a/lib/ruby2d/image.rb b/lib/ruby2d/image.rb index 5a57953..793c25a 100644 --- a/lib/ruby2d/image.rb +++ b/lib/ruby2d/image.rb @@ -11,7 +11,7 @@ module Ruby2D @path = path unless RUBY_ENGINE == 'opal' - unless File.exists? @path + unless File.exist? @path raise Error, "Cannot find image file `#{@path}`" end end diff --git a/lib/ruby2d/music.rb b/lib/ruby2d/music.rb index 5974a8a..e47131e 100644 --- a/lib/ruby2d/music.rb +++ b/lib/ruby2d/music.rb @@ -9,7 +9,7 @@ module Ruby2D def initialize(path) unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find audio file `#{path}`" end end diff --git a/lib/ruby2d/sound.rb b/lib/ruby2d/sound.rb index c1d4060..0a0b40d 100644 --- a/lib/ruby2d/sound.rb +++ b/lib/ruby2d/sound.rb @@ -9,7 +9,7 @@ module Ruby2D def initialize(path) unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find audio file `#{path}`" end end diff --git a/lib/ruby2d/sprite.rb b/lib/ruby2d/sprite.rb index 41c48e2..cc9e31f 100644 --- a/lib/ruby2d/sprite.rb +++ b/lib/ruby2d/sprite.rb @@ -11,7 +11,7 @@ module Ruby2D # Check if sprite file exists, unless running on the web unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find sprite image file `#{path}`" end end diff --git a/lib/ruby2d/text.rb b/lib/ruby2d/text.rb index 5f942cd..93ea062 100644 --- a/lib/ruby2d/text.rb +++ b/lib/ruby2d/text.rb @@ -17,7 +17,7 @@ module Ruby2D @font = opts[:font] || Font.default unless RUBY_ENGINE == 'opal' - unless File.exists? @font + unless File.exist? @font raise Error, "Cannot find font file `#{@font}`" end end diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index 5b0b7cb..fa12fd0 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -321,7 +321,7 @@ module Ruby2D # Add controller mappings from file def add_controller_mappings unless RUBY_ENGINE == 'opal' - if File.exists? @controller_mappings + if File.exist? @controller_mappings ext_add_controller_mappings(@controller_mappings) end end |
