sinclair 1.9.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -1
  3. data/README.md +414 -324
  4. data/config/check_specs.yml +3 -4
  5. data/config/yardstick.yml +9 -1
  6. data/lib/sinclair/configurable.rb +2 -0
  7. data/lib/sinclair/equals_checker.rb +2 -0
  8. data/lib/sinclair/matchers/add_class_method.rb +26 -36
  9. data/lib/sinclair/matchers/add_instance_method.rb +59 -59
  10. data/lib/sinclair/matchers/add_method.rb +33 -35
  11. data/lib/sinclair/matchers/change_class_method.rb +22 -16
  12. data/lib/sinclair/matchers/change_instance_method.rb +46 -16
  13. data/lib/sinclair/matchers.rb +2 -8
  14. data/lib/sinclair/method_builder/base.rb +17 -2
  15. data/lib/sinclair/method_builder/call_method_builder.rb +49 -0
  16. data/lib/sinclair/method_builder.rb +5 -17
  17. data/lib/sinclair/method_definition/block_definition.rb +2 -0
  18. data/lib/sinclair/method_definition/call_definition.rb +49 -0
  19. data/lib/sinclair/method_definition/string_definition.rb +2 -2
  20. data/lib/sinclair/method_definition.rb +80 -26
  21. data/lib/sinclair/method_definitions.rb +25 -7
  22. data/lib/sinclair/options/builder.rb +8 -0
  23. data/lib/sinclair/options.rb +1 -13
  24. data/lib/sinclair/version.rb +1 -1
  25. data/lib/sinclair.rb +149 -62
  26. data/spec/integration/readme/sinclair/types_of_definition_spec.rb +47 -0
  27. data/spec/integration/yard/sinclair/add_class_method_spec.rb +51 -0
  28. data/spec/integration/yard/sinclair/add_method_spec.rb +60 -0
  29. data/spec/integration/yard/sinclair/eval_and_add_method_spec.rb +26 -0
  30. data/spec/integration/yard/sinclair/matchers/change_class_method_spec.rb +24 -0
  31. data/spec/integration/yard/sinclair/matchers/change_instance_method_spec.rb +40 -0
  32. data/spec/integration/yard/sinclair_spec.rb +0 -83
  33. data/spec/lib/sinclair/method_builder/base_spec.rb +15 -0
  34. data/spec/lib/sinclair/method_builder/call_method_builder_spec.rb +76 -0
  35. data/spec/lib/sinclair/method_builder_spec.rb +63 -20
  36. data/spec/lib/sinclair/method_definition/call_definition_spec.rb +33 -0
  37. data/spec/lib/sinclair/method_definition_spec.rb +129 -0
  38. data/spec/lib/sinclair/method_definitions_spec.rb +79 -1
  39. data/spec/lib/sinclair/options/builder_spec.rb +13 -0
  40. data/spec/lib/sinclair/options/class_methods_spec.rb +23 -8
  41. data/spec/lib/sinclair_spec.rb +6 -160
  42. data/spec/support/models/dummy_builder.rb +4 -1
  43. data/spec/support/models/dummy_class_builder.rb +3 -0
  44. data/spec/support/models/person.rb +1 -1
  45. data/spec/support/shared_examples/attribute_accessor.rb +103 -0
  46. data/spec/support/shared_examples/sinclair.rb +112 -0
  47. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23c4aa7f5d3c743f783dc6196e0799bbef94fa2c4f42825379c4cc61aad8e9ec
4
- data.tar.gz: 4aa6481202521cc4c0cf8b0210e798a8d56344a43c42e41157ae7a3121ea67a4
3
+ metadata.gz: 1c6050b1049de69dd4ba37327f3b0d8e92e1a570ec5f6372ff91b1732bbc3be7
4
+ data.tar.gz: 68c4c64e8d414bb81d250f180c5f3a6a7f3c180751247a3360b497e53693cf78
5
5
  SHA512:
6
- metadata.gz: 3b07675d7768ea9db9e858498863fec96959e209b2bf9596f78e4f57ff2134f286723d8d7d3c42b9be5f8efc907602dee83dc3d0914473cc73c163a65362e84f
7
- data.tar.gz: 8f596032dfad280158eeeb5a4a74400386f960010b86480608864d81d9c017ad6fdcd8fcabf01d97ef9987a333719561f59d883840514fc707d076872760d195
6
+ metadata.gz: 11a89d1a3b77320298c2027ac33a2a12d7ff57ddda3792753b5e9d0495bb50b3d83904e12ee06b79b84aa615b8796b34c5d087c905aee6a6f77e7d68bed39308
7
+ data.tar.gz: '04833c0736f37c690b554c007f60a0226255e3730a30c57b5f3a26cb486571c50b0b9f4970e27f581b6829a264321e8277f8eed22592904b1e6af3616ca62328'
data/.rubocop.yml CHANGED
@@ -4,6 +4,11 @@ inherit_from: .rubocop_todo.yml
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.5
6
6
 
7
+
8
+ RSpec/DescribeClass:
9
+ Exclude:
10
+ - 'spec/integration/yard/**/*_spec.rb'
11
+
7
12
  Metrics/BlockLength:
8
13
  Exclude:
9
14
  - 'spec/**/*_spec.rb'
@@ -38,9 +43,10 @@ RSpec/MultipleExpectations:
38
43
  - 'spec/integration/yard/**/*_spec.rb'
39
44
  - 'spec/integration/readme/**/*_spec.rb'
40
45
  - spec/lib/sinclair_spec.rb
46
+ - spec/support/shared_examples/sinclair.rb
41
47
 
42
48
  RSpec/NestedGroups:
43
- Max: 4
49
+ Max: 5
44
50
  Exclude:
45
51
  - spec/integration/yard/**/*.rb
46
52