dry-struct 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +105 -61
- data/LICENSE +1 -1
- data/README.md +16 -12
- data/dry-struct.gemspec +26 -27
- data/lib/dry-struct.rb +2 -0
- data/lib/dry/struct.rb +14 -3
- data/lib/dry/struct/class_interface.rb +91 -34
- data/lib/dry/struct/compiler.rb +22 -0
- data/lib/dry/struct/constructor.rb +4 -24
- data/lib/dry/struct/errors.rb +13 -3
- data/lib/dry/struct/extensions.rb +2 -0
- data/lib/dry/struct/extensions/pretty_print.rb +3 -1
- data/lib/dry/struct/hashify.rb +5 -1
- data/lib/dry/struct/printer.rb +5 -0
- data/lib/dry/struct/struct_builder.rb +18 -11
- data/lib/dry/struct/sum.rb +3 -0
- data/lib/dry/struct/value.rb +4 -6
- data/lib/dry/struct/version.rb +3 -1
- metadata +36 -59
- data/.codeclimate.yml +0 -12
- data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
- data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
- data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
- data/.github/workflows/ci.yml +0 -74
- data/.github/workflows/docsite.yml +0 -34
- data/.github/workflows/sync_configs.yml +0 -34
- data/.gitignore +0 -12
- data/.rspec +0 -4
- data/.rubocop.yml +0 -95
- data/.yardopts +0 -4
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -29
- data/Gemfile +0 -28
- data/Rakefile +0 -10
- data/benchmarks/basic.rb +0 -57
- data/benchmarks/constrained.rb +0 -37
- data/benchmarks/profile_instantiation.rb +0 -19
- data/benchmarks/setup.rb +0 -11
- data/bin/console +0 -12
- data/bin/setup +0 -7
- data/docsite/source/index.html.md +0 -103
- data/docsite/source/nested-structs.html.md +0 -49
- data/docsite/source/recipes.html.md +0 -143
- data/log/.gitkeep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64b4b12493455f8f916b5708d7c2afdc2649099d3b7b8c41045b73517cce05f8
|
4
|
+
data.tar.gz: 84989a15e01c83c1d71b0d5e034ca54d7727fc7c37db29c0e8b2db88ece51f15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2462f24f972cbaa0c89399f76e3247c3b1fac9a6a88a0f1ea3a6e4ceb37fea2a463b58967c26b102456d589755fe2d3350c324b0646b870db27c6c434eba5acf
|
7
|
+
data.tar.gz: 6156aa3704d9afffedc1370bf17371177d41696c289005fe5d41e4d356049ab881a6e40675756ab6bacd59ca4ac41f792a0dc872da9ffd2724b12cdd44c78e28
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,51 @@
|
|
1
|
-
|
1
|
+
## 1.3.0 2020-02-10
|
2
2
|
|
3
|
-
|
3
|
+
|
4
|
+
### Added
|
5
|
+
|
6
|
+
- Nested structures will reuse type and key transformations from of the enclosing struct (flash-gordon)
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
class User < Dry::Struct
|
10
|
+
transform_keys(&:to_sym)
|
11
|
+
|
12
|
+
attribute :name, Types::String
|
13
|
+
attribute :address do
|
14
|
+
# this struct will inherit transform_keys(&:to_sym)
|
15
|
+
attribute :city, Types::String
|
16
|
+
end
|
17
|
+
|
18
|
+
# nested struct will _not_ transform keys because a parent
|
19
|
+
# struct is given
|
20
|
+
attribute :contacts, Dry::Struct do
|
21
|
+
attribute :email, Types::String
|
22
|
+
end
|
23
|
+
end
|
24
|
+
```
|
25
|
+
- `Dry::Struct::Constructor` finally acts like a fully-featured type (flash-gordon)
|
26
|
+
- `Dry::Struct.abstract` declares a struct class as abstract. An abstract class is used as a default superclass for nested structs (flash-gordon)
|
27
|
+
- `Struct.to_ast` and struct compiler (@flash-gordon)
|
28
|
+
|
29
|
+
### Changed
|
30
|
+
|
31
|
+
- [internal] metadata is now stored inside schema (flash-gordon)
|
32
|
+
|
33
|
+
[Compare v1.2.0...v1.3.0](https://github.com/dry-rb/dry-struct/compare/v1.2.0...v1.3.0)
|
34
|
+
|
35
|
+
## 1.2.0 2019-12-20
|
36
|
+
|
37
|
+
|
38
|
+
### Changed
|
4
39
|
|
5
40
|
- `Dry::Struct::Value` is deprecated. `Dry::Struct` instances were never meant to be mutable, we have no support for this. The only difference between `Dry::Struct` and `Dry::Struct::Value` is that the latter is deeply frozen. Freezing objects slows the code down and gives you very little benefit in return. If you have a use case for `Value`, it won't be hard to roll your own solution using [ice_nine](https://github.com/dkubb/ice_nine) (flash-gordon)
|
6
|
-
- In the thread of the previous change, structs now use immutable equalizer. This means `Struct#hash` memoizes its value after the first
|
41
|
+
- In the thread of the previous change, structs now use immutable equalizer. This means `Struct#hash` memoizes its value after the first invocation. Depending on the case, this may speed up your code significantly (flash-gordon)
|
7
42
|
|
8
|
-
[Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-struct/compare/v1.1.1...
|
43
|
+
[Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-struct/compare/v1.1.1...v1.2.0)
|
9
44
|
|
10
|
-
|
45
|
+
## 1.1.1 2019-10-13
|
11
46
|
|
12
|
-
|
47
|
+
|
48
|
+
### Changed
|
13
49
|
|
14
50
|
- Pattern matching syntax is simplified with `deconstruct_keys` (k-tsj)
|
15
51
|
|
@@ -30,21 +66,20 @@
|
|
30
66
|
|
31
67
|
[Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-struct/compare/v1.1.0...v1.1.1)
|
32
68
|
|
33
|
-
|
69
|
+
## 1.1.0 2019-10-07
|
70
|
+
|
34
71
|
|
35
|
-
|
72
|
+
### Added
|
36
73
|
|
37
74
|
- Experimental support for pattern matching :tada: (flash-gordon)
|
38
75
|
|
39
|
-
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-struct/compare/v1.0.0...v1.1.0)
|
40
76
|
|
41
|
-
|
77
|
+
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-struct/compare/v1.0.0...v1.1.0)
|
42
78
|
|
43
|
-
##
|
79
|
+
## 1.0.0 2019-04-23
|
44
80
|
|
45
|
-
- `valid?` and `===` behave differently, `===` works the same way `Class#===` does and `valid?` checks if the value _can be_ coerced to the struct (flash-gordon)
|
46
81
|
|
47
|
-
|
82
|
+
### Added
|
48
83
|
|
49
84
|
- `Struct.call` now accepts an optional block that will be called on failed coercion. This behavior is consistent with dry-types 1.0. Note that `.new` doesn't take a block (flash-gordon)
|
50
85
|
```ruby
|
@@ -53,11 +88,16 @@
|
|
53
88
|
# => :oh_no
|
54
89
|
```
|
55
90
|
|
91
|
+
### Changed
|
92
|
+
|
93
|
+
- `valid?` and `===` behave differently, `===` works the same way `Class#===` does and `valid?` checks if the value _can be_ coerced to the struct (flash-gordon)
|
94
|
+
|
56
95
|
[Compare v0.7.0...v1.0.0](https://github.com/dry-rb/dry-struct/compare/v0.7.0...v1.0.0)
|
57
96
|
|
58
|
-
|
97
|
+
## 0.7.0 2019-03-22
|
59
98
|
|
60
|
-
|
99
|
+
|
100
|
+
### Changed
|
61
101
|
|
62
102
|
- [BREAKING] `Struct.input` was renamed `Struct.schema`, hence `Struct.schema` returns an instance of `Dry::Types::Hash::Schema` rather than a `Hash`. Schemas are also implementing `Enumerable` but they iterate over key types.
|
63
103
|
New API:
|
@@ -84,13 +124,10 @@
|
|
84
124
|
|
85
125
|
[Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-struct/compare/v0.6.0...v0.7.0)
|
86
126
|
|
87
|
-
|
127
|
+
## 0.6.0 2018-10-24
|
88
128
|
|
89
|
-
## Changed
|
90
129
|
|
91
|
-
|
92
|
-
|
93
|
-
## Added
|
130
|
+
### Added
|
94
131
|
|
95
132
|
- `Struct.attribute?` is an easy way to define omittable attributes (flash-gordon):
|
96
133
|
|
@@ -102,19 +139,20 @@
|
|
102
139
|
# User.new(name: 'John') # => #<User name="John">
|
103
140
|
```
|
104
141
|
|
105
|
-
|
142
|
+
### Fixed
|
106
143
|
|
107
144
|
- `Struct#to_h` recursively converts hash values to hashes, this was done to be consistent with current behavior for arrays (oeoeaio + ZimbiX)
|
108
145
|
|
109
|
-
|
146
|
+
### Changed
|
110
147
|
|
111
|
-
|
148
|
+
- [BREAKING] `Struct.attribute?` in the old sense is deprecated, use `has_attribute?` as a replacement
|
112
149
|
|
113
|
-
|
150
|
+
[Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-struct/compare/v0.5.1...v0.6.0)
|
114
151
|
|
115
|
-
|
152
|
+
## 0.5.1 2018-08-11
|
116
153
|
|
117
|
-
|
154
|
+
|
155
|
+
### Added
|
118
156
|
|
119
157
|
- Pretty print extension (ojab)
|
120
158
|
```ruby
|
@@ -126,18 +164,17 @@
|
|
126
164
|
address=#<Test::Address city="NYC", zipcode="123">>
|
127
165
|
```
|
128
166
|
|
129
|
-
|
167
|
+
### Fixed
|
130
168
|
|
131
|
-
|
169
|
+
- Constant resolution is now restricted to the current module when structs are automatically defined using the block syntax. This shouldn't break any existing code (piktur)
|
170
|
+
|
171
|
+
|
172
|
+
[Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-struct/compare/v0.5.0...v0.5.1)
|
132
173
|
|
133
|
-
##
|
174
|
+
## 0.5.0 2018-05-03
|
134
175
|
|
135
|
-
- `constructor_type` was removed, use `transform_types` and `transform_keys` as a replacement (see below)
|
136
|
-
- Default types are evaluated _only_ on missing values. Again, use `tranform_types` as a work around for `nil`s
|
137
|
-
- Values are now stored within a single instance variable names `@attributes`, this sped up struct creation and improved support for reserved attribute names such as `hash`, they don't get a getter but still can be read via `#[]`
|
138
|
-
- Ruby 2.3 is a minimal supported version
|
139
176
|
|
140
|
-
|
177
|
+
### Added
|
141
178
|
|
142
179
|
- `Dry::Struct.transform_types` accepts a block which is yielded on every type to add. Since types are `dry-types`' objects that come with a robust DSL it's rather simple to restore the behavior of `constructor_type`. See https://github.com/dry-rb/dry-struct/pull/64 for details (flash-gordon)
|
143
180
|
|
@@ -150,9 +187,7 @@
|
|
150
187
|
end
|
151
188
|
end
|
152
189
|
```
|
153
|
-
|
154
190
|
- `Data::Struct.transform_keys` accepts a block/proc that transforms keys of input hashes. The most obvious usage is simbolization but arbitrary transformations are allowed (flash-gordon)
|
155
|
-
|
156
191
|
- `Dry.Struct` builds a struct by a hash of attribute names and types (citizen428)
|
157
192
|
|
158
193
|
```ruby
|
@@ -160,7 +195,6 @@
|
|
160
195
|
attribute :email, 'strict.string'
|
161
196
|
end
|
162
197
|
```
|
163
|
-
|
164
198
|
- Support for `Struct.meta`, note that `.meta` returns a _new class_ (flash-gordon)
|
165
199
|
|
166
200
|
```ruby
|
@@ -172,7 +206,6 @@
|
|
172
206
|
|
173
207
|
User.new(name: 'Jade').class == UserWithMeta.new(name: 'Jade').class # => false
|
174
208
|
```
|
175
|
-
|
176
209
|
- `Struct.attribute` yields a block with definition for nested structs. It defines a nested constant for the new struct and supports arrays (AMHOL + flash-gordon)
|
177
210
|
|
178
211
|
```ruby
|
@@ -191,85 +224,96 @@
|
|
191
224
|
# ^This automatically defines User::Address and User::Account
|
192
225
|
```
|
193
226
|
|
194
|
-
|
227
|
+
### Fixed
|
195
228
|
|
196
229
|
- Adding a new attribute invalidates `attribute_names` (flash-gordon)
|
197
230
|
- Struct classes track subclasses and define attributes in them, now it doesn't matter whether you define attributes first and _then_ subclass or vice versa. Note this can lead to memory leaks in Rails environment when struct classes are reloaded (flash-gordon)
|
198
231
|
|
232
|
+
|
199
233
|
[Compare v0.4.0...v0.5.0](https://github.com/dry-rb/dry-struct/compare/v0.4.0...v0.5.0)
|
200
234
|
|
201
|
-
|
235
|
+
## 0.4.0 2017-11-04
|
236
|
+
|
202
237
|
|
203
|
-
|
238
|
+
### Fixed
|
239
|
+
|
240
|
+
- `Struct#new` doesn't call `.to_hash` recursively (flash-gordon)
|
241
|
+
|
242
|
+
### Changed
|
204
243
|
|
205
244
|
- Attribute readers don't override existing instance methods (solnic)
|
206
245
|
- `Struct#new` uses raw attributes instead of method calls, this makes the behavior consistent with the change above (flash-gordon)
|
207
246
|
- `constructor_type` now actively rejects `:weak` and `:symbolized` values (GustavoCaso)
|
208
247
|
|
209
|
-
## Fixed
|
210
|
-
|
211
|
-
- `Struct#new` doesn't call `.to_hash` recursively (flash-gordon)
|
212
|
-
|
213
248
|
[Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-struct/compare/v0.3.1...v0.4.0)
|
214
249
|
|
215
|
-
|
250
|
+
## 0.3.1 2017-06-30
|
251
|
+
|
216
252
|
|
217
|
-
|
253
|
+
### Added
|
218
254
|
|
219
255
|
- `Struct.constructor` that makes dry-struct more aligned with dry-types; now you can have a struct with a custom constructor that will be called _before_ calling the `new` method (v-kolesnikov)
|
220
256
|
- `Struct.attribute?` and `Struct.attribute_names` for introspecting struct attributes (flash-gordon)
|
221
257
|
- `Struct#__new__` is a safe-to-use-in-gems alias for `Struct#new` (flash-gordon)
|
222
258
|
|
259
|
+
|
223
260
|
[Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-struct/compare/v0.3.0...v0.3.1)
|
224
261
|
|
225
|
-
|
262
|
+
## 0.3.0 2017-05-05
|
226
263
|
|
227
|
-
|
264
|
+
|
265
|
+
### Added
|
228
266
|
|
229
267
|
- `Dry::Struct#new` method to return new instance with applied changeset (Kukunin)
|
230
268
|
|
231
|
-
|
269
|
+
### Fixed
|
232
270
|
|
233
271
|
- `.[]` and `.call` does not coerce subclass to superclass anymore (Kukunin)
|
234
272
|
- Raise ArgumentError when attribute type is a string and no value provided is for `new` (GustavoCaso)
|
235
273
|
|
236
|
-
|
274
|
+
### Changed
|
237
275
|
|
238
276
|
- `.new` without arguments doesn't use nil as an input for non-default types anymore (flash-gordon)
|
239
277
|
|
240
278
|
[Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-struct/compare/v0.2.1...v0.3.0)
|
241
279
|
|
242
|
-
|
280
|
+
## 0.2.1 2017-02-27
|
281
|
+
|
243
282
|
|
244
|
-
|
283
|
+
### Fixed
|
245
284
|
|
246
285
|
- Fixed `Dry::Struct::Value` which appeared to be broken in the last release (flash-gordon)
|
247
286
|
|
287
|
+
|
248
288
|
[Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-struct/compare/v0.2.0...v0.2.1)
|
249
289
|
|
250
|
-
|
290
|
+
## 0.2.0 2016-02-26
|
291
|
+
|
251
292
|
|
252
|
-
|
293
|
+
### Changed
|
253
294
|
|
254
295
|
- Struct attributes can be overridden in a subclass (flash-gordon)
|
255
296
|
|
256
297
|
[Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-struct/compare/v0.1.1...v0.2.0)
|
257
298
|
|
258
|
-
|
299
|
+
## 0.1.1 2016-11-13
|
259
300
|
|
260
|
-
|
301
|
+
|
302
|
+
### Fixed
|
261
303
|
|
262
304
|
- Make `Dry::Struct` act as a constrained type. This fixes the behavior of sum types containing structs (flash-gordon)
|
263
305
|
|
306
|
+
|
264
307
|
[Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-struct/compare/v0.1.0...v0.1.1)
|
265
308
|
|
266
|
-
|
309
|
+
## 0.1.0 2016-09-21
|
310
|
+
|
267
311
|
|
268
|
-
|
312
|
+
### Added
|
269
313
|
|
270
314
|
- `:strict_with_defaults` constructor type (backus)
|
271
315
|
|
272
|
-
|
316
|
+
### Changed
|
273
317
|
|
274
318
|
- [BREAKING] `:strict` was renamed to `:permissive` as it ignores missing keys (backus)
|
275
319
|
- [BREAKING] `:strict` now raises on unexpected keys (backus)
|
@@ -277,6 +321,6 @@
|
|
277
321
|
|
278
322
|
[Compare v0.0.1...v0.1.0](https://github.com/dry-rb/dry-struct/compare/v0.0.1...v0.1.0)
|
279
323
|
|
280
|
-
|
324
|
+
## 0.0.1 2016-07-17
|
281
325
|
|
282
326
|
Initial release of code imported from dry-types
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,29 @@
|
|
1
1
|
[gem]: https://rubygems.org/gems/dry-struct
|
2
|
-
[
|
3
|
-
[
|
4
|
-
[inchpages]: http://inch-ci.org/github/dry-rb/dry-struct
|
2
|
+
[actions]: https://github.com/dry-rb/dry-struct/actions
|
3
|
+
[codacy]: https://www.codacy.com/gh/dry-rb/dry-struct
|
5
4
|
[chat]: https://dry-rb.zulipchat.com
|
5
|
+
[inchpages]: http://inch-ci.org/github/dry-rb/dry-struct
|
6
6
|
|
7
7
|
# dry-struct [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
|
8
8
|
|
9
9
|
[![Gem Version](https://badge.fury.io/rb/dry-struct.svg)][gem]
|
10
|
-
[![
|
11
|
-
[![
|
12
|
-
[![
|
10
|
+
[![CI Status](https://github.com/dry-rb/dry-struct/workflows/ci/badge.svg)][actions]
|
11
|
+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/961f5c776f1d49218b2cede3745e059c)][codacy]
|
12
|
+
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/961f5c776f1d49218b2cede3745e059c)][codacy]
|
13
13
|
[![Inline docs](http://inch-ci.org/github/dry-rb/dry-struct.svg?branch=master)][inchpages]
|
14
14
|
|
15
|
-
|
15
|
+
## Links
|
16
|
+
|
17
|
+
* [User documentation](http://dry-rb.org/gems/dry-struct)
|
18
|
+
* [API documentation](http://rubydoc.info/gems/dry-struct)
|
16
19
|
|
17
|
-
##
|
20
|
+
## Supported Ruby versions
|
18
21
|
|
19
|
-
|
22
|
+
This library officially supports the following Ruby versions:
|
20
23
|
|
21
|
-
|
24
|
+
* MRI >= `2.4`
|
25
|
+
* jruby >= `9.2`
|
22
26
|
|
23
|
-
##
|
27
|
+
## License
|
24
28
|
|
25
|
-
|
29
|
+
See `LICENSE` file.
|
data/dry-struct.gemspec
CHANGED
@@ -1,41 +1,40 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# this file is managed by dry-rb/devtools project
|
3
|
+
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
2
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
6
|
require 'dry/struct/version'
|
4
7
|
|
5
8
|
Gem::Specification.new do |spec|
|
6
9
|
spec.name = 'dry-struct'
|
7
|
-
spec.
|
8
|
-
spec.
|
9
|
-
spec.email = ['piotr.solnica@gmail.com']
|
10
|
+
spec.authors = ["Piotr Solnica"]
|
11
|
+
spec.email = ["piotr.solnica@gmail.com"]
|
10
12
|
spec.license = 'MIT'
|
13
|
+
spec.version = Dry::Struct::VERSION.dup
|
11
14
|
|
12
|
-
spec.summary =
|
15
|
+
spec.summary = "Typed structs and value objects"
|
13
16
|
spec.description = spec.summary
|
14
|
-
spec.homepage = 'https://
|
17
|
+
spec.homepage = 'https://dry-rb.org/gems/dry-struct'
|
18
|
+
spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-struct.gemspec", "lib/**/*"]
|
19
|
+
spec.bindir = 'bin'
|
20
|
+
spec.executables = []
|
21
|
+
spec.require_paths = ['lib']
|
15
22
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
spec.metadata['changelog_uri'] = 'https://github.com/dry-rb/dry-struct/blob/master/CHANGELOG.md'
|
21
|
-
spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-struct'
|
22
|
-
else
|
23
|
-
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
24
|
-
end
|
23
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
24
|
+
spec.metadata['changelog_uri'] = 'https://github.com/dry-rb/dry-struct/blob/master/CHANGELOG.md'
|
25
|
+
spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-struct'
|
26
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-struct/issues'
|
25
27
|
|
26
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
27
|
-
spec.bindir = 'exe'
|
28
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
-
spec.require_paths = ['lib']
|
30
28
|
spec.required_ruby_version = ">= 2.4.0"
|
31
29
|
|
32
|
-
|
33
|
-
spec.add_runtime_dependency
|
34
|
-
spec.add_runtime_dependency
|
35
|
-
spec.add_runtime_dependency
|
30
|
+
# to update dependencies edit project.yml
|
31
|
+
spec.add_runtime_dependency "dry-core", "~> 0.4", ">= 0.4.4"
|
32
|
+
spec.add_runtime_dependency "dry-equalizer", "~> 0.3"
|
33
|
+
spec.add_runtime_dependency "dry-types", "~> 1.3"
|
34
|
+
spec.add_runtime_dependency "ice_nine", "~> 0.11"
|
36
35
|
|
37
|
-
spec.add_development_dependency
|
38
|
-
spec.add_development_dependency
|
39
|
-
spec.add_development_dependency
|
40
|
-
spec.add_development_dependency
|
36
|
+
spec.add_development_dependency "bundler"
|
37
|
+
spec.add_development_dependency "rake"
|
38
|
+
spec.add_development_dependency "rspec"
|
39
|
+
spec.add_development_dependency "yard"
|
41
40
|
end
|