diff --git a/beef b/beef index c008fa309..0e478b68f 100755 --- a/beef +++ b/beef @@ -9,25 +9,17 @@ # stop deprecation warning from being displayed $VERBOSE = nil -# @note Version check to ensure BeEF is running Ruby 1.9 > -if RUBY_VERSION < '1.9' +# @note Version check to ensure BeEF is running Ruby 2.0+ +if RUBY_VERSION < '2.0' puts "\n" - puts "Ruby version " + RUBY_VERSION + " is no longer supported. Please upgrade 1.9 or later." - puts "OSX:" - puts "See Readme" + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.0 or later." puts "\n" - exit + exit 1 end $:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '.')) $root_dir = File.expand_path('..', __FILE__) -# @note Prevent some errors on encoding: encoding handling changed (improved) from 1.8.7 to 1.9.1/2. -if RUBY_VERSION =~ /1.9/ - Encoding.default_external = Encoding::UTF_8 - Encoding.default_internal = Encoding::UTF_8 -end - # @note Require core loader's require 'core/loader' diff --git a/install b/install index 6df561452..f8478d6cf 100755 --- a/install +++ b/install @@ -8,14 +8,11 @@ puts "\nWelcome to the BeEF installer!" -if RUBY_VERSION < '1.9' +if RUBY_VERSION < '2.0' puts "\n" - puts "Ruby version " + RUBY_VERSION + " is no longer supported. Please upgrade 1.9 or later." - puts "" - puts "OSX:" - puts "See README" + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.0 or later." puts "\n" - exit + exit 1 end puts "\nPlease make sure you have installed SQLite before proceeding. For instructions on how to do this please see the README file" @@ -26,4 +23,4 @@ puts "\nRun bundler in your BeEF folder: bundle install" puts "\nRun BeEF: ./beef" -#Testing fork regroup \ No newline at end of file +#Testing fork regroup diff --git a/test/common/ts_common.rb b/test/common/ts_common.rb index 9b35c4c7d..018bbbc5f 100644 --- a/test/common/ts_common.rb +++ b/test/common/ts_common.rb @@ -4,12 +4,12 @@ # See the file 'doc/COPYING' for copying permission # -# @note Version check to ensure BeEF is running Ruby 1.9 > -if RUBY_VERSION < '1.9' +# @note Version check to ensure BeEF is running Ruby 2.0+ +if RUBY_VERSION < '2.0' puts "\n" - puts "Ruby version " + RUBY_VERSION + " is no longer supported. Please upgrade 1.9 or later." + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.0 or later." puts "\n" - exit + exit 1 end begin