Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use frozen string literal in actionview/ #29897

Merged
merged 1 commit into from
Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ Style/FrozenStringLiteralComment:
- 'activejob/**/*'
- 'activerecord/**/*'
- 'actionmailer/**/*'
- 'actionview/**/*'
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'

# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:
Expand Down
2 changes: 2 additions & 0 deletions actionview/Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rake/testtask"
require "fileutils"
require "open3"
Expand Down
2 changes: 2 additions & 0 deletions actionview/actionview.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip

Gem::Specification.new do |s|
Expand Down
1 change: 1 addition & 0 deletions actionview/bin/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

COMPONENT_ROOT = File.expand_path("..", __dir__)
require_relative "../../tools/test"
2 changes: 2 additions & 0 deletions actionview/lib/action_view.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2004-2017 David Heinemeier Hansson
#
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/base.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/buffers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/string/output_safety"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/context.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module CompiledTemplates #:nodoc:
# holds compiled template code
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/dependency_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "concurrent/map"
require_relative "path_set"

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

require "concurrent/map"
require_relative "dependency_tracker"
require "monitor"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/flows.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/string/output_safety"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/gem_version.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/benchmarkable"

module ActionView #:nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/active_model_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/module/attribute_accessors"
require "active_support/core_ext/enumerable"

Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/asset_tag_helper.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/asset_url_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "zlib"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/atom_feed_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "set"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/cache_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
# = Action View Cache Helper
module Helpers
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/capture_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/string/output_safety"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/controller_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/module/attr_internal"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/csrf_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
# = Action View CSRF Helper
module Helpers
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/date_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "date"
require_relative "tag_helper"
require "active_support/core_ext/array/extract_options"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/debug_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
# = Action View Debug Helper
#
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/form_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "cgi"
require_relative "date_helper"
require_relative "tag_helper"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/form_options_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "cgi"
require "erb"
require_relative "form_helper"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/form_tag_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "cgi"
require_relative "tag_helper"
require "active_support/core_ext/string/output_safety"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/javascript_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "tag_helper"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/number_helper.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/output_safety_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/string/output_safety"

module ActionView #:nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/record_tag_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module RecordTagHelper
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/rendering_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
# = Action View Rendering
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/sanitize_helper.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/try"
require "rails-html-sanitizer"

Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/helpers/tag_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen-string-literal: true
# frozen_string_literal: true

require "active_support/core_ext/string/output_safety"
require "set"
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags #:nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/base.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/check_box.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "checkable"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/checkable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "collection_helpers"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/collection_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "collection_helpers"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/collection_select.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/color_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/date_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/date_select.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/time/calculations"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/datetime_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/datetime_select.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/email_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/file_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/hidden_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/label.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/month_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/number_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/password_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/placeholderable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/radio_button.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "checkable"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/range_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/search_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/select.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/tel_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/text_area.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "placeholderable"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/text_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "placeholderable"

module ActionView
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/time_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down
2 changes: 2 additions & 0 deletions actionview/lib/action_view/helpers/tags/time_select.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ActionView
module Helpers
module Tags # :nodoc:
Expand Down