classroom
https://github.com/education/classroom
Ruby
GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
Module#depends_on
Allows you to break big classes up into multiple files.
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
# require_dependency 'application_controller/authentication_dependency'
# require_dependency 'application_controller/errors_dependency'
# require_dependency 'application_controller/feature_flags_dependency'
depends_on :authentication, :errors, :feature_flags
# app/controllers/application_controller/authetnication_dependency.rb
class ApplicationController
end
Each dependency should reopen the class and do its thing. No more mucking
with defining ClassMethods modules or messing with the self.included
callback.
*files - Splatted array of String or Symbol filenames. Each one will be
expanded to "#{name.underscore}/#{file}_dependency"
Returns nothing.Edit
git clone [email protected]:education/classroom.git
cd classroom
open config/initializers/01_depends_on.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Module-depends_on-for-pr
# Commit to gitgit add config/initializers/01_depends_on.rbgit commit -m "better docs for Module#depends_on"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Module-depends_on-for-pr
hub pull-request
# Celebrate!