README.md in codependency-1.0.0 vs README.md in codependency-2.0.0
- old
+ new
@@ -16,16 +16,18 @@
$ 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:
+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
+#= require foo
class Bar
end
```
@@ -37,11 +39,12 @@
```
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 "bar.rb"
-graph.files # => ["./foo.rb", "./bar.rb"]
+graph = Codependency::Graph.new
+graph.path << '.' # works like PATH, append search paths for this graph
+graph.files # => ["./foo.rb", "./bar.rb"] # returns a topologically sorted list of relative filepaths
```
## Contributing
1. Fork it