sinclair 1.6.5 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -2
  3. data/Dockerfile +2 -2
  4. data/README.md +3 -1
  5. data/config/check_specs.yml +3 -0
  6. data/config/yardstick.yml +7 -1
  7. data/lib/sinclair/config.rb +46 -0
  8. data/lib/sinclair/config_class.rb +15 -0
  9. data/lib/sinclair/configurable.rb +8 -0
  10. data/lib/sinclair/matchers/add_class_method.rb +16 -13
  11. data/lib/sinclair/matchers/add_class_method_to.rb +9 -23
  12. data/lib/sinclair/matchers/add_instance_method.rb +16 -18
  13. data/lib/sinclair/matchers/add_instance_method_to.rb +12 -16
  14. data/lib/sinclair/matchers/add_method.rb +39 -30
  15. data/lib/sinclair/matchers/add_method_to.rb +4 -56
  16. data/lib/sinclair/matchers/base.rb +45 -0
  17. data/lib/sinclair/matchers/change_class_method.rb +42 -0
  18. data/lib/sinclair/matchers/change_class_method_on.rb +64 -0
  19. data/lib/sinclair/matchers/change_instance_method.rb +42 -0
  20. data/lib/sinclair/matchers/change_instance_method_on.rb +98 -0
  21. data/lib/sinclair/matchers/change_method_on.rb +25 -0
  22. data/lib/sinclair/matchers/method_to.rb +82 -0
  23. data/lib/sinclair/matchers.rb +38 -30
  24. data/lib/sinclair/options/class_methods.rb +95 -0
  25. data/lib/sinclair/options.rb +10 -60
  26. data/lib/sinclair/version.rb +1 -1
  27. data/sinclair.gemspec +12 -12
  28. data/spec/integration/readme/my_class_spec.rb +1 -1
  29. data/spec/integration/yard/sinclair/config_spec.rb +27 -0
  30. data/spec/integration/yard/sinclair/options_parser_spec.rb +9 -0
  31. data/spec/lib/sinclair/config_class_spec.rb +1 -33
  32. data/spec/lib/sinclair/config_spec.rb +71 -0
  33. data/spec/lib/sinclair/matchers/add_class_method_to_spec.rb +40 -16
  34. data/spec/lib/sinclair/matchers/add_instance_method_to_spec.rb +36 -12
  35. data/spec/lib/sinclair/matchers/change_class_method_on_spec.rb +138 -0
  36. data/spec/lib/sinclair/matchers/change_class_method_spec.rb +38 -0
  37. data/spec/lib/sinclair/matchers/change_instance_method_on_spec.rb +149 -0
  38. data/spec/lib/sinclair/matchers/change_instance_method_spec.rb +38 -0
  39. data/spec/lib/sinclair/matchers_spec.rb +30 -0
  40. data/spec/lib/sinclair/options/class_methods_spec.rb +255 -0
  41. data/spec/lib/sinclair/options_spec.rb +28 -237
  42. data/spec/support/models/builder_options.rb +7 -0
  43. data/spec/support/models/login_configurable.rb +7 -0
  44. data/spec/support/models/open_options.rb +7 -0
  45. data/spec/support/shared_examples/config.rb +48 -0
  46. metadata +43 -28
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinclair
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DarthJee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-17 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.16.1
33
+ version: 2.3.20
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.16.1
40
+ version: 2.3.20
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.12.2
47
+ version: 0.14.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.12.2
54
+ version: 0.14.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry-nav
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.0
61
+ version: 1.0.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.0
68
+ version: 1.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,84 +86,84 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 5.6.0
89
+ version: 6.0.3
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 5.6.0
96
+ version: 6.0.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 3.9.0
103
+ version: 3.11.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 3.9.0
110
+ version: 3.11.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-core
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 3.9.1
117
+ version: 3.11.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 3.9.1
124
+ version: 3.11.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec-expectations
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 3.9.1
131
+ version: 3.11.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 3.9.1
138
+ version: 3.11.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec-mocks
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 3.9.1
145
+ version: 3.11.1
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 3.9.1
152
+ version: 3.11.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec-support
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 3.9.2
159
+ version: 3.11.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 3.9.2
166
+ version: 3.11.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -198,42 +198,42 @@ dependencies:
198
198
  requirements:
199
199
  - - '='
200
200
  - !ruby/object:Gem::Version
201
- version: 4.4.1
201
+ version: 4.7.0
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - '='
207
207
  - !ruby/object:Gem::Version
208
- version: 4.4.1
208
+ version: 4.7.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: simplecov
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 0.17.1
215
+ version: 0.21.2
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 0.17.1
222
+ version: 0.21.2
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: yard
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - '='
228
228
  - !ruby/object:Gem::Version
229
- version: 0.9.24
229
+ version: 0.9.27
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - '='
235
235
  - !ruby/object:Gem::Version
236
- version: 0.9.24
236
+ version: 0.9.27
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: yardstick
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -289,6 +289,13 @@ files:
289
289
  - lib/sinclair/matchers/add_instance_method_to.rb
290
290
  - lib/sinclair/matchers/add_method.rb
291
291
  - lib/sinclair/matchers/add_method_to.rb
292
+ - lib/sinclair/matchers/base.rb
293
+ - lib/sinclair/matchers/change_class_method.rb
294
+ - lib/sinclair/matchers/change_class_method_on.rb
295
+ - lib/sinclair/matchers/change_instance_method.rb
296
+ - lib/sinclair/matchers/change_instance_method_on.rb
297
+ - lib/sinclair/matchers/change_method_on.rb
298
+ - lib/sinclair/matchers/method_to.rb
292
299
  - lib/sinclair/method_builder.rb
293
300
  - lib/sinclair/method_builder/base.rb
294
301
  - lib/sinclair/method_builder/block_method_builder.rb
@@ -300,6 +307,7 @@ files:
300
307
  - lib/sinclair/method_definitions.rb
301
308
  - lib/sinclair/options.rb
302
309
  - lib/sinclair/options/builder.rb
310
+ - lib/sinclair/options/class_methods.rb
303
311
  - lib/sinclair/options_parser.rb
304
312
  - lib/sinclair/version.rb
305
313
  - sinclair.gemspec
@@ -340,6 +348,10 @@ files:
340
348
  - spec/lib/sinclair/matchers/add_class_method_to_spec.rb
341
349
  - spec/lib/sinclair/matchers/add_instance_method_spec.rb
342
350
  - spec/lib/sinclair/matchers/add_instance_method_to_spec.rb
351
+ - spec/lib/sinclair/matchers/change_class_method_on_spec.rb
352
+ - spec/lib/sinclair/matchers/change_class_method_spec.rb
353
+ - spec/lib/sinclair/matchers/change_instance_method_on_spec.rb
354
+ - spec/lib/sinclair/matchers/change_instance_method_spec.rb
343
355
  - spec/lib/sinclair/matchers_spec.rb
344
356
  - spec/lib/sinclair/method_builder/block_method_builder_spec.rb
345
357
  - spec/lib/sinclair/method_builder/string_method_builder_spec.rb
@@ -350,6 +362,7 @@ files:
350
362
  - spec/lib/sinclair/method_definition_spec.rb
351
363
  - spec/lib/sinclair/method_definitions_spec.rb
352
364
  - spec/lib/sinclair/options/builder_spec.rb
365
+ - spec/lib/sinclair/options/class_methods_spec.rb
353
366
  - spec/lib/sinclair/options_parser_spec.rb
354
367
  - spec/lib/sinclair/options_spec.rb
355
368
  - spec/lib/sinclair_spec.rb
@@ -357,6 +370,7 @@ files:
357
370
  - spec/support/fixture_helpers.rb
358
371
  - spec/support/models/app_client.rb
359
372
  - spec/support/models/app_config.rb
373
+ - spec/support/models/builder_options.rb
360
374
  - spec/support/models/client.rb
361
375
  - spec/support/models/connection_options.rb
362
376
  - spec/support/models/default_value.rb
@@ -373,6 +387,7 @@ files:
373
387
  - spec/support/models/http_person.rb
374
388
  - spec/support/models/initial_valuer.rb
375
389
  - spec/support/models/login_config.rb
390
+ - spec/support/models/login_configurable.rb
376
391
  - spec/support/models/my_app_client.rb
377
392
  - spec/support/models/my_builder.rb
378
393
  - spec/support/models/my_class.rb
@@ -381,6 +396,7 @@ files:
381
396
  - spec/support/models/my_configurable.rb
382
397
  - spec/support/models/my_model.rb
383
398
  - spec/support/models/my_server_config.rb
399
+ - spec/support/models/open_options.rb
384
400
  - spec/support/models/person.rb
385
401
  - spec/support/models/purchase.rb
386
402
  - spec/support/models/random_generator.rb
@@ -411,8 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
411
427
  - !ruby/object:Gem::Version
412
428
  version: '0'
413
429
  requirements: []
414
- rubyforge_project:
415
- rubygems_version: 2.7.6
430
+ rubygems_version: 3.3.20
416
431
  signing_key:
417
432
  specification_version: 4
418
433
  summary: Gem for easy concern creation