How ofamosomario/simple-task-with-pipeline works
Project type and purpose
• This is a Ruby on Rails back-end (API-style) application that provides a “tasks” resource under the namespace API::V1.
• It demonstrates how to integrate RSpec and RuboCop checks into a GitHub Actions CI pipeline (.github/workflows/rubyonrails.yml).
• It includes a Dockerfile for containerization and standard Rails components (models, controllers, jobs, mailers, ActionCable channels).
File structure
• Top-level artifacts:
• Dockerfile / .dockerignore → container build
• .github/workflows/rubyonrails.yml → CI pipeline
• Gemfile / Rakefile / config/ / db/ → classic Rails project layout
• app/controllers/api/v1/tasks_controller.rb and app/models/api/v1/task.rb → primary domain (Task resource)
• config/routes.rb registers /api/v1/tasks endpoints
• config/database.yml, db/migrate, db/schema.rb → ActiveRecord + relational database
• spec/… and .rspec → RSpec suite
• .rubocop.yml → linting rules
README for additional insights
• The README confirms the goal is to showcase GitHub Actions integration alongside RSpec and RuboCop enforcement.
• No front-end UI; this is pure back-end/API.
a. Main components
• Developer & Git repository (GitHub)
• GitHub Actions CI pipeline
• Docker build / container registry
• API server (Rails + Puma)
• Database (PostgreSQL or specified adapter)
• Optional: File storage (local or cloud via ActiveStorage)
• Optional: ActionCable channels (WebSocket)
b. Relationships & interactions
• Developer pushes code → GitHub → CI pipeline runs RuboCop & RSpec → builds Docker image → pushes to registry / deploys
• Client (e.g. mobile app, curl, Postman) → HTTP(S) → Rails (Puma) → Controllers (API::V1::TasksController) → Models → Database → Response
• Rails may write/read files via ActiveStorage (storage.yml)
• WebSocket clients ↔ ActionCable server
c. Architectural patterns & design principles
• MVC separation: Controllers (app/controllers), Models (app/models), no Views for HTML (API only)
• Namespacing by API version (api/v1) to support future evolution
• CI/CD pipeline (shift-left testing and linting)
• Containerization for consistent environments
d. Key technologies, frameworks, libraries
• Ruby on Rails (API)
• RSpec (testing)
• RuboCop (static analysis)
• Docker
• GitHub Actions