{"id":24093246,"url":"https://github.com/umd-lib/student-applications","last_synced_at":"2026-05-09T23:49:29.914Z","repository":{"id":12235204,"uuid":"69396780","full_name":"umd-lib/student-applications","owner":"umd-lib","description":"Rails application for processing student applications for Libraries employment","archived":false,"fork":false,"pushed_at":"2024-03-27T12:56:53.000Z","size":4229,"stargazers_count":0,"open_issues_count":6,"forks_count":3,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-01-10T09:26:12.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-27T20:40:41.000Z","updated_at":"2022-03-01T13:49:38.000Z","dependencies_parsed_at":"2024-03-27T14:06:00.376Z","dependency_job_id":null,"html_url":"https://github.com/umd-lib/student-applications","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fstudent-applications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fstudent-applications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fstudent-applications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fstudent-applications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/student-applications/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241005367,"owners_count":19892779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-10T09:26:32.422Z","updated_at":"2026-05-09T23:49:29.894Z","avatar_url":"https://github.com/umd-lib.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# student-applications\n\nRails application for processing student applications for Libraries employment\n\nA student application ( called \"Prospect\" to avoid confusion ) is submitted via\na multi-page form. This is managed by serializing the parameters in a session,\nwhich are marshalled at each step of the process.\n\nEach step has a view defined in the \"app/views/prospects\" directory which is\nrendered when the process reaches that step.\n\n## Documentation\n\nSee [docs](docs/) for additional information about this application.\n\n## Test Plan\n\nA basic test plan for verifying application functionality is provided in\n[docs/TestPlan.md](docs/TestPlan.md).\n\n## Development Setup\n\n**Note:** This application uses the \"sprockets\" asset pipeline for\nCSS and JavaScript. It does *not* use \"importmaps\", and does *not*\nrequire Node, Webpack, or Yarn.\n\nRequires:\n\n* Ruby 3.4.9\n* Bundler v2.5.22\n* [Google Chrome](https://www.google.com/chrome/index.html) (for testing)\n\n### Prerequisites\n\n* Update the /etc/hosts file to add:\n\n```text\n127.0.0.1       student-applications-local\n```\n\n### Application Setup\n\nTo run the application:\n\n1) Clone the Git repository and switch into the directory:\n\n```zsh\n$ git clone https://github.com/umd-lib/student-applications.git\n$ cd student-applications\n```\n\n2) Install the dependencies:\n\n```zsh\n$ bundle config set without 'production'\n$ bundle install\n```\n\n---\n\n**Note:** If after installing the gems and running a Rails task (or the server)\nyou get multiple errors of the form:\n\n```text\nIgnoring cgi-0.5.1 because its extensions are not built. Try: gem pristine cgi --version 0.5.1\nIgnoring io-console-0.8.1 because its extensions are not built. Try: gem pristine io-console --version 0.8.1\n...\n```\n\nthen run:\n\n```zsh\ngem pristine --all\n```\n\nto fix the gems.\n\n---\n\n3) Setup the database:\n\n```zsh\n$ rails db:migrate\n$ rails db:seed\n```\n\n4) (Optional) Populate database with sample data:\n\n```zsh\n$ rails db:reset_with_sample_data\n```\n\n5) The application uses CAS authentication to only allow known users to log in.\nThe seed data for the database does not contain any users. Run the following\nRake task to add a user:\n\n```zsh\n$ rails 'db:add_admin_cas_user[\u003cCAS DIRECTORY ID\u003e,\u003cFULL NAME\u003e]'\n```\n\nand replacing the \"\\\u003cCAS DIRECTORY ID\u003e\" and \"\\\u003cFULL NAME\u003e\" with valid user\ninformation. For example, to add \"John Smith\" with a CAS Directory ID of\n\"jsmith\":\n\n```zsh\n$ rails 'db:add_admin_cas_user[jsmith, John Smith]'\n```\n\n5) Run the web application:\n\n```zsh\n$ rails server\n```\n\nTo create an application, go to:\n\n\u003chttp://student-applications-local:3000/\u003e\n\nTo access the administrative interface, go to:\n\n\u003chttp://student-applications-local:3000/admin\u003e\n\n### Running the tests\n\nTo run the unit tests:\n\n```zsh\n$ rails test\n```\n\nTo run the system tests:\n\n```zsh\n$ rails test:system\n```\n\nTo run both unit and system tests:\n\n```zsh\n$ rails test:all\n```\n\n### Code Style\n\nThis application uses the Rails Rubocop configuration\n[rubocop-rails-omakase](https://github.com/rails/rubocop-rails-omakase) to\nenforce a consistent coding style. To run:\n\n```zsh\n$ rubocop -D\n```\n\n## Continuous Integration\n\n### Local CI\n\nRails 8.1 added a \"local\" continuous integration process that:\n\n* Run Rubocop\n* Runs \"bundler-audit\" to check gems for security issues\n* Runs the unit and system tests\n\nThis process can be run using:\n\n```zsh\n$ bin/ci\n```\n\n### Docker.ci and Jenkinsfile\n\nThe \"Dockerfile.ci\" file is used to encapsulate the environment needed by the\ncontinuous integration (ci) server for building and testing the application in\nJenkins.\n\nThe \"Jenkinsfile\" provides the Jenkins pipeline steps for building and\ntesting the application.\n\n## Production Environment Configuration\n\nRequires:\n\n* Postgres client to be installed (on RedHat, the \"postgresql\" and\n  \"postgresql-devel\" packages)\n\nThe application uses the \"dotenv\" gem to configure the production environment.\nThe gem expects a \".env\" file in the root directory to contain the environment\nvariables that are provided to Ruby. A sample \"env_example\" file has been\nprovided to assist with this process. Simply copy the \"env_example\" file to\n\".env\" and fill out the parameters as appropriate.\n\nThe configured .env file should *not* be checked into the Git repository, as it\ncontains credential information.\n\n### Delayed Jobs and Mailers\n\nAn application submission sends an email to applicants. This email is handled\nby ActionMailer, using a [delayed_job](https://github.com/collectiveidea/delayed_job)\nqueue. To run a delayed_job worker, you can start/stop the daemon process using:\n\n```zsh\n$ cd ./student-applications; RAILS_ENV=production ./bin/delayed_job start\n$ cd ./student-applications; RAILS_ENV=production ./bin/delayed_job stop\n```\n\nThere are also a number of Job-related rake tasks that can be invoked\nThese include:\n\n```zsh\n$ ./bin/rails jobs:clear          # Clear the delayed_job queue\n$ ./bin/rails jobs:check[max_age] # Exit with error status if any jobs older than max_age seconds haven't been attempted yet\n$ ./bin/rails jobs:work           # Start a delayed_job worker\n$ ./bin/rails jobs:workoff        # Start a delayed_job worker and exit when all available jobs are complete\n```\n\nNote: Include the RAILS_ENV=production flag if you're using this on\napplication in production-mode.\n\nTo view the delayed_job queue status, you can visit /delayed_jobs in the\napplication. This requires an admin user to be logged in ( first visit\n/prospects to login. )\n\n### Adding users\n\nYou can add users via a Rails task:\n\n```zsh\n$ ./bin/rails 'db:add_admin_cas_user[cas_directory_id,full_name]'  # Add an admin user\n$ ./bin/rails 'db:add_cas_user[cas_directory_id,full_name]'        # Add a non-admin user\n$ ./bin/rails db:bulk_add_users[csv_file]  # use csv file with full_name, directory_id rows\n```\n\n## Rails Tasks\n\n## db:purge_suppressed_prospects\n\nProspects that are deleted through the GUI are \"soft-deleted\", that is, they are\nnot actually destroyed. Instead, the \"suppressed\" field is simply set to \"true\",\nand the prospects no longer appear in the GUI.\n\nThe \"db:purge_suppressed_prospects\" actually deletes suppressed prospects, once\nthey have not been updated for a week.\n\nIt is anticipated this task will be run periodically in a \"cron-link\" process.\n\nTo run the task manually:\n\n```zsh\n$ ./bin/rails db:purge_suppressed_prospects\n```\n\n## verify_resume_attachments\n\nExamines the file attachments in the database, and in the attached file storage\nlocation to determine if any files are \"missing\" or \"orphaned\".\n\nA \"missing\" file is a file that is in a database record as an existing\nattachment, but which is not found in the attached file storage directory.\n\nAn \"orphaned\" file is a file found in the attached file storage directory, but\ndoes not have an associated database record.\n\nTo run the task:\n\n```zsh\n$ ./bin/rails db:purge_suppressed_prospects\n```\n\n## db:reset_with_sample_data/db:populate_sample_data\n\nCreates 700 sample prospects in the database. Typically used to create\nprospects in the development environment.\n\nThe \"db:reset_with_sample_data\" resets the databases before creating 700\nnew prospects using the \"db:populate_sample_data\" task.\n\n**Note:** The file attachment storage directory is not cleared in the reset,\nso there will likely be \"orphaned\" files (files without an associated database\nrecord) in that directory.\n\nTo run the task:\n\n```zsh\n$ ./bin/rails db:reset_with_sample_data\n```\n\nThe \"db:populate_sample_data\" task simply adds 700 new prospects to the\nexisting database (the database is *not* reset).\n\nTo run the task:\n\n```zsh\n$ ./bin/rails db:populate_sample_data\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fstudent-applications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fstudent-applications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fstudent-applications/lists"}