dry-mutations 0.8.91 → 0.8.92
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dry/mutations.rb +5 -0
- data/lib/dry/mutations/dsl/schema.rb +1 -12
- data/lib/dry/mutations/schema.rb +15 -0
- data/lib/dry/mutations/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 931ff7712119f2fa2f5734361b6325eff9a59619
|
4
|
+
data.tar.gz: 11b884893ec200eb72db680530af903089b5b0b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f85613e22558ab9294242608aed371ff4b602ebd0d9412de576ddf42463afcec86849c7cc6e1ed9f58a14ad164405abae4dc1ec7eff191ebf502da224eaad830
|
7
|
+
data.tar.gz: 05e2c2d5d3b84bc13ccad4ac3c9cf3ba1af7009cf2d27bac8438b1078f5cfa06afb3dcea7cccb1af29e5f8a67eafff8f23ce7dff9664b403f1dffcfb84baf0d3
|
data/lib/dry/mutations.rb
CHANGED
@@ -13,6 +13,7 @@ require 'dry/mutations/errors'
|
|
13
13
|
require 'dry/mutations/dsl'
|
14
14
|
require 'dry/mutations/extensions'
|
15
15
|
require 'dry/mutations/transactions'
|
16
|
+
require 'dry/mutations/schema'
|
16
17
|
|
17
18
|
require 'dry/mutations/globals'
|
18
19
|
|
@@ -31,6 +32,10 @@ module Dry
|
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
def self.Schema(options = {}, &block)
|
36
|
+
::Dry::Validation.Schema(::Dry::Mutations::Schema, options, &block)
|
37
|
+
end
|
38
|
+
|
34
39
|
DSL::Types::Nested.extend DSL::Module
|
35
40
|
::Mutations::Command.prepend Extensions::Command if Utils.Truthy?(ENV['GLOBAL_DRY_MUTATIONS'])
|
36
41
|
end
|
@@ -1,19 +1,8 @@
|
|
1
1
|
module Dry
|
2
2
|
module Mutations
|
3
3
|
module DSL # :nodoc:
|
4
|
-
MESSAGES_FILE = (::File.join __dir__, '..', '..', '..', '..', 'config', 'messages.yml').freeze
|
5
|
-
|
6
4
|
def self.Schema
|
7
|
-
|
8
|
-
configure do
|
9
|
-
# config.messages = :i18n
|
10
|
-
config.messages_file = MESSAGES_FILE
|
11
|
-
config.hash_type = :symbolized
|
12
|
-
config.input_processor = :sanitizer
|
13
|
-
|
14
|
-
predicates(Mutations::Predicates)
|
15
|
-
end
|
16
|
-
end
|
5
|
+
Dry::Mutations.Schema
|
17
6
|
end
|
18
7
|
|
19
8
|
module Schema # :nodoc:
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Dry
|
2
|
+
module Mutations
|
3
|
+
class Schema < ::Dry::Validation::Schema
|
4
|
+
MESSAGES_FILE = (::File.join __dir__, '..', '..', '..', 'config', 'messages.yml').freeze
|
5
|
+
|
6
|
+
configure do |config|
|
7
|
+
config.messages_file = MESSAGES_FILE
|
8
|
+
config.hash_type = :symbolized
|
9
|
+
config.input_processor = :sanitizer
|
10
|
+
|
11
|
+
predicates(::Dry::Mutations::Predicates)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-mutations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.92
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksei Matiushkin
|
@@ -220,6 +220,7 @@ files:
|
|
220
220
|
- lib/dry/mutations/globals.rb
|
221
221
|
- lib/dry/mutations/monkeypatches.rb
|
222
222
|
- lib/dry/mutations/predicates.rb
|
223
|
+
- lib/dry/mutations/schema.rb
|
223
224
|
- lib/dry/mutations/transactions.rb
|
224
225
|
- lib/dry/mutations/transactions/container.rb
|
225
226
|
- lib/dry/mutations/transactions/dsl.rb
|