dryer_factories 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/dryer_factories.gemspec +1 -7
- data/lib/dryer/factories/version.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d05663a63dd5b25ae02fd9737222a6c7ad4a934124767fed02460e881c988bd
|
4
|
+
data.tar.gz: 2a1037cd3884108163777ea36534709f74799e0f56dffa61c0a8320c3ecefabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a9044151eb6bef54b17416fa4ba5cee168938c604ddbf7569a3220fa933b80ffe8a91fbfba89e913019d8f51f3c5bf28ace95fe7fd2045130785ab2901cedf6
|
7
|
+
data.tar.gz: c559f032433c5500645024c565f502ae3e760d2bbbcf1bc6287dd4fbaab3c3824137c04ef8406e16a1659d3850869ddc841c3a14396f69c607fe2e6a5d1153f2
|
data/README.md
CHANGED
@@ -11,10 +11,15 @@ gem "dryer_factories"
|
|
11
11
|
## Usage
|
12
12
|
```
|
13
13
|
test "POST 200 - successfully creating a user" do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
class SimpleContract < Dry::Validation::Contract
|
15
|
+
params do
|
16
|
+
required(:email).filled(:string)
|
17
|
+
required(:password).filled(:string)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
request = Dryer::Factories::BuildFromContract.call(SimpleContract)
|
22
|
+
post "/users", params: request.as_json
|
18
23
|
|
19
24
|
assert_response :success
|
20
25
|
end
|
data/dryer_factories.gemspec
CHANGED
@@ -1,12 +1,6 @@
|
|
1
|
-
#require File.expand_path('lib/dryer/factories/version.rb', __dir__)
|
2
1
|
Gem::Specification.new do |spec|
|
3
2
|
spec.name = 'dryer_factories'
|
4
|
-
|
5
|
-
# this should be imported from lib/dryer/factories/version.rb
|
6
|
-
# but I am having nix issues with importing the version file
|
7
|
-
# when this file is evaluated
|
8
|
-
#spec.version = Dryer::Factories::Version
|
9
|
-
spec.version = "0.0.2"
|
3
|
+
spec.version = "0.0.3"
|
10
4
|
spec.authors = ['John Bernier']
|
11
5
|
spec.email = ['john.b.bernier@gmail.com']
|
12
6
|
spec.summary = 'Generate payloads from dry-validation definitions'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryer_factories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Bernier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-validation
|