dry-logic 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +76 -26
  3. data/LICENSE +1 -1
  4. data/README.md +12 -14
  5. data/dry-logic.gemspec +27 -20
  6. data/lib/dry/logic/predicates.rb +1 -1
  7. data/lib/dry/logic/rule/interface.rb +1 -1
  8. data/lib/dry/logic/version.rb +1 -1
  9. metadata +9 -150
  10. data/.codeclimate.yml +0 -12
  11. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  12. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -34
  13. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  14. data/.github/workflows/ci.yml +0 -70
  15. data/.github/workflows/docsite.yml +0 -34
  16. data/.github/workflows/sync_configs.yml +0 -34
  17. data/.gitignore +0 -9
  18. data/.rspec +0 -4
  19. data/.rubocop.yml +0 -89
  20. data/CODE_OF_CONDUCT.md +0 -13
  21. data/CONTRIBUTING.md +0 -29
  22. data/Gemfile +0 -16
  23. data/Rakefile +0 -14
  24. data/benchmarks/rule_application.rb +0 -30
  25. data/benchmarks/setup.rb +0 -13
  26. data/bin/console +0 -11
  27. data/docsite/source/index.html.md +0 -54
  28. data/docsite/source/operations.html.md +0 -62
  29. data/docsite/source/predicates.html.md +0 -102
  30. data/examples/basic.rb +0 -16
  31. data/spec/integration/result_spec.rb +0 -61
  32. data/spec/integration/rule_spec.rb +0 -55
  33. data/spec/shared/predicates.rb +0 -59
  34. data/spec/shared/rule.rb +0 -74
  35. data/spec/spec_helper.rb +0 -30
  36. data/spec/support/mutant.rb +0 -11
  37. data/spec/unit/operations/and_spec.rb +0 -70
  38. data/spec/unit/operations/attr_spec.rb +0 -29
  39. data/spec/unit/operations/check_spec.rb +0 -51
  40. data/spec/unit/operations/each_spec.rb +0 -49
  41. data/spec/unit/operations/implication_spec.rb +0 -32
  42. data/spec/unit/operations/key_spec.rb +0 -135
  43. data/spec/unit/operations/negation_spec.rb +0 -51
  44. data/spec/unit/operations/or_spec.rb +0 -75
  45. data/spec/unit/operations/set_spec.rb +0 -43
  46. data/spec/unit/operations/xor_spec.rb +0 -63
  47. data/spec/unit/predicates/array_spec.rb +0 -43
  48. data/spec/unit/predicates/attr_spec.rb +0 -31
  49. data/spec/unit/predicates/bool_spec.rb +0 -36
  50. data/spec/unit/predicates/bytesize_spec.rb +0 -48
  51. data/spec/unit/predicates/case_spec.rb +0 -35
  52. data/spec/unit/predicates/date_spec.rb +0 -33
  53. data/spec/unit/predicates/date_time_spec.rb +0 -33
  54. data/spec/unit/predicates/decimal_spec.rb +0 -34
  55. data/spec/unit/predicates/empty_spec.rb +0 -40
  56. data/spec/unit/predicates/eql_spec.rb +0 -23
  57. data/spec/unit/predicates/even_spec.rb +0 -33
  58. data/spec/unit/predicates/excluded_from_spec.rb +0 -37
  59. data/spec/unit/predicates/excludes_spec.rb +0 -58
  60. data/spec/unit/predicates/false_spec.rb +0 -37
  61. data/spec/unit/predicates/filled_spec.rb +0 -40
  62. data/spec/unit/predicates/float_spec.rb +0 -33
  63. data/spec/unit/predicates/format_spec.rb +0 -31
  64. data/spec/unit/predicates/gt_spec.rb +0 -42
  65. data/spec/unit/predicates/gteq_spec.rb +0 -42
  66. data/spec/unit/predicates/hash_spec.rb +0 -40
  67. data/spec/unit/predicates/included_in_spec.rb +0 -37
  68. data/spec/unit/predicates/includes_spec.rb +0 -24
  69. data/spec/unit/predicates/int_spec.rb +0 -36
  70. data/spec/unit/predicates/key_spec.rb +0 -31
  71. data/spec/unit/predicates/lt_spec.rb +0 -42
  72. data/spec/unit/predicates/lteq_spec.rb +0 -42
  73. data/spec/unit/predicates/max_bytesize_spec.rb +0 -39
  74. data/spec/unit/predicates/max_size_spec.rb +0 -51
  75. data/spec/unit/predicates/min_bytesize_spec.rb +0 -39
  76. data/spec/unit/predicates/min_size_spec.rb +0 -51
  77. data/spec/unit/predicates/none_spec.rb +0 -30
  78. data/spec/unit/predicates/not_eql_spec.rb +0 -23
  79. data/spec/unit/predicates/number_spec.rb +0 -39
  80. data/spec/unit/predicates/odd_spec.rb +0 -33
  81. data/spec/unit/predicates/respond_to_spec.rb +0 -31
  82. data/spec/unit/predicates/size_spec.rb +0 -57
  83. data/spec/unit/predicates/str_spec.rb +0 -34
  84. data/spec/unit/predicates/time_spec.rb +0 -33
  85. data/spec/unit/predicates/true_spec.rb +0 -37
  86. data/spec/unit/predicates/type_spec.rb +0 -37
  87. data/spec/unit/predicates/uuid_v4_spec.rb +0 -29
  88. data/spec/unit/predicates_spec.rb +0 -25
  89. data/spec/unit/rule/predicate_spec.rb +0 -55
  90. data/spec/unit/rule_compiler_spec.rb +0 -129
  91. data/spec/unit/rule_spec.rb +0 -213
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eaa5ac48636ac8735eb5acfd455b0a6cc23887730500a3738a0e6b79b105187
4
- data.tar.gz: 98d6ba8d611d80f4a1eb0ef3aa52dfcf976ef46ceabe92040f9090caaa98a4cb
3
+ metadata.gz: a6c0b350baaf47853027db9d61e790c195ced412ff40a9ecaac56b6588172da3
4
+ data.tar.gz: 966f1daee610a4eea2eae78743e8e17f0e57084b1106fd3f033483329895a4a1
5
5
  SHA512:
6
- metadata.gz: 9de80f29b7ee5b3d8303a6834a94f20442ac3c78d9c90b634c91a7d6d7e620a5c96eea6d7142fbe361561d5076261f8ec54d0cfd6ebbdd05926a4b59d77b1919
7
- data.tar.gz: 56ed2dc66cd66fd80d7437c5f75adee53dcfbb8e721b1d83a87d1e6fca35fab3dd8bb04f7cdb00c35c64d70f8d0685bed2900b2835bc7f710cacda8e034aa0f0
6
+ metadata.gz: 98002481f3e8cc83affa67ff7b3f8e69b22836f0737112bba1d4c656f39cbc06d9657bdb7865326fb9b6531660a9fd260b60d18d2062d9d149a97f25154a3974
7
+ data.tar.gz: cc6163b44e7e2ef296901e35085fa42290ad8b4b936237e26409f7f71d90041e12472322319d3dc8553fb46dcf532b2747b68b1d3a5cd46e81bb94fb298cf56c
@@ -1,16 +1,35 @@
1
- # v1.0.5 2019-11-07
1
+ ## 1.0.6 2020-02-10
2
+
3
+
4
+ ### Fixed
5
+
6
+ - Made the regexp used by `uuid_v4?` more secure (@kml)
7
+
8
+
9
+ [Compare v1.0.5...v1.0.6](https://github.com/dry-rb/dry-logic/compare/v1.0.5...v1.0.6)
10
+
11
+ ## 1.0.5 2019-11-07
12
+
13
+
14
+ ### Fixed
2
15
 
3
16
  - 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)
4
17
 
18
+
5
19
  [Compare v1.0.4...v1.0.5](https://github.com/dry-rb/dry-logic/compare/v1.0.4...v1.0.5)
6
20
 
7
- # v1.0.4 2019-11-06
21
+ ## 1.0.4 2019-11-06
22
+
23
+
24
+ ### Fixed
8
25
 
9
26
  - Fix keyword warnings (@flash-gordon)
10
27
 
28
+
11
29
  [Compare v1.0.3...v1.0.4](https://github.com/dry-rb/dry-logic/compare/v1.0.3...v1.0.4)
12
30
 
13
- # v1.0.3 2019-08-01
31
+ ## 1.0.3 2019-08-01
32
+
14
33
 
15
34
  ### Added
16
35
 
@@ -24,36 +43,46 @@
24
43
 
25
44
  [Compare v1.0.2...v1.0.3](https://github.com/dry-rb/dry-logic/compare/v1.0.2...v1.0.3)
26
45
 
27
- # v1.0.2 2019-06-14
46
+ ## 1.0.2 2019-06-14
28
47
 
29
48
  Re-pushed 1.0.1 after dry-schema 1.2.0 release.
30
49
 
50
+
31
51
  [Compare v1.0.1...v1.0.2](https://github.com/dry-rb/dry-logic/compare/v1.0.1...v1.0.2)
32
52
 
33
- # v1.0.1 2019-06-04 (yanked)
53
+ ## 1.0.1 2019-06-04
54
+
55
+ This release was removed from rubygems because it broke dry-schema.
34
56
 
35
57
  ### Added
36
58
 
37
59
  - `uuid_v4?` predicate (radar)
38
60
  - `respond_to?` predicate (waiting-for-dev)
39
61
 
62
+
40
63
  [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-logic/compare/v1.0.0...v1.0.1)
41
64
 
42
- This release was removed from rubygems because it broke dry-schema.
65
+ ## 1.0.0 2019-04-23
43
66
 
44
- # v1.0.0 2019-04-23
67
+
68
+ ### Changed
45
69
 
46
70
  - Version bump to `1.0.0` (flash-gordon)
47
71
 
48
72
  [Compare v0.6.1...v1.0.0](https://github.com/dry-rb/dry-logic/compare/v0.6.1...v1.0.0)
49
73
 
50
- # v0.6.1 2019-04-18
74
+ ## 0.6.1 2019-04-18
75
+
76
+
77
+ ### Fixed
51
78
 
52
79
  - Fix a regression in dry-validation 0.x for argument-less predicates (flash-gordon)
53
80
 
81
+
54
82
  [Compare v0.6.0...v0.6.1](https://github.com/dry-rb/dry-logic/compare/v0.6.0...v0.6.1)
55
83
 
56
- # v0.6.0 2019-04-04
84
+ ## 0.6.0 2019-04-04
85
+
57
86
 
58
87
  ### Added
59
88
 
@@ -65,7 +94,8 @@ This release was removed from rubygems because it broke dry-schema.
65
94
 
66
95
  [Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-logic/compare/v0.5.0...v0.6.0)
67
96
 
68
- # v0.5.0 2019-01-29
97
+ ## 0.5.0 2019-01-29
98
+
69
99
 
70
100
  ### Added
71
101
 
@@ -75,9 +105,11 @@ This release was removed from rubygems because it broke dry-schema.
75
105
 
76
106
  - `Operation::Key#ast` will now return a correct AST with non-Undefined inputs (solnic)
77
107
 
108
+
78
109
  [Compare v0.4.2...v0.5.0](https://github.com/dry-rb/dry-logic/compare/v0.4.2...v0.5.0)
79
110
 
80
- # v0.4.2 2017-09-15
111
+ ## 0.4.2 2017-09-15
112
+
81
113
 
82
114
  ### Added
83
115
 
@@ -88,21 +120,23 @@ This release was removed from rubygems because it broke dry-schema.
88
120
 
89
121
  - A bug with using custom predicates within a standalone module in `dry-validation` (flash-gordon)
90
122
 
91
- [Compare v0.4.1...v0.4.2](https://github.com/dry-rb/dry-logic/compare/v0.4.1...v0.4.2)
92
123
 
93
- # v0.4.1 2017-01-23
124
+ [Compare v0.4.1...v0.4.2](https://github.com/dry-rb/dry-logic/compare/v0.4.1...v0.4.2)
94
125
 
95
- ### Changed
126
+ ## 0.4.1 2017-01-23
96
127
 
97
- - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
98
128
 
99
129
  ### Fixed
100
130
 
101
131
  - Warnings on MRI 2.4.0 are gone (jtippett)
102
132
 
133
+ ### Changed
134
+
135
+ - Predicates simply reuse other predicate methods instead of referring to them via `#[]` (georgemillo)
136
+
103
137
  [Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-logic/compare/v0.4.0...v0.4.1)
104
138
 
105
- # v0.4.0 2016-09-21
139
+ ## 0.4.0 2016-09-21
106
140
 
107
141
  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.
108
142
 
@@ -130,7 +164,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
130
164
 
131
165
  [Compare v0.3.0...v0.4.0](https://github.com/dry-rb/dry-logic/compare/v0.3.0...v0.4.0)
132
166
 
133
- # v0.3.0 2016-07-01
167
+ ## 0.3.0 2016-07-01
168
+
134
169
 
135
170
  ### Added
136
171
 
@@ -145,7 +180,8 @@ This is a partial rewrite focused on internal clean up and major performance imp
145
180
 
146
181
  [Compare v0.2.3...v0.3.0](https://github.com/dry-rb/dry-logic/compare/v0.2.3...v0.3.0)
147
182
 
148
- # v0.2.3 2016-05-11
183
+ ## 0.2.3 2016-05-11
184
+
149
185
 
150
186
  ### Added
151
187
 
@@ -158,21 +194,28 @@ This is a partial rewrite focused on internal clean up and major performance imp
158
194
 
159
195
  [Compare v0.2.2...v0.2.3](https://github.com/dry-rb/dry-logic/compare/v0.2.2...v0.2.3)
160
196
 
161
- # v0.2.2 2016-03-30
197
+ ## 0.2.2 2016-03-30
198
+
162
199
 
163
200
  ### Added
164
201
 
165
202
  - `number?`, `odd?`, `even?` predicates (fran-worley)
166
203
 
204
+
167
205
  [Compare v0.2.1...v0.2.2](https://github.com/dry-rb/dry-logic/compare/v0.2.1...v0.2.2)
168
206
 
169
- # v0.2.1 2016-03-20
207
+ ## 0.2.1 2016-03-20
208
+
170
209
 
171
210
  ### Fixed
172
211
 
173
212
  - Result AST for `Rule::Each` correctly maps elements with eql inputs (solnic)
174
213
 
175
- # v0.2.0 2016-03-11
214
+
215
+ [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-logic/compare/v0.2.0...v0.2.1)
216
+
217
+ ## 0.2.0 2016-03-11
218
+
176
219
 
177
220
  ### Changed
178
221
 
@@ -180,16 +223,19 @@ This is a partial rewrite focused on internal clean up and major performance imp
180
223
 
181
224
  [Compare v0.1.4...v0.2.0](https://github.com/dry-rb/dry-logic/compare/v0.1.4...v0.2.0)
182
225
 
183
- # v0.1.4 2016-01-27
226
+ ## 0.1.4 2016-01-27
227
+
184
228
 
185
229
  ### Added
186
230
 
187
231
  - Support for hash-names in `Check` and `Result` which can properly resolve input
188
232
  from nested results (solnic)
189
233
 
234
+
190
235
  [Compare v0.1.3...v0.1.4](https://github.com/dry-rb/dry-logic/compare/v0.1.3...v0.1.4)
191
236
 
192
- # v0.1.3 2016-01-27
237
+ ## 0.1.3 2016-01-27
238
+
193
239
 
194
240
  ### Added
195
241
 
@@ -201,15 +247,18 @@ This is a partial rewrite focused on internal clean up and major performance imp
201
247
 
202
248
  [Compare v0.1.2...v0.1.3](https://github.com/dry-rb/dry-logic/compare/v0.1.2...v0.1.3)
203
249
 
204
- # v0.1.2 2016-01-19
250
+ ## 0.1.2 2016-01-19
251
+
205
252
 
206
253
  ### Fixed
207
254
 
208
255
  - `xor` returns wrapped results when used against another result-rule (solnic)
209
256
 
257
+
210
258
  [Compare v0.1.1...v0.1.2](https://github.com/dry-rb/dry-logic/compare/v0.1.1...v0.1.2)
211
259
 
212
- # v0.1.1 2016-01-18
260
+ ## 0.1.1 2016-01-18
261
+
213
262
 
214
263
  ### Added
215
264
 
@@ -217,8 +266,9 @@ This is a partial rewrite focused on internal clean up and major performance imp
217
266
  - `Rule::Result` which can be applied to a result object (solnic)
218
267
  - `true?` and `false?` predicates (solnic)
219
268
 
269
+
220
270
  [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-logic/compare/v0.1.0...v0.1.1)
221
271
 
222
- # v0.1.0 2016-01-11
272
+ ## 0.1.0 2016-01-11
223
273
 
224
274
  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.4`
25
+ * jruby >= `9.2`
28
26
 
29
27
  ## License
30
28
 
@@ -1,31 +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
-
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.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"
31
38
  end
@@ -207,7 +207,7 @@ module Dry
207
207
  end
208
208
 
209
209
  def uuid_v4?(input)
210
- uuid_v4_format = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
210
+ uuid_v4_format = /\A[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}\z/i
211
211
  format?(uuid_v4_format, input)
212
212
  end
213
213
 
@@ -116,7 +116,7 @@ module Dry
116
116
 
117
117
  def define_fixed_application
118
118
  parameters = unapplied_args.join(', ')
119
- application = "@predicate[#{ (curried_args + unapplied_args).join(', ') }]"
119
+ application = "@predicate[#{(curried_args + unapplied_args).join(', ')}]"
120
120
 
121
121
  module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
122
122
  def call(#{parameters})
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Logic
5
- VERSION = '1.0.5'
5
+ VERSION = '1.0.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-logic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-06 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -94,38 +94,17 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description:
97
+ description: Predicate logic with rule composition
98
98
  email:
99
99
  - piotr.solnica@gmail.com
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".codeclimate.yml"
105
- - ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
106
- - ".github/ISSUE_TEMPLATE/---bug-report.md"
107
- - ".github/ISSUE_TEMPLATE/---feature-request.md"
108
- - ".github/workflows/ci.yml"
109
- - ".github/workflows/docsite.yml"
110
- - ".github/workflows/sync_configs.yml"
111
- - ".gitignore"
112
- - ".rspec"
113
- - ".rubocop.yml"
114
104
  - CHANGELOG.md
115
- - CODE_OF_CONDUCT.md
116
- - CONTRIBUTING.md
117
- - Gemfile
118
105
  - LICENSE
119
106
  - README.md
120
- - Rakefile
121
- - benchmarks/rule_application.rb
122
- - benchmarks/setup.rb
123
- - bin/console
124
- - docsite/source/index.html.md
125
- - docsite/source/operations.html.md
126
- - docsite/source/predicates.html.md
127
107
  - dry-logic.gemspec
128
- - examples/basic.rb
129
108
  - lib/dry-logic.rb
130
109
  - lib/dry/logic.rb
131
110
  - lib/dry/logic/appliable.rb
@@ -152,73 +131,14 @@ files:
152
131
  - lib/dry/logic/rule/predicate.rb
153
132
  - lib/dry/logic/rule_compiler.rb
154
133
  - lib/dry/logic/version.rb
155
- - spec/integration/result_spec.rb
156
- - spec/integration/rule_spec.rb
157
- - spec/shared/predicates.rb
158
- - spec/shared/rule.rb
159
- - spec/spec_helper.rb
160
- - spec/support/mutant.rb
161
- - spec/unit/operations/and_spec.rb
162
- - spec/unit/operations/attr_spec.rb
163
- - spec/unit/operations/check_spec.rb
164
- - spec/unit/operations/each_spec.rb
165
- - spec/unit/operations/implication_spec.rb
166
- - spec/unit/operations/key_spec.rb
167
- - spec/unit/operations/negation_spec.rb
168
- - spec/unit/operations/or_spec.rb
169
- - spec/unit/operations/set_spec.rb
170
- - spec/unit/operations/xor_spec.rb
171
- - spec/unit/predicates/array_spec.rb
172
- - spec/unit/predicates/attr_spec.rb
173
- - spec/unit/predicates/bool_spec.rb
174
- - spec/unit/predicates/bytesize_spec.rb
175
- - spec/unit/predicates/case_spec.rb
176
- - spec/unit/predicates/date_spec.rb
177
- - spec/unit/predicates/date_time_spec.rb
178
- - spec/unit/predicates/decimal_spec.rb
179
- - spec/unit/predicates/empty_spec.rb
180
- - spec/unit/predicates/eql_spec.rb
181
- - spec/unit/predicates/even_spec.rb
182
- - spec/unit/predicates/excluded_from_spec.rb
183
- - spec/unit/predicates/excludes_spec.rb
184
- - spec/unit/predicates/false_spec.rb
185
- - spec/unit/predicates/filled_spec.rb
186
- - spec/unit/predicates/float_spec.rb
187
- - spec/unit/predicates/format_spec.rb
188
- - spec/unit/predicates/gt_spec.rb
189
- - spec/unit/predicates/gteq_spec.rb
190
- - spec/unit/predicates/hash_spec.rb
191
- - spec/unit/predicates/included_in_spec.rb
192
- - spec/unit/predicates/includes_spec.rb
193
- - spec/unit/predicates/int_spec.rb
194
- - spec/unit/predicates/key_spec.rb
195
- - spec/unit/predicates/lt_spec.rb
196
- - spec/unit/predicates/lteq_spec.rb
197
- - spec/unit/predicates/max_bytesize_spec.rb
198
- - spec/unit/predicates/max_size_spec.rb
199
- - spec/unit/predicates/min_bytesize_spec.rb
200
- - spec/unit/predicates/min_size_spec.rb
201
- - spec/unit/predicates/none_spec.rb
202
- - spec/unit/predicates/not_eql_spec.rb
203
- - spec/unit/predicates/number_spec.rb
204
- - spec/unit/predicates/odd_spec.rb
205
- - spec/unit/predicates/respond_to_spec.rb
206
- - spec/unit/predicates/size_spec.rb
207
- - spec/unit/predicates/str_spec.rb
208
- - spec/unit/predicates/time_spec.rb
209
- - spec/unit/predicates/true_spec.rb
210
- - spec/unit/predicates/type_spec.rb
211
- - spec/unit/predicates/uuid_v4_spec.rb
212
- - spec/unit/predicates_spec.rb
213
- - spec/unit/rule/predicate_spec.rb
214
- - spec/unit/rule_compiler_spec.rb
215
- - spec/unit/rule_spec.rb
216
- homepage: https://github.com/dry-rb/dry-logic
134
+ homepage: https://dry-rb.org/gems/dry-logic
217
135
  licenses:
218
136
  - MIT
219
137
  metadata:
220
- source_code_uri: https://github.com/dry-rb/dry-logic
138
+ allowed_push_host: https://rubygems.org
221
139
  changelog_uri: https://github.com/dry-rb/dry-logic/blob/master/CHANGELOG.md
140
+ source_code_uri: https://github.com/dry-rb/dry-logic
141
+ bug_tracker_uri: https://github.com/dry-rb/dry-logic/issues
222
142
  post_install_message:
223
143
  rdoc_options: []
224
144
  require_paths:
@@ -234,69 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
154
  - !ruby/object:Gem::Version
235
155
  version: '0'
236
156
  requirements: []
237
- rubygems_version: 3.0.6
157
+ rubygems_version: 3.0.3
238
158
  signing_key:
239
159
  specification_version: 4
240
160
  summary: Predicate logic with rule composition
241
- test_files:
242
- - spec/integration/result_spec.rb
243
- - spec/integration/rule_spec.rb
244
- - spec/shared/predicates.rb
245
- - spec/shared/rule.rb
246
- - spec/spec_helper.rb
247
- - spec/support/mutant.rb
248
- - spec/unit/operations/and_spec.rb
249
- - spec/unit/operations/attr_spec.rb
250
- - spec/unit/operations/check_spec.rb
251
- - spec/unit/operations/each_spec.rb
252
- - spec/unit/operations/implication_spec.rb
253
- - spec/unit/operations/key_spec.rb
254
- - spec/unit/operations/negation_spec.rb
255
- - spec/unit/operations/or_spec.rb
256
- - spec/unit/operations/set_spec.rb
257
- - spec/unit/operations/xor_spec.rb
258
- - spec/unit/predicates/array_spec.rb
259
- - spec/unit/predicates/attr_spec.rb
260
- - spec/unit/predicates/bool_spec.rb
261
- - spec/unit/predicates/bytesize_spec.rb
262
- - spec/unit/predicates/case_spec.rb
263
- - spec/unit/predicates/date_spec.rb
264
- - spec/unit/predicates/date_time_spec.rb
265
- - spec/unit/predicates/decimal_spec.rb
266
- - spec/unit/predicates/empty_spec.rb
267
- - spec/unit/predicates/eql_spec.rb
268
- - spec/unit/predicates/even_spec.rb
269
- - spec/unit/predicates/excluded_from_spec.rb
270
- - spec/unit/predicates/excludes_spec.rb
271
- - spec/unit/predicates/false_spec.rb
272
- - spec/unit/predicates/filled_spec.rb
273
- - spec/unit/predicates/float_spec.rb
274
- - spec/unit/predicates/format_spec.rb
275
- - spec/unit/predicates/gt_spec.rb
276
- - spec/unit/predicates/gteq_spec.rb
277
- - spec/unit/predicates/hash_spec.rb
278
- - spec/unit/predicates/included_in_spec.rb
279
- - spec/unit/predicates/includes_spec.rb
280
- - spec/unit/predicates/int_spec.rb
281
- - spec/unit/predicates/key_spec.rb
282
- - spec/unit/predicates/lt_spec.rb
283
- - spec/unit/predicates/lteq_spec.rb
284
- - spec/unit/predicates/max_bytesize_spec.rb
285
- - spec/unit/predicates/max_size_spec.rb
286
- - spec/unit/predicates/min_bytesize_spec.rb
287
- - spec/unit/predicates/min_size_spec.rb
288
- - spec/unit/predicates/none_spec.rb
289
- - spec/unit/predicates/not_eql_spec.rb
290
- - spec/unit/predicates/number_spec.rb
291
- - spec/unit/predicates/odd_spec.rb
292
- - spec/unit/predicates/respond_to_spec.rb
293
- - spec/unit/predicates/size_spec.rb
294
- - spec/unit/predicates/str_spec.rb
295
- - spec/unit/predicates/time_spec.rb
296
- - spec/unit/predicates/true_spec.rb
297
- - spec/unit/predicates/type_spec.rb
298
- - spec/unit/predicates/uuid_v4_spec.rb
299
- - spec/unit/predicates_spec.rb
300
- - spec/unit/rule/predicate_spec.rb
301
- - spec/unit/rule_compiler_spec.rb
302
- - spec/unit/rule_spec.rb
161
+ test_files: []