
Security News
Nx npm Packages Compromised in Supply Chain Attack Leveraging AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
ruby_test_student_grader
Advanced tools
A Ruby gem for generating academic test reports in HTML format. Initially designed for automated grading of university programming assignments, with flexibility to adapt to different testing frameworks.
Current Status: Early Development (Beta)
Primary Use: Automated evaluation of academic coding tasks
Future Goal: Modular system for diverse testing scenarios
Add to your Rails Gemfile:
gem 'ruby_test_student_grader', path: '/path/to/gem/directory'
Then run:
bundle install
From RubyGems (Once Published)
gem install ruby_test_student_grader
Configure in your test helper:
test/test_helper.rb
require 'ruby_test_student_grader'
Minitest.after_run do
RubyTestStudentGrader::Reporter.new(
total_score, # Calculated score
max_score, # Maximum possible score
failed_tests, # Array of failed test names
automated_feedback # Generated feedback summary
).generate
end
Report will be generated at:
A Ruby gem for generating academic test reports in HTML format. Initially designed for automated grading of university programming assignments, with flexibility to adapt to different testing frameworks.
Current Status: Early Development (Beta)
Primary Use: Automated evaluation of academic coding tasks
Future Goal: Modular system for diverse testing scenarios
Add to your Rails Gemfile:
gem 'ruby_test_student_grader', path: '/path/to/gem/directory'
Then run:
bundle install
From RubyGems (Once Published):
gem install ruby_test_student_grader
Configure in your test helper:
test/test_helper.rb
require 'ruby_test_student_grader'
Minitest.after_run do
RubyTestStudentGrader::Reporter.new(
total_score, # Calculated score
max_score, # Maximum possible score
failed_tests, # Array of failed test names
automated_feedback # Generated feedback summary
).generate
end
Report will be generated at:
public/test_report.html
Planned Features
RubyTestStudentGrader.configure do |config|
config.grading_scale = {
passing: 4.0,
excellence: 5.5
}
config.rubric = {
code_quality: 30%,
coverage: 20%,
functionality: 50%
}
end
lib/
├── ruby_test_student_grader/
│ ├── reporter.rb # Core logic
│ ├── template.html.erb # HTML template
├── ruby_test_student_grader.rb # Main module
We welcome contributions for:
MIT License - See LICENSE. Requires attribution in academic materials using this software.
Educational assessment tool - Adaptable for diverse pedagogical needs.
Note: This project is in very early stage and could have major bugs
See README_PROBAR.md
for a step-by-step guide. Quick summary:
# HTML and CSV
reporter = RubyTestStudentGrader::Reporter.new(5.2, 6.0, ["test_model"], "Good job", course_name: "IIC2143")
reporter.generate
reporter.generate_csv("public/test_report.csv")
# PDF (optional, requires prawn)
reporter.generate_pdf("public/test_report.pdf")
# Multiple students
students = [ { id: 1, name: "Alice", total_score: 5.2, max_score: 6.0, failed_tests: ["test_model"], feedback: "OK" } ]
RubyTestStudentGrader::ClassReporter.new(students, course_name: "IIC2143", output_dir: "public/reports").generate_all
# Similarity
RubyTestStudentGrader::Similarity.jaccard("def a;1;end", "def b;1;end", k: 5)
Use the demo script to verify everything end-to-end.
scripts/demo.rb
public/
prawn
is installed)public/reports/
Run:
bundle exec ruby scripts/demo.rb
Optional (for PDF):
bundle add prawn
Tip: set a course name for the report via env var (optional):
export COURSE_NAME="IIC2143"
RubyTestStudentGrader::Reporter#generate_csv("public/test_report.csv")
RubyTestStudentGrader::Reporter#generate_pdf("public/test_report.pdf")
course_name: "IIC2143"
to the constructor or set COURSE_NAME
in your environment.students = [
{ id: 1, name: "Alice", total_score: 5.2, max_score: 6.0, failed_tests: ["test_model"], feedback: "Good job" },
{ id: 2, name: "Bob", total_score: 3.9, max_score: 6.0, failed_tests: ["test_controller"], feedback: "Check controllers" }
]
RubyTestStudentGrader::ClassReporter.new(students, course_name: "IIC2143", output_dir: "public/reports").generate_all
RubyTestStudentGrader::Similarity.jaccard(code_a, code_b, k: 5) # => 0.0..1.0
FAQs
Unknown package
We found that ruby_test_student_grader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.