Add frozen_string_literal pragma to ruby files

This commit is contained in:
Krzysztof Rybka
2018-12-16 16:25:29 +01:00
parent 17d0e6bdb7
commit 873cf4add2
157 changed files with 313 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require 'will_paginate/array'
require 'kaminari'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module SerializationScopeTesting

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActionController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Execute this test in isolation
require 'support/isolated_unit'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'support/isolated_unit'
require 'minitest/mock'
require 'action_dispatch'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Execute this test in isolation
require 'support/isolated_unit'
require 'minitest/mock'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class ActiveRecordTest < ActiveSupport::TestCase

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel
class Serializer

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class NestedPost < ::Model; associations :nested_posts end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require 'will_paginate/array'
require 'kaminari'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers
module Adapter

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require_relative 'collection_serializer_test'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# https://github.com/rails-api/active_model_serializers/pull/872
# approx ref 792fb8a9053f8db3c562dae4f40907a582dd1720 to test against
require 'bundler/setup'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'benchmark/ips'
require 'json'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative './benchmarking_support'
require_relative './app'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative './benchmarking_support'
require_relative './app'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative './benchmarking_support'
require_relative './app'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative './benchmarking_support'
require_relative './app'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative './benchmarking_support'
require_relative './app'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PrimaryResourceController < ActionController::Base
PRIMARY_RESOURCE =
begin

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.configuration.serializers = []
class HasOneRelationshipSerializer < ActiveModel::Serializer
attributes :id, :first_name, :last_name

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require 'tmpdir'
require 'tempfile'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_record'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class Model < ActiveModelSerializers::Model
rand(2).zero? && derive_attributes_from_names_and_fix_accessors

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require 'generators/rails/resource_override'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
require 'generators/rails/resource_override'
require 'generators/rails/serializer_generator'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
TestHelper.silence_warnings do
require 'grape'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class PoroTest < ActiveSupport::TestCase

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModelSerializers

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel
class Serializer

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Execute this test in isolation
require 'support/isolated_unit'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel
class Serializer

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
class SerializationTest < ActiveSupport::TestCase

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
module ActiveModel

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# https://github.com/rails/rails/blob/v5.0.0.beta1/railties/test/isolation/abstract_unit.rb
# Usage Example:

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Rails5Shims
module ControllerTests
# https://github.com/rails/rails/blob/b217354/actionpack/lib/action_controller/test_case.rb

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'support/isolated_unit'
module ActiveModelSerializers
RailsApplication = TestHelpers::Generation.make_basic_app do |app|

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module SerializationTesting
def config
ActiveModelSerializers.config

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'
require 'bundler/setup'