RubyMine 2017.3. Faster IDE, WSL, Embedded Puppet, and more
Hello, Habr! As you can see from the latest JetBrains blog posts, many of the company's products are in the final release phase this year.
In this series we will talk about the new version of the IDE for Ruby and Rails, RubyMine 2017.3 .
IDE has become smarter
WSL support
Improved
RuboCop refactoring is now even cooler
More code style options
Support for EPP templates
Timeout for the debugger
VCS
REST client
JavaScript improvements
Databases Improved
details
Now, more details:
We managed to make the IDE faster, which is noticeable when working with large applications. For example, now checking the entire code for errors ( Code | Inspect Code ) takes significantly less time compared to RubyMine 2017.1 and 2017.2:
Read more on the blog (in English).
Users love RubyMine for being able to quickly jump to the definition of methods and variables in the project and gems used, and we are trying to improve this functionality. So, navigation to rail callbacks and responders in version 2017.3 has become much more reliable:
We are seriously determined to improve the basic support for Ruby and Rails in future versions.
And not just recognizes, but much better than before. RubyMine will tell you if the number of arguments passed does not match their original number in the declared method:
Details .
The IDE has learned to recognize nested projects, correctly install dependencies and switch to them if necessary:
If your application is a mono-repository, try the new version and let us know if you encounter problems.
If you have Windows, then do not pass by this feature. RubyMine learned to work with Windows Bash, which avoids the painful Ruby settings on Windows. Recipe:
RubyMine has a set of refactorings that allow you to conveniently tidy your code. In particular, the Extract Method option helps to quickly put the code that is logically distinguished in meaning into a separate method. Now this option can also immediately transfer the code to the private or protected section. If the section is still missing from the file, then RubyMine will create it on its own:
In the previous release, we taught RubyMine to apply RuboCop auto-corrections for the entire file directly from the editor. Starting from version 2017.3 you can not only detect and fix all errors, but also fix only a certain cop department or offense class ( blog ). No plugins, everything works right away out of the box!
At the same time, RubyMine takes into account the presence of .rubocop.yml and displays violations according to the settings:
By the way, we are also asked if the IDE can display custom user inspections. Able, and some users have already seen this:
In the settings ( Preferences / Settings | Editor | Code style | Ruby ), you can now set indents for private and protected sections. RubyMine will remember the selected settings and use them when formatting the code in the editor ( Code | Reformat code ):
Also, now you can choose which operators should be escaped with spaces and which should remain untouched by the formatter:
Source
Some of our users are involved in configuration management and use Puppet. Embedded Puppet support is implemented for them . In particular, autocomplete and navigation were added to EPP templates and manifestos:
And the IDE quickly finds all uses of templates in the project, and can conveniently rename variables and parameters throughout the application:
We added the option Trace to_s evaluation ( Preferences / Settings | Build, Execution, Deployment | Debugger ), when selected, the debugger will start throwing timeout messages in case of an overhead: You
can configure the timeout by time, or you can turn it off altogether:
Learn more about the feature here .
Interactive rebase of the latest changes in Git can now be launched directly from the log by clicking on the basic commit:
When switching between branches, the IDE saves the workspace state: location of editor tabs, tool windows, etc.: Show Changes to Parents
mode has been added to the gitlog . In this mode, the right panel in the log shows not only changes in files with conflicts, but also separately non-conflict changes for each branch participating in the merge:
From now on, you can work with REST requests using a new tool based on an editor. It is enough to create a file in the project with .http permission and open it in the editor:
Detailed analysis of work with the new REST client .
You can learn more about the improvements on the What's new in WebStorm page , as well as in the video:
For more information about improvements in database tools, see the DataGrip blog (category 2017.3).
Among other improvements you will find support for Ruby 2.5, Docker Compose v3, Gems.rb, Cucumber Expressions and the ability to rename files from tabs.
You can download the new version on the What's new page . If you are trying RubyMine for the first time, then the first month of use is at our expense (your credit card details are not required).
Do not forget to report problems to the tracker , subscribe to our Twitter (in it you will find product announcements and useful tips & tricks), as well as join our Slack !
PS Taking this opportunity, we boast that a Ruby mitap was recently held at JetBrains:
Video recordings of reports should appear already this week.
We express our gratitude to the organizers and speakers, and also encourage all Ruby and Rails developers who have not done so to join the Saint P Ruby User Group !
Good luck
In this series we will talk about the new version of the IDE for Ruby and Rails, RubyMine 2017.3 .
Table of contents
IDE has become smarter
WSL support
Improved
RuboCop refactoring is now even cooler
More code style options
Support for EPP templates
Timeout for the debugger
VCS
REST client
JavaScript improvements
Databases Improved
details
Now, more details:
IDE has become smarter
Speed
We managed to make the IDE faster, which is noticeable when working with large applications. For example, now checking the entire code for errors ( Code | Inspect Code ) takes significantly less time compared to RubyMine 2017.1 and 2017.2:
Read more on the blog (in English).
Method Declaration Navigation
Users love RubyMine for being able to quickly jump to the definition of methods and variables in the project and gems used, and we are trying to improve this functionality. So, navigation to rail callbacks and responders in version 2017.3 has become much more reliable:
We are seriously determined to improve the basic support for Ruby and Rails in future versions.
IDE recognizes called parameters
And not just recognizes, but much better than before. RubyMine will tell you if the number of arguments passed does not match their original number in the declared method:
Details .
Support for applications with nested projects
The IDE has learned to recognize nested projects, correctly install dependencies and switch to them if necessary:
If your application is a mono-repository, try the new version and let us know if you encounter problems.
WSL Support
If you have Windows, then do not pass by this feature. RubyMine learned to work with Windows Bash, which avoids the painful Ruby settings on Windows. Recipe:
- Install bash according to this guide .
- Add WSL as a remote SDK in the settings ( Preferences / Settings | Languages & Frameworks | Ruby SDK and Gems | New remote ).
- Forget that you are dealing with Windows.
Improved refactoring
RubyMine has a set of refactorings that allow you to conveniently tidy your code. In particular, the Extract Method option helps to quickly put the code that is logically distinguished in meaning into a separate method. Now this option can also immediately transfer the code to the private or protected section. If the section is still missing from the file, then RubyMine will create it on its own:
RuboCop is now even cooler
In the previous release, we taught RubyMine to apply RuboCop auto-corrections for the entire file directly from the editor. Starting from version 2017.3 you can not only detect and fix all errors, but also fix only a certain cop department or offense class ( blog ). No plugins, everything works right away out of the box!
At the same time, RubyMine takes into account the presence of .rubocop.yml and displays violations according to the settings:
By the way, we are also asked if the IDE can display custom user inspections. Able, and some users have already seen this:
More code style options
In the settings ( Preferences / Settings | Editor | Code style | Ruby ), you can now set indents for private and protected sections. RubyMine will remember the selected settings and use them when formatting the code in the editor ( Code | Reformat code ):
Also, now you can choose which operators should be escaped with spaces and which should remain untouched by the formatter:
Source
EPP Template Support
Some of our users are involved in configuration management and use Puppet. Embedded Puppet support is implemented for them . In particular, autocomplete and navigation were added to EPP templates and manifestos:
And the IDE quickly finds all uses of templates in the project, and can conveniently rename variables and parameters throughout the application:
Debugger timeout
We added the option Trace to_s evaluation ( Preferences / Settings | Build, Execution, Deployment | Debugger ), when selected, the debugger will start throwing timeout messages in case of an overhead: You
can configure the timeout by time, or you can turn it off altogether:
Learn more about the feature here .
Vcs
Interactive rebase of the latest changes in Git can now be launched directly from the log by clicking on the basic commit:
When switching between branches, the IDE saves the workspace state: location of editor tabs, tool windows, etc.: Show Changes to Parents
mode has been added to the gitlog . In this mode, the right panel in the log shows not only changes in files with conflicts, but also separately non-conflict changes for each branch participating in the merge:
REST client
From now on, you can work with REST requests using a new tool based on an editor. It is enough to create a file in the project with .http permission and open it in the editor:
Detailed analysis of work with the new REST client .
JavaScript enhancements
- For Vue.js, code completion and navigation for props, properties and methods, as well as a new collection of code templates, have appeared.
- New refactoring Extract type alias and Extract interface for TypeScript.
- Updated documentation and improved auto-completion for standard JavaScript methods and objects. Project discovery is faster thanks to pre-built indexes for these methods.
- Imports in JavaScript and TypeScript files are now added automatically when copying and pasting code from one file to another.
You can learn more about the improvements on the What's new in WebStorm page , as well as in the video:
Database
- If you work with a large number of data sources, these data sources can now be organized into groups.
- For the convenience of working with numerical data in the table, they are now aligned to the right.
- For PostgreSQL, the Database toolbar displays Users and Roles, and Foreign Data Wrappers are also supported.
- You can insert data into a table from Excel.
- Several values of the table can be compared with each other.
- Export to DDL now supports more options and is accessible through the Context menu | SQL Scripts | SQL Generator .
- Autocompletion for JOIN has become smarter.
For more information about improvements in database tools, see the DataGrip blog (category 2017.3).
Important little things
Among other improvements you will find support for Ruby 2.5, Docker Compose v3, Gems.rb, Cucumber Expressions and the ability to rename files from tabs.
You can download the new version on the What's new page . If you are trying RubyMine for the first time, then the first month of use is at our expense (your credit card details are not required).
Do not forget to report problems to the tracker , subscribe to our Twitter (in it you will find product announcements and useful tips & tricks), as well as join our Slack !
PS Taking this opportunity, we boast that a Ruby mitap was recently held at JetBrains:
Video recordings of reports should appear already this week.
We express our gratitude to the organizers and speakers, and also encourage all Ruby and Rails developers who have not done so to join the Saint P Ruby User Group !
Good luck