dry-initializer 2.5.0 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +367 -239
- data/LICENSE +20 -0
- data/README.md +17 -79
- data/dry-initializer.gemspec +29 -16
- data/lib/dry-initializer.rb +1 -1
- data/lib/dry/initializer.rb +16 -14
- data/lib/dry/initializer/builders.rb +2 -2
- data/lib/dry/initializer/builders/attribute.rb +12 -7
- data/lib/dry/initializer/builders/initializer.rb +9 -13
- data/lib/dry/initializer/builders/reader.rb +3 -1
- data/lib/dry/initializer/builders/signature.rb +3 -3
- data/lib/dry/initializer/config.rb +22 -8
- data/lib/dry/initializer/definition.rb +20 -71
- data/lib/dry/initializer/dispatchers.rb +101 -33
- data/lib/dry/initializer/dispatchers/build_nested_type.rb +59 -0
- data/lib/dry/initializer/dispatchers/check_type.rb +43 -0
- data/lib/dry/initializer/dispatchers/prepare_default.rb +40 -0
- data/lib/dry/initializer/dispatchers/prepare_ivar.rb +12 -0
- data/lib/dry/initializer/dispatchers/prepare_optional.rb +13 -0
- data/lib/dry/initializer/dispatchers/prepare_reader.rb +30 -0
- data/lib/dry/initializer/dispatchers/prepare_source.rb +28 -0
- data/lib/dry/initializer/dispatchers/prepare_target.rb +44 -0
- data/lib/dry/initializer/dispatchers/unwrap_type.rb +22 -0
- data/lib/dry/initializer/dispatchers/wrap_type.rb +28 -0
- data/lib/dry/initializer/mixin.rb +4 -4
- data/lib/dry/initializer/mixin/root.rb +1 -0
- data/lib/dry/initializer/struct.rb +39 -0
- data/lib/dry/initializer/undefined.rb +2 -0
- data/lib/dry/initializer/version.rb +5 -0
- data/lib/tasks/benchmark.rake +13 -13
- data/lib/tasks/profile.rake +16 -16
- metadata +38 -103
- data/.codeclimate.yml +0 -23
- data/.gitignore +0 -10
- data/.rspec +0 -4
- data/.rubocop.yml +0 -51
- data/.travis.yml +0 -24
- data/Gemfile +0 -29
- data/Guardfile +0 -5
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -8
- data/benchmarks/compare_several_defaults.rb +0 -82
- data/benchmarks/plain_options.rb +0 -63
- data/benchmarks/plain_params.rb +0 -84
- data/benchmarks/with_coercion.rb +0 -71
- data/benchmarks/with_defaults.rb +0 -66
- data/benchmarks/with_defaults_and_coercion.rb +0 -59
- data/spec/attributes_spec.rb +0 -38
- data/spec/coercion_of_nil_spec.rb +0 -25
- data/spec/custom_dispatchers_spec.rb +0 -35
- data/spec/custom_initializer_spec.rb +0 -30
- data/spec/default_values_spec.rb +0 -83
- data/spec/definition_spec.rb +0 -107
- data/spec/invalid_default_spec.rb +0 -13
- data/spec/missed_default_spec.rb +0 -14
- data/spec/optional_spec.rb +0 -71
- data/spec/options_tolerance_spec.rb +0 -11
- data/spec/public_attributes_utility_spec.rb +0 -22
- data/spec/reader_spec.rb +0 -87
- data/spec/repetitive_definitions_spec.rb +0 -69
- data/spec/several_assignments_spec.rb +0 -41
- data/spec/spec_helper.rb +0 -21
- data/spec/subclassing_spec.rb +0 -49
- data/spec/type_argument_spec.rb +0 -35
- data/spec/type_constraint_spec.rb +0 -78
- data/spec/value_coercion_via_dry_types_spec.rb +0 -29
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# The dispatcher verifies a correctness of the source name
|
3
|
+
# of param or option, taken as a `:source` option.
|
4
|
+
#
|
5
|
+
# We allow any stringified name for the source.
|
6
|
+
# For example, this syntax is correct because we accept any key
|
7
|
+
# in the original hash of arguments, but give them proper names:
|
8
|
+
#
|
9
|
+
# ```ruby
|
10
|
+
# class Foo
|
11
|
+
# extend Dry::Initializer
|
12
|
+
#
|
13
|
+
# option "", as: :first
|
14
|
+
# option 1, as: :second
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# foo = Foo.new("": 42, 1: 666)
|
18
|
+
# foo.first # => 42
|
19
|
+
# foo.second # => 666
|
20
|
+
# ```
|
21
|
+
#
|
22
|
+
module Dry::Initializer::Dispatchers::PrepareSource
|
23
|
+
module_function
|
24
|
+
|
25
|
+
def call(source:, **options)
|
26
|
+
{ source: source.to_s.to_sym, **options }
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#
|
2
|
+
# Prepares the target name of a parameter or an option.
|
3
|
+
#
|
4
|
+
# Unlike source, the target must satisfy requirements for Ruby variable names.
|
5
|
+
# It also shouldn't be in conflict with names used by the gem.
|
6
|
+
#
|
7
|
+
module Dry::Initializer::Dispatchers::PrepareTarget
|
8
|
+
extend self
|
9
|
+
|
10
|
+
# List of variable names reserved by the gem
|
11
|
+
RESERVED = %i[
|
12
|
+
__dry_initializer_options__
|
13
|
+
__dry_initializer_config__
|
14
|
+
__dry_initializer_value__
|
15
|
+
__dry_initializer_definition__
|
16
|
+
__dry_initializer_initializer__
|
17
|
+
].freeze
|
18
|
+
|
19
|
+
def call(source:, target: nil, as: nil, **options)
|
20
|
+
target ||= as || source
|
21
|
+
target = target.to_s.to_sym.downcase
|
22
|
+
|
23
|
+
check_ruby_name!(target)
|
24
|
+
check_reserved_names!(target)
|
25
|
+
|
26
|
+
{ source: source, target: target, **options }
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def check_ruby_name!(target)
|
32
|
+
return if target[/\A[[:alpha:]_][[:alnum:]_]*\??\z/u]
|
33
|
+
|
34
|
+
raise ArgumentError,
|
35
|
+
"The name `#{target}` is not allowed for Ruby methods"
|
36
|
+
end
|
37
|
+
|
38
|
+
def check_reserved_names!(target)
|
39
|
+
return unless RESERVED.include?(target)
|
40
|
+
|
41
|
+
raise ArgumentError,
|
42
|
+
"The method name `#{target}` is reserved by the dry-initializer gem"
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Looks at the `:type` option and counts how many nested arrays
|
3
|
+
# it contains around either nil or a callable value.
|
4
|
+
#
|
5
|
+
# The counted number is preserved in the `:wrap` virtual option
|
6
|
+
# used by the [WrapType] dispatcher.
|
7
|
+
#
|
8
|
+
module Dry::Initializer::Dispatchers::UnwrapType
|
9
|
+
extend self
|
10
|
+
|
11
|
+
def call(type: nil, wrap: 0, **options)
|
12
|
+
type, wrap = unwrap(type, 0)
|
13
|
+
|
14
|
+
{ type: type, wrap: wrap, **options }
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def unwrap(type, count)
|
20
|
+
type.is_a?(Array) ? unwrap(type.first, count + 1) : [type, count]
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# Takes `:type` and `:wrap` to construct the final value coercer
|
3
|
+
#
|
4
|
+
module Dry::Initializer::Dispatchers::WrapType
|
5
|
+
extend self
|
6
|
+
|
7
|
+
def call(type: nil, wrap: 0, **options)
|
8
|
+
{ type: wrapped_type(type, wrap), **options }
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def wrapped_type(type, count)
|
14
|
+
return type if count.zero?
|
15
|
+
|
16
|
+
->(value) { wrap_value(value, count, type) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def wrap_value(value, count, type)
|
20
|
+
if count.zero?
|
21
|
+
type ? type.call(value) : value
|
22
|
+
else
|
23
|
+
return [wrap_value(value, count - 1, type)] unless value.is_a?(Array)
|
24
|
+
|
25
|
+
value.map { |item| wrap_value(item, count - 1, type) }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -4,12 +4,12 @@ module Dry::Initializer
|
|
4
4
|
extend DSL # @deprecated
|
5
5
|
include Dry::Initializer # @deprecated
|
6
6
|
def self.extended(klass) # @deprecated
|
7
|
-
warn
|
8
|
-
|
7
|
+
warn '[DEPRECATED] Use Dry::Initializer instead of its alias' \
|
8
|
+
' Dry::Initializer::Mixin. The later will be removed in v2.1.0'
|
9
9
|
super
|
10
10
|
end
|
11
11
|
|
12
|
-
require_relative
|
13
|
-
require_relative
|
12
|
+
require_relative 'mixin/root'
|
13
|
+
require_relative 'mixin/local'
|
14
14
|
end
|
15
15
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# The nested structure that takes nested hashes with indifferent access
|
3
|
+
#
|
4
|
+
class Dry::Initializer::Struct
|
5
|
+
extend Dry::Initializer
|
6
|
+
|
7
|
+
class << self
|
8
|
+
undef_method :param
|
9
|
+
|
10
|
+
def new(options)
|
11
|
+
super(**Hash(options).each_with_object({}) { |(k, v), h| h[k.to_sym] = v })
|
12
|
+
end
|
13
|
+
alias call new
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# Represents event data as a nested hash with deeply stringified keys
|
18
|
+
# @return [Hash<String, ...>]
|
19
|
+
#
|
20
|
+
def to_h
|
21
|
+
self
|
22
|
+
.class
|
23
|
+
.dry_initializer
|
24
|
+
.attributes(self)
|
25
|
+
.each_with_object({}) { |(k, v), h| h[k.to_s] = __hashify(v) }
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def __hashify(value)
|
31
|
+
case value
|
32
|
+
when Hash
|
33
|
+
value.each_with_object({}) { |(k, v), obj| obj[k.to_s] = __hashify(v) }
|
34
|
+
when Array then value.map { |v| __hashify(v) }
|
35
|
+
when Dry::Initializer::Struct then value.to_h
|
36
|
+
else value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/tasks/benchmark.rake
CHANGED
@@ -1,36 +1,36 @@
|
|
1
1
|
namespace :benchmark do
|
2
|
-
desc
|
2
|
+
desc 'Runs benchmarks for plain params'
|
3
3
|
task :plain_params do
|
4
|
-
system
|
4
|
+
system 'ruby benchmarks/plain_params.rb'
|
5
5
|
end
|
6
6
|
|
7
|
-
desc
|
7
|
+
desc 'Runs benchmarks for plain options'
|
8
8
|
task :plain_options do
|
9
|
-
system
|
9
|
+
system 'ruby benchmarks/plain_options.rb'
|
10
10
|
end
|
11
11
|
|
12
|
-
desc
|
12
|
+
desc 'Runs benchmarks for value coercion'
|
13
13
|
task :with_coercion do
|
14
|
-
system
|
14
|
+
system 'ruby benchmarks/with_coercion.rb'
|
15
15
|
end
|
16
16
|
|
17
|
-
desc
|
17
|
+
desc 'Runs benchmarks with defaults'
|
18
18
|
task :with_defaults do
|
19
|
-
system
|
19
|
+
system 'ruby benchmarks/with_defaults.rb'
|
20
20
|
end
|
21
21
|
|
22
|
-
desc
|
22
|
+
desc 'Runs benchmarks with defaults and coercion'
|
23
23
|
task :with_defaults_and_coercion do
|
24
|
-
system
|
24
|
+
system 'ruby benchmarks/with_defaults_and_coercion.rb'
|
25
25
|
end
|
26
26
|
|
27
|
-
desc
|
27
|
+
desc 'Runs benchmarks for several defaults'
|
28
28
|
task :compare_several_defaults do
|
29
|
-
system
|
29
|
+
system 'ruby benchmarks/with_several_defaults.rb'
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
desc
|
33
|
+
desc 'Runs all benchmarks'
|
34
34
|
task benchmark: %i[
|
35
35
|
benchmark:plain_params
|
36
36
|
benchmark:plain_options
|
data/lib/tasks/profile.rake
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
namespace :profile do
|
2
2
|
def profile(name, execution, &definition)
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require 'dry-initializer'
|
4
|
+
require 'ruby-prof'
|
5
|
+
require 'fileutils'
|
6
6
|
|
7
7
|
definition.call
|
8
8
|
result = RubyProf.profile do
|
9
9
|
1_000.times { execution.call }
|
10
10
|
end
|
11
11
|
|
12
|
-
FileUtils.mkdir_p
|
12
|
+
FileUtils.mkdir_p './tmp'
|
13
13
|
|
14
14
|
FileUtils.touch "./tmp/#{name}.dot"
|
15
|
-
File.open("./tmp/#{name}.dot",
|
15
|
+
File.open("./tmp/#{name}.dot", 'w+') do |output|
|
16
16
|
RubyProf::DotPrinter.new(result).print(output, min_percent: 0)
|
17
17
|
end
|
18
18
|
|
19
19
|
FileUtils.touch "./tmp/#{name}.html"
|
20
|
-
File.open("./tmp/#{name}.html",
|
20
|
+
File.open("./tmp/#{name}.html", 'w+') do |output|
|
21
21
|
RubyProf::CallStackPrinter.new(result).print(output, min_percent: 0)
|
22
22
|
end
|
23
23
|
|
24
24
|
system "dot -Tpng ./tmp/#{name}.dot > ./tmp/#{name}.png"
|
25
25
|
end
|
26
26
|
|
27
|
-
desc
|
27
|
+
desc 'Profiles initialization with required param and option'
|
28
28
|
task :required do
|
29
|
-
profile(
|
29
|
+
profile('required', -> { User.new :Andy, email: 'andy@example.com' }) do
|
30
30
|
class User
|
31
31
|
extend Dry::Initializer
|
32
32
|
param :name
|
@@ -35,20 +35,20 @@ namespace :profile do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
desc
|
38
|
+
desc 'Profiles initialization with default param and option'
|
39
39
|
task :defaults do
|
40
|
-
profile(
|
40
|
+
profile('defaults', -> { User.new }) do
|
41
41
|
class User
|
42
42
|
extend Dry::Initializer
|
43
43
|
param :name, default: -> { :Andy }
|
44
|
-
option :email, default: -> {
|
44
|
+
option :email, default: -> { 'andy@example.com' }
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
desc
|
49
|
+
desc 'Profiles initialization with coerced param and option'
|
50
50
|
task :coercion do
|
51
|
-
profile(
|
51
|
+
profile('coercion', -> { User.new :Andy, email: :"andy@example.com" }) do
|
52
52
|
class User
|
53
53
|
extend Dry::Initializer
|
54
54
|
param :name, proc(&:to_s)
|
@@ -57,9 +57,9 @@ namespace :profile do
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
desc
|
60
|
+
desc 'Profiles initialization with coerced defaults of param and option'
|
61
61
|
task :default_coercion do
|
62
|
-
profile(
|
62
|
+
profile('default_coercion', -> { User.new }) do
|
63
63
|
class User
|
64
64
|
extend Dry::Initializer
|
65
65
|
param :name, proc(&:to_s), default: -> { :Andy }
|
@@ -69,7 +69,7 @@ namespace :profile do
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
desc
|
72
|
+
desc 'Makes all profiling at once'
|
73
73
|
task profile: %i[
|
74
74
|
profile:required
|
75
75
|
profile:defaults
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-initializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Kochnev (marshall-lee)
|
@@ -9,89 +9,46 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rspec
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '3.0'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '3.0'
|
28
14
|
- !ruby/object:Gem::Dependency
|
29
15
|
name: rake
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
|
-
- - "
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '10'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '10'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: dry-types
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">"
|
18
|
+
- - ">="
|
47
19
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0
|
20
|
+
version: '0'
|
49
21
|
type: :development
|
50
22
|
prerelease: false
|
51
23
|
version_requirements: !ruby/object:Gem::Requirement
|
52
24
|
requirements:
|
53
|
-
- - "
|
25
|
+
- - ">="
|
54
26
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0
|
27
|
+
version: '0'
|
56
28
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
29
|
+
name: rspec
|
58
30
|
requirement: !ruby/object:Gem::Requirement
|
59
31
|
requirements:
|
60
|
-
- - "
|
32
|
+
- - ">="
|
61
33
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0
|
34
|
+
version: '0'
|
63
35
|
type: :development
|
64
36
|
prerelease: false
|
65
37
|
version_requirements: !ruby/object:Gem::Requirement
|
66
38
|
requirements:
|
67
|
-
- - "
|
39
|
+
- - ">="
|
68
40
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0
|
70
|
-
description:
|
71
|
-
email:
|
41
|
+
version: '0'
|
42
|
+
description: DSL for declaring params and options of the initializer
|
43
|
+
email:
|
44
|
+
- andrew.kozin@gmail.com
|
72
45
|
executables: []
|
73
46
|
extensions: []
|
74
|
-
extra_rdoc_files:
|
75
|
-
- README.md
|
76
|
-
- CHANGELOG.md
|
47
|
+
extra_rdoc_files: []
|
77
48
|
files:
|
78
|
-
- ".codeclimate.yml"
|
79
|
-
- ".gitignore"
|
80
|
-
- ".rspec"
|
81
|
-
- ".rubocop.yml"
|
82
|
-
- ".travis.yml"
|
83
49
|
- CHANGELOG.md
|
84
|
-
-
|
85
|
-
- Guardfile
|
86
|
-
- LICENSE.txt
|
50
|
+
- LICENSE
|
87
51
|
- README.md
|
88
|
-
- Rakefile
|
89
|
-
- benchmarks/compare_several_defaults.rb
|
90
|
-
- benchmarks/plain_options.rb
|
91
|
-
- benchmarks/plain_params.rb
|
92
|
-
- benchmarks/with_coercion.rb
|
93
|
-
- benchmarks/with_defaults.rb
|
94
|
-
- benchmarks/with_defaults_and_coercion.rb
|
95
52
|
- dry-initializer.gemspec
|
96
53
|
- lib/dry-initializer.rb
|
97
54
|
- lib/dry/initializer.rb
|
@@ -103,35 +60,33 @@ files:
|
|
103
60
|
- lib/dry/initializer/config.rb
|
104
61
|
- lib/dry/initializer/definition.rb
|
105
62
|
- lib/dry/initializer/dispatchers.rb
|
63
|
+
- lib/dry/initializer/dispatchers/build_nested_type.rb
|
64
|
+
- lib/dry/initializer/dispatchers/check_type.rb
|
65
|
+
- lib/dry/initializer/dispatchers/prepare_default.rb
|
66
|
+
- lib/dry/initializer/dispatchers/prepare_ivar.rb
|
67
|
+
- lib/dry/initializer/dispatchers/prepare_optional.rb
|
68
|
+
- lib/dry/initializer/dispatchers/prepare_reader.rb
|
69
|
+
- lib/dry/initializer/dispatchers/prepare_source.rb
|
70
|
+
- lib/dry/initializer/dispatchers/prepare_target.rb
|
71
|
+
- lib/dry/initializer/dispatchers/unwrap_type.rb
|
72
|
+
- lib/dry/initializer/dispatchers/wrap_type.rb
|
106
73
|
- lib/dry/initializer/dsl.rb
|
107
74
|
- lib/dry/initializer/mixin.rb
|
108
75
|
- lib/dry/initializer/mixin/local.rb
|
109
76
|
- lib/dry/initializer/mixin/root.rb
|
77
|
+
- lib/dry/initializer/struct.rb
|
78
|
+
- lib/dry/initializer/undefined.rb
|
79
|
+
- lib/dry/initializer/version.rb
|
110
80
|
- lib/tasks/benchmark.rake
|
111
81
|
- lib/tasks/profile.rake
|
112
|
-
-
|
113
|
-
- spec/coercion_of_nil_spec.rb
|
114
|
-
- spec/custom_dispatchers_spec.rb
|
115
|
-
- spec/custom_initializer_spec.rb
|
116
|
-
- spec/default_values_spec.rb
|
117
|
-
- spec/definition_spec.rb
|
118
|
-
- spec/invalid_default_spec.rb
|
119
|
-
- spec/missed_default_spec.rb
|
120
|
-
- spec/optional_spec.rb
|
121
|
-
- spec/options_tolerance_spec.rb
|
122
|
-
- spec/public_attributes_utility_spec.rb
|
123
|
-
- spec/reader_spec.rb
|
124
|
-
- spec/repetitive_definitions_spec.rb
|
125
|
-
- spec/several_assignments_spec.rb
|
126
|
-
- spec/spec_helper.rb
|
127
|
-
- spec/subclassing_spec.rb
|
128
|
-
- spec/type_argument_spec.rb
|
129
|
-
- spec/type_constraint_spec.rb
|
130
|
-
- spec/value_coercion_via_dry_types_spec.rb
|
131
|
-
homepage: https://github.com/dryrb/dry-initializer
|
82
|
+
homepage: https://dry-rb.org/gems/dry-initializer
|
132
83
|
licenses:
|
133
84
|
- MIT
|
134
|
-
metadata:
|
85
|
+
metadata:
|
86
|
+
allowed_push_host: https://rubygems.org
|
87
|
+
changelog_uri: https://github.com/dry-rb/dry-initializer/blob/master/CHANGELOG.md
|
88
|
+
source_code_uri: https://github.com/dry-rb/dry-initializer
|
89
|
+
bug_tracker_uri: https://github.com/dry-rb/dry-initializer/issues
|
135
90
|
post_install_message:
|
136
91
|
rdoc_options: []
|
137
92
|
require_paths:
|
@@ -140,35 +95,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
95
|
requirements:
|
141
96
|
- - ">="
|
142
97
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
98
|
+
version: 2.4.0
|
144
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
100
|
requirements:
|
146
101
|
- - ">="
|
147
102
|
- !ruby/object:Gem::Version
|
148
103
|
version: '0'
|
149
104
|
requirements: []
|
150
|
-
|
151
|
-
rubygems_version: 2.6.14
|
105
|
+
rubygems_version: 3.0.3
|
152
106
|
signing_key:
|
153
107
|
specification_version: 4
|
154
108
|
summary: DSL for declaring params and options of the initializer
|
155
|
-
test_files:
|
156
|
-
- spec/attributes_spec.rb
|
157
|
-
- spec/coercion_of_nil_spec.rb
|
158
|
-
- spec/custom_dispatchers_spec.rb
|
159
|
-
- spec/custom_initializer_spec.rb
|
160
|
-
- spec/default_values_spec.rb
|
161
|
-
- spec/definition_spec.rb
|
162
|
-
- spec/invalid_default_spec.rb
|
163
|
-
- spec/missed_default_spec.rb
|
164
|
-
- spec/optional_spec.rb
|
165
|
-
- spec/options_tolerance_spec.rb
|
166
|
-
- spec/public_attributes_utility_spec.rb
|
167
|
-
- spec/reader_spec.rb
|
168
|
-
- spec/repetitive_definitions_spec.rb
|
169
|
-
- spec/several_assignments_spec.rb
|
170
|
-
- spec/spec_helper.rb
|
171
|
-
- spec/subclassing_spec.rb
|
172
|
-
- spec/type_argument_spec.rb
|
173
|
-
- spec/type_constraint_spec.rb
|
174
|
-
- spec/value_coercion_via_dry_types_spec.rb
|
109
|
+
test_files: []
|