easy_params 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.travis.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +39 -31
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/easy_params.gemspec +5 -4
- data/lib/easy_params/base.rb +0 -0
- data/lib/easy_params/dsl.rb +0 -0
- data/lib/easy_params/types.rb +9 -10
- data/lib/easy_params/version.rb +1 -1
- data/lib/easy_params.rb +0 -0
- metadata +27 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dc0f5627888a21c92ef0ebfe212bf74035feeb5cc3579c8a710c7128445d863
|
4
|
+
data.tar.gz: 809f1077535f33db3b03b15fd5aabe93f4478cb1c8e577b06ec6c4c92622fbe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9054b406b6b55a066e4556128bf95c4224f4273b65c6086d0d07e5f20f175118b8dcf097e0de3e7e9bad65456ac491b0aa7077547cc18d88b89f0f03c73882d
|
7
|
+
data.tar.gz: f26d3a0f8fb1d275232f7cba454181fc47e6a5444e65c36be534fd6a39e7734b79fcd9d8dca402749947472cfdcd4b60226d3b7c846dcbffbb36f857f4aed19b
|
data/.gitignore
CHANGED
File without changes
|
data/.rspec
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
@@ -1,52 +1,51 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
easy_params (0.
|
5
|
-
activemodel (>= 3.2, <
|
6
|
-
dry-struct (~> 1.
|
7
|
-
dry-types (~> 1.
|
4
|
+
easy_params (0.2.0)
|
5
|
+
activemodel (>= 3.2, < 6.1)
|
6
|
+
dry-struct (~> 1.4)
|
7
|
+
dry-types (~> 1.5)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activemodel (
|
13
|
-
activesupport (=
|
14
|
-
activesupport (
|
12
|
+
activemodel (6.0.3.5)
|
13
|
+
activesupport (= 6.0.3.5)
|
14
|
+
activesupport (6.0.3.5)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
-
i18n (>=
|
17
|
-
minitest (
|
18
|
-
tzinfo (~>
|
19
|
-
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
20
|
+
concurrent-ruby (1.1.8)
|
20
21
|
diff-lcs (1.4.4)
|
21
|
-
|
22
|
+
docile (1.3.5)
|
23
|
+
dry-configurable (0.12.1)
|
22
24
|
concurrent-ruby (~> 1.0)
|
23
|
-
dry-core (~> 0.
|
24
|
-
dry-container (0.
|
25
|
+
dry-core (~> 0.5, >= 0.5.0)
|
26
|
+
dry-container (0.7.2)
|
25
27
|
concurrent-ruby (~> 1.0)
|
26
|
-
dry-configurable (~> 0.
|
27
|
-
dry-core (0.
|
28
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
29
|
+
dry-core (0.5.0)
|
28
30
|
concurrent-ruby (~> 1.0)
|
29
|
-
dry-
|
30
|
-
dry-
|
31
|
-
dry-logic (1.2.0)
|
31
|
+
dry-inflector (0.2.0)
|
32
|
+
dry-logic (1.1.0)
|
32
33
|
concurrent-ruby (~> 1.0)
|
33
34
|
dry-core (~> 0.5, >= 0.5)
|
34
|
-
dry-struct (1.
|
35
|
-
dry-core (~> 0.
|
36
|
-
dry-
|
37
|
-
dry-types (~> 1.3)
|
35
|
+
dry-struct (1.4.0)
|
36
|
+
dry-core (~> 0.5, >= 0.5)
|
37
|
+
dry-types (~> 1.5)
|
38
38
|
ice_nine (~> 0.11)
|
39
|
-
dry-types (1.
|
39
|
+
dry-types (1.5.1)
|
40
40
|
concurrent-ruby (~> 1.0)
|
41
41
|
dry-container (~> 0.3)
|
42
|
-
dry-core (~> 0.
|
43
|
-
dry-equalizer (~> 0.3)
|
42
|
+
dry-core (~> 0.5, >= 0.5)
|
44
43
|
dry-inflector (~> 0.1, >= 0.1.2)
|
45
44
|
dry-logic (~> 1.0, >= 1.0.2)
|
46
|
-
i18n (1.9
|
45
|
+
i18n (1.8.9)
|
47
46
|
concurrent-ruby (~> 1.0)
|
48
47
|
ice_nine (0.11.2)
|
49
|
-
minitest (5.
|
48
|
+
minitest (5.14.4)
|
50
49
|
rake (12.3.3)
|
51
50
|
rspec (3.10.0)
|
52
51
|
rspec-core (~> 3.10.0)
|
@@ -63,8 +62,16 @@ GEM
|
|
63
62
|
rspec-support (3.10.0)
|
64
63
|
rspec_vars_helper (0.1.0)
|
65
64
|
rspec (>= 2.4)
|
66
|
-
|
67
|
-
|
65
|
+
simplecov (0.21.2)
|
66
|
+
docile (~> 1.1)
|
67
|
+
simplecov-html (~> 0.11)
|
68
|
+
simplecov_json_formatter (~> 0.1)
|
69
|
+
simplecov-html (0.12.3)
|
70
|
+
simplecov_json_formatter (0.1.2)
|
71
|
+
thread_safe (0.3.6)
|
72
|
+
tzinfo (1.2.9)
|
73
|
+
thread_safe (~> 0.1)
|
74
|
+
zeitwerk (2.4.2)
|
68
75
|
|
69
76
|
PLATFORMS
|
70
77
|
ruby
|
@@ -74,6 +81,7 @@ DEPENDENCIES
|
|
74
81
|
rake (~> 12.0)
|
75
82
|
rspec (~> 3.0)
|
76
83
|
rspec_vars_helper (~> 0.1)
|
84
|
+
simplecov (~> 0.17)
|
77
85
|
|
78
86
|
BUNDLED WITH
|
79
|
-
2.
|
87
|
+
2.1.4
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/easy_params.gemspec
CHANGED
@@ -27,16 +27,17 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
|
-
spec.required_ruby_version = '>= 2.
|
30
|
+
spec.required_ruby_version = '>= 2.2.2'
|
31
31
|
|
32
|
-
version_string = ['>= 3.2', '<
|
32
|
+
version_string = ['>= 3.2', '< 6.1']
|
33
33
|
|
34
34
|
spec.add_runtime_dependency 'activemodel', version_string
|
35
35
|
|
36
36
|
# spec.add_dependency 'dry-logic', '~> 0.4.2'
|
37
|
-
spec.add_dependency 'dry-struct', '~> 1.
|
38
|
-
spec.add_dependency 'dry-types', '~> 1.
|
37
|
+
spec.add_dependency 'dry-struct', '~> 1.4'
|
38
|
+
spec.add_dependency 'dry-types', '~> 1.5'
|
39
39
|
|
40
40
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
41
|
spec.add_development_dependency 'rspec_vars_helper', '~> 0.1'
|
42
|
+
spec.add_development_dependency 'simplecov', '~> 0.17'
|
42
43
|
end
|
data/lib/easy_params/base.rb
CHANGED
File without changes
|
data/lib/easy_params/dsl.rb
CHANGED
File without changes
|
data/lib/easy_params/types.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
module EasyParams
|
2
2
|
module Types
|
3
|
-
include Dry::Types.module
|
4
3
|
Struct = EasyParams::Base.meta(omittable: true)
|
5
4
|
StructDSL = ::Class.new(EasyParams::Base).extend(EasyParams::DSL).meta(omittable: true)
|
6
|
-
Integer =
|
7
|
-
Decimal =
|
8
|
-
Float =
|
9
|
-
Bool =
|
10
|
-
String =
|
11
|
-
Array =
|
12
|
-
Date =
|
13
|
-
DateTime =
|
14
|
-
Time =
|
5
|
+
Integer = Dry::Types['params.integer'].optional.meta(omittable: true).default(nil)
|
6
|
+
Decimal = Dry::Types['params.decimal'].optional.meta(omittable: true).default(nil)
|
7
|
+
Float = Dry::Types['params.float'].optional.meta(omittable: true).default(nil)
|
8
|
+
Bool = Dry::Types['strict.bool'].optional.meta(omittable: true).default(nil)
|
9
|
+
String = Dry::Types['string'].optional.meta(omittable: true).default(nil)
|
10
|
+
Array = Dry::Types['array'].of(Struct).meta(omittable: true).default([])
|
11
|
+
Date = Dry::Types['params.date'].optional.meta(omittable: true).default(nil)
|
12
|
+
DateTime = Dry::Types['params.date_time'].optional.meta(omittable: true).default(nil)
|
13
|
+
Time = Dry::Types['params.time'].optional.meta(omittable: true).default(nil)
|
15
14
|
end
|
16
15
|
end
|
data/lib/easy_params/version.rb
CHANGED
data/lib/easy_params.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrii Baran
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,35 +29,35 @@ dependencies:
|
|
29
29
|
version: '3.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: dry-struct
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 1.
|
39
|
+
version: '1.4'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.
|
46
|
+
version: '1.4'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dry-types
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: '1.5'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: '1.5'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +86,20 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0.1'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: simplecov
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.17'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.17'
|
89
103
|
description: Dessribe structure, validate and coerce values. Powered by dry-types
|
90
104
|
and dry-struct
|
91
105
|
email:
|
@@ -118,7 +132,7 @@ metadata:
|
|
118
132
|
allowed_push_host: https://rubygems.org
|
119
133
|
homepage_uri: https://github.com/andriy-baran/easy_params
|
120
134
|
source_code_uri: https://github.com/andriy-baran/easy_params
|
121
|
-
post_install_message:
|
135
|
+
post_install_message:
|
122
136
|
rdoc_options: []
|
123
137
|
require_paths:
|
124
138
|
- lib
|
@@ -126,15 +140,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
140
|
requirements:
|
127
141
|
- - ">="
|
128
142
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
143
|
+
version: 2.2.2
|
130
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
145
|
requirements:
|
132
146
|
- - ">="
|
133
147
|
- !ruby/object:Gem::Version
|
134
148
|
version: '0'
|
135
149
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
137
|
-
signing_key:
|
150
|
+
rubygems_version: 3.1.4
|
151
|
+
signing_key:
|
138
152
|
specification_version: 4
|
139
153
|
summary: A tool that handles common tasks needed when working with params in Rails
|
140
154
|
test_files: []
|