dryer_factories 0.0.3 → 0.1.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: 9d05663a63dd5b25ae02fd9737222a6c7ad4a934124767fed02460e881c988bd
4
- data.tar.gz: 2a1037cd3884108163777ea36534709f74799e0f56dffa61c0a8320c3ecefabd
3
+ metadata.gz: 13cd5bb84ca831c68d59c9eeb6d53070d91fb830be09f35b1550236543b45aa5
4
+ data.tar.gz: 808f35ad0638c56306ffd3aad264621846fb7d87d2f19629503cb37e5de8c1eb
5
5
  SHA512:
6
- metadata.gz: 6a9044151eb6bef54b17416fa4ba5cee168938c604ddbf7569a3220fa933b80ffe8a91fbfba89e913019d8f51f3c5bf28ace95fe7fd2045130785ab2901cedf6
7
- data.tar.gz: c559f032433c5500645024c565f502ae3e760d2bbbcf1bc6287dd4fbaab3c3824137c04ef8406e16a1659d3850869ddc841c3a14396f69c607fe2e6a5d1153f2
6
+ metadata.gz: f18f5976b9f5457cb07723871c80bcdebb3f796d873e87c09a647276cfbf4a57a0eef9e603e742d2c2122f7423d3517d17a97e88e5df8e3cf9dc3c18e00c376b
7
+ data.tar.gz: 57da99b75c0e2aa0afa5b421a7a064ea6124ca59089619c54734f08ab60934b3a57dd369766d07ba9e04ce0bdace2f97eb5e9c56274bb7f39edeb7b4f78400fd
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'dryer_factories'
3
- spec.version = "0.0.3"
3
+ spec.version = "0.1.0"
4
4
  spec.authors = ['John Bernier']
5
5
  spec.email = ['john.b.bernier@gmail.com']
6
6
  spec.summary = 'Generate payloads from dry-validation definitions'
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
  ]
25
25
  spec.add_dependency "dry-validation", "~> 1.10"
26
26
  spec.add_dependency "dry-types", "~> 1.7"
27
+ spec.add_dependency "dryer_services", "~> 1.0"
27
28
  spec.add_development_dependency "rspec", "~> 3.10"
28
29
  spec.add_development_dependency "debug", "~> 1.8"
29
30
  end
@@ -1,10 +1,11 @@
1
- require_relative "./simple_service.rb"
2
1
  require_relative "./generated_payload.rb"
3
2
  require_relative "./fields/build.rb"
4
3
 
4
+ require "dryer_services"
5
+
5
6
  module Dryer
6
7
  module Factories
7
- class BuildFromContract < SimpleService
8
+ class BuildFromContract < Dryer::Services::SimpleService
8
9
  def initialize(contract)
9
10
  @contract = contract
10
11
  check_contract_type!
@@ -1,9 +1,9 @@
1
- require_relative "../simple_service.rb"
1
+ require "dryer_services"
2
2
 
3
3
  module Dryer
4
4
  module Factories
5
5
  module Fields
6
- class Build < SimpleService
6
+ class Build < Dryer::Services::SimpleService
7
7
  def initialize(name:, type:)
8
8
  @name = name
9
9
  @type = type
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.3
4
+ version: 0.1.0
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-12-03 00:00:00.000000000 Z
11
+ date: 2023-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dryer_services
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +97,6 @@ files:
83
97
  - lib/dryer/factories/build_from_contract.rb
84
98
  - lib/dryer/factories/fields/build.rb
85
99
  - lib/dryer/factories/generated_payload.rb
86
- - lib/dryer/factories/simple_service.rb
87
100
  - lib/dryer/factories/version.rb
88
101
  - lib/dryer_factories.rb
89
102
  homepage: https://github.com/jbernie2/dryer-factories
@@ -1,13 +0,0 @@
1
- module Dryer
2
- module Factories
3
- class SimpleService
4
- def self.call(*args)
5
- if args.length == 1 && args[0].is_a?(Hash)
6
- new(**args[0]).call
7
- else
8
- new(*args).call
9
- end
10
- end
11
- end
12
- end
13
- end