├── .github └── workflows │ └── build.yml ├── .gitignore ├── .rspec ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── LICENCE ├── README.rdoc ├── Rakefile ├── bin └── magic_frozen_string_literal ├── lib └── add_magic_comment.rb ├── magic_frozen_string_literal.gemspec └── spec ├── acceptance_spec.rb ├── fixtures ├── expected │ ├── Gemfile │ ├── Rakefile │ ├── blank_line.rb │ ├── config.ru │ ├── empty.rb │ ├── only_comment.rb │ ├── shebang.rb │ ├── shebang_blank_line.rb │ ├── t.Rakefile │ ├── t1.erb │ ├── t1.haml │ ├── t1.rb │ ├── t1.slim │ └── utf8.rb └── input │ ├── Gemfile │ ├── Rakefile │ ├── blank_line.rb │ ├── config.ru │ ├── empty.rb │ ├── only_comment.rb │ ├── shebang.rb │ ├── shebang_blank_line.rb │ ├── t.Rakefile │ ├── t1.erb │ ├── t1.haml │ ├── t1.rb │ ├── t1.slim │ └── utf8.rb ├── newline_code_spec.rb └── spec_helper.rb /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/.gitignore -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.5 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/Gemfile -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/Gemfile.lock -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/LICENCE -------------------------------------------------------------------------------- /README.rdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/README.rdoc -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/Rakefile -------------------------------------------------------------------------------- /bin/magic_frozen_string_literal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/bin/magic_frozen_string_literal -------------------------------------------------------------------------------- /lib/add_magic_comment.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/lib/add_magic_comment.rb -------------------------------------------------------------------------------- /magic_frozen_string_literal.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/magic_frozen_string_literal.gemspec -------------------------------------------------------------------------------- /spec/acceptance_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/acceptance_spec.rb -------------------------------------------------------------------------------- /spec/fixtures/expected/Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/expected/Gemfile -------------------------------------------------------------------------------- /spec/fixtures/expected/Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/expected/Rakefile -------------------------------------------------------------------------------- /spec/fixtures/expected/blank_line.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts "hello" 4 | -------------------------------------------------------------------------------- /spec/fixtures/expected/config.ru: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/expected/config.ru -------------------------------------------------------------------------------- /spec/fixtures/expected/empty.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/expected/only_comment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | -------------------------------------------------------------------------------- /spec/fixtures/expected/shebang.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | # frozen_string_literal: true 3 | 4 | puts "hello" 5 | -------------------------------------------------------------------------------- /spec/fixtures/expected/shebang_blank_line.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | # frozen_string_literal: true 3 | 4 | puts "hello" 5 | -------------------------------------------------------------------------------- /spec/fixtures/expected/t.Rakefile: -------------------------------------------------------------------------------- 1 | puts 'not a Rakefile!' 2 | -------------------------------------------------------------------------------- /spec/fixtures/expected/t1.erb: -------------------------------------------------------------------------------- 1 | Hello! 2 | -------------------------------------------------------------------------------- /spec/fixtures/expected/t1.haml: -------------------------------------------------------------------------------- 1 | -# frozen_string_literal: true 2 | Hello! 3 | -------------------------------------------------------------------------------- /spec/fixtures/expected/t1.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts "hello" 4 | -------------------------------------------------------------------------------- /spec/fixtures/expected/t1.slim: -------------------------------------------------------------------------------- 1 | -# frozen_string_literal: true 2 | Hello! 3 | -------------------------------------------------------------------------------- /spec/fixtures/expected/utf8.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts " " 4 | -------------------------------------------------------------------------------- /spec/fixtures/input/Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/input/Gemfile -------------------------------------------------------------------------------- /spec/fixtures/input/Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/input/Rakefile -------------------------------------------------------------------------------- /spec/fixtures/input/blank_line.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts "hello" 4 | -------------------------------------------------------------------------------- /spec/fixtures/input/config.ru: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/fixtures/input/config.ru -------------------------------------------------------------------------------- /spec/fixtures/input/empty.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/input/only_comment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | -------------------------------------------------------------------------------- /spec/fixtures/input/shebang.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | # frozen_string_literal: true 3 | 4 | puts "hello" 5 | -------------------------------------------------------------------------------- /spec/fixtures/input/shebang_blank_line.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | # frozen_string_literal: true 3 | 4 | puts "hello" 5 | -------------------------------------------------------------------------------- /spec/fixtures/input/t.Rakefile: -------------------------------------------------------------------------------- 1 | puts 'not a Rakefile!' 2 | -------------------------------------------------------------------------------- /spec/fixtures/input/t1.erb: -------------------------------------------------------------------------------- 1 | Hello! 2 | -------------------------------------------------------------------------------- /spec/fixtures/input/t1.haml: -------------------------------------------------------------------------------- 1 | -# frozen_string_literal: true 2 | Hello! 3 | -------------------------------------------------------------------------------- /spec/fixtures/input/t1.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts "hello" 4 | -------------------------------------------------------------------------------- /spec/fixtures/input/t1.slim: -------------------------------------------------------------------------------- 1 | -# frozen_string_literal: true 2 | Hello! 3 | -------------------------------------------------------------------------------- /spec/fixtures/input/utf8.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts " " 4 | -------------------------------------------------------------------------------- /spec/newline_code_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/newline_code_spec.rb -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Invoca/magic_frozen_string_literal/HEAD/spec/spec_helper.rb --------------------------------------------------------------------------------