{"id":9922,"date":"2017-09-15T04:53:45","date_gmt":"2017-09-15T04:53:45","guid":{"rendered":"https:\/\/blog.jetbrains.com\/ruby\/?p=7708"},"modified":"2019-04-01T15:01:14","modified_gmt":"2019-04-01T15:01:14","slug":"rubymine-2017-3-eap1-is-open-2","status":"publish","type":"ruby","link":"https:\/\/blog.jetbrains.com\/zh-hans\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2","title":{"rendered":"RubyMine 2017.3 EAP1 is Open: Better Performance, EPP Support, and Much More!"},"content":{"rendered":"<p>Hi there,<\/p>\n<p><strong><a href=\"https:\/\/jetbrains.com\/ruby\/nextversion\/\" target=\"_blank\" rel=\"noopener\">RubyMine 2017.3 EAP 1 (build 173.2099.29)<\/a><\/strong>\u00a0is here kicking off\u00a0a series of Early Access builds for the upcoming v2017.3 that should be out by the end of November. The first EAP has a gazillion improvements, so you may find the navigation useful:<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#performance\">Better Performance<\/a><br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#epp\">Embedded Puppet (EPP) Support<\/a><br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#refactoring\">Refactoring<\/a><br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#rubocop\">RuboCop improvements<\/a><br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#code-style\">Code style<\/a><br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2017\/09\/rubymine-2017-3-eap1-is-open-2\/#other\">Other improvements<\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/ruby\/nextversion\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>Download RubyMine 2017.3 EAP1<\/a><\/p>\n<p>Let\u2019s now review everything in detail:<\/p>\n<h3><a name=\"performance\"><\/a>Better Performance<\/h3>\n<p>Investigating performance issues is the hardest part of our job as it all depends on the specific project environment, which we usually cannot investigate as the majority of our customers develop proprietary software. Still, based on your feedback and requests, we\u2019ve got a better sense of direction and now our performance-improving attempts have started to pay off.<\/p>\n<p>In our recent updates, the 2017.2 and 2017.3 builds, we have seen consistent improvement in the overall responsiveness of the IDE, which can be witnessed in massive Ruby\/Rails apps (e.g. while using autocompletion, inspecting code, finding usages, or navigating to declarations).<\/p>\n<p>However, to make the effect of the improvements completely obvious, one should give RubyMine a full load. To test our improvements, we\u2019ve inspected all the code in <a href=\"https:\/\/github.com\/diaspora\/diaspora\" target=\"_blank\" rel=\"noopener\">Diaspora<\/a> and <a href=\"https:\/\/github.com\/TracksApp\/tracks\" target=\"_blank\" rel=\"noopener\">TracksApp<\/a> in the new EAP (<em>Code | Inspect Code<\/em>) and compared the results with the most stable version of the previous release version, RubyMine 2017.1.5, and the currently stable RubyMine 2017.2.3 that already contains some of the performance updates. Here\u2019s what we\u2019ve got:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7710\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-performance_comparison_chart.png\" alt=\"better RubyMine performance\" width=\"1242\" height=\"766\" \/><\/p>\n<p><!--more-->As you can see on the graph, the new EAP clearly does the job faster: 1.5 times faster than the current stable build, and about 1.8\u20132.5 times faster compared to the previous major version!<\/p>\n<p><strong><em>If you develop a huge Ruby\/Rails project and enjoy testing EAPs, please try this build and let us know if you can confirm our results.<\/em><\/strong><\/p>\n<h3><a name=\"epp\"><\/a>Embedded Puppet (EPP) Support<\/h3>\n<p>Our users developing with Puppet will be glad to know that RubyMine now <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-19108\" target=\"_blank\" rel=\"noopener\">supports<\/a> the EPP templating language. The IDE correctly identifies `.epp` files, recognizes the original EPP syntax, and autocompletes opening expression and parameter tags:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7892\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-epp_autocompletion1.gif\" alt=\"epp_autocompletion1\" width=\"1340\" height=\"600\" \/><\/p>\n<p>The templates resolution works as well, meaning that you can autocomplete a path to a template and navigate from a manifest to the template called:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7894\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-epp_go_to_declaration1.gif\" alt=\"epp_go_to_declaration1\" width=\"1340\" height=\"600\" \/><\/p>\n<p>Also, we have implemented a <em>Refactor Rename<\/em> action for variables and parameters:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7895\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-epp_refactor_rename1.gif\" alt=\"epp_refactor_rename1\" width=\"1340\" height=\"600\" \/><\/p>\n<p>And <em>Find Usages<\/em> for template files:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7893\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-epp_find_usages1.gif\" alt=\"epp_find_usages1\" width=\"1340\" height=\"600\" \/><\/p>\n<h3><a name=\"refactoring\"><\/a>Refactoring<\/h3>\n<h4>\u201cExtract Method\u201d Improved<\/h4>\n<p>The <em>Extract Method<\/em> dialog now <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-19772\" target=\"_blank\" rel=\"noopener\">allows you to choose<\/a> whether to extract a method to a `public`, `protected`, or `private` section. If the chosen section doesn\u2019t exist, RubyMine will create it and put the method right into the added section:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7715\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-extract_method_to_private.gif\" alt=\"extract method to private rails ror rubymine\" width=\"1340\" height=\"600\" \/><\/p>\n<h4>Renaming files from tabs<\/h4>\n<p>We added a handy <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-19336\" target=\"_blank\" rel=\"noopener\">option<\/a> to rename files from tabs. It speaks for itself and needs no further explanation, but here\u2019s what it looks like:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7716\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-rename_files_from_tabs.gif\" alt=\"rename files from tabs rubymine\" width=\"1754\" height=\"956\" \/><\/p>\n<h3><a name=\"rubocop\"><\/a>RuboCop Improvements<\/h3>\n<p>Note that starting from this EAP RubyMine runs RuboCop in the context of bundler if the `Gemfile` exists in the project root. If you don\u2019t have `rubocop` in your `Gemfile`, but RuboCop inspections are active (<em>Settings \/ Preferences | Inspections | Ruby | RuboCop<\/em>) you will get the following message:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-7717 aligncenter\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-rubocop_error.png\" alt=\"rubocop error rubymine\" width=\"390\" height=\"233\" \/><\/p>\n<p>The message will be reworked in the next EAP build. For now though, simply add `gem &#8216;rubocop&#8217;` to your `Gemfile` and install it to get rid of the error message, and continue working with RuboCop like before.<\/p>\n<p>As for improvements, now RubyMine can not only autocorrect the whole file with RuboCop, but also fix errors by a class offense, or even a <a href=\"http:\/\/rubocop.readthedocs.io\/en\/latest\/cops\/\" target=\"_blank\" rel=\"noopener\">cop department<\/a>. You will discover the new options by calling <em>Show Intention Actions<\/em> <em>(<\/em>`<em>Alt+Enter<\/em>`<em>)<\/em>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7718\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-rubocop_autocorrect_options.gif\" alt=\"rubocop autocorrect options rubymine\" width=\"1340\" height=\"546\" \/><\/p>\n<h3><a name=\"code-style\"><\/a>Code Style<\/h3>\n<h4>Indenting private and protected methods<\/h4>\n<p>The <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-8497\" target=\"_blank\" rel=\"noopener\">long-awaited option<\/a> to indent methods under `private` and `protected` is finally available in this build. You can find it in <em>Preferences \/ Settings | Code Style | Ruby<\/em>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7719\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-indent_prviate_protected.gif\" alt=\"indent private protected methods rubymine ruby on rails\" width=\"1340\" height=\"600\" \/><\/p>\n<h4>Adding spaces around any operators<\/h4>\n<p>Another neat improvement is the <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-10510\" target=\"_blank\" rel=\"noopener\">ability to configure spacing<\/a> around assignment, range, conditional, relational, and other operators:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7720\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-add_spacing_around_operators.gif\" alt=\"add spacing around operators ruby rubymine\" width=\"1340\" height=\"600\" \/><\/p>\n<h4>Continuous commenting on Enter<\/h4>\n<p>Now if you comment a line, RubyMine will automatically comment the next line when you press <em>Enter<\/em>. To remove the automatically inserted `#`, press <em>Backspace<\/em>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7739\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2017\/09\/ruby-autocommenting.gif\" alt=\"comment ruby on rails rubymine\" width=\"1100\" height=\"159\" \/><\/p>\n<p>As usual, we added this option upon <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-19414\" target=\"_blank\" rel=\"noopener\">request<\/a>, but if you don\u2019t like the new \u201cautocommenting\u201d behavior, go <em>Help | Find Action | Registry<\/em>, and uncheck `ruby.auto.prolong.comment` (just start typing to find it quickly).<\/p>\n<h3><a name=\"other\"><\/a>Other Improvements<\/h3>\n<ul>\n<li>Reinstated the <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-16183\" target=\"_blank\" rel=\"noopener\">ability<\/a> to indent `*.erb` files with two spaces<\/li>\n<li>Added an <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-19831\" target=\"_blank\" rel=\"noopener\">ability<\/a> to fold multiline containers in the editor<\/li>\n<li>RubyMine can now suggest running `bundle install` based on the <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-8936\" target=\"_blank\" rel=\"noopener\">stacktrace messages<\/a><\/li>\n<li>Fixed <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/RUBY?q=fix%20versions:%20%7B2017.3%20EAP1%7D%20sort%20by:%20votes%20Subsystem:%20Markdown%20\" target=\"_blank\" rel=\"noopener\">markdown issues<\/a><\/li>\n<li>Other improvements and bug-fixes<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/ruby\/nextversion\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>Download RubyMine 2017.3 EAP1<\/a><\/p>\n<p>See the <a href=\"https:\/\/confluence.jetbrains.com\/display\/RUBYDEV\/RubyMine+2017.3\" target=\"_blank\" rel=\"noopener\">release notes<\/a> for the full list of improvements, and please use our <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/ruby\" target=\"_blank\" rel=\"noopener\">bug tracker<\/a> to report any issues you encounter.<\/p>\n<p>Your comments on the new EAP are very welcome in the section below!<\/p>\n<p>Cheers,<\/p>\n<p>Your RubyMine team<\/p>\n","protected":false},"author":574,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[826,808,89],"tags":[676,603,600,667,1273,195],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/9922"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/ruby"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/574"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=9922"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/9922\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=9922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=9922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=9922"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=9922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}