[chef] Re: Re: Cookbook dependency graphing


Chronological Thread 
  • From: "steve ." < >
  • To: " " < >
  • Subject: [chef] Re: Re: Cookbook dependency graphing
  • Date: Tue, 9 Jul 2013 22:48:11 -0700

Hi Torbin,

I threw this together today on my Macbook, so I'm not surprised to find that you're having trouble getting it to work on Windows.  I'm pretty sure at least some of the depgraph codebase pre-dates Chef and it definitely _wasn't_ designed with Bundler in mind.  The gemspec is actually declared in the Rakefile.

However, I can attest that "rake gem" and "sudo gem install pkg/depgraph-VERSION.gem" got it installed for me.  No idea how easy it's going to be for you to get graphviz / ruby-graphviz functioning on Windows, though.

I don't know if the original gem is actively maintained at this point -- haven't put together a pull request yet -- but if you get it working on Windows, send me a PR and I'll merge it on in...


On Tue, Jul 9, 2013 at 10:38 PM, Torben Knerr < " target="_blank"> > wrote:
Guess I'm too stupid to install it...

In my `Gemfile`:
```
```

Then I run:
```
D:\Repos\_github\_cookbooks\gitlab>bundle install
remote: Counting objects: 316, done.
remote: Compressing objects: 100% (124/124), done.
rRemote: Total 316 (delta 171), reused 311 (delta 166)
Receiving objects: 100% (316/316), 69.82 KiB | 73 KiB/s, done.
Resolving deltas: 100% (171/171), done.
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'depgraph (>= 0) x86-mingw32' in
Source does not contain any versions of 'depgraph (>= 0) x86-mingw32'
```

Is it supposed to be installed as a gem? 

Not a Ruby expert, but I don't see a .gemspec there. Might this be the problem?



On Wed, Jul 10, 2013 at 2:00 AM, steve . < " target="_blank"> > wrote:
Not sure if anyone's already doing something like this, but I made some REALLY MINOR modifications to the most ancient and venerable Ruby depgraph tool and got it parsing cookbook metadata instead of C# code and installed gems.


Default behavior is to parse, fire up graphviz and show you a dependency graph.  That's fine but I wanted it as a JSON object.

I added the -json switch to allow you to generate an object that looks like this:

{ "cookbook" : [ "dependency1", "dependency2"],
 ...
}

Hope someone out there finds this useful.





Archive powered by MHonArc 2.6.16.

§