From 801198377e11646693b8a634240fff87db663069 Mon Sep 17 00:00:00 2001 From: Yosi Attias Date: Sun, 10 Sep 2023 11:55:02 +0300 Subject: [PATCH] Lint fixes --- benchmarks/allocs.rb | 6 +++--- benchmarks/bm_ams_0_10.rb | 6 +++--- benchmarks/bm_object_writer.rb | 4 ++-- benchmarks/bm_panko_json.rb | 6 +++--- benchmarks/bm_panko_object.rb | 6 +++--- benchmarks/bm_plain_object.rb | 4 ++-- benchmarks/bm_serialization_descriptor.rb | 2 +- benchmarks/bm_serializer_resolver.rb | 4 ++-- benchmarks/bm_to_object.rb | 6 +++--- benchmarks/profile.rb | 6 +++--- benchmarks/sanity.rb | 6 +++--- benchmarks/type_casts/bm_active_record.rb | 2 +- benchmarks/type_casts/bm_panko.rb | 2 +- benchmarks/type_casts/support.rb | 2 +- spec/panko/type_cast_spec.rb | 2 +- 15 files changed, 32 insertions(+), 32 deletions(-) diff --git a/benchmarks/allocs.rb b/benchmarks/allocs.rb index d41e528..d7a4e55 100644 --- a/benchmarks/allocs.rb +++ b/benchmarks/allocs.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" require "memory_profiler" diff --git a/benchmarks/bm_ams_0_10.rb b/benchmarks/bm_ams_0_10.rb index ba747df..b326fa6 100644 --- a/benchmarks/bm_ams_0_10.rb +++ b/benchmarks/bm_ams_0_10.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" # disable logging for benchmarks ActiveModelSerializers.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new("/dev/null")) diff --git a/benchmarks/bm_object_writer.rb b/benchmarks/bm_object_writer.rb index 2669d15..6c03ba2 100644 --- a/benchmarks/bm_object_writer.rb +++ b/benchmarks/bm_object_writer.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" +require_relative "benchmarking_support" +require_relative "app" Benchmark.run("ObjectWriter_OneProperty_PushValue") do writer = Panko::ObjectWriter.new diff --git a/benchmarks/bm_panko_json.rb b/benchmarks/bm_panko_json.rb index dc5165b..784559c 100644 --- a/benchmarks/bm_panko_json.rb +++ b/benchmarks/bm_panko_json.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" class AuthorFastSerializer < Panko::Serializer attributes :id, :name diff --git a/benchmarks/bm_panko_object.rb b/benchmarks/bm_panko_object.rb index 39d8567..c1fe3b5 100644 --- a/benchmarks/bm_panko_object.rb +++ b/benchmarks/bm_panko_object.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" class AuthorFastSerializer < Panko::Serializer attributes :id, :name diff --git a/benchmarks/bm_plain_object.rb b/benchmarks/bm_plain_object.rb index fa2a363..b1a3727 100644 --- a/benchmarks/bm_plain_object.rb +++ b/benchmarks/bm_plain_object.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" +require_relative "benchmarking_support" +require_relative "app" class AuthorFastSerializer < Panko::Serializer attributes :id, :name diff --git a/benchmarks/bm_serialization_descriptor.rb b/benchmarks/bm_serialization_descriptor.rb index 8cb7bd1..ee939a4 100644 --- a/benchmarks/bm_serialization_descriptor.rb +++ b/benchmarks/bm_serialization_descriptor.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" +require_relative "benchmarking_support" require "active_support" require "panko_serializer" diff --git a/benchmarks/bm_serializer_resolver.rb b/benchmarks/bm_serializer_resolver.rb index 1441c7a..56dca31 100644 --- a/benchmarks/bm_serializer_resolver.rb +++ b/benchmarks/bm_serializer_resolver.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" +require_relative "benchmarking_support" +require_relative "app" class NotSerializer end diff --git a/benchmarks/bm_to_object.rb b/benchmarks/bm_to_object.rb index b101b5b..40b925b 100644 --- a/benchmarks/bm_to_object.rb +++ b/benchmarks/bm_to_object.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" class PostWithAliasModel < ActiveRecord::Base self.table_name = "posts" diff --git a/benchmarks/profile.rb b/benchmarks/profile.rb index 21f4e13..9a2ff8a 100644 --- a/benchmarks/profile.rb +++ b/benchmarks/profile.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" require "memory_profiler" diff --git a/benchmarks/sanity.rb b/benchmarks/sanity.rb index 012bfcb..229962d 100644 --- a/benchmarks/sanity.rb +++ b/benchmarks/sanity.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "./benchmarking_support" -require_relative "./app" -require_relative "./setup" +require_relative "benchmarking_support" +require_relative "app" +require_relative "setup" class PostWithAliasModel < ActiveRecord::Base self.table_name = "posts" diff --git a/benchmarks/type_casts/bm_active_record.rb b/benchmarks/type_casts/bm_active_record.rb index 3672a06..cf4202c 100644 --- a/benchmarks/type_casts/bm_active_record.rb +++ b/benchmarks/type_casts/bm_active_record.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./support" +require_relative "support" def ar_type_convert(type_klass, from, to) converter = type_klass.new diff --git a/benchmarks/type_casts/bm_panko.rb b/benchmarks/type_casts/bm_panko.rb index 8a23a5e..16888a9 100644 --- a/benchmarks/type_casts/bm_panko.rb +++ b/benchmarks/type_casts/bm_panko.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./support" +require_relative "support" def panko_type_convert(type_klass, from, to) converter = type_klass.new diff --git a/benchmarks/type_casts/support.rb b/benchmarks/type_casts/support.rb index e2bd85f..0db4ea4 100644 --- a/benchmarks/type_casts/support.rb +++ b/benchmarks/type_casts/support.rb @@ -21,7 +21,7 @@ def check_if_exists(module_name) nil end return true if mod - return false unless mod + false unless mod end Time.zone = "UTC" diff --git a/spec/panko/type_cast_spec.rb b/spec/panko/type_cast_spec.rb index 71112fd..a14ae8f 100644 --- a/spec/panko/type_cast_spec.rb +++ b/spec/panko/type_cast_spec.rb @@ -10,7 +10,7 @@ def check_if_exists(module_name) nil end) return true if mod - return false unless mod + false unless mod end describe "Type Casting" do