mirror of
https://github.com/samsonjs/csc360-a1-shell.git
synced 2026-04-27 14:57:43 +00:00
Update gems and add .ruby-version
This commit is contained in:
parent
1072088493
commit
996feaf62c
5 changed files with 7 additions and 6 deletions
1
ruby/.ruby-version
Normal file
1
ruby/.ruby-version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
3.1.0
|
||||||
|
|
@ -27,6 +27,7 @@ GEM
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
arm64-darwin-21
|
arm64-darwin-21
|
||||||
|
arm64-darwin-22
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
minitest (~> 5.15)
|
minitest (~> 5.15)
|
||||||
|
|
@ -38,4 +39,4 @@ RUBY VERSION
|
||||||
ruby 3.1.0p0
|
ruby 3.1.0p0
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.3.3
|
2.4.6
|
||||||
|
|
|
||||||
5
ruby/a1
5
ruby/a1
|
|
@ -1,9 +1,6 @@
|
||||||
#!/usr/bin/env ruby -w
|
#!/usr/bin/env ruby -w
|
||||||
|
|
||||||
require 'English'
|
require 'English'
|
||||||
|
require_relative './shell'
|
||||||
$LOAD_PATH << File.expand_path(__dir__)
|
|
||||||
|
|
||||||
require 'shell'
|
|
||||||
|
|
||||||
Shell::CLI.new.run(args: ARGV) if $PROGRAM_NAME == __FILE__
|
Shell::CLI.new.run(args: ARGV) if $PROGRAM_NAME == __FILE__
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
$LOAD_PATH << File.expand_path(__dir__)
|
||||||
|
|
||||||
require 'shell/cli'
|
require 'shell/cli'
|
||||||
require 'shell/repl'
|
require 'shell/repl'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class ShellTest < Minitest::Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_expands_environment_variables
|
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")
|
assert system("#{A1_PATH} -c 'echo $HOME' >/dev/null")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue