Update gems and add .ruby-version

This commit is contained in:
Sami Samhuri 2023-02-13 22:58:22 -08:00
parent 1072088493
commit 996feaf62c
No known key found for this signature in database
GPG key ID: 4B4195422742FC16
5 changed files with 7 additions and 6 deletions

1
ruby/.ruby-version Normal file
View file

@ -0,0 +1 @@
3.1.0

View file

@ -27,6 +27,7 @@ GEM
PLATFORMS
arm64-darwin-21
arm64-darwin-22
DEPENDENCIES
minitest (~> 5.15)
@ -38,4 +39,4 @@ RUBY VERSION
ruby 3.1.0p0
BUNDLED WITH
2.3.3
2.4.6

View file

@ -1,9 +1,6 @@
#!/usr/bin/env ruby -w
require 'English'
$LOAD_PATH << File.expand_path(__dir__)
require 'shell'
require_relative './shell'
Shell::CLI.new.run(args: ARGV) if $PROGRAM_NAME == __FILE__

View file

@ -1,3 +1,5 @@
$LOAD_PATH << File.expand_path(__dir__)
require 'shell/cli'
require 'shell/repl'

View file

@ -18,7 +18,7 @@ class ShellTest < Minitest::Test
end
def test_expands_environment_variables
assert_equal ENV['HOME'], `#{A1_PATH} -c 'echo $HOME'`.chomp
assert_equal Dir.home, `#{A1_PATH} -c 'echo $HOME'`.chomp
assert system("#{A1_PATH} -c 'echo $HOME' >/dev/null")
end