methodist 1.2.2 → 2.0.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: da5a8eb24c48c7014ad69d52327f570cddf39533a93c775f7e468cce9678e0e4
4
- data.tar.gz: 4377bb0f3918a9b0023156d8214d17940c6116fbd8bc1a586e0bdf4f6e039dfb
3
+ metadata.gz: 41e4246fff352e5067caf807d3428d98bae6c175a8179b78a90fed386e88fdfa
4
+ data.tar.gz: 2754ff544b4faf41cb04154a4095c5df231ee0071d3fe7a0b4971aeabcb77bab
5
5
  SHA512:
6
- metadata.gz: d04e17ad253635eb6a6cc789564b04d344725e18ef962a77e10a0139207a3d51719731d443c98f11b9ecf279086f8f153309f1effa636f882d2439684afa141a
7
- data.tar.gz: 979ae625ef691502453aa6e5a0b56354772f7216b2452ec3ad135da289217c3e84620f3e096e9314d1cdc1f0d67649ab7e21c3f4d51f47f245653a0df869c2b5
6
+ metadata.gz: a3e9597a39f5de75c9368900ae9058219fd94c9c27d081455bafb949daa5245b34761d12a4869e51393881463f2174a3b4a609fdc704956e089dee3d6e200c0c
7
+ data.tar.gz: 0a9dea8aef09e700df2ce25ce4ca98941de39d2ec6f2380c1be369b31b19891dcff56e1c1fb1a82dbbd78ad28cc5e39371830d4c57c0b4acb7a0e57f2ebf38a3
@@ -145,10 +145,8 @@ class Methodist::Interactor < Methodist::Pattern
145
145
  def validate(input)
146
146
  input = {} unless input
147
147
  raise InputClassError, 'If you want to use custom #validate, you have to pass a hash to an interactor' unless input.is_a?(Hash)
148
-
149
148
  validator = contract_class ? contract_class : input_schema
150
149
  raise ValidatorDefinitionError, 'you must define schema via #schema OR define contract via #contract' unless validator
151
-
152
150
  @validation_result = validator.call(input)
153
151
  return Success(validation_result.to_h) if validation_result.success?
154
152
  Failure(failure_validation_value)
@@ -180,5 +178,4 @@ class Methodist::Interactor < Methodist::Pattern
180
178
  class InputClassError < StandardError; end
181
179
  class DryValidationVersionError < StandardError; end
182
180
  class ContractDefinitionError < StandardError; end
183
- class SchemaDefinitionError < StandardError; end
184
181
  end
@@ -1,3 +1,3 @@
1
1
  module Methodist
2
- VERSION = '1.2.2'
2
+ VERSION = '2.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: methodist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Nesterov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
11
+ date: 2022-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-validation
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.13'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.13'
55
- - !ruby/object:Gem::Dependency
56
- name: rbs
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 2.8.2
47
+ version: '0.15'
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 2.8.2
54
+ version: '0.15'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: sqlite3
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +72,14 @@ dependencies:
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '3.7'
75
+ version: '4.1'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '3.7'
82
+ version: '4.1'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: generator_spec
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -184,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
170
  - !ruby/object:Gem::Version
185
171
  version: '0'
186
172
  requirements: []
187
- rubygems_version: 3.1.2
173
+ rubygems_version: 3.3.26
188
174
  signing_key:
189
175
  specification_version: 4
190
176
  summary: Gem for Ruby on Rails created to stop chaos in your buisness logic.