calificador 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "singleton"
4
+
5
+ module Calificador
6
+ module Util
7
+ # Marker for missing parameters
8
+ class Missing
9
+ include Singleton
10
+
11
+ def initialize
12
+ freeze
13
+ end
14
+
15
+ def mask_nil
16
+ Nil.instance
17
+ end
18
+
19
+ def to_s
20
+ "<missing>"
21
+ end
22
+
23
+ alias_method :inspect, :to_s
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "singleton"
4
+
5
+ module Calificador
6
+ module Util
7
+ # Wrapper for nil values
8
+ class Nil
9
+ module ObjectMixin
10
+ def unmask_nil
11
+ self
12
+ end
13
+
14
+ def mask_nil
15
+ self
16
+ end
17
+ end
18
+
19
+ Object.include(ObjectMixin)
20
+
21
+ module NilClassMixin
22
+ def mask_nil
23
+ Nil.instance
24
+ end
25
+ end
26
+
27
+ NilClass.include(NilClassMixin)
28
+
29
+ include Singleton
30
+
31
+ def initialize
32
+ freeze
33
+ end
34
+
35
+ def self.[](value)
36
+ case value
37
+ when nil, Nil.instance
38
+ Nil.instance
39
+ else
40
+ value
41
+ end
42
+ end
43
+
44
+ def unmask_nil
45
+ nil
46
+ end
47
+
48
+ def mask_nil
49
+ self
50
+ end
51
+
52
+ def to_s
53
+ "<nil>"
54
+ end
55
+
56
+ alias_method :inspect, :to_s
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Calificador
4
+ VERSION = "0.1.0"
5
+ end
metadata ADDED
@@ -0,0 +1,257 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: calificador
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jochen Seeber
8
+ autorequire:
9
+ bindir: cmd
10
+ cert_chain: []
11
+ date: 2021-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: docile
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.3.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.14'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: zeitwerk
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 0.8.23.js
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.8.23.js
83
+ - !ruby/object:Gem::Dependency
84
+ name: debase
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: qed
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.9'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '13.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '13.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0.85'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0.85'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 0.5.1
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 0.5.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: ruby-debug-ide
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.7'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.7'
167
+ - !ruby/object:Gem::Dependency
168
+ name: simplecov
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.18'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.18'
181
+ - !ruby/object:Gem::Dependency
182
+ name: yard
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0.9'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0.9'
195
+ description:
196
+ email:
197
+ - jochen@seeber.me
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - LICENSE.txt
203
+ - README.md
204
+ - lib/calificador.rb
205
+ - lib/calificador/assertor.rb
206
+ - lib/calificador/build/attribute.rb
207
+ - lib/calificador/build/attribute_container.rb
208
+ - lib/calificador/build/attribute_evaluator.rb
209
+ - lib/calificador/build/factory.rb
210
+ - lib/calificador/build/trait.rb
211
+ - lib/calificador/key.rb
212
+ - lib/calificador/minitest/minitest_patches.rb
213
+ - lib/calificador/spec/basic_context.rb
214
+ - lib/calificador/spec/class_method_context.rb
215
+ - lib/calificador/spec/condition_context.rb
216
+ - lib/calificador/spec/examine_context.rb
217
+ - lib/calificador/spec/instance_method_context.rb
218
+ - lib/calificador/spec/test_environment.rb
219
+ - lib/calificador/spec/test_method.rb
220
+ - lib/calificador/spec/test_root.rb
221
+ - lib/calificador/spec/type_context.rb
222
+ - lib/calificador/spec/value_override.rb
223
+ - lib/calificador/test.rb
224
+ - lib/calificador/test_mixin.rb
225
+ - lib/calificador/util/call_formatter.rb
226
+ - lib/calificador/util/class_mixin.rb
227
+ - lib/calificador/util/core_extensions.rb
228
+ - lib/calificador/util/missing.rb
229
+ - lib/calificador/util/nil.rb
230
+ - lib/calificador/version.rb
231
+ homepage: https://github.com/jochenseeber/calificador
232
+ licenses: []
233
+ metadata:
234
+ issue_tracker: https://github.com/jochenseeber/calificador/issues
235
+ documentation: http://jochenseeber.github.com/calificador
236
+ source_code: https://github.com/jochenseeber/calificador
237
+ wiki: https://github.com/jochenseeber/calificador/wiki
238
+ post_install_message:
239
+ rdoc_options: []
240
+ require_paths:
241
+ - lib
242
+ required_ruby_version: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: '2.7'
247
+ required_rubygems_version: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ requirements: []
253
+ rubygems_version: 3.1.4
254
+ signing_key:
255
+ specification_version: 4
256
+ summary: Concise and readable unit tests
257
+ test_files: []