repl 426 B

1234567891011121314151617181920
  1. #!/usr/bin/env ruby
  2. # frozen_string_literal: true
  3. require_relative "./../.env"
  4. case ENV["DATA_STRUCTURES_RB_ENV"]
  5. when "development", "test"
  6. require "pathname"
  7. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
  8. Pathname.new(__FILE__).realpath)
  9. require "rubygems"
  10. require "bundler/setup"
  11. load Gem.bin_path("pry", "pry")
  12. else
  13. $stderr.puts "ERROR: repl can't be run in this environment"
  14. exit 1
  15. end