trailblazer-finder 0.90.0 → 0.92.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c3605d464db4d05bd07e54aec870bd62820657704a730ebc02d11f904dcd964
4
- data.tar.gz: e0c677b1cf39def27bef24b5787cf0cc6a475afb9adf227baa77315ee447208b
3
+ metadata.gz: d5aa468a471c2d9bb6f7f0196e46a14905a557956a18da87723eb74a3f897b10
4
+ data.tar.gz: 6d236f533affcf4eb828704e438b2ec9f30270d61626be709aa29d64c5489d5d
5
5
  SHA512:
6
- metadata.gz: 251cf565e7ca50200c70a997bbbe8c96d28232b28d8bd8001129612194ee2065f57b6198b965cb60f19420f988ad1af17cdcd50c4ad23a50d6eff2241d4a2845
7
- data.tar.gz: dcad67e86a906c097f00b88b6b051b296819287a1401db159c401121142e794028a0a0406b8836fc74f590c368ac6a21045f39ed869d36e7b1f6642495c8ae91
6
+ metadata.gz: 8067cad54995bf7b42b522dc10fc3574dcb7a0a62ad3548e207785c647737192059c0193dd80420891d7e9ab0e96ae13f66c18f0edee94bd29b211139c6457b6
7
+ data.tar.gz: 9da38615d6276c0c886ab89396da5e0dcf776eefe8ed8e369d439ce38af3113d477c39dee6482c28d6110a9f4e880aa0c3f4b0a704140ed419ea66a83f06b410
@@ -5,20 +5,21 @@ module Trailblazer
5
5
  module Activities
6
6
  class PrepareAdapter < Trailblazer::Activity::Railway
7
7
  def set_adapter(ctx, **)
8
- ctx[:adapter] = ctx.dig(:config, :adapter) || "Basic"
8
+ ctx[:adapter] = ctx[:config].adapter
9
9
  end
10
10
 
11
11
  def validate_adapter(_ctx, adapter:, **)
12
- (ORM_ADAPTERS + ["Basic"]).include? adapter.to_s
12
+ ORM_ADAPTERS.(adapter.to_s)
13
13
  end
14
14
 
15
- def invalid?((ctx, _flow_options), **_circuit_options)
15
+ def invalid?(_e, (ctx, _flow_options), **_circuit_options)
16
16
  (ctx[:errors] ||= []) << {adapter: "The specified adapter are invalid"}
17
17
  end
18
18
 
19
19
  step :set_adapter
20
- step :validate_adapter
21
- fail :invalid?
20
+ step Rescue(Dry::Types::ConstraintError, handler: :invalid?) {
21
+ step :validate_adapter
22
+ }
22
23
  end
23
24
  end
24
25
  end
@@ -4,16 +4,16 @@ module Trailblazer
4
4
  class Finder
5
5
  module Activities
6
6
  class PrepareEntity < Trailblazer::Activity::Railway
7
- def validate_entity(ctx, **)
8
- ctx.dig(:options, :entity) || ctx.dig(:config, :entity)
7
+ def validate_entity(ctx, config:, **)
8
+ ctx.dig(:options, :entity) || config.entity
9
9
  end
10
10
 
11
11
  def invalid_entity_error(ctx, **)
12
12
  (ctx[:errors] ||= []) << {entity: "Invalid entity specified"}
13
13
  end
14
14
 
15
- def set_entity(ctx, **)
16
- ctx[:entity] = ctx.dig(:options, :entity) || instance_eval(&ctx[:config][:entity])
15
+ def set_entity(ctx, config:, **)
16
+ ctx[:entity] = ctx.dig(:options, :entity) || instance_eval(&config.entity)
17
17
  end
18
18
 
19
19
  step :validate_entity
@@ -4,8 +4,8 @@ module Trailblazer
4
4
  class Finder
5
5
  module Activities
6
6
  class PrepareFilters < Trailblazer::Activity::Railway
7
- def validate_filters(ctx, **)
8
- filters = ctx.dig(:config, :filters)
7
+ def validate_filters(_ctx, config:, **)
8
+ filters = config.filters
9
9
  filters.each do |key, _value|
10
10
  return false if !filters[key][:with].nil? && !filters[key][:with].is_a?(Symbol)
11
11
  end
@@ -16,8 +16,8 @@ module Trailblazer
16
16
  (ctx[:errors] ||= []) << {filters: "One or more filters are missing a with method definition"}
17
17
  end
18
18
 
19
- def set_filters(ctx, **)
20
- ctx[:filters] = ctx[:config][:filters]
19
+ def set_filters(ctx, config:, **)
20
+ ctx[:filters] = config.filters
21
21
  end
22
22
 
23
23
  step :validate_filters
@@ -4,15 +4,15 @@ module Trailblazer
4
4
  class Finder
5
5
  module Activities
6
6
  class PreparePaging < Trailblazer::Activity::Railway
7
- def check_paging(ctx, **)
8
- paging = ctx[:config][:paging] || nil
9
- return false if ctx[:config][:paging].empty? || paging.nil?
7
+ def check_paging(_ctx, config:, **)
8
+ paging = config.paging
9
+ return false if config.paging.empty? || paging.nil?
10
10
 
11
11
  true
12
12
  end
13
13
 
14
- def set_paging(ctx, **)
15
- ctx[:paging] = ctx.dig(:config, :paging) || {}
14
+ def set_paging(ctx, config:, **)
15
+ ctx[:paging] = config.paging
16
16
  ctx[:paging][:current_page] = ctx.dig(:params, :page) || 1
17
17
  return true unless ctx[:params][:per_page]
18
18
 
@@ -4,8 +4,8 @@ module Trailblazer
4
4
  class Finder
5
5
  module Activities
6
6
  class PrepareProperties < Trailblazer::Activity::Railway
7
- def check_property_types(ctx, **)
8
- properties = ctx[:config][:properties] || {}
7
+ def check_property_types(_ctx, config:, **)
8
+ properties = config.properties
9
9
  return true if properties.empty?
10
10
 
11
11
  properties.each do |key, _value|
@@ -13,8 +13,8 @@ module Trailblazer
13
13
  end
14
14
  end
15
15
 
16
- def validate_property_types(ctx, **)
17
- properties = ctx[:config][:properties] || {}
16
+ def validate_property_types(_ctx, config:, **)
17
+ properties = config.properties
18
18
  return true if properties.empty?
19
19
 
20
20
  properties.each do |key, _value|
@@ -26,8 +26,8 @@ module Trailblazer
26
26
  (ctx[:errors] ||= []) << {properties: "One or more properties are missing a valid type"}
27
27
  end
28
28
 
29
- def set_properties(ctx, **)
30
- ctx[:properties] = ctx[:config][:properties]
29
+ def set_properties(ctx, config:, **)
30
+ ctx[:properties] = config.properties
31
31
  end
32
32
 
33
33
  step :check_property_types
@@ -4,20 +4,20 @@ module Trailblazer
4
4
  class Finder
5
5
  module Activities
6
6
  class PrepareSorting < Trailblazer::Activity::Railway
7
- def check_sorting(ctx, **)
8
- sorting = ctx[:config][:sorting] || nil
9
- return true unless ctx[:config][:sorting].empty? || sorting.nil?
7
+ def check_sorting(_ctx, config:, **)
8
+ sorting = config.sorting
9
+ return true unless sorting.empty? || sorting.nil?
10
10
  end
11
11
 
12
- def set_sorting(ctx, **)
12
+ def set_sorting(ctx, config:, **)
13
13
  return true if ctx[:params][:sort].nil?
14
14
 
15
15
  sorting = ctx[:params][:sort]
16
- config = ctx[:config][:sorting]
16
+ sorting_config = config.sorting
17
17
  ctx[:sorting] = ctx[:sorting] || {}
18
18
  sorting.split(",").each do |sorter|
19
19
  spt = sorter.split
20
- ctx[:sorting][spt[0]] = fetch_sort_direction(config[spt[0].to_sym], spt[1]) if config.include?(spt[0].to_sym)
20
+ ctx[:sorting][spt[0]] = fetch_sort_direction(sorting_config[spt[0].to_sym], spt[1]) if sorting_config.include?(spt[0].to_sym)
21
21
  end
22
22
  end
23
23
 
@@ -15,10 +15,10 @@ module Trailblazer
15
15
  end
16
16
 
17
17
  def set_paginator(ctx, **)
18
- paginator = ctx.dig(:config, :paginator)
18
+ paginator = ctx[:config].paginator
19
19
  return true unless paginator
20
- return false unless ORM_ADAPTERS.include?(ctx[:orm][:adapter])
21
- return false unless PAGING_ADAPTERS.include?(paginator)
20
+ return false unless EXT_ORM_ADAPTERS.(ctx[:orm][:adapter])
21
+ return false unless PAGING_ADAPTERS.(paginator)
22
22
 
23
23
  ctx[:orm][:paging] = "Trailblazer::Finder::Adapters::#{paginator}::Paging"
24
24
  true
@@ -26,16 +26,19 @@ module Trailblazer
26
26
 
27
27
  def invalid_paginator_error(ctx, **)
28
28
  (ctx[:errors] ||= []) << {
29
- paginator: "Can't use paginator #{ctx.dig(
30
- :config,
31
- :paginator
32
- )} without using an ORM like ActiveRecord or Sequel"
29
+ paginator: "Can't use paginator #{ctx[:config].paginator} without using an ORM like ActiveRecord or Sequel"
33
30
  }
34
31
  end
35
32
 
33
+ def invalid_paginator_handler(_e, (ctx, _flow_options), **)
34
+ invalid_paginator_error(ctx)
35
+ end
36
+
36
37
  step :set_adapter, fast_track: true
37
- step :set_paginator
38
- fail :invalid_paginator_error
38
+ step Rescue(Dry::Types::ConstraintError, handler: :invalid_paginator_handler) {
39
+ step :set_paginator
40
+ fail :invalid_paginator_error
41
+ }
39
42
  end
40
43
  end
41
44
  end
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- ORM_ADAPTERS = %w[ActiveRecord Sequel].freeze
6
- PAGING_ADAPTERS = %w[Kaminari WillPaginate].freeze
7
5
 
8
6
  module Base
9
7
  def self.included(base)
@@ -1,59 +1,95 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Trailblazer
4
2
  class Finder
3
+ class Configuration
4
+ attr_accessor :entity, :paging, :properties, :sorting,
5
+ :filters, :adapter, :paginator
6
+
7
+ def initialize
8
+ @paging = {}
9
+ @properties = {}
10
+ @sorting = {}
11
+ @filters = {}
12
+ @paginator = nil
13
+ @adapter = "Basic"
14
+ end
15
+
16
+ def clone
17
+ new_config = Configuration.new
18
+ new_config.entity = entity
19
+ new_config.paging = paging.clone
20
+ new_config.properties = properties.clone
21
+ new_config.sorting = sorting.clone
22
+ new_config.filters = filters.clone
23
+ new_config.adapter = adapter
24
+ new_config.paginator = paginator
25
+ new_config
26
+ end
27
+ end
28
+
5
29
  module Dsl
6
- attr_reader :config
30
+ def config
31
+ @config ||= Configuration.new
32
+ end
33
+
7
34
 
8
35
  def inherited(base)
9
- base.instance_variable_set "@config", apply_config({})
36
+ ## We don't want to inherit the config from Trailblazer::Finder
37
+ return if name == 'Trailblazer::Finder'
38
+
39
+ base.config = config.clone
10
40
  end
11
41
 
12
42
  def entity(&block)
13
- config[:entity] = block
43
+ config.entity = block
14
44
  end
15
45
 
16
- def paging(**options)
17
- config[:paging][:per_page] = options[:per_page] || 25
18
- config[:paging][:min_per_page] = options[:min_per_page] || 10
19
- config[:paging][:max_per_page] = options[:max_per_page] || 100
46
+ def paging(per_page: 25, min_per_page: 10, max_per_page: 100)
47
+ config.paging[:per_page] = per_page
48
+ config.paging[:min_per_page] = min_per_page
49
+ config.paging[:max_per_page] = max_per_page
20
50
  end
21
51
 
22
52
  def property(name, options = {})
23
- config[:properties][name] = options
24
- config[:properties][name][:type] = options[:type] || Types::String
25
- config[:sorting][name] = options[:sort_direction] || :desc if options[:sortable]
53
+ config.properties[name] = options
54
+ config.properties[name][:type] = options[:type] || Types::String
55
+ config.sorting[name] = options[:sort_direction] || :desc if options[:sortable]
26
56
  end
27
57
 
28
58
  def filter_by(name, options = {}, &block)
29
59
  filter_name = name.to_sym
30
- config[:filters][filter_name] = {}
31
- config[:filters][filter_name][:name] = name
32
- config[:filters][filter_name][:with] = options[:with] if options.include?(:with)
33
- config[:filters][filter_name][:block] = block || nil
60
+ config.filters[filter_name] = {}
61
+ config.filters[filter_name][:name] = name
62
+ config.filters[filter_name][:with] = options[:with] if options.include?(:with)
63
+ config.filters[filter_name][:block] = block || nil
64
+ end
65
+
66
+ def adapter(adapter_name)
67
+ config.adapter = adapter_name.to_s
68
+ end
69
+
70
+ def paginator(paginator_name)
71
+ config.paginator = paginator_name.to_s
34
72
  end
35
73
 
36
- def adapter(adapter)
37
- config[:adapter] = adapter.to_s
74
+ def current_adapter
75
+ config.adapter
38
76
  end
39
77
 
40
- def paginator(paginator)
41
- config[:paginator] = paginator.to_s
78
+ def current_paginator
79
+ config.paginator
42
80
  end
43
81
 
44
- def apply_config(options, **)
45
- return @config = options unless options.empty?
82
+ def filters_count
83
+ config.filters.count
84
+ end
46
85
 
47
- @config = {
48
- actions: {},
49
- entity: nil,
50
- properties: {},
51
- filters: {},
52
- paging: {},
53
- sorting: {},
54
- adapters: []
55
- }
86
+ def properties_count
87
+ config.properties.count
56
88
  end
89
+
90
+ protected
91
+
92
+ attr_writer :config
57
93
  end
58
94
  end
59
95
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Trailblazer
4
4
  class Finder
5
- VERSION = "0.90.0"
5
+ VERSION = "0.92.0"
6
6
  end
7
7
  end
@@ -5,37 +5,40 @@ require "trailblazer"
5
5
  require "dry-types"
6
6
  require "ostruct"
7
7
 
8
- require "trailblazer/finder/utils/array"
9
- require "trailblazer/finder/utils/hash"
10
- require "trailblazer/finder/utils/string"
11
- require "trailblazer/finder/utils/splitter"
12
- require "trailblazer/finder/utils/extra"
13
- require "trailblazer/finder/adapters/active_record/predicates"
14
- require "trailblazer/finder/adapters/active_record/paging"
15
- require "trailblazer/finder/adapters/active_record/sorting"
16
- require "trailblazer/finder/adapters/kaminari/paging"
17
- require "trailblazer/finder/adapters/will_paginate/paging"
18
- require "trailblazer/finder/adapters/sequel/predicates"
19
- require "trailblazer/finder/adapters/sequel/paging"
20
- require "trailblazer/finder/adapters/sequel/sorting"
21
- require "trailblazer/finder/adapters/basic/predicates"
22
- require "trailblazer/finder/adapters/basic/paging"
23
- require "trailblazer/finder/adapters/basic/sorting"
24
- require "trailblazer/finder/activities/prepare"
25
- require "trailblazer/finder/activities/process"
26
- require "trailblazer/finder/activities/find"
27
- require "trailblazer/finder/helpers/basic"
28
- require "trailblazer/finder/helpers/sorting"
29
- require "trailblazer/finder/dsl"
30
- require "trailblazer/finder/find"
31
- require "trailblazer/finder/base"
32
- require "trailblazer/operation/finder"
8
+ require_relative "finder/utils/array"
9
+ require_relative "finder/utils/hash"
10
+ require_relative "finder/utils/string"
11
+ require_relative "finder/utils/splitter"
12
+ require_relative "finder/utils/extra"
13
+ require_relative "finder/adapters/active_record/predicates"
14
+ require_relative "finder/adapters/active_record/paging"
15
+ require_relative "finder/adapters/active_record/sorting"
16
+ require_relative "finder/adapters/kaminari/paging"
17
+ require_relative "finder/adapters/will_paginate/paging"
18
+ require_relative "finder/adapters/sequel/predicates"
19
+ require_relative "finder/adapters/sequel/paging"
20
+ require_relative "finder/adapters/sequel/sorting"
21
+ require_relative "finder/adapters/basic/predicates"
22
+ require_relative "finder/adapters/basic/paging"
23
+ require_relative "finder/adapters/basic/sorting"
24
+ require_relative "finder/activities/prepare"
25
+ require_relative "finder/activities/process"
26
+ require_relative "finder/activities/find"
27
+ require_relative "finder/helpers/basic"
28
+ require_relative "finder/helpers/sorting"
29
+ require_relative "finder/dsl"
30
+ require_relative "finder/find"
31
+ require_relative "finder/base"
32
+ require_relative "operation/finder"
33
33
 
34
34
  module Trailblazer
35
35
  class Finder
36
36
  module Types
37
37
  include Dry.Types(default: :nominal)
38
38
  end
39
+ EXT_ORM_ADAPTERS = Types::Strict::String.enum("ActiveRecord", "Sequel")
40
+ ORM_ADAPTERS = EXT_ORM_ADAPTERS | Types::Strict::String.enum("Basic")
41
+ PAGING_ADAPTERS = Types::Strict::String.enum("Kaminari", "WillPaginate")
39
42
 
40
43
  include Base
41
44
  end
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  class Operation
3
3
  def self.Finder(finder_class, action = nil, entity = nil)
4
- task = Trailblazer::Activity::TaskBuilder::Binary(Finder.new)
4
+ task = Trailblazer::Activity::Circuit::TaskAdapter.for_step(Finder.new, binary: true)
5
5
  injections = [
6
6
  :params,
7
7
  {:"finder.class" => ->(*) { finder_class }},
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.90.0
4
+ version: 0.92.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-06-07 00:00:00.000000000 Z
13
+ date: 2024-01-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dry-types
@@ -111,21 +111,7 @@ dependencies:
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
- name: rspec
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - "~>"
118
- - !ruby/object:Gem::Version
119
- version: '3.5'
120
- type: :development
121
- prerelease: false
122
- version_requirements: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - "~>"
125
- - !ruby/object:Gem::Version
126
- version: '3.5'
127
- - !ruby/object:Gem::Dependency
128
- name: rspec_junit_formatter
114
+ name: maxitest
129
115
  requirement: !ruby/object:Gem::Requirement
130
116
  requirements:
131
117
  - - ">="
@@ -139,21 +125,7 @@ dependencies:
139
125
  - !ruby/object:Gem::Version
140
126
  version: '0'
141
127
  - !ruby/object:Gem::Dependency
142
- name: rspec-mocks
143
- requirement: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - "~>"
146
- - !ruby/object:Gem::Version
147
- version: '3.5'
148
- type: :development
149
- prerelease: false
150
- version_requirements: !ruby/object:Gem::Requirement
151
- requirements:
152
- - - "~>"
153
- - !ruby/object:Gem::Version
154
- version: '3.5'
155
- - !ruby/object:Gem::Dependency
156
- name: rubocop
128
+ name: sequel
157
129
  requirement: !ruby/object:Gem::Requirement
158
130
  requirements:
159
131
  - - ">="
@@ -167,7 +139,7 @@ dependencies:
167
139
  - !ruby/object:Gem::Version
168
140
  version: '0'
169
141
  - !ruby/object:Gem::Dependency
170
- name: rubocop-rspec
142
+ name: simplecov
171
143
  requirement: !ruby/object:Gem::Requirement
172
144
  requirements:
173
145
  - - ">="
@@ -181,21 +153,21 @@ dependencies:
181
153
  - !ruby/object:Gem::Version
182
154
  version: '0'
183
155
  - !ruby/object:Gem::Dependency
184
- name: sequel
156
+ name: trailblazer
185
157
  requirement: !ruby/object:Gem::Requirement
186
158
  requirements:
187
- - - ">="
159
+ - - "~>"
188
160
  - !ruby/object:Gem::Version
189
- version: '0'
161
+ version: 2.1.0
190
162
  type: :development
191
163
  prerelease: false
192
164
  version_requirements: !ruby/object:Gem::Requirement
193
165
  requirements:
194
- - - ">="
166
+ - - "~>"
195
167
  - !ruby/object:Gem::Version
196
- version: '0'
168
+ version: 2.1.0
197
169
  - !ruby/object:Gem::Dependency
198
- name: simplecov
170
+ name: trailblazer-developer
199
171
  requirement: !ruby/object:Gem::Requirement
200
172
  requirements:
201
173
  - - ">="
@@ -209,21 +181,7 @@ dependencies:
209
181
  - !ruby/object:Gem::Version
210
182
  version: '0'
211
183
  - !ruby/object:Gem::Dependency
212
- name: trailblazer
213
- requirement: !ruby/object:Gem::Requirement
214
- requirements:
215
- - - "~>"
216
- - !ruby/object:Gem::Version
217
- version: 2.1.0
218
- type: :development
219
- prerelease: false
220
- version_requirements: !ruby/object:Gem::Requirement
221
- requirements:
222
- - - "~>"
223
- - !ruby/object:Gem::Version
224
- version: 2.1.0
225
- - !ruby/object:Gem::Dependency
226
- name: trailblazer-developer
184
+ name: will_paginate
227
185
  requirement: !ruby/object:Gem::Requirement
228
186
  requirements:
229
187
  - - ">="
@@ -237,7 +195,7 @@ dependencies:
237
195
  - !ruby/object:Gem::Version
238
196
  version: '0'
239
197
  - !ruby/object:Gem::Dependency
240
- name: will_paginate
198
+ name: minitest-trailblazer
241
199
  requirement: !ruby/object:Gem::Requirement
242
200
  requirements:
243
201
  - - ">="
@@ -298,11 +256,11 @@ files:
298
256
  - lib/trailblazer/finder/utils/string.rb
299
257
  - lib/trailblazer/finder/version.rb
300
258
  - lib/trailblazer/operation/finder.rb
301
- - trailblazer-finder.gemspec
302
- homepage: http://trailblazer.to
259
+ homepage: https://trailblazer.to
303
260
  licenses:
304
261
  - LGPL-3.0
305
- metadata: {}
262
+ metadata:
263
+ rubygems_mfa_required: 'true'
306
264
  post_install_message:
307
265
  rdoc_options: []
308
266
  require_paths:
@@ -318,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
276
  - !ruby/object:Gem::Version
319
277
  version: '0'
320
278
  requirements: []
321
- rubygems_version: 3.2.22
279
+ rubygems_version: 3.4.22
322
280
  signing_key:
323
281
  specification_version: 4
324
282
  summary: Trailblazer based finder objects. It is designed to be used on its own as
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path("lib", __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "trailblazer/finder/version"
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "trailblazer-finder"
9
- spec.version = Trailblazer::Finder::VERSION
10
- spec.description = "Trailblazer Finder Objects"
11
- spec.summary = "Trailblazer based finder objects. It is designed to be used on its own as a separate gem. It was influenced by popular Ransack gem, but in addition to ActiveRecord, it can be used with Sequel, Hash objects, and RomRB."
12
- spec.authors = ["Nick Sutterer", "Marc Tich", "Abdelkader Boudih"]
13
- spec.email = %w[apotonick@gmail.com marc@mudsu.com terminale@gmail.com]
14
- spec.homepage = "http://trailblazer.to"
15
- spec.license = "LGPL-3.0"
16
- spec.files = Dir.glob("lib/**/*")
17
- spec.files << ["trailblazer-finder.gemspec"]
18
- spec.test_files = spec.files.grep(%r{^(test)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_dependency "dry-types", ">= 1.0.0"
22
- spec.add_dependency "trailblazer-activity", ">= 0.13.0"
23
-
24
- spec.add_development_dependency "activerecord"
25
- spec.add_development_dependency "bundler"
26
- spec.add_development_dependency "kaminari"
27
- spec.add_development_dependency "kaminari-activerecord"
28
- spec.add_development_dependency "rake"
29
- spec.add_development_dependency "rspec", "~> 3.5"
30
- spec.add_development_dependency "rspec_junit_formatter"
31
- spec.add_development_dependency "rspec-mocks", "~> 3.5"
32
- spec.add_development_dependency "rubocop"
33
- spec.add_development_dependency "rubocop-rspec"
34
- spec.add_development_dependency "sequel"
35
- spec.add_development_dependency "simplecov"
36
- spec.add_development_dependency "trailblazer", "~> 2.1.0"
37
- spec.add_development_dependency "trailblazer-developer"
38
- spec.add_development_dependency "will_paginate"
39
-
40
- spec.required_ruby_version = ">= 2.5.0"
41
- end