Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yosiat committed Sep 10, 2023
1 parent 630b98a commit 8011983
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions benchmarks/allocs.rb
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/bm_ams_0_10.rb
Original file line number Diff line number Diff line change
@@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bm_object_writer.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/bm_panko_json.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/bm_panko_object.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bm_plain_object.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bm_serialization_descriptor.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "./benchmarking_support"
require_relative "benchmarking_support"
require "active_support"

require "panko_serializer"
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bm_serializer_resolver.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/bm_to_object.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/profile.rb
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/sanity.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/type_casts/bm_active_record.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/type_casts/bm_panko.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/type_casts/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion spec/panko/type_cast_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8011983

Please sign in to comment.