Method: Rails::PluginBuilder#gemfile_entry

Defined in:
railties/lib/rails/generators/rails/plugin/plugin_generator.rb

#gemfile_entryObject



191
192
193
194
195
196
197
198
199
# File 'railties/lib/rails/generators/rails/plugin/plugin_generator.rb', line 191

def gemfile_entry
  return unless inside_application?

  gemfile_in_app_path = File.join(rails_app_path, "Gemfile")
  if File.exist? gemfile_in_app_path
    entry = %{\ngem "#{name}", path: "#{relative_path}"}
    append_file gemfile_in_app_path, entry
  end
end