• Stars
    star
    159
  • Rank 235,916 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 9 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

easily add '# frozen_string_literal: true' comments to the top of all your project's Ruby files

Magic_frozen_string_literal¶ ↑

Magic_frozen_string_literal is a little tool that allows you to quickly add the magic comment that indicates that the file can safely have its string literals frozen, as will be the default in Ruby 3.0.

Cloned from github.com/m-ryan/magic_encoding

Installation¶ ↑

gem install magic_frozen_string_literal
rbenv rehash

Usage¶ ↑

Run the tool from the command line:

magic_frozen_string_literal <directory>

this will prepend every “*.rb”, “*.ru”, “Rakefile”, “*.rake”, “Gemfile”, “*.gemspec”, “*.rabl”, “*.jbuilder”, “*.haml”, “*.slim” file in the given <directory> (recursively) with the following magic comment followed by a blank line:

# frozen_string_literal: true

(“.haml” and “.slim” files will have a “-” prefix before the comment and no blank line after.)

The <directory> parameter is optional. It defaults to the current working directory.

Notes:

  • existing frozen_string_literal magic comments are replaced

  • the rest of the file remains unchanged

  • empty files are not touched

  • if the file starts with #! (shebang), that line is preserved and the magic comment is added just below it

More Repositories

1

ruby_dig-archived

Gem that adds Ruby 2.3's Hash#dig and Array#dig to earlier versions of Ruby
Ruby
30
star
2

jenkins-pipeline

Jenkins Pipeline Shared Library
Groovy
16
star
3

declare_schema

Declare your Rails/active_record model schemas and have database migrations generated for you!
Ruby
10
star
4

contextual_logger

Add more context to your logs
Ruby
8
star
5

attr_default

Dynamic Ruby defaults for ActiveRecord attributes
Ruby
8
star
6

attr_comparable

AttrComparable gem
Ruby
7
star
7

monotonic_tick_count

PORO to hold a monotonic tick count. Useful for measuring time differences.
Ruby
5
star
8

backdraft

Wrapper around Backbone providing jQuery dataTable integration and plugin framework
JavaScript
5
star
9

exception_handling

Exception handling logger/emailer
Ruby
4
star
10

developer-docs

Read The Docs repository for Invoca developer documentation
Python
4
star
11

appraisal-matrix

Ruby
2
star
12

fibered_mysql2

Ruby
2
star
13

call_load_tester

A load tester that generates calls using Twilio
Ruby
1
star
14

parameter_substitution

Ruby gem to parse an input string with embedded substitution parameters and replace them with values from a provided mapping
Ruby
1
star
15

call_center_api-ruby

Ruby wrapper for Call Center API with examples
Ruby
1
star
16

simple-rss

Ruby
1
star
17

call_center_api-php

PHP wrapper for Call Center API with examples
PHP
1
star
18

paperclip-gem

Ruby
1
star
19

tenable-scan-launcher

Go
1
star
20

call_center_api-java

Java wrapper for Call Center API with examples
Java
1
star
21

rack-rewrite

Ruby
1
star
22

aggregate

A no-sql style key value store with migrations and data validations
Ruby
1
star
23

style-guide

Centralized repository for all of Invoca's language style guides and HoundCI config
1
star
24

call_center_api-dotnet

Dot NET wrapper for Call Center API with examples
C#
1
star
25

exceptional_synchrony

Extensions to EventMachine/Synchrony to work well with exceptions
Ruby
1
star
26

ringpool_api-example-ios

Example universal iOS app showing how to call the RingRevenue RingPool API via JSON
Objective-C
1
star
27

yard-to_mkdocs

Generate mkdocs navigation section and markdown files from yard
Ruby
1
star
28

process_settings

dynamic process settings
Ruby
1
star
29

nmap-diff

Go
1
star
30

activerecord-dynamic_timeout

Dynamic Timeouts within ActiveRecord
Ruby
1
star