Early Access Program Features

What’s Mining: Chef Integration

Hello everyone,

I’d like to introduce a plugin for RubyMine and IDEA that provides Chef support. It’s compatible with the last RubyMine Tsubaki EAP and Intellij IDEA 14 EAP.

Following the main concepts of Chef the plugin introduces cookbooks, recipes and resources in the IDE. It provides marking/detection options for a cookbook and code insight for a resource and for its attributes. Please note you need to install Chef gem before you start.

Cookbooks

Cookbooks are presented in RubyMine as a new kind of the project source root. So to define a directory as a cookbook you are to mark it as ‘Cookbook’ source root. This action is available via context menu in the Project View as well as in the Settings | Project Structure:

chef_1

 

If a directory contains ‘recipes’ folder with a ruby file inside, the directory is detected as a cookbook and you’re asked whether to add it or not:

chef_2

Resources

Since the folder is marked as a cookbook, code insight is available f0r any ruby file inside the ‘recipes’. E.g. one can complete any Chef resource or navigate to its definition into the Chef library:

chef_3

Attributes

Resource’s own attributes and inherited ones are also available inside the resource code block:

chef_4

Wherever it’s possible RubyMine suggests attribute arguments such as allowed actions for the action attribute; actions for the notifies and subscribes; all boolean arguments; and many more.

We would be glad if you try the plugin and share your feedback.  Please don’t hesitate to ask any questions here in the comments or on our forum.


Develop with pleasure!
JetBrains RubyMine Team

image description