Sha256: 05ec6408259c86ef682d34ce61cafcae96175e27d8e1a70d86ee2010e1b44801
Contents?: true
Size: 1022 Bytes
Versions: 16
Compression:
Stored size: 1022 Bytes
Contents
#!/usr/bin/env ruby -wKU require 'yaml' version_hash = YAML.load_file(File.join(File.dirname(__FILE__), %w(.. VERSION.yml))) version = [version_hash[:major].to_s, version_hash[:minor].to_s, version_hash[:patch].to_s].join(".") jes_file = File.join(File.dirname(__FILE__), %w(.. lib just_enumerable_stats)) irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' require 'optparse' options = { :sandbox => false, :irb => irb, :without_stored_procedures => false } OptionParser.new do |opt| opt.banner = "Usage: console [environment] [options]" opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |v| options[:irb] = v } opt.on("-w", 'Run without storing procedures') { |v| options[:without_stored_procedures] = true } opt.parse!(ARGV) end libs = " -r irb/completion -r #{jes_file}" puts "Loading Just Enumerable Stats version: #{version}" if options[:sandbox] puts "I'll have to think about how the whole sandbox concept should work for the jes" end exec "#{options[:irb]} #{libs} --simple-prompt"
Version data entries
16 entries across 16 versions & 1 rubygems