sinclair 1.6.2 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +37 -2
  3. data/Dockerfile +2 -2
  4. data/README.md +6 -2
  5. data/config/check_specs.yml +3 -0
  6. data/config/yardstick.yml +8 -1
  7. data/lib/sinclair/matchers.rb +37 -10
  8. data/lib/sinclair/matchers/add_class_method.rb +16 -13
  9. data/lib/sinclair/matchers/add_class_method_to.rb +9 -23
  10. data/lib/sinclair/matchers/add_instance_method.rb +16 -18
  11. data/lib/sinclair/matchers/add_instance_method_to.rb +12 -16
  12. data/lib/sinclair/matchers/add_method.rb +13 -30
  13. data/lib/sinclair/matchers/add_method_to.rb +4 -56
  14. data/lib/sinclair/matchers/base.rb +45 -0
  15. data/lib/sinclair/matchers/change_class_method.rb +42 -0
  16. data/lib/sinclair/matchers/change_class_method_on.rb +64 -0
  17. data/lib/sinclair/matchers/change_instance_method.rb +42 -0
  18. data/lib/sinclair/matchers/change_instance_method_on.rb +98 -0
  19. data/lib/sinclair/matchers/change_method_on.rb +25 -0
  20. data/lib/sinclair/matchers/method_to.rb +82 -0
  21. data/lib/sinclair/options.rb +47 -46
  22. data/lib/sinclair/options/builder.rb +1 -1
  23. data/lib/sinclair/options/class_methods.rb +99 -0
  24. data/lib/sinclair/version.rb +1 -1
  25. data/spec/integration/readme/sinclair/options_spec.rb +8 -0
  26. data/spec/integration/yard/sinclair/options_parser_spec.rb +9 -0
  27. data/spec/integration/yard/sinclair/options_spec.rb +17 -6
  28. data/spec/lib/sinclair/matchers/add_class_method_to_spec.rb +40 -16
  29. data/spec/lib/sinclair/matchers/add_instance_method_to_spec.rb +36 -12
  30. data/spec/lib/sinclair/matchers/change_class_method_on_spec.rb +138 -0
  31. data/spec/lib/sinclair/matchers/change_class_method_spec.rb +38 -0
  32. data/spec/lib/sinclair/matchers/change_instance_method_on_spec.rb +149 -0
  33. data/spec/lib/sinclair/matchers/change_instance_method_spec.rb +38 -0
  34. data/spec/lib/sinclair/matchers_spec.rb +30 -0
  35. data/spec/lib/sinclair/options/builder_spec.rb +16 -8
  36. data/spec/lib/sinclair/options/class_methods_spec.rb +255 -0
  37. data/spec/lib/sinclair/options_spec.rb +90 -78
  38. data/spec/support/models/builder_options.rb +7 -0
  39. data/spec/support/models/open_options.rb +7 -0
  40. metadata +17 -2
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class BuilderOptions < Sinclair::Options
4
+ with_options :name
5
+
6
+ skip_validation
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class OpenOptions < Sinclair::Options
4
+ with_options :valid_option
5
+
6
+ skip_validation
7
+ end
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.2
4
+ version: 1.6.7
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-02 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -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
@@ -381,6 +395,7 @@ files:
381
395
  - spec/support/models/my_configurable.rb
382
396
  - spec/support/models/my_model.rb
383
397
  - spec/support/models/my_server_config.rb
398
+ - spec/support/models/open_options.rb
384
399
  - spec/support/models/person.rb
385
400
  - spec/support/models/purchase.rb
386
401
  - spec/support/models/random_generator.rb