Skip to content

[Bundler] Adding frozen string literal comment to generated files #30

@diegous

Description

@diegous

Problem

When running bundle gem my_gem several files are created, none of which include # frozen_string_literal: true which is a default requirement of some linters like rubocop.

Solution

Include that line by default in generated ruby files (e.g. ), or add a flag to indicate the comment is desired in the new gem.

Some of the files that could include this line:

  • my_gem/lib/my_gem.rb
  • my_gem/lib/my_gem/version.rb
  • my_gem/spec/my_gem_spec.rb
  • my_gem/spec/spec_helper.rb

Note: This is a really small change, and might not even consider it an improvement so if there isn't too much support for this we can simply close it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions