dry-logic 1.0.3 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +115 -32
  3. data/LICENSE +1 -1
  4. data/README.md +12 -14
  5. data/dry-logic.gemspec +27 -15
  6. data/lib/dry-logic.rb +1 -1
  7. data/lib/dry/logic.rb +2 -2
  8. data/lib/dry/logic/evaluator.rb +1 -1
  9. data/lib/dry/logic/operations.rb +11 -11
  10. data/lib/dry/logic/operations/abstract.rb +6 -6
  11. data/lib/dry/logic/operations/and.rb +4 -4
  12. data/lib/dry/logic/operations/attr.rb +1 -1
  13. data/lib/dry/logic/operations/binary.rb +1 -1
  14. data/lib/dry/logic/operations/check.rb +4 -4
  15. data/lib/dry/logic/operations/each.rb +2 -2
  16. data/lib/dry/logic/operations/implication.rb +2 -2
  17. data/lib/dry/logic/operations/key.rb +5 -5
  18. data/lib/dry/logic/operations/negation.rb +2 -2
  19. data/lib/dry/logic/operations/or.rb +2 -2
  20. data/lib/dry/logic/operations/set.rb +3 -3
  21. data/lib/dry/logic/operations/unary.rb +1 -1
  22. data/lib/dry/logic/operations/xor.rb +2 -2
  23. data/lib/dry/logic/operators.rb +4 -4
  24. data/lib/dry/logic/predicates.rb +33 -8
  25. data/lib/dry/logic/result.rb +2 -2
  26. data/lib/dry/logic/rule.rb +11 -11
  27. data/lib/dry/logic/rule/interface.rb +32 -37
  28. data/lib/dry/logic/rule/predicate.rb +3 -3
  29. data/lib/dry/logic/rule_compiler.rb +3 -3
  30. data/lib/dry/logic/version.rb +1 -1
  31. metadata +10 -139
  32. data/.codeclimate.yml +0 -15
  33. data/.gitignore +0 -9
  34. data/.rspec +0 -3
  35. data/.travis.yml +0 -31
  36. data/CONTRIBUTING.md +0 -29
  37. data/Gemfile +0 -15
  38. data/Rakefile +0 -14
  39. data/benchmarks/rule_application.rb +0 -30
  40. data/benchmarks/setup.rb +0 -13
  41. data/bin/console +0 -11
  42. data/examples/basic.rb +0 -16
  43. data/spec/integration/result_spec.rb +0 -61
  44. data/spec/integration/rule_spec.rb +0 -55
  45. data/spec/shared/predicates.rb +0 -59
  46. data/spec/shared/rule.rb +0 -74
  47. data/spec/spec_helper.rb +0 -36
  48. data/spec/support/mutant.rb +0 -11
  49. data/spec/unit/operations/and_spec.rb +0 -70
  50. data/spec/unit/operations/attr_spec.rb +0 -29
  51. data/spec/unit/operations/check_spec.rb +0 -51
  52. data/spec/unit/operations/each_spec.rb +0 -49
  53. data/spec/unit/operations/implication_spec.rb +0 -32
  54. data/spec/unit/operations/key_spec.rb +0 -135
  55. data/spec/unit/operations/negation_spec.rb +0 -51
  56. data/spec/unit/operations/or_spec.rb +0 -75
  57. data/spec/unit/operations/set_spec.rb +0 -43
  58. data/spec/unit/operations/xor_spec.rb +0 -63
  59. data/spec/unit/predicates/array_spec.rb +0 -43
  60. data/spec/unit/predicates/attr_spec.rb +0 -31
  61. data/spec/unit/predicates/bool_spec.rb +0 -36
  62. data/spec/unit/predicates/bytesize_spec.rb +0 -48
  63. data/spec/unit/predicates/case_spec.rb +0 -35
  64. data/spec/unit/predicates/date_spec.rb +0 -33
  65. data/spec/unit/predicates/date_time_spec.rb +0 -33
  66. data/spec/unit/predicates/decimal_spec.rb +0 -34
  67. data/spec/unit/predicates/empty_spec.rb +0 -40
  68. data/spec/unit/predicates/eql_spec.rb +0 -23
  69. data/spec/unit/predicates/even_spec.rb +0 -33
  70. data/spec/unit/predicates/excluded_from_spec.rb +0 -37
  71. data/spec/unit/predicates/excludes_spec.rb +0 -58
  72. data/spec/unit/predicates/false_spec.rb +0 -37
  73. data/spec/unit/predicates/filled_spec.rb +0 -40
  74. data/spec/unit/predicates/float_spec.rb +0 -33
  75. data/spec/unit/predicates/format_spec.rb +0 -23
  76. data/spec/unit/predicates/gt_spec.rb +0 -42
  77. data/spec/unit/predicates/gteq_spec.rb +0 -42
  78. data/spec/unit/predicates/hash_spec.rb +0 -40
  79. data/spec/unit/predicates/included_in_spec.rb +0 -37
  80. data/spec/unit/predicates/includes_spec.rb +0 -24
  81. data/spec/unit/predicates/int_spec.rb +0 -36
  82. data/spec/unit/predicates/key_spec.rb +0 -31
  83. data/spec/unit/predicates/lt_spec.rb +0 -42
  84. data/spec/unit/predicates/lteq_spec.rb +0 -42
  85. data/spec/unit/predicates/max_bytesize_spec.rb +0 -39
  86. data/spec/unit/predicates/max_size_spec.rb +0 -51
  87. data/spec/unit/predicates/min_bytesize_spec.rb +0 -39
  88. data/spec/unit/predicates/min_size_spec.rb +0 -51
  89. data/spec/unit/predicates/none_spec.rb +0 -30
  90. data/spec/unit/predicates/not_eql_spec.rb +0 -23
  91. data/spec/unit/predicates/number_spec.rb +0 -39
  92. data/spec/unit/predicates/odd_spec.rb +0 -33
  93. data/spec/unit/predicates/respond_to_spec.rb +0 -31
  94. data/spec/unit/predicates/size_spec.rb +0 -57
  95. data/spec/unit/predicates/str_spec.rb +0 -34
  96. data/spec/unit/predicates/time_spec.rb +0 -33
  97. data/spec/unit/predicates/true_spec.rb +0 -37
  98. data/spec/unit/predicates/type_spec.rb +0 -37
  99. data/spec/unit/predicates/uuid_v4_spec.rb +0 -29
  100. data/spec/unit/predicates_spec.rb +0 -25
  101. data/spec/unit/rule/predicate_spec.rb +0 -55
  102. data/spec/unit/rule_compiler_spec.rb +0 -129
  103. data/spec/unit/rule_spec.rb +0 -213
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a09361d1d78293fe7254b7c92dd29b26df899630db88cf5aa9c8a99b369eb38
4
- data.tar.gz: 8aa9c03d77c492207dbef23a8b06d10f698e0f54def07e356847e4116eb9ca69
3
+ metadata.gz: 18fd19e7ba009817c12de16b828fb0e1dd04f1e5d2305fa9eeb8be9a55681473
4
+ data.tar.gz: a4f2ff3297ab4684323489bd0a371f759b1b99d0a5c5f5425a3158f4d8af45e7
5
5
  SHA512:
6
- metadata.gz: 5780b5badd5db51a5bd8f8c275cf114a786d0860be4c949a88327b243476a779a020d4e3323e2561fa96ba87382e64b63cdc473b10ce346d13ea533fc67b1936
7
- data.tar.gz: 649e7727b08808abf58378ffaa191796945070e45f2bf5c502b560f7c1a33506d5e17d55cef52c52827431d145bb1907bbc81622ff64870428cfdbd0afec3bdb
6
+ metadata.gz: c57af697d43afe951a6cfdce3a9afd2ce12399b95e6d48f9468c84a2de33299d8a20b8f1851652a86cb922868974b2be80f434d38c8086022db42d9baa7df5dc
7
+ data.tar.gz: a33e8cfcec95668d7189ac1921bce8c88602dd25fea59f10174cef42ff7130cd9bb4285884d4c241eeb98fcd842a5268078c14649851e1b24fc20a56633fcd43
@@ -1,59 +1,122 @@
1
- # v1.0.3 2019-08-01
1
+ ## unreleased
2
+
3
+
4
+ ### Fixed
5
+
6
+ - Better Ruby 3 support with fixed specialization for rules of negative arity (@flash-gordon)
7
+
8
+
9
+ [Compare v1.0.7...master](https://github.com/dry-rb/dry-logic/compare/v1.0.7...master)
10
+
11
+ ## 1.0.7 2020-08-13
12
+
2
13
 
3
14
  ### Added
4
15
 
5
- * `bytesize?` predicate (@bmalinconico)
6
- * `min_bytesize?` predicate (@bmalinconico)
7
- * `max_bytesize? predicate (@bmalinconico)
16
+ - A new `uri?` predicate that you can use to verify `URI` strings, ie `uri?("https", "https://dry-rb.org")` (@nerburish)
17
+ - New predicates: `uuid_v1?`, `uuid_v2?`, `uuid_v3?` and `uuid_v5?` (via #75) (@jamesbrauman)
18
+
19
+
20
+ [Compare v1.0.6...v1.0.7](https://github.com/dry-rb/dry-logic/compare/v1.0.6...v1.0.7)
21
+
22
+ ## 1.0.6 2020-02-10
23
+
24
+
25
+ ### Fixed
26
+
27
+ - Made the regexp used by `uuid_v4?` more secure (@kml)
28
+
29
+
30
+ [Compare v1.0.5...v1.0.6](https://github.com/dry-rb/dry-logic/compare/v1.0.5...v1.0.6)
31
+
32
+ ## 1.0.5 2019-11-07
33
+
34
+
35
+ ### Fixed
36
+
37
+ - Make `format?` tolerant to `nil` values. It already worked like that before, but starting Ruby 2.7 it would produce warnings. Now it won't. Don't rely on this behavior, it's only added to make tests pass in dry-schema. Use explicit type checks instead (@flash-gordon)
38
+
39
+
40
+ [Compare v1.0.4...v1.0.5](https://github.com/dry-rb/dry-logic/compare/v1.0.4...v1.0.5)
41
+
42
+ ## 1.0.4 2019-11-06
43
+
44
+
45
+ ### Fixed
46
+
47
+ - Fix keyword warnings (@flash-gordon)
48
+
49
+
50
+ [Compare v1.0.3...v1.0.4](https://github.com/dry-rb/dry-logic/compare/v1.0.3...v1.0.4)
51
+
52
+ ## 1.0.3 2019-08-01
53
+
54
+
55
+ ### Added
56
+
57
+ - `bytesize?` predicate (@bmalinconico)
58
+ - `min_bytesize?` predicate (@bmalinconico)
59
+ - `max_bytesize? predicate (@bmalinconico)
8
60
 
9
61
  ### Changed
10
62
 
11
- * Min ruby version was set to `>= 2.4.0` (@flash-gordon)
63
+ - Min ruby version was set to `>= 2.4.0` (@flash-gordon)
12
64
 
13
65
  [Compare v1.0.2...v1.0.3](https://github.com/dry-rb/dry-logic/compare/v1.0.2...v1.0.3)
14
66
 
15
- # v1.0.2 2019-06-14
67
+ ## 1.0.2 2019-06-14
16
68
 
17
69
  Re-pushed 1.0.1 after dry-schema 1.2.0 release.
18
70
 
71
+
19
72
  [Compare v1.0.1...v1.0.2](https://github.com/dry-rb/dry-logic/compare/v1.0.1...v1.0.2)
20
73
 
21
- # v1.0.1 2019-06-04 (yanked)
74
+ ## 1.0.1 2019-06-04
75
+
76
+ This release was removed from rubygems because it broke dry-schema.
22
77
 
23
78
  ### Added
24
79
 
25
80
  - `uuid_v4?` predicate (radar)
26
81
  - `respond_to?` predicate (waiting-for-dev)
27
82
 
83
+
28
84
  [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-logic/compare/v1.0.0...v1.0.1)
29
85
 
30
- This release was removed from rubygems because it broke dry-schema.
86
+ ## 1.0.0 2019-04-23
87
+
31
88
 
32
- # v1.0.0 2019-04-23
89
+ ### Changed
33
90
 
34
- * Version bump to `1.0.0` (flash-gordon)
91
+ - Version bump to `1.0.0` (flash-gordon)
35
92
 
36
93
  [Compare v0.6.1...v1.0.0](https://github.com/dry-rb/dry-logic/compare/v0.6.1...v1.0.0)
37
94
 
38
- # v0.6.1 2019-04-18
95
+ ## 0.6.1 2019-04-18
96
+
97
+
98
+ ### Fixed
99
+
100
+ - Fix a regression in dry-validation 0.x for argument-less predicates (flash-gordon)
39
101
 
40
- * Fix a regression in dry-validation 0.x for argument-less predicates (flash-gordon)
41
102
 
42
103
  [Compare v0.6.0...v0.6.1](https://github.com/dry-rb/dry-logic/compare/v0.6.0...v0.6.1)
43
104
 
44
- # v0.6.0 2019-04-04
105
+ ## 0.6.0 2019-04-04
106
+
45
107
 
46
108
  ### Added
47
109
 
48
- * Generating hints can be disabled by building `Operations::And` with `hints: false` option set (solnic)
110
+ - Generating hints can be disabled by building `Operations::And` with `hints: false` option set (solnic)
49
111
 
50
112
  ### Changed
51
113
 
52
- * `Rule` construction has been optimized so that currying and application is multiple-times faster (flash-gordon)
114
+ - `Rule` construction has been optimized so that currying and application is multiple-times faster (flash-gordon)
53
115
 
54
116
  [Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-logic/compare/v0.5.0...v0.6.0)
55
117
 
56
- # v0.5.0 2019-01-29
118
+ ## 0.5.0 2019-01-29
119
+
57
120
 
58
121
  ### Added
59
122
 
@@ -63,9 +126,11 @@ This release was removed from rubygems because it broke dry-schema.
63
126
 
64
127
  - `Operation::Key#ast` will now return a correct AST with non-Undefined inputs (solnic)
65
128
 
129
+
66
130
  [Compare v0.4.2...v0.5.0](https://github.com/dry-rb/dry-logic/compare/v0.4.2...v0.5.0)
67
131
 
68
- # v0.4.2 2017-09-15
132
+ ## 0.4.2 2017-09-15
133
+
69
134
 
70
135
  ### Added
71
136
 
@@ -76,21 +141,23 @@ This release was removed from rubygems because it broke dry-schema.
76
141
 
77
142
  - A bug with using custom predicates within a standalone module in `dry-validation` (flash-gordon)
78
143
 
79
- [Compare v0.4.1...v0.4.2](https://github.com/dry-rb/dry-logic/compare/v0.4.1...v0.4.2)
80
144
 
81
- # v0.4.1 2017-01-23
145
+ [Compare v0.4.1...v0.4.2](https://github.com/dry-rb/dry-logic/compare/v0.4.1...v0.4.2)
82
146
 
83
- ### Changed
147
+ ## 0.4.1 2017-01-23
84
148
 
85
- - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
86
149
 
87
150
  ### Fixed
88
151
 
89
152
  - Warnings on MRI 2.4.0 are gone (jtippett)
90
153
 
154
+ ### Changed
155
+
156
+ - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
157
+
91
158
  [Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-logic/compare/v0.4.0...v0.4.1)
92
159
 
93
- # v0.4.0 2016-09-21
160
+ ## 0.4.0 2016-09-21
94
161
 
95
162
  This is a partial rewrite focused on internal clean up and major performance improvements. This is also the beginning of the work to make this library first-class rather than "just" a rule backend for dry-validation and dry-types.
96
163
 
@@ -118,7 +185,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
118
185
 
119
186
  [Compare v0.3.0...v0.4.0](https://github.com/dry-rb/dry-logic/compare/v0.3.0...v0.4.0)
120
187
 
121
- # v0.3.0 2016-07-01
188
+ ## 0.3.0 2016-07-01
189
+
122
190
 
123
191
  ### Added
124
192
 
@@ -133,7 +201,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
133
201
 
134
202
  [Compare v0.2.3...v0.3.0](https://github.com/dry-rb/dry-logic/compare/v0.2.3...v0.3.0)
135
203
 
136
- # v0.2.3 2016-05-11
204
+ ## 0.2.3 2016-05-11
205
+
137
206
 
138
207
  ### Added
139
208
 
@@ -146,21 +215,28 @@ This is a partial rewrite focused on internal clean up and major performance imp
146
215
 
147
216
  [Compare v0.2.2...v0.2.3](https://github.com/dry-rb/dry-logic/compare/v0.2.2...v0.2.3)
148
217
 
149
- # v0.2.2 2016-03-30
218
+ ## 0.2.2 2016-03-30
219
+
150
220
 
151
221
  ### Added
152
222
 
153
223
  - `number?`, `odd?`, `even?` predicates (fran-worley)
154
224
 
225
+
155
226
  [Compare v0.2.1...v0.2.2](https://github.com/dry-rb/dry-logic/compare/v0.2.1...v0.2.2)
156
227
 
157
- # v0.2.1 2016-03-20
228
+ ## 0.2.1 2016-03-20
229
+
158
230
 
159
231
  ### Fixed
160
232
 
161
233
  - Result AST for `Rule::Each` correctly maps elements with eql inputs (solnic)
162
234
 
163
- # v0.2.0 2016-03-11
235
+
236
+ [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-logic/compare/v0.2.0...v0.2.1)
237
+
238
+ ## 0.2.0 2016-03-11
239
+
164
240
 
165
241
  ### Changed
166
242
 
@@ -168,16 +244,19 @@ This is a partial rewrite focused on internal clean up and major performance imp
168
244
 
169
245
  [Compare v0.1.4...v0.2.0](https://github.com/dry-rb/dry-logic/compare/v0.1.4...v0.2.0)
170
246
 
171
- # v0.1.4 2016-01-27
247
+ ## 0.1.4 2016-01-27
248
+
172
249
 
173
250
  ### Added
174
251
 
175
252
  - Support for hash-names in `Check` and `Result` which can properly resolve input
176
253
  from nested results (solnic)
177
254
 
255
+
178
256
  [Compare v0.1.3...v0.1.4](https://github.com/dry-rb/dry-logic/compare/v0.1.3...v0.1.4)
179
257
 
180
- # v0.1.3 2016-01-27
258
+ ## 0.1.3 2016-01-27
259
+
181
260
 
182
261
  ### Added
183
262
 
@@ -189,15 +268,18 @@ This is a partial rewrite focused on internal clean up and major performance imp
189
268
 
190
269
  [Compare v0.1.2...v0.1.3](https://github.com/dry-rb/dry-logic/compare/v0.1.2...v0.1.3)
191
270
 
192
- # v0.1.2 2016-01-19
271
+ ## 0.1.2 2016-01-19
272
+
193
273
 
194
274
  ### Fixed
195
275
 
196
276
  - `xor` returns wrapped results when used against another result-rule (solnic)
197
277
 
278
+
198
279
  [Compare v0.1.1...v0.1.2](https://github.com/dry-rb/dry-logic/compare/v0.1.1...v0.1.2)
199
280
 
200
- # v0.1.1 2016-01-18
281
+ ## 0.1.1 2016-01-18
282
+
201
283
 
202
284
  ### Added
203
285
 
@@ -205,8 +287,9 @@ This is a partial rewrite focused on internal clean up and major performance imp
205
287
  - `Rule::Result` which can be applied to a result object (solnic)
206
288
  - `true?` and `false?` predicates (solnic)
207
289
 
290
+
208
291
  [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-logic/compare/v0.1.0...v0.1.1)
209
292
 
210
- # v0.1.0 2016-01-11
293
+ ## 0.1.0 2016-01-11
211
294
 
212
295
  Code extracted from dry-validation 0.4.1
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 Ruby Object Mapper
3
+ Copyright (c) 2015-2020 dry-rb team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -1,30 +1,28 @@
1
1
  [gem]: https://rubygems.org/gems/dry-logic
2
- [travis]: https://travis-ci.com/dry-rb/dry-logic
3
- [codeclimate]: https://codeclimate.com/github/dry-rb/dry-logic
2
+ [actions]: https://github.com/dry-rb/dry-logic/actions
3
+ [codacy]: https://www.codacy.com/gh/dry-rb/dry-logic
4
4
  [chat]: https://dry-rb.zulipchat.com
5
5
  [inchpages]: http://inch-ci.org/github/dry-rb/dry-logic
6
6
 
7
7
  # dry-logic [![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-logic.svg)][gem]
10
- [![Build Status](https://travis-ci.com/dry-rb/dry-logic.svg?branch=master)][travis]
11
- [![Code Climate](https://codeclimate.com/github/dry-rb/dry-logic/badges/gpa.svg)][codeclimate]
12
- [![Test Coverage](https://codeclimate.com/github/dry-rb/dry-logic/badges/coverage.svg)][codeclimate]
10
+ [![CI Status](https://github.com/dry-rb/dry-logic/workflows/ci/badge.svg)][actions]
11
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3ac6ea12c2dd42beb36dc3abe63d9606)][codacy]
12
+ [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/3ac6ea12c2dd42beb36dc3abe63d9606)][codacy]
13
13
  [![Inline docs](http://inch-ci.org/github/dry-rb/dry-logic.svg?branch=master)][inchpages]
14
14
 
15
- Predicate logic and rule composition used by:
16
-
17
- * [dry-types](https://github.com/dry-rb/dry-types) for constrained types
18
- * [dry-schema](https://github.com/dry-rb/dry-schema) and [dry-validation](https://github.com/dry-rb/dry-validation) for composing validation rules
19
- * your project...?
20
-
21
15
  ## Links
22
16
 
23
- * [Documentation](http://dry-rb.org/gems/dry-logic)
17
+ * [User documentation](http://dry-rb.org/gems/dry-logic)
18
+ * [API documentation](http://rubydoc.info/gems/dry-logic)
19
+
20
+ ## Supported Ruby versions
24
21
 
25
- ## Contributing
22
+ This library officially supports the following Ruby versions:
26
23
 
27
- Bug reports and pull requests are welcome on GitHub at https://github.com/dry-rb/dry-logic.
24
+ * MRI >= `2.4`
25
+ * jruby >= `9.2`
28
26
 
29
27
  ## License
30
28
 
@@ -1,26 +1,38 @@
1
1
  # frozen_string_literal: true
2
+ # this file is managed by dry-rb/devtools project
2
3
 
3
- require File.expand_path('../lib/dry/logic/version', __FILE__)
4
+ lib = File.expand_path('lib', __dir__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'dry/logic/version'
4
7
 
5
8
  Gem::Specification.new do |spec|
6
9
  spec.name = 'dry-logic'
7
- spec.version = Dry::Logic::VERSION
8
- spec.authors = ['Piotr Solnica']
9
- spec.email = ['piotr.solnica@gmail.com']
10
- spec.summary = 'Predicate logic with rule composition'
11
- spec.homepage = 'https://github.com/dry-rb/dry-logic'
10
+ spec.authors = ["Piotr Solnica"]
11
+ spec.email = ["piotr.solnica@gmail.com"]
12
12
  spec.license = 'MIT'
13
+ spec.version = Dry::Logic::VERSION.dup
13
14
 
14
- spec.files = `git ls-files -z`.split("\x0")
15
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.summary = "Predicate logic with rule composition"
16
+ spec.description = spec.summary
17
+ spec.homepage = 'https://dry-rb.org/gems/dry-logic'
18
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-logic.gemspec", "lib/**/*"]
19
+ spec.bindir = 'bin'
20
+ spec.executables = []
16
21
  spec.require_paths = ['lib']
17
- spec.required_ruby_version = '>= 2.4.0'
18
22
 
19
- spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
20
- spec.add_runtime_dependency 'dry-core', '~> 0.2'
21
- spec.add_runtime_dependency 'dry-equalizer', '~> 0.2'
23
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/dry-rb/dry-logic/blob/master/CHANGELOG.md'
25
+ spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-logic'
26
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-logic/issues'
22
27
 
23
- spec.add_development_dependency 'bundler'
24
- spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'rspec'
28
+ spec.required_ruby_version = ">= 2.4.0"
29
+
30
+ # to update dependencies edit project.yml
31
+ spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
32
+ spec.add_runtime_dependency "dry-core", "~> 0.2"
33
+ spec.add_runtime_dependency "dry-equalizer", "~> 0.2"
34
+
35
+ spec.add_development_dependency "bundler"
36
+ spec.add_development_dependency "rake"
37
+ spec.add_development_dependency "rspec"
26
38
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/logic'
3
+ require "dry/logic"
@@ -7,5 +7,5 @@ module Dry
7
7
  end
8
8
  end
9
9
 
10
- require 'dry/logic/rule/predicate'
11
- require 'dry/logic/operations'
10
+ require "dry/logic/rule/predicate"
11
+ require "dry/logic/operations"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/equalizer'
3
+ require "dry/equalizer"
4
4
 
5
5
  module Dry
6
6
  module Logic
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/logic/operations/and'
4
- require 'dry/logic/operations/or'
5
- require 'dry/logic/operations/xor'
6
- require 'dry/logic/operations/implication'
7
- require 'dry/logic/operations/negation'
3
+ require "dry/logic/operations/and"
4
+ require "dry/logic/operations/or"
5
+ require "dry/logic/operations/xor"
6
+ require "dry/logic/operations/implication"
7
+ require "dry/logic/operations/negation"
8
8
 
9
- require 'dry/logic/operations/key'
10
- require 'dry/logic/operations/attr'
11
- require 'dry/logic/operations/each'
12
- require 'dry/logic/operations/set'
13
- require 'dry/logic/operations/check'
9
+ require "dry/logic/operations/key"
10
+ require "dry/logic/operations/attr"
11
+ require "dry/logic/operations/each"
12
+ require "dry/logic/operations/set"
13
+ require "dry/logic/operations/check"
14
14
 
15
- require 'dry/logic/operators'
15
+ require "dry/logic/operators"