servactory 2.16.0.rc3 → 2.16.0

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: 6746c3ceeeada5c6f0c176a7ed39bb8ae380be9bb90dacb23d766c89fb38f8b5
4
- data.tar.gz: a34e6148b46002a8bd4ec7a527d6262a482ba3416401cd4bdba11a0a9f2b2af6
3
+ metadata.gz: 2cff4c0f6ff8ecc7a499e738a23ba621757a674b5d1cf07707b75ac716cb3e1f
4
+ data.tar.gz: f0da2b67eb5d4e4e0126e1827182a8fd6efd659e3aa14082455fa439d163ff30
5
5
  SHA512:
6
- metadata.gz: 7f1e36365f9ebc8f2356586945fb7340a5be9888a4930bf6eda1e9baabdec1bebe1cf3d91485b83e9e21fc5fb4e2e7eb98c241a192de14f44e0ad94550a97dbd
7
- data.tar.gz: d004cce9a054659749afb44cf0315737424820677b9ff7ce916b6561901906e49c412048b543c7338c569aa33d34fe668189fc3c44fa9666f281c81def338afd
6
+ metadata.gz: 44596fe29886b3685039bfd9ee7e30d38c46ae3e2c1c4ac01007919a3c497e55c70a5b275df47bf44edff9b915b5cc52ea488d9fd04fd6a90edaa535b78db5d1
7
+ data.tar.gz: 11aa49b7b0d4ddaa1de5d3ad9a2c33c6d8db4900af44b361602e994e254a0be27879f9623065cd567965077aafbfbc1c606fba0879288ebedd6895705b743773
@@ -4,6 +4,7 @@ module Servactory
4
4
  module Actions
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :each, :to_h, :sort_by
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module Stages
6
6
  class Collection
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@collection, :<<, :each, :merge, :to_h, :sort_by, :size, :empty?
9
10
 
10
11
  def initialize(collection = Set.new)
@@ -74,7 +74,7 @@ module Servactory
74
74
  condition = stage.condition
75
75
  is_condition_opposite = stage.is_condition_opposite
76
76
 
77
- result = prepare_condition_for(condition)
77
+ result = checks_passed_for?(condition)
78
78
 
79
79
  is_condition_opposite ? !result : result
80
80
  end
@@ -83,12 +83,12 @@ module Servactory
83
83
  condition = make_action.condition
84
84
  is_condition_opposite = make_action.is_condition_opposite
85
85
 
86
- result = prepare_condition_for(condition)
86
+ result = checks_passed_for?(condition)
87
87
 
88
88
  is_condition_opposite ? !result : result
89
89
  end
90
90
 
91
- def prepare_condition_for(condition)
91
+ def checks_passed_for?(condition)
92
92
  return false if condition.nil?
93
93
  return !Servactory::Utils.true?(condition) unless condition.is_a?(Proc)
94
94
 
@@ -6,6 +6,7 @@ module Servactory
6
6
  module Aliases
7
7
  class Collection
8
8
  extend Forwardable
9
+
9
10
  def_delegators :@collection, :<<, :merge, :include?
10
11
 
11
12
  def initialize(*)
@@ -6,6 +6,7 @@ module Servactory
6
6
  module RescueHandlers
7
7
  class Collection
8
8
  extend Forwardable
9
+
9
10
  def_delegators :@collection, :+, :detect, :reverse_each
10
11
 
11
12
  def initialize(*)
@@ -6,6 +6,7 @@ module Servactory
6
6
  module Shortcuts
7
7
  class Collection
8
8
  extend Forwardable
9
+
9
10
  def_delegators :@collection, :merge!, :fetch, :keys
10
11
 
11
12
  def initialize(*)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module CollectionMode
6
6
  class ClassNamesCollection
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@collection, :merge, :intersect?
9
10
 
10
11
  def initialize(collection)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module HashMode
6
6
  class ClassNamesCollection
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@collection, :include?, :intersect?
9
10
 
10
11
  def initialize(collection)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module OptionHelpers
6
6
  class OptionHelpersCollection
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@collection, :<<, :filter, :map, :find, :merge
9
10
 
10
11
  def initialize(collection = Set.new)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module Warehouse
6
6
  class Outputs < Base
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@arguments, :each_pair
9
10
  end
10
11
  end
@@ -4,6 +4,7 @@ module Servactory
4
4
  module Inputs
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :filter, :each, :map, :flat_map, :to_h, :merge, :find
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -5,6 +5,7 @@ module Servactory
5
5
  module Validations
6
6
  class Errors
7
7
  extend Forwardable
8
+
8
9
  def_delegators :@collection, :<<, :to_a
9
10
 
10
11
  def initialize(*)
@@ -4,6 +4,7 @@ module Servactory
4
4
  module Internals
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :filter, :each, :map, :to_h, :merge, :find
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -6,6 +6,7 @@ module Servactory
6
6
  module Tools
7
7
  class CheckErrors
8
8
  extend Forwardable
9
+
9
10
  def_delegators :@collection, :merge, :reject, :first, :empty?
10
11
 
11
12
  def initialize(collection = Set.new)
@@ -6,6 +6,7 @@ module Servactory
6
6
  module Validations
7
7
  class Errors
8
8
  extend Forwardable
9
+
9
10
  def_delegators :@collection, :<<, :to_a, :empty?
10
11
 
11
12
  def initialize(*)
@@ -4,6 +4,7 @@ module Servactory
4
4
  module Outputs
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :filter, :each, :map, :to_h, :merge, :find
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -9,7 +9,7 @@ module Servactory
9
9
  instance.must(:be_inclusion)
10
10
  end
11
11
 
12
- def condition_for_input_with(input:, value:, option:)
12
+ def condition_for_input_with(input:, value:, option:) # rubocop:disable Naming/PredicateMethod
13
13
  if input.required? || (input.optional? && !value.nil?) # rubocop:disable Style/IfUnlessModifier
14
14
  return option.value.include?(value)
15
15
  end
@@ -21,11 +21,11 @@ module Servactory
21
21
  true
22
22
  end
23
23
 
24
- def condition_for_internal_with(value:, option:, **)
24
+ def condition_for_internal_with(value:, option:, **) # rubocop:disable Naming/PredicateMethod
25
25
  option.value.include?(value)
26
26
  end
27
27
 
28
- def condition_for_output_with(value:, option:, **)
28
+ def condition_for_output_with(value:, option:, **) # rubocop:disable Naming/PredicateMethod
29
29
  option.value.include?(value)
30
30
  end
31
31
 
@@ -20,7 +20,7 @@ module Servactory
20
20
  common_condition_with(...)
21
21
  end
22
22
 
23
- def common_condition_with(value:, option:, **)
23
+ def common_condition_with(value:, option:, **) # rubocop:disable Naming/PredicateMethod
24
24
  case value
25
25
  when Integer, Float, Rational, BigDecimal
26
26
  return false if option.value.blank?
@@ -86,7 +86,7 @@ module Servactory
86
86
  # https://github.com/rails/rails/blob/main/activerecord/lib/active_record/attribute_methods/query.rb
87
87
  # @param value [#to_s]
88
88
  # @return [Boolean]
89
- def query_attribute(value) # rubocop:disable Metrics/MethodLength
89
+ def query_attribute(value) # rubocop:disable Metrics/MethodLength, Naming/PredicateMethod
90
90
  case value
91
91
  when true then true
92
92
  when false, nil then false
@@ -5,7 +5,7 @@ module Servactory
5
5
  MAJOR = 2
6
6
  MINOR = 16
7
7
  PATCH = 0
8
- PRE = "rc3"
8
+ PRE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.0.rc3
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
@@ -338,7 +338,7 @@ metadata:
338
338
  documentation_uri: https://servactory.com
339
339
  source_code_uri: https://github.com/servactory/servactory
340
340
  bug_tracker_uri: https://github.com/servactory/servactory/issues
341
- changelog_uri: https://github.com/servactory/servactory/blob/master/CHANGELOG.md
341
+ changelog_uri: https://github.com/servactory/servactory/blob/main/CHANGELOG.md
342
342
  rubygems_mfa_required: 'true'
343
343
  rdoc_options: []
344
344
  require_paths: