Created
September 8, 2012 16:24
-
-
Save tosik/3676732 to your computer and use it in GitHub Desktop.
Creates Motion::Project::Config#dependencies(from: path, to: path)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Motion::Project::Config | |
| def dependencies(args) | |
| from, to = args[:from], args[:to] | |
| Dir[from].each do |from_file| | |
| Dir[to].each do |to_file| | |
| files_dependencies from_file => to_file | |
| end | |
| end | |
| end | |
| end | |
| # usage | |
| Motion::Project::App.setup do |app| | |
| # Use `rake config' to see complete project settings. | |
| app.name = 'foo' | |
| app.dependencies from: 'app/controllers/*.rb', to: 'app/lib/hello.rb' | |
| app.dependencies from: 'app/lib/hello.rb', to: 'app/lib/hello/**/*.rb' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment