File tree Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 3
3
source 'https://rubygems.org'
4
4
5
5
# gem "rails"
6
+ gem 'activesupport'
6
7
gem 'rspec'
7
8
gem 'sorbet-coerce' , '>= 0.2.6'
8
9
gem 'sorbet-static-and-runtime' , '>= 0.5.11511'
Original file line number Diff line number Diff line change 1
1
GEM
2
2
remote: https://rubygems.org/
3
3
specs:
4
+ activesupport (7.2.0 )
5
+ base64
6
+ bigdecimal
7
+ concurrent-ruby (~> 1.0 , >= 1.3.1 )
8
+ connection_pool (>= 2.2.5 )
9
+ drb
10
+ i18n (>= 1.6 , < 2 )
11
+ logger (>= 1.4.2 )
12
+ minitest (>= 5.1 )
13
+ securerandom (>= 0.3 )
14
+ tzinfo (~> 2.0 , >= 2.0.5 )
15
+ base64 (0.2.0 )
16
+ bigdecimal (3.1.8 )
17
+ concurrent-ruby (1.3.4 )
18
+ connection_pool (2.4.1 )
4
19
diff-lcs (1.5.1 )
20
+ drb (2.2.1 )
21
+ i18n (1.14.5 )
22
+ concurrent-ruby (~> 1.0 )
23
+ logger (1.6.0 )
24
+ minitest (5.25.1 )
5
25
polyfill (1.9.0 )
6
26
rspec (3.13.0 )
7
27
rspec-core (~> 3.13.0 )
17
37
rspec-support (~> 3.13.0 )
18
38
rspec-support (3.13.1 )
19
39
safe_type (1.1.1 )
40
+ securerandom (0.3.1 )
20
41
sorbet (0.5.11531 )
21
42
sorbet-static (= 0.5.11531 )
22
43
sorbet-coerce (0.7.0 )
28
49
sorbet-static-and-runtime (0.5.11531 )
29
50
sorbet (= 0.5.11531 )
30
51
sorbet-runtime (= 0.5.11531 )
52
+ tzinfo (2.0.6 )
53
+ concurrent-ruby (~> 1.0 )
31
54
32
55
PLATFORMS
33
56
ruby
34
57
x86_64-linux
35
58
36
59
DEPENDENCIES
60
+ activesupport
37
61
rspec
38
62
sorbet-coerce (>= 0.2.6 )
39
63
sorbet-static-and-runtime (>= 0.5.11511 )
Original file line number Diff line number Diff line change 1
1
# typed: strict
2
2
3
3
require 'sorbet-coerce'
4
+ require 'active_support/hash_with_indifferent_access'
4
5
5
6
module ResourceRegistry
6
7
# Constructs a resource struct (like Dtos and Entities) from a hash of arguments
@@ -38,13 +39,6 @@ def build(value)
38
39
build_other ( value )
39
40
end
40
41
rescue TypeError , ArgumentError , TypeCoerce ::CoercionError => e
41
- CustomLogger . info (
42
- message : "Failed to parse provided arguments into #{ resource_type } " ,
43
- payload : {
44
- request : value ,
45
- response : e . to_s
46
- }
47
- )
48
42
raise ParseInputError , e . message
49
43
end
50
44
Original file line number Diff line number Diff line change 4
4
require 'spec_helper'
5
5
require_relative '../lib/public/resource_struct_builder'
6
6
7
- module :: ResourceRegistry
7
+ module ResourceRegistry
8
8
module DtoBuilderSpec
9
9
module Dtos
10
10
class SimpleDto < T ::Struct
@@ -133,7 +133,8 @@ class SetDto < T::Struct
133
133
end
134
134
end
135
135
136
- context 'with a nested value-object dto' do
136
+ # ValueObjects is an internal detail of Factorial
137
+ xcontext 'with a nested value-object dto' do
137
138
let ( :dto ) { ResourceRegistry ::DtoBuilderSpec ::Dtos ::NestedValueObjectDto }
138
139
let ( :period ) { ValueObjects ::TimeRange . new ( from : Time . zone . now , to : Time . zone . now . tomorrow ) }
139
140
let ( :args ) { { type : 'one-type' , period : { from : period . from , to : period . to } } }
You can’t perform that action at this time.
0 commit comments