diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-08-13 22:02:48 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-08-13 22:04:09 +0900 |
commit | 1f37d846a91e4048367f6185371ec0abb523712c (patch) | |
tree | 77aef1d6f2f6ef187c0ba1c53b49f81b161f073a /guides | |
parent | 788f46d4863a0f38ecec042864da291f2342ec74 (diff) | |
download | rails-1f37d846a91e4048367f6185371ec0abb523712c.tar.gz rails-1f37d846a91e4048367f6185371ec0abb523712c.tar.bz2 rails-1f37d846a91e4048367f6185371ec0abb523712c.zip |
Use frozen string literal in guides/
Diffstat (limited to 'guides')
21 files changed, 41 insertions, 0 deletions
diff --git a/guides/Rakefile b/guides/Rakefile index 3a6f10040f..84e18e0972 100644 --- a/guides/Rakefile +++ b/guides/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :guides do desc 'Generate guides (for authors), use ONLY=foo to process just "foo.md"' task generate: "generate:html" diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb index 8b7aa893fd..4d8d8db3e5 100644 --- a/guides/bug_report_templates/action_controller_gem.rb +++ b/guides/bug_report_templates/action_controller_gem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb index 3dd66c95ec..1f862e07da 100644 --- a/guides/bug_report_templates/action_controller_master.rb +++ b/guides/bug_report_templates/action_controller_master.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_job_gem.rb b/guides/bug_report_templates/active_job_gem.rb index 252b270a0c..af777a86ef 100644 --- a/guides/bug_report_templates/active_job_gem.rb +++ b/guides/bug_report_templates/active_job_gem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_job_master.rb b/guides/bug_report_templates/active_job_master.rb index 7591470440..39fb3f60a6 100644 --- a/guides/bug_report_templates/active_job_master.rb +++ b/guides/bug_report_templates/active_job_master.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb index 61d4e8d395..168e2dcc66 100644 --- a/guides/bug_report_templates/active_record_gem.rb +++ b/guides/bug_report_templates/active_record_gem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb index 8bbc1ef19e..cbd2cff2b8 100644 --- a/guides/bug_report_templates/active_record_master.rb +++ b/guides/bug_report_templates/active_record_master.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_migrations_gem.rb b/guides/bug_report_templates/active_record_migrations_gem.rb index 00ba3c1cd6..b931ed0beb 100644 --- a/guides/bug_report_templates/active_record_migrations_gem.rb +++ b/guides/bug_report_templates/active_record_migrations_gem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/active_record_migrations_master.rb b/guides/bug_report_templates/active_record_migrations_master.rb index 52c9028b0f..2c009c0563 100644 --- a/guides/bug_report_templates/active_record_migrations_master.rb +++ b/guides/bug_report_templates/active_record_migrations_master.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/benchmark.rb b/guides/bug_report_templates/benchmark.rb index a0b541d012..d0f5a634bc 100644 --- a/guides/bug_report_templates/benchmark.rb +++ b/guides/bug_report_templates/benchmark.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/generic_gem.rb b/guides/bug_report_templates/generic_gem.rb index 4dcd04ea27..c990bda005 100644 --- a/guides/bug_report_templates/generic_gem.rb +++ b/guides/bug_report_templates/generic_gem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/bug_report_templates/generic_master.rb b/guides/bug_report_templates/generic_master.rb index ed45726e92..1a9b99b624 100644 --- a/guides/bug_report_templates/generic_master.rb +++ b/guides/bug_report_templates/generic_master.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/inline" rescue LoadError => e diff --git a/guides/rails_guides.rb b/guides/rails_guides.rb index 0f611c8f2b..f2d4d6f647 100644 --- a/guides/rails_guides.rb +++ b/guides/rails_guides.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $:.unshift __dir__ as_lib = File.expand_path("../activesupport/lib", __dir__) diff --git a/guides/rails_guides/generator.rb b/guides/rails_guides/generator.rb index 35f014747c..7205f37be7 100644 --- a/guides/rails_guides/generator.rb +++ b/guides/rails_guides/generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "set" require "fileutils" diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb index 520aa7f7cc..a6970fb90c 100644 --- a/guides/rails_guides/helpers.rb +++ b/guides/rails_guides/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "yaml" module RailsGuides diff --git a/guides/rails_guides/indexer.rb b/guides/rails_guides/indexer.rb index c58b6b85a2..c707464cdf 100644 --- a/guides/rails_guides/indexer.rb +++ b/guides/rails_guides/indexer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/object/blank" require "active_support/core_ext/string/inflections" diff --git a/guides/rails_guides/kindle.rb b/guides/rails_guides/kindle.rb index 9536d0bd3b..87a369a15a 100644 --- a/guides/rails_guides/kindle.rb +++ b/guides/rails_guides/kindle.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require "kindlerb" require "nokogiri" diff --git a/guides/rails_guides/levenshtein.rb b/guides/rails_guides/levenshtein.rb index 40c6a5c372..bafa6bfe9d 100644 --- a/guides/rails_guides/levenshtein.rb +++ b/guides/rails_guides/levenshtein.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RailsGuides module Levenshtein # This code is based directly on the Text gem implementation. diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 02d58601c4..84f95eec68 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "redcarpet" require "nokogiri" require "rails_guides/markdown/renderer" diff --git a/guides/rails_guides/markdown/renderer.rb b/guides/rails_guides/markdown/renderer.rb index 7ac3d417a4..1f2fe91ea1 100644 --- a/guides/rails_guides/markdown/renderer.rb +++ b/guides/rails_guides/markdown/renderer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RailsGuides class Markdown class Renderer < Redcarpet::Render::HTML diff --git a/guides/w3c_validator.rb b/guides/w3c_validator.rb index 4671e040ca..f38b6c2639 100644 --- a/guides/w3c_validator.rb +++ b/guides/w3c_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # --------------------------------------------------------------------------- # # This script validates the generated guides against the W3C Validator. |