dry-logic 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +113 -25
  3. data/LICENSE +1 -1
  4. data/README.md +12 -14
  5. data/dry-logic.gemspec +26 -20
  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 +3 -3
  11. data/lib/dry/logic/operations/and.rb +3 -3
  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 +3 -3
  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 +3 -3
  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 +8 -8
  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 +17 -166
  32. data/.codeclimate.yml +0 -12
  33. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  34. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -34
  35. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  36. data/.github/workflows/ci.yml +0 -70
  37. data/.github/workflows/docsite.yml +0 -34
  38. data/.github/workflows/sync_configs.yml +0 -34
  39. data/.gitignore +0 -9
  40. data/.rspec +0 -4
  41. data/.rubocop.yml +0 -89
  42. data/CODE_OF_CONDUCT.md +0 -13
  43. data/CONTRIBUTING.md +0 -29
  44. data/Gemfile +0 -16
  45. data/Rakefile +0 -14
  46. data/benchmarks/rule_application.rb +0 -30
  47. data/benchmarks/setup.rb +0 -13
  48. data/bin/console +0 -11
  49. data/docsite/source/index.html.md +0 -54
  50. data/docsite/source/operations.html.md +0 -62
  51. data/docsite/source/predicates.html.md +0 -102
  52. data/examples/basic.rb +0 -16
  53. data/spec/integration/result_spec.rb +0 -61
  54. data/spec/integration/rule_spec.rb +0 -55
  55. data/spec/shared/predicates.rb +0 -59
  56. data/spec/shared/rule.rb +0 -74
  57. data/spec/spec_helper.rb +0 -30
  58. data/spec/support/mutant.rb +0 -11
  59. data/spec/unit/operations/and_spec.rb +0 -70
  60. data/spec/unit/operations/attr_spec.rb +0 -29
  61. data/spec/unit/operations/check_spec.rb +0 -51
  62. data/spec/unit/operations/each_spec.rb +0 -49
  63. data/spec/unit/operations/implication_spec.rb +0 -32
  64. data/spec/unit/operations/key_spec.rb +0 -135
  65. data/spec/unit/operations/negation_spec.rb +0 -51
  66. data/spec/unit/operations/or_spec.rb +0 -75
  67. data/spec/unit/operations/set_spec.rb +0 -43
  68. data/spec/unit/operations/xor_spec.rb +0 -63
  69. data/spec/unit/predicates/array_spec.rb +0 -43
  70. data/spec/unit/predicates/attr_spec.rb +0 -31
  71. data/spec/unit/predicates/bool_spec.rb +0 -36
  72. data/spec/unit/predicates/bytesize_spec.rb +0 -48
  73. data/spec/unit/predicates/case_spec.rb +0 -35
  74. data/spec/unit/predicates/date_spec.rb +0 -33
  75. data/spec/unit/predicates/date_time_spec.rb +0 -33
  76. data/spec/unit/predicates/decimal_spec.rb +0 -34
  77. data/spec/unit/predicates/empty_spec.rb +0 -40
  78. data/spec/unit/predicates/eql_spec.rb +0 -23
  79. data/spec/unit/predicates/even_spec.rb +0 -33
  80. data/spec/unit/predicates/excluded_from_spec.rb +0 -37
  81. data/spec/unit/predicates/excludes_spec.rb +0 -58
  82. data/spec/unit/predicates/false_spec.rb +0 -37
  83. data/spec/unit/predicates/filled_spec.rb +0 -40
  84. data/spec/unit/predicates/float_spec.rb +0 -33
  85. data/spec/unit/predicates/format_spec.rb +0 -23
  86. data/spec/unit/predicates/gt_spec.rb +0 -42
  87. data/spec/unit/predicates/gteq_spec.rb +0 -42
  88. data/spec/unit/predicates/hash_spec.rb +0 -40
  89. data/spec/unit/predicates/included_in_spec.rb +0 -37
  90. data/spec/unit/predicates/includes_spec.rb +0 -24
  91. data/spec/unit/predicates/int_spec.rb +0 -36
  92. data/spec/unit/predicates/key_spec.rb +0 -31
  93. data/spec/unit/predicates/lt_spec.rb +0 -42
  94. data/spec/unit/predicates/lteq_spec.rb +0 -42
  95. data/spec/unit/predicates/max_bytesize_spec.rb +0 -39
  96. data/spec/unit/predicates/max_size_spec.rb +0 -51
  97. data/spec/unit/predicates/min_bytesize_spec.rb +0 -39
  98. data/spec/unit/predicates/min_size_spec.rb +0 -51
  99. data/spec/unit/predicates/none_spec.rb +0 -30
  100. data/spec/unit/predicates/not_eql_spec.rb +0 -23
  101. data/spec/unit/predicates/number_spec.rb +0 -39
  102. data/spec/unit/predicates/odd_spec.rb +0 -33
  103. data/spec/unit/predicates/respond_to_spec.rb +0 -31
  104. data/spec/unit/predicates/size_spec.rb +0 -57
  105. data/spec/unit/predicates/str_spec.rb +0 -34
  106. data/spec/unit/predicates/time_spec.rb +0 -33
  107. data/spec/unit/predicates/true_spec.rb +0 -37
  108. data/spec/unit/predicates/type_spec.rb +0 -37
  109. data/spec/unit/predicates/uuid_v4_spec.rb +0 -29
  110. data/spec/unit/predicates_spec.rb +0 -25
  111. data/spec/unit/rule/predicate_spec.rb +0 -55
  112. data/spec/unit/rule_compiler_spec.rb +0 -129
  113. data/spec/unit/rule_spec.rb +0 -213
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a7700d85d1b92e3f0ddb2625b7c01e420101b33ae39ee12d1dcc342d22471d0
4
- data.tar.gz: 5324d7fa8ef310acdfe0de371ab7c7ac28fee9454a8a339a5cfad3170fc1527e
3
+ metadata.gz: 35900556fff5ca088cf3f66f319d770c4e15ba1f91a2298a1db096498ea01fb4
4
+ data.tar.gz: 942707a00d2f4424d2cd737e042877af2b15cf8a621564b463c254b98a72f9df
5
5
  SHA512:
6
- metadata.gz: 89917d5c3c0b0d2f988db144b66d898606a8a2aae27f92c681bdb99646601236e63a08bce58a07bf6e50bad27c3458b89c3a3aaa73745266c83fe6008852da02
7
- data.tar.gz: 7d3635146104a74a58f60ee2b819ae61a568fd936b3abe0a93eeb3e908b7658c0613bdcda9c5cbb423d2434039ccdcdc221fd316ea6dec15029396d2888e3d5b
6
+ metadata.gz: 37f3b82b384a0b34b51f966665e5b74c7b9834e25a02ca6f096d7bfac4b0de100d023341aeba212ddee1c8b9a1e5a2281c25db6ba66058b9884cc926f95520e1
7
+ data.tar.gz: 174ec949de041f18c8a8b95b2e8db5c483e949e30be69da09f02032a29d2ee7ff3f823d44269e63b45c8ac201f75c4c1b520a02f2c6fbf6435dd725c729eba72
@@ -1,10 +1,67 @@
1
- # v1.0.4 2019-11-06
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
+
3
+ ## 1.1.0 2020-12-26
4
+
5
+
6
+ ### Changed
7
+
8
+ - Switched to equalizer from dry-core (@solnic)
9
+
10
+ [Compare v1.0.8...v1.1.0](https://github.com/dry-rb/dry-logic/compare/v1.0.8...v1.1.0)
11
+
12
+ ## 1.0.8 2020-09-28
13
+
14
+
15
+ ### Fixed
16
+
17
+ - Better Ruby 3 support with fixed specialization for rules of negative arity (@flash-gordon)
18
+
19
+
20
+ [Compare v1.0.7...v1.0.8](https://github.com/dry-rb/dry-logic/compare/v1.0.7...v1.0.8)
21
+
22
+ ## 1.0.7 2020-08-13
23
+
24
+
25
+ ### Added
26
+
27
+ - A new `uri?` predicate that you can use to verify `URI` strings, ie `uri?("https", "https://dry-rb.org")` (@nerburish)
28
+ - New predicates: `uuid_v1?`, `uuid_v2?`, `uuid_v3?` and `uuid_v5?` (via #75) (@jamesbrauman)
29
+
30
+
31
+ [Compare v1.0.6...v1.0.7](https://github.com/dry-rb/dry-logic/compare/v1.0.6...v1.0.7)
32
+
33
+ ## 1.0.6 2020-02-10
34
+
35
+
36
+ ### Fixed
37
+
38
+ - Made the regexp used by `uuid_v4?` more secure (@kml)
39
+
40
+
41
+ [Compare v1.0.5...v1.0.6](https://github.com/dry-rb/dry-logic/compare/v1.0.5...v1.0.6)
42
+
43
+ ## 1.0.5 2019-11-07
44
+
45
+
46
+ ### Fixed
47
+
48
+ - 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)
49
+
50
+
51
+ [Compare v1.0.4...v1.0.5](https://github.com/dry-rb/dry-logic/compare/v1.0.4...v1.0.5)
52
+
53
+ ## 1.0.4 2019-11-06
54
+
55
+
56
+ ### Fixed
2
57
 
3
58
  - Fix keyword warnings (@flash-gordon)
4
59
 
60
+
5
61
  [Compare v1.0.3...v1.0.4](https://github.com/dry-rb/dry-logic/compare/v1.0.3...v1.0.4)
6
62
 
7
- # v1.0.3 2019-08-01
63
+ ## 1.0.3 2019-08-01
64
+
8
65
 
9
66
  ### Added
10
67
 
@@ -18,36 +75,46 @@
18
75
 
19
76
  [Compare v1.0.2...v1.0.3](https://github.com/dry-rb/dry-logic/compare/v1.0.2...v1.0.3)
20
77
 
21
- # v1.0.2 2019-06-14
78
+ ## 1.0.2 2019-06-14
22
79
 
23
80
  Re-pushed 1.0.1 after dry-schema 1.2.0 release.
24
81
 
82
+
25
83
  [Compare v1.0.1...v1.0.2](https://github.com/dry-rb/dry-logic/compare/v1.0.1...v1.0.2)
26
84
 
27
- # v1.0.1 2019-06-04 (yanked)
85
+ ## 1.0.1 2019-06-04
86
+
87
+ This release was removed from rubygems because it broke dry-schema.
28
88
 
29
89
  ### Added
30
90
 
31
91
  - `uuid_v4?` predicate (radar)
32
92
  - `respond_to?` predicate (waiting-for-dev)
33
93
 
94
+
34
95
  [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-logic/compare/v1.0.0...v1.0.1)
35
96
 
36
- This release was removed from rubygems because it broke dry-schema.
97
+ ## 1.0.0 2019-04-23
98
+
37
99
 
38
- # v1.0.0 2019-04-23
100
+ ### Changed
39
101
 
40
102
  - Version bump to `1.0.0` (flash-gordon)
41
103
 
42
104
  [Compare v0.6.1...v1.0.0](https://github.com/dry-rb/dry-logic/compare/v0.6.1...v1.0.0)
43
105
 
44
- # v0.6.1 2019-04-18
106
+ ## 0.6.1 2019-04-18
107
+
108
+
109
+ ### Fixed
45
110
 
46
111
  - Fix a regression in dry-validation 0.x for argument-less predicates (flash-gordon)
47
112
 
113
+
48
114
  [Compare v0.6.0...v0.6.1](https://github.com/dry-rb/dry-logic/compare/v0.6.0...v0.6.1)
49
115
 
50
- # v0.6.0 2019-04-04
116
+ ## 0.6.0 2019-04-04
117
+
51
118
 
52
119
  ### Added
53
120
 
@@ -59,7 +126,8 @@ This release was removed from rubygems because it broke dry-schema.
59
126
 
60
127
  [Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-logic/compare/v0.5.0...v0.6.0)
61
128
 
62
- # v0.5.0 2019-01-29
129
+ ## 0.5.0 2019-01-29
130
+
63
131
 
64
132
  ### Added
65
133
 
@@ -69,9 +137,11 @@ This release was removed from rubygems because it broke dry-schema.
69
137
 
70
138
  - `Operation::Key#ast` will now return a correct AST with non-Undefined inputs (solnic)
71
139
 
140
+
72
141
  [Compare v0.4.2...v0.5.0](https://github.com/dry-rb/dry-logic/compare/v0.4.2...v0.5.0)
73
142
 
74
- # v0.4.2 2017-09-15
143
+ ## 0.4.2 2017-09-15
144
+
75
145
 
76
146
  ### Added
77
147
 
@@ -82,21 +152,23 @@ This release was removed from rubygems because it broke dry-schema.
82
152
 
83
153
  - A bug with using custom predicates within a standalone module in `dry-validation` (flash-gordon)
84
154
 
155
+
85
156
  [Compare v0.4.1...v0.4.2](https://github.com/dry-rb/dry-logic/compare/v0.4.1...v0.4.2)
86
157
 
87
- # v0.4.1 2017-01-23
158
+ ## 0.4.1 2017-01-23
88
159
 
89
- ### Changed
90
-
91
- - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
92
160
 
93
161
  ### Fixed
94
162
 
95
163
  - Warnings on MRI 2.4.0 are gone (jtippett)
96
164
 
165
+ ### Changed
166
+
167
+ - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
168
+
97
169
  [Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-logic/compare/v0.4.0...v0.4.1)
98
170
 
99
- # v0.4.0 2016-09-21
171
+ ## 0.4.0 2016-09-21
100
172
 
101
173
  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.
102
174
 
@@ -124,7 +196,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
124
196
 
125
197
  [Compare v0.3.0...v0.4.0](https://github.com/dry-rb/dry-logic/compare/v0.3.0...v0.4.0)
126
198
 
127
- # v0.3.0 2016-07-01
199
+ ## 0.3.0 2016-07-01
200
+
128
201
 
129
202
  ### Added
130
203
 
@@ -139,7 +212,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
139
212
 
140
213
  [Compare v0.2.3...v0.3.0](https://github.com/dry-rb/dry-logic/compare/v0.2.3...v0.3.0)
141
214
 
142
- # v0.2.3 2016-05-11
215
+ ## 0.2.3 2016-05-11
216
+
143
217
 
144
218
  ### Added
145
219
 
@@ -152,21 +226,28 @@ This is a partial rewrite focused on internal clean up and major performance imp
152
226
 
153
227
  [Compare v0.2.2...v0.2.3](https://github.com/dry-rb/dry-logic/compare/v0.2.2...v0.2.3)
154
228
 
155
- # v0.2.2 2016-03-30
229
+ ## 0.2.2 2016-03-30
230
+
156
231
 
157
232
  ### Added
158
233
 
159
234
  - `number?`, `odd?`, `even?` predicates (fran-worley)
160
235
 
236
+
161
237
  [Compare v0.2.1...v0.2.2](https://github.com/dry-rb/dry-logic/compare/v0.2.1...v0.2.2)
162
238
 
163
- # v0.2.1 2016-03-20
239
+ ## 0.2.1 2016-03-20
240
+
164
241
 
165
242
  ### Fixed
166
243
 
167
244
  - Result AST for `Rule::Each` correctly maps elements with eql inputs (solnic)
168
245
 
169
- # v0.2.0 2016-03-11
246
+
247
+ [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-logic/compare/v0.2.0...v0.2.1)
248
+
249
+ ## 0.2.0 2016-03-11
250
+
170
251
 
171
252
  ### Changed
172
253
 
@@ -174,16 +255,19 @@ This is a partial rewrite focused on internal clean up and major performance imp
174
255
 
175
256
  [Compare v0.1.4...v0.2.0](https://github.com/dry-rb/dry-logic/compare/v0.1.4...v0.2.0)
176
257
 
177
- # v0.1.4 2016-01-27
258
+ ## 0.1.4 2016-01-27
259
+
178
260
 
179
261
  ### Added
180
262
 
181
263
  - Support for hash-names in `Check` and `Result` which can properly resolve input
182
264
  from nested results (solnic)
183
265
 
266
+
184
267
  [Compare v0.1.3...v0.1.4](https://github.com/dry-rb/dry-logic/compare/v0.1.3...v0.1.4)
185
268
 
186
- # v0.1.3 2016-01-27
269
+ ## 0.1.3 2016-01-27
270
+
187
271
 
188
272
  ### Added
189
273
 
@@ -195,15 +279,18 @@ This is a partial rewrite focused on internal clean up and major performance imp
195
279
 
196
280
  [Compare v0.1.2...v0.1.3](https://github.com/dry-rb/dry-logic/compare/v0.1.2...v0.1.3)
197
281
 
198
- # v0.1.2 2016-01-19
282
+ ## 0.1.2 2016-01-19
283
+
199
284
 
200
285
  ### Fixed
201
286
 
202
287
  - `xor` returns wrapped results when used against another result-rule (solnic)
203
288
 
289
+
204
290
  [Compare v0.1.1...v0.1.2](https://github.com/dry-rb/dry-logic/compare/v0.1.1...v0.1.2)
205
291
 
206
- # v0.1.1 2016-01-18
292
+ ## 0.1.1 2016-01-18
293
+
207
294
 
208
295
  ### Added
209
296
 
@@ -211,8 +298,9 @@ This is a partial rewrite focused on internal clean up and major performance imp
211
298
  - `Rule::Result` which can be applied to a result object (solnic)
212
299
  - `true?` and `false?` predicates (solnic)
213
300
 
301
+
214
302
  [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-logic/compare/v0.1.0...v0.1.1)
215
303
 
216
- # v0.1.0 2016-01-11
304
+ ## 0.1.0 2016-01-11
217
305
 
218
306
  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) 2015-2019 dry-rb team
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
- [ci]: https://github.com/dry-rb/dry-logic/actions?query=workflow%3Aci
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://github.com/dry-rb/dry-logic/workflows/ci/badge.svg)][ci]
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.5`
25
+ * jruby >= `9.2`
28
26
 
29
27
  ## License
30
28
 
@@ -1,31 +1,37 @@
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
-
19
- spec.metadata = {
20
- 'source_code_uri' => 'https://github.com/dry-rb/dry-logic',
21
- 'changelog_uri' => 'https://github.com/dry-rb/dry-logic/blob/master/CHANGELOG.md'
22
- }
23
22
 
24
- spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
25
- spec.add_runtime_dependency 'dry-core', '~> 0.2'
26
- 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'
27
27
 
28
- spec.add_development_dependency 'bundler'
29
- spec.add_development_dependency 'rake'
30
- spec.add_development_dependency 'rspec'
28
+ spec.required_ruby_version = ">= 2.5.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.5", ">= 0.5"
33
+
34
+ spec.add_development_dependency "bundler"
35
+ spec.add_development_dependency "rake"
36
+ spec.add_development_dependency "rspec"
31
37
  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/core/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"