Skip to content

Commit

Permalink
Use frozen string literal in guides/
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Aug 13, 2017
1 parent 788f46d commit 1f37d84
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Style/FrozenStringLiteralComment:
- 'actionmailer/**/*'
- 'actionview/**/*'
- 'actionpack/**/*'
- 'guides/**/*'
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'
Expand Down
2 changes: 2 additions & 0 deletions guides/Rakefile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/action_controller_gem.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/action_controller_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_job_gem.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_job_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_record_gem.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_record_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/active_record_migrations_gem.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/benchmark.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/generic_gem.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/bug_report_templates/generic_master.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require "bundler/inline"
rescue LoadError => e
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

$:.unshift __dir__

as_lib = File.expand_path("../activesupport/lib", __dir__)
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/generator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "set"
require "fileutils"

Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "yaml"

module RailsGuides
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/indexer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/object/blank"
require "active_support/core_ext/string/inflections"

Expand Down
1 change: 1 addition & 0 deletions guides/rails_guides/kindle.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require "kindlerb"
require "nokogiri"
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/levenshtein.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RailsGuides
module Levenshtein
# This code is based directly on the Text gem implementation.
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/markdown.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "redcarpet"
require "nokogiri"
require "rails_guides/markdown/renderer"
Expand Down
2 changes: 2 additions & 0 deletions guides/rails_guides/markdown/renderer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RailsGuides
class Markdown
class Renderer < Redcarpet::Render::HTML
Expand Down
2 changes: 2 additions & 0 deletions guides/w3c_validator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# ---------------------------------------------------------------------------
#
# This script validates the generated guides against the W3C Validator.
Expand Down

0 comments on commit 1f37d84

Please sign in to comment.