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
source 'https://rubygems.org'
#
# Add a Gemfile.local to locally bundle gems outside of version control

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
begin
require 'bundler/setup'
rescue LoadError

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_support/core_ext/class/attribute'
require 'active_model_serializers/serialization_context'

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'thread_safe'
require 'jsonapi/include_directive'
require 'active_model/serializer/collection_serializer'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model_serializers/adapter'
require 'active_model_serializers/deprecate'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Adapter

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Adapter

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Adapter

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Adapter

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Adapter

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/collection_serializer'
module ActiveModel

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/lazy_association'
module ActiveModel

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/field'
module ActiveModel

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
# @api private

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
class CollectionSerializer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
UndefinedCacheKey = Class.new(StandardError)

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/error_serializer'
module ActiveModel

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
# Holds all the meta-data about a field (i.e. attribute or association) as it was

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
class Fieldset

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
# @api private

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
# @api private

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
# @api private

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/field'
module ActiveModel

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
module Lint

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model/serializer/field'
require 'active_model/serializer/association'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModel
class Serializer
VERSION = '0.10.8'.freeze

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_model'
require 'active_support'
require 'active_support/core_ext/object/with_options'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
UnknownAdapterError = Class.new(ArgumentError)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class Attributes < Base

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class Json < Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# {http://jsonapi.org/format/ JSON API specification}
# rubocop:disable Style/AsciiComments
# TODO: implement!

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi < Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi < Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi < Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class JsonApi

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Adapter
class Null < Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# Adapted from
# https://github.com/rails/rails/blob/7f18ea14c8/activejob/lib/active_job/callbacks.rb
require 'active_support/callbacks'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
##
# Provides a single method +deprecate+ to be used to declare when
# something is going away.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Deserialization
module_function

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module JsonPointer
module_function

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
##
# ActiveModelSerializers::Logging
#

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module LookupChain
# Standard appending of Serializer to the resource name.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# ActiveModelSerializers::Model is a convenient superclass for making your models
# from Plain-Old Ruby Objects (PORO). It also serves as a reference implementation
# that satisfies ActiveModel::Serializer::Lint::Tests.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails/railtie'
require 'action_controller'
require 'action_controller/railtie'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# Based on discussion in https://github.com/rails/rails/pull/23712#issuecomment-184977238,
# the JSON API media type will have its own format/renderer.
#

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'active_support/core_ext/array/extract_options'
module ActiveModelSerializers
class SerializationContext

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Test
extend ActiveSupport::Autoload

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveModelSerializers
module Test
module Schema

View File

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

View File

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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Rails
module Generators
class SerializerGenerator < NamedBase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# To add Grape support, require 'grape/active_model_serializers' in the base of your Grape endpoints
# Then add 'include Grape::ActiveModelSerializers' to enable the formatter and helpers
require 'active_model_serializers'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# A Grape response formatter that can be used as 'formatter :json, Grape::Formatters::ActiveModelSerializers'
#
# Serializer options can be passed as a hash from your Grape endpoint using env[:active_model_serializer_options],

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# Helpers can be included in your Grape endpoint as: helpers Grape::Helpers::ActiveModelSerializers
module Grape

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
begin
require 'rubocop'
require 'rubocop/rake_task'

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

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