Use frozen string literal in actionview/

This commit is contained in:
Kir Shatrov 2017-07-23 18:36:41 +03:00
parent 2ee46434e0
commit 424117281e
178 changed files with 354 additions and 1 deletions

@ -93,6 +93,10 @@ Style/FrozenStringLiteralComment:
- 'activejob/**/*'
- 'activerecord/**/*'
- 'actionmailer/**/*'
- 'actionview/**/*'
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'
# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "rake/testtask"
require "fileutils"
require "open3"

@ -1,3 +1,5 @@
# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
COMPONENT_ROOT = File.expand_path("..", __dir__)
require_relative "../../tools/test"

@ -1,3 +1,5 @@
# frozen_string_literal: true
#--
# Copyright (c) 2004-2017 David Heinemeier Hansson
#

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module/attr_internal"
require "active_support/core_ext/module/attribute_accessors"
require "active_support/ordered_options"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/string/output_safety"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module CompiledTemplates #:nodoc:
# holds compiled template code

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "concurrent/map"
require_relative "path_set"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "concurrent/map"
require_relative "dependency_tracker"
require "monitor"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/string/output_safety"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# Returns the version of the currently loaded Action View as a <tt>Gem::Version</tt>
def self.gem_version

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/benchmarkable"
module ActionView #:nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module/attribute_accessors"
require "active_support/core_ext/enumerable"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/array/extract_options"
require "active_support/core_ext/hash/keys"
require_relative "asset_url_helper"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "zlib"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "set"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# = Action View Cache Helper
module Helpers

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/string/output_safety"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module/attr_internal"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# = Action View CSRF Helper
module Helpers

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "date"
require_relative "tag_helper"
require "active_support/core_ext/array/extract_options"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# = Action View Debug Helper
#

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cgi"
require_relative "date_helper"
require_relative "tag_helper"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cgi"
require "erb"
require_relative "form_helper"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cgi"
require_relative "tag_helper"
require "active_support/core_ext/string/output_safety"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "tag_helper"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/hash/keys"
require "active_support/core_ext/string/output_safety"
require "active_support/number_helper"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/string/output_safety"
module ActionView #:nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module RecordTagHelper

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
# = Action View Rendering

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/object/try"
require "rails-html-sanitizer"

@ -1,4 +1,4 @@
# frozen-string-literal: true
# frozen_string_literal: true
require "active_support/core_ext/string/output_safety"
require "set"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags #:nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "checkable"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "collection_helpers"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "collection_helpers"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/time/calculations"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "checkable"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "placeholderable"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "placeholderable"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/string/filters"
require "active_support/core_ext/array/extract_options"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "tag_helper"
require "active_support/core_ext/string/access"
require "i18n/exceptions"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "javascript_helper"
require "active_support/core_ext/array/access"
require "active_support/core_ext/hash/keys"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "rendering"
require "active_support/core_ext/module/remove_method"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "concurrent/map"
require "active_support/core_ext/module/remove_method"
require "active_support/core_ext/module/attribute_accessors"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module ModelNaming #:nodoc:
# Converts the given object to an ActiveModel compliant one.

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView #:nodoc:
# = Action View PathSet
#

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "action_view"
require "rails"

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module"
require_relative "model_naming"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# This class defines the interface for a renderer. Each class that
# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "concurrent/map"
require_relative "partial_renderer/collection_caching"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module CollectionCaching # :nodoc:
extend ActiveSupport::Concern

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
# This is the main entry point for rendering. It basically delegates
# to other objects like TemplateRenderer and PartialRenderer which

@ -1,4 +1,5 @@
# frozen_string_literal: true
require "fiber"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "view_paths"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "action_dispatch/routing/polymorphic_routes"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
namespace :cache_digests do
desc "Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)"
task nested_dependencies: :environment do

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/enumerable"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView #:nodoc:
# = Action View Template Handlers
class Template

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Template::Handlers
class Builder

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
class Template
module Handlers

@ -1,3 +1,5 @@
# frozen_string_literal: true
::ActiveSupport::Deprecation.warn("ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead.")
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "erubi"
module ActionView

@ -1,3 +1,5 @@
# frozen_string_literal: true
gem "erubis"
require "erubis"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Template::Handlers
class Html < Raw

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView
module Template::Handlers
class Raw

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView #:nodoc:
# = Action View HTML Template
class Template

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "pathname"
require "active_support/core_ext/class"
require "active_support/core_ext/module/attribute_accessors"

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionView #:nodoc:
# = Action View Text Template
class Template

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module/attribute_accessors"
module ActionView

Some files were not shown because too many files have changed in this diff Show More