Sha256: 2750d206add9bdfa3743a861e6e642c7aa1cc8da1f478050402f691a6067b48a
Contents?: true
Size: 1.18 KB
Versions: 3
Compression:
Stored size: 1.18 KB
Contents
# Codependency Codependency is a simple comment-based dependency graph that you can use on arbitrary files. At the moment, it only supports ruby-style comments, files with the `.rb` extension, and files in the same flat directory. ## Installation Add this line to your application's Gemfile: gem 'codependency' And then execute: $ bundle Or install it yourself as: $ gem install codependency ## Usage Say you have two files, `bar.rb` and `foo.rb`. `bar` comes before `foo` in a natural naming scheme, but `bar` has a dependency on `foo`. We can express this using a simple comment syntax at the head of the file like this: **bar.rb:** ``` rb # require foo class Bar end ``` **foo.rb:** ``` rb class Foo end ``` Then, we create a dependency graph to determine the order in which the files might need to be loaded, inserted, or compiled: ``` rb graph = Codependency::Graph.new %w| bar.rb foo.rb | graph.files # => ["foo.rb", "bar.rb"] ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
codependency-0.3.0 | README.md |
codependency-0.2.0 | README.md |
codependency-0.1.0 | README.md |