📜 ⬆️ ⬇️

RubyMine 2017.1: Docker, RuboCop, autogenerate Rails tests, improvements for Puppet

Hi, Habr! We recently released RubyMine 2017.1 , a new version of our IDE for Ruby and Rails, and have already updated it to the more stable version 2017.1.1. It's time to talk about what's new in it.



And now more:

Docker


Docker support is available through a plugin, which in version 2017.1.1 is already “sewn” in the IDE. It remains only to enter the settings of the remote SDK (Settings / Preferences | Ruby SDK & Gems | New remote | Docker) and select the desired image. Autocompletion, code analysis and other delights of IDE will work, with one exception: debugging applications in Docker containers will be available in version 2017.2 , which will be released in summer.
')


Read more about Docker support on the blog.

Making RVM Gemsets


Although opinions on the use of gemsets differ , by default this is the most competent approach to managing gems, and the task of our IDE is to make working with them more convenient. Therefore, in the new version, you can create RVM gems directly in the New Project window, which will allow you to avoid conflicts between gems and their versions for different projects. Read more in the blog .



Now gems can be added in the SDK settings (Settings / Preferences | Ruby SDK & Gems).



Rubocop


If you are a Ruby / Rails programmer, then most likely you are already using this static code analyzer and do not need to present it. In this version, we taught the IDE to work with RuboCop. RubyMine runs cops in the background, and displays offenses as user-friendly IDE inspections.



For the next release, we plan to teach RubyMine to correct errors and format the code according to the RuboCop style.

Instant Rails Test Creation


RubyMine provides the ability to quickly jump between an object and its test - Go to test (Navigate | Test / Test Subject) (⇧⌘T / Ctrl + Shift + T). We have expanded this functionality a bit: now we can not only switch to tests of controllers , models , helpers, and view them, but also quickly create them.

If you try to go to, for example, the missing controller test using Go to test , the IDE will suggest that you create it using Test :: Unit or RSpec (we plan to add other frameworks).



We also added the ability to quickly roll back the newly created test, and then extended this opportunity to all generated entities, in addition to the tests.



Improvements for the development of modules Puppet


In the previous release, we talked about improved addition, navigation and refactoring for Puppet. In the new version, we also added the ability to create Puppet modules directly from the New Project dialog. RubyMine will find the necessary gems for Puppet and will suggest installing the missing ones.



You can also create a new module using the Find action (⇧⌘A / Shift + Ctrl + A).

Previously, RubyMine relied on metadata.json and Puppetfile to find modules and determine dependencies. Now the IDE has learned to read fixtures.yml and install dependencies in the appropriate directory. Read more about the current rezolv rules in this post . By the way, the other day we announced a new EAP (as we call our beta releases), in which you can find modules by modulepath in environment.conf . If you use RubyMine for puppet development, please note.

Puppet project structure


In most cases, RubyMine will install the necessary dependencies when opening a project or making changes in the development process. However, if this does not happen, you can install dependencies by calling the context menu in the Project window and selecting Install dependencies . This action is also available through the Find action .



It is important to note that navigation and autocompletion for the modules will work in strict accordance with their dependencies, and not issue everything. An example can be found in this post .





Javascript enhancements






Updated VCS Search


Search in the Git-log has become much faster, which will be noticeable in projects with a long history.
You can use regular expressions in your search, as well as make it case-sensitive.



Other improvements



Download the new version from the What's new page. For new users there is a 30-day free trial period.

Share your thoughts and problems in the comments, we will try to help. You can also report bugs to the tracker , for which many thanks to you in advance.

Source: https://habr.com/ru/post/326806/


All Articles