Initial commit

This commit is contained in:
2026-11-14 22:25:16 -07:00
commit f71a9a1626
10 changed files with 258 additions and 0 deletions
+110
View File
@@ -0,0 +1,110 @@
# ---> Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
# undo-tree
*.~undo-tree~
# ---> Ruby
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
# Used by dotenv library to load environment variables.
# .env
# Ignore Byebug command history file.
.byebug_history
## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/
## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/
## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/
## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*
+2
View File
@@ -0,0 +1,2 @@
--require spec_helper
--format documentation
+3
View File
@@ -0,0 +1,3 @@
plugins:
- rubocop-rake
- rubocop-rspec
+9
View File
@@ -0,0 +1,9 @@
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'rake'
gem 'rspec'
gem 'rubocop'
gem 'rubocop-rake'
gem 'rubocop-rspec'
+70
View File
@@ -0,0 +1,70 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
diff-lcs (1.6.2)
json (3.1.0)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
parallel (2.3.0)
parser (3.3.13.0)
ast (~> 2.4.1)
racc
prism (2.1.0)
prism (2.1.0-x86_64-linux-gnu)
racc (1.8.1)
rainbow (3.1.1)
rake (13.4.2)
regexp_parser (2.13.1)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.7)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.9)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.8)
rubocop (1.92.2)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.11.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.51.0)
parser (>= 3.3.7.2)
prism (>= 1.7)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
ruby-progressbar (1.13.0)
unicode-display_width (3.3.0)
unicode-emoji (~> 4.3)
unicode-emoji (4.3.0)
PLATFORMS
ruby
x86_64-linux-gnu
DEPENDENCIES
rake
rspec
rubocop
rubocop-rake
rubocop-rspec
BUNDLED WITH
2.6.7
+12
View File
@@ -0,0 +1,12 @@
# Project goal
Write a program that will display the text `Hello World`
# Instructions
- Clone this Git repository.
- Change dirrectories inxto the folder that you cloned.
- Install required tooling using the command `bundle install`. If bundle is not
available please refer to the help documents in Canvas.
- Complete the assignment, open the `assignment.rb` file in the `lib` folder.
- Modify the `say_text` function to include the line `puts 'Hello World'`
+7
View File
@@ -0,0 +1,7 @@
# frozen_string_literal: true
require 'rubocop/rake_task'
require 'rspec/core/rake_task'
RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec)
+25
View File
@@ -0,0 +1,25 @@
# frozen_string_literal: true
# This file is where you (the student) will solve the homework. This file will
# have many comments and will note where you need to make changes.
# This is a class, it allows us to use it as an object and will allow our
# testing/grading process to work. This generally will never be changed.
class Assignment
# This is a class function. The `initialize` function is a special one that
# is run whenever an object of the class is created. In this case, we will
# leave this empty as there are no default actions that need to be performed.
def initialize; end
# This is our main task in this file. For this assignment we need to make the
# text `Hello World` appear on the screen.
def say_text
# Here is where you will change. In Ruby there are several ways to print
# text. In this case, we can use either the `puts` or the `print`
# function. There are slight differences which can be found at
# `https://docs.ruby-lang.org/en/3.3/`. I encourage you to look for these
# two functions and find the documentation. Becoming familar with this site
# will be a great benifit later as you will easily be able to find
# information about Ruby.
end
end
+14
View File
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# Nathan Hinton
# Test file for the student's code
require 'spec_helper'
RSpec.describe Assignment do
describe '#say_text' do
it 'prints the text `Hello World`' do
expect { described_class.new.say_text }.to output("Hello World\n").to_stdout
end
end
end
+6
View File
@@ -0,0 +1,6 @@
# frozen_string_literal: true
# Nathan Hinton
# Helper file for the testing
require_relative '../lib/assignment'