{"id":9752,"date":"2016-11-04T22:01:43","date_gmt":"2016-11-04T22:01:43","guid":{"rendered":"https:\/\/blog.jetbrains.com\/ruby\/?p=6830"},"modified":"2016-11-07T13:24:18","modified_gmt":"2016-11-07T13:24:18","slug":"better-puppet-support","status":"publish","type":"ruby","link":"https:\/\/blog.jetbrains.com\/zh-hans\/ruby\/2016\/11\/better-puppet-support","title":{"rendered":"RubyMine 2016.3 EAP: Better Puppet Support"},"content":{"rendered":"<p>Hello everyone,<\/p>\n<p>Please welcome the next\u00a0<strong><a href=\"https:\/\/confluence.jetbrains.com\/display\/RUBYDEV\/Early+Access+Program\" target=\"_blank\" rel=\"noopener\">RubyMine 2016.3 EAP build 163.7342.19<\/a><\/strong>.<\/p>\n<p><em>For previous posts covering the major new features of the upcoming release, see: <a href=\"https:\/\/blog.jetbrains.com\/ruby\/2016\/09\/new-gem-management-ui\/\">New Gem Management UI<\/a>,\u00a0<a href=\"https:\/\/blog.jetbrains.com\/ruby\/2016\/09\/rubymine-2016-3-eap-is-open\/\">Faster Remote Gem Downloading<\/a>.<\/em><\/p>\n<h2>Better Puppet\u00a0Support<\/h2>\n<p>If you&#8217;re staying with the latest 2016.3 EAP builds, you may have noticed a lot of issues on Puppet support being closed. Back in October 2014 we implemented many <a href=\"https:\/\/blog.jetbrains.com\/ruby\/2014\/10\/puppet-support-improvements\/\">Puppet support improvements<\/a>, and with the new RubyMine 2016.3 we&#8217;ve decided to add more intelligence into Puppet code insight and resolving\u00a0as we felt there was room for improvement. Today we&#8217;re ready to share all the new features with you.<\/p>\n<h3><!--more-->Puppet 4<\/h3>\n<p>First of all we&#8217;ve changed the default language level to Puppet 4. You can always adjust it in <em>Settings | Languages &amp; Frameworks | Puppet<\/em>:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet4_settings.png\" rel=\"attachment wp-att-6855\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6855\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet4_settings.png\" alt=\"puppet4_settings\" width=\"1200\" height=\"398\" \/><\/a><\/p>\n<h3>Smarter code completion<\/h3>\n<p>We&#8217;ve implemented much smarter code completion. For all the main syntax elements, such as <em>case<\/em>, <em>class<\/em>, <em>define<\/em>, <em>function<\/em>, <em>if<\/em>, <em>node<\/em>, and <em>unless<\/em>, RubyMine\u00a0is aware of the code element structure:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_code_completion.gif\" rel=\"attachment wp-att-6859\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6859\" width=\"1924\" height=\"948\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_code_completion.png\" alt=\"puppet_code_completion\" onmouseover=\"this.width=\"1924\" height=\"948\" src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_code_completion.gif';\" onmouseout=\"this.width=\"1924\" height=\"948\" src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_code_completion.png';\" \/><\/a><\/p>\n<p>Data type code completion is now available inside lists of parameters for classes, functions and resource types:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_type_completion_1.png\" rel=\"attachment wp-att-6861\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6861\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_type_completion_1.png\" alt=\"puppet_type_completion_1\" width=\"1200\" height=\"468\" \/><\/a><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_type_completion_2.png\" rel=\"attachment wp-att-6862\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6862\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_type_completion_2.png\" alt=\"puppet_type_completion_2\" width=\"1200\" height=\"468\" \/><\/a><\/p>\n<p>Code completion now works correctly and for resources defined with an array of strings in the title:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_file_completion.png\" rel=\"attachment wp-att-6863\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6863\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_file_completion.png\" alt=\"puppet_file_completion\" width=\"1200\" height=\"468\" \/><\/a><\/p>\n<p>The\u00a0list of built-in variables and facts is now up-to-date:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_list_facts.png\" rel=\"attachment wp-att-6866\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6866\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_list_facts.png\" alt=\"puppet_list_facts\" width=\"1200\" height=\"468\" \/><\/a><\/p>\n<h3>Puppet functions<\/h3>\n<p>RubyMine now supports\u00a0defining Puppet functions. Once defined, functions are also available in code completion:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_functions.png\" rel=\"attachment wp-att-6871\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6871\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_functions.png\" alt=\"puppet_functions\" width=\"1200\" height=\"468\" \/><\/a><\/p>\n<h3>More accurate code\u00a0navigation<\/h3>\n<p>While\u00a0highlighting code elements, RubyMine is now aware of local and global scopes:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_variables_1.png\" rel=\"attachment wp-att-6877\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6877\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_variables_1.png\" alt=\"puppet_variables_1\" width=\"1200\" height=\"468\" \/><\/a><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_variables_2.png\" rel=\"attachment wp-att-6878\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6878\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_variables_2.png\" alt=\"puppet_variables_2\" width=\"1200\" height=\"468\" \/><\/a><\/p>\n<p><em><em>Go to Declaration<\/em><\/em>\u00a0and\u00a0<em>Find Usages<\/em>\u00a0actions now work better for facts, functions, resource types and parameters:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_go_to_declaration.png\" rel=\"attachment wp-att-6882\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6882\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_go_to_declaration.png\" alt=\"puppet_go_to_declaration\" width=\"1200\" height=\"382\" \/><\/a><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_find_usages.png\" rel=\"attachment wp-att-6884\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6884\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_find_usages.png\" alt=\"puppet_find_usages\" width=\"1200\" height=\"382\" \/><\/a><\/p>\n<h3>In-place Rename refactoring<\/h3>\n<p>Rename refactoring is now aware of local and global scopes as well. Also, now it works without any additional dialogs, in-place:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_rename.gif\" rel=\"attachment wp-att-6887\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6887\" width=\"1600\" height=\"800\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_rename.png\" alt=\"puppet_rename\"  onmouseover=\"this.width=\"1600\" height=\"800\" src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_rename.gif';\" onmouseout=\"this.width=\"1600\" height=\"800\" src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_rename.png';\" \/><\/a><\/p>\n<h3>Live templates<\/h3>\n<p>With RubyMine 2016.3 you can create your own custom live templates for Puppet language in the same way as for other languages:<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_live_templates.png\" rel=\"attachment wp-att-6889\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6889\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2016\/11\/ruby-puppet_live_templates.png\" alt=\"puppet_live_templates\" width=\"1200\" height=\"752\" \/><\/a><\/p>\n<p>You\u2019re welcome to give this build a try by <a href=\"https:\/\/confluence.jetbrains.com\/display\/RUBYDEV\/Early+Access+Program\" target=\"_blank\" rel=\"noopener\">downloading it<\/a>,\u00a0and share your feedback with us here in the comments.<\/p>\n<p>The full list of fixed issues can be found in the\u00a0<a href=\"https:\/\/confluence.jetbrains.com\/display\/RUBYDEV\/RubyMine+2016.3#RubyMine2016.3-RubyMine2016.3EAP(build163.7342.19)ReleaseNotes\" target=\"_blank\" rel=\"noopener\">release notes<\/a>.\u00a0Please note that EAP builds are pre-beta software and may cause issues, which we ask you to report to our\u00a0<a href=\"https:\/\/youtrack.jetbrains.com\/issues\/RUBY\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>.<\/p>\n<p>\u2014<br \/>\nYour RubyMine Team<\/p>\n","protected":false},"author":51,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[826,808],"tags":[662,603,1273,195],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/9752"}],"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\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=9752"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/9752\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=9752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=9752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=9752"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=9752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}