Skip to content

Commit

Permalink
remove more requires
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Jan 12, 2024
1 parent 1928ec3 commit 62a961e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
8 changes: 0 additions & 8 deletions lib/trailblazer/finder/activities/prepare.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# frozen_string_literal: true

require_relative "prepare_adapter"
require_relative "prepare_entity"
require_relative "prepare_properties"
require_relative "prepare_filters"
require_relative "prepare_params"
require_relative "prepare_paging"
require_relative "prepare_sorting"

module Trailblazer
class Finder
module Activities
Expand Down
6 changes: 0 additions & 6 deletions lib/trailblazer/finder/activities/process.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# frozen_string_literal: true

require_relative "process_adapters"
require_relative "process_predicates"
require_relative "process_paging"
require_relative "process_sorting"
require_relative "process_filters"

module Trailblazer
class Finder
module Activities
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Base
def self.included(base)
base.include Helpers::Basic
base.include Helpers::Sorting
base.extend Finder::Dsl
base.extend Dsl
end

attr_reader :signal, :errors
Expand Down
4 changes: 2 additions & 2 deletions lib/trailblazer/operation/finder.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Trailblazer
class Operation
def self.Finder(finder_class, action = nil, entity = nil)
task = Trailblazer::Activity::Circuit::TaskAdapter.for_step(Finder.new, binary: true)
task = Activity::Circuit::TaskAdapter.for_step(Finder.new, binary: true)
injections = [
:params,
{:"finder.class" => ->(*) { finder_class }},
Expand All @@ -17,7 +17,7 @@ def call(ctx, **options)
builder = Finder::Builder.new
ctx[:finder] = finder = builder.call(options, options[:params])
ctx[:model] = finder # Don't like it, but somehow it's needed if contracts are loaded
ctx[:"result.finder"] = Trailblazer::Operation::Result.new(!finder.nil?, {})
ctx[:"result.finder"] = Result.new(!finder.nil?, {})

ctx[:"result.finder"].success?
end
Expand Down

0 comments on commit 62a961e

Please sign in to comment.