#!/usr/bin/env ruby
require 'optparse'
options = {}
OptionParser.new do |opts|
  options[:version] = '2.0 - Power Ducky Rewrite'
  opts.on_tail('--help', 'Display this screen') do
    puts opts
    puts
    exit
  end

  opts.parse!
end

frame_work = __FILE__
frame_work = File.readlink(frame_work) while File.symlink?(frame_work)
APP_ROOT = File.dirname(frame_work)

$LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
begin
  require 'guide'
  Dir.chdir(APP_ROOT) do
    Guide.new(options)
  end
end

#!/usr/bin/env ruby
require 'optparse'
options = {}
OptionParser.new do |opts|
  options[:version] = '2.0 - Power Ducky Rewrite'
  opts.on_tail('--help', 'Display this screen') do
    puts opts
    puts
    exit
  end

  opts.parse!
end

frame_work = __FILE__
frame_work = File.readlink(frame_work) while File.symlink?(frame_work)
APP_ROOT = File.dirname(frame_work)

$LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
begin
  fail('Needs ruby 2.0 or higher') if RUBY_VERSION < '2.0'
  require 'guide'
  Dir.chdir(APP_ROOT) do
    Guide.new(options)
  end
end

Add check for ruby version
Add check for ruby version

because we are using stabby lambda operator we need ruby version 2.0 or
higher.  This adds that check and fails if the user is running anything
less than 2.0.
