trailblazer-finder 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb1a6d3df9380459d5e21c54c7525b0848e63ef921251d9560d6e51aba373b71
4
- data.tar.gz: 9255d7b252793df093f83e4d46a4a3b777011374e75e245c5673a4c9deccc49c
3
+ metadata.gz: 691fee589f1865e7704d021751dfedfa6be1c51950f5812b09de57493ac2d6e4
4
+ data.tar.gz: 1919763290c8173d600c4722fa6c1c43a4be4bd70715cc1d05efb963ba5af78b
5
5
  SHA512:
6
- metadata.gz: 246da8f4eb7de635a9eb692f03fdafdaae1154a4b2e2e40f647227571e83a6ce366ac4062ae88b177befc50dcdaf94de262f726d1dee9b5f2b756f94ede0097f
7
- data.tar.gz: a63b631f720310717e83798cf891bbb8e3fd31f06e545c068942640a277486791d749c1bd47b17f73cc715bda036bf99dc86de2d23d9d5953640243db0091d3e
6
+ metadata.gz: 3215baeb3874a0aafe6eb0f4c65f28848ebb08806f26a76e195eb8b9fc9bf8e087a6f64e126ca5d7f0981c42f1cedde892e27e8d882ed799d7ee9e84771d05d8
7
+ data.tar.gz: ec4f69e4f75bac9d921bf503381afab35073d0806c65dfd1b1af4382e82ae51f9199098366898429f0dd3f6c22da2dd7977b17bcd8f5b03d08f1a0748cbf19d4
data/CHANGES.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.10.1
2
+ * Move activities to Activities folder to avoid conflict with Activity Class.
3
+
1
4
  # 0.10.0
2
5
  * Support Trailblazer 2.1.0 wiring api, drop old api
3
6
 
@@ -21,9 +21,9 @@ require "trailblazer/finder/adapters/sequel/sorting"
21
21
  require "trailblazer/finder/adapters/basic/predicates"
22
22
  require "trailblazer/finder/adapters/basic/paging"
23
23
  require "trailblazer/finder/adapters/basic/sorting"
24
- require "trailblazer/finder/activity/prepare"
25
- require "trailblazer/finder/activity/process"
26
- require "trailblazer/finder/activity/find"
24
+ require "trailblazer/finder/activities/prepare"
25
+ require "trailblazer/finder/activities/process"
26
+ require "trailblazer/finder/activities/find"
27
27
  require "trailblazer/finder/helpers/basic"
28
28
  require "trailblazer/finder/helpers/sorting"
29
29
  require "trailblazer/finder/dsl"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  # Find Activity
7
7
  class Find < Trailblazer::Activity::Railway
8
8
  PREDICATES = %w[eq not_eq blank not_blank lt lte gt gte sw not_sw ew not_ew cont not_cont].freeze
@@ -10,12 +10,12 @@ require_relative "prepare_sorting"
10
10
 
11
11
  module Trailblazer
12
12
  class Finder
13
- module Activity
13
+ module Activities
14
14
  # Prepare Activity
15
15
  class Prepare < Trailblazer::Activity::Railway
16
16
  def clean_ctx((ctx, flow_options), **)
17
17
  ctx.delete(:options)
18
- [Trailblazer::Activity::Right, [ctx, flow_options]]
18
+ [Activity::Right, [ctx, flow_options]]
19
19
  end
20
20
 
21
21
  step Subprocess(PrepareAdapters)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  # Adapters Activity
7
7
  class PrepareAdapters < Trailblazer::Activity::Railway
8
8
  def check_for_adapters(ctx, **)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class PrepareEntity < Trailblazer::Activity::Railway
7
7
  def validate_entity(ctx, **)
8
8
  ctx.dig(:options,:entity) || ctx.dig(:config,:entity)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class PrepareFilters < Trailblazer::Activity::Railway
7
7
  def validate_filters(ctx, **)
8
8
  filters = ctx.dig(:config, :filters)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class PreparePaging < Trailblazer::Activity::Railway
7
7
  def check_paging(ctx, **)
8
8
  paging = ctx[:config][:paging] || nil
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  # Params Activity
7
7
  class PrepareParams < Trailblazer::Activity::Railway
8
8
  def validate_params(_ctx, **)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class PrepareProperties < Trailblazer::Activity::Railway
7
7
  def check_property_types(ctx, **)
8
8
  properties = ctx[:config][:properties] || {}
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class PrepareSorting < Trailblazer::Activity::Railway
7
7
  def check_sorting(ctx, **)
8
8
  sorting = ctx[:config][:sorting] || nil
@@ -8,7 +8,7 @@ require_relative "process_filters"
8
8
 
9
9
  module Trailblazer
10
10
  class Finder
11
- module Activity
11
+ module Activities
12
12
  # Process Activity
13
13
  class Process < Trailblazer::Activity::Railway
14
14
  step Subprocess(ProcessAdapters)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class ProcessAdapters < Trailblazer::Activity::Railway
7
7
  def set_orm_adapters(ctx, **)
8
8
  ctx[:adapters].each do |adapter|
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class ProcessFilters < Trailblazer::Activity::Railway
7
7
  def set_filter_handlers(ctx, **)
8
8
  return true unless ctx[:process]
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class ProcessPaging < Trailblazer::Activity::Railway
7
7
  def set_paging_handler(ctx, **)
8
8
  return true if ctx[:paging].nil?
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class ProcessPredicates < Trailblazer::Activity::Railway
7
7
  def set_properties_handler(ctx, **)
8
8
  return true if ctx[:process].nil?
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- module Activity
5
+ module Activities
6
6
  class ProcessSorting < Trailblazer::Activity::Railway
7
7
  def set_sorting_handler(ctx, **)
8
8
  return true if ctx[:sorting].nil?
@@ -17,7 +17,7 @@ module Trailblazer
17
17
  def initialize(options = {}) # rubocop:disable Style/OptionHash
18
18
  config = self.class.config
19
19
  ctx = {config: config, options: options}
20
- @signal, (ctx, *) = Activity::Find.call([ctx, {}])
20
+ @signal, (ctx, *) = Activities::Find.call([ctx, {}])
21
21
  @options = options
22
22
  @errors = ctx[:errors] || {}
23
23
  @find = ctx[:finder]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- VERSION = "0.10.0".freeze
5
+ VERSION = "0.10.1".freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -283,21 +283,21 @@ files:
283
283
  - README.md
284
284
  - Rakefile
285
285
  - lib/trailblazer/finder.rb
286
- - lib/trailblazer/finder/activity/find.rb
287
- - lib/trailblazer/finder/activity/prepare.rb
288
- - lib/trailblazer/finder/activity/prepare_adapters.rb
289
- - lib/trailblazer/finder/activity/prepare_entity.rb
290
- - lib/trailblazer/finder/activity/prepare_filters.rb
291
- - lib/trailblazer/finder/activity/prepare_paging.rb
292
- - lib/trailblazer/finder/activity/prepare_params.rb
293
- - lib/trailblazer/finder/activity/prepare_properties.rb
294
- - lib/trailblazer/finder/activity/prepare_sorting.rb
295
- - lib/trailblazer/finder/activity/process.rb
296
- - lib/trailblazer/finder/activity/process_adapters.rb
297
- - lib/trailblazer/finder/activity/process_filters.rb
298
- - lib/trailblazer/finder/activity/process_paging.rb
299
- - lib/trailblazer/finder/activity/process_predicates.rb
300
- - lib/trailblazer/finder/activity/process_sorting.rb
286
+ - lib/trailblazer/finder/activities/find.rb
287
+ - lib/trailblazer/finder/activities/prepare.rb
288
+ - lib/trailblazer/finder/activities/prepare_adapters.rb
289
+ - lib/trailblazer/finder/activities/prepare_entity.rb
290
+ - lib/trailblazer/finder/activities/prepare_filters.rb
291
+ - lib/trailblazer/finder/activities/prepare_paging.rb
292
+ - lib/trailblazer/finder/activities/prepare_params.rb
293
+ - lib/trailblazer/finder/activities/prepare_properties.rb
294
+ - lib/trailblazer/finder/activities/prepare_sorting.rb
295
+ - lib/trailblazer/finder/activities/process.rb
296
+ - lib/trailblazer/finder/activities/process_adapters.rb
297
+ - lib/trailblazer/finder/activities/process_filters.rb
298
+ - lib/trailblazer/finder/activities/process_paging.rb
299
+ - lib/trailblazer/finder/activities/process_predicates.rb
300
+ - lib/trailblazer/finder/activities/process_sorting.rb
301
301
  - lib/trailblazer/finder/adapters/active_record/paging.rb
302
302
  - lib/trailblazer/finder/adapters/active_record/predicates.rb
303
303
  - lib/trailblazer/finder/adapters/active_record/sorting.rb