deprecation_toolkit 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +24 -185
- data/Gemfile.lock +17 -15
- data/deprecation_toolkit.gemspec +2 -0
- data/gemfiles/test/deprecations +1 -1
- data/lib/deprecation_toolkit/version.rb +1 -1
- data/lib/deprecation_toolkit/warning.rb +29 -0
- data/lib/minitest/deprecation_toolkit_plugin.rb +9 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 360fe42fd8be7a46d83f88f62b43fe12823416d0c1d07415211f67b96142bd1e
|
|
4
|
+
data.tar.gz: 78150fd7983ddff6c38dff085361ac6b78a8d1efae289c387b191bc4a7715194
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d36f06b2190924517b16f5a6c06a2285de38cf1577b73639092149605a9a55de001766b878af270003c009f9990c1de5302ebf2083d26bb80b7ee552ba27fccf
|
|
7
|
+
data.tar.gz: fc7d1f5101ffbf65eaae48e2029aa5feee4d373dbc98af29b88d837e0e3cdbc677d824b670d4165cd5ca8272d08e2e237a1d9ed761a4b3fdfa296529290ec46e
|
|
@@ -20,7 +20,7 @@ Style/Alias:
|
|
|
20
20
|
- prefer_alias
|
|
21
21
|
- prefer_alias_method
|
|
22
22
|
|
|
23
|
-
Layout/
|
|
23
|
+
Layout/HashAlignment:
|
|
24
24
|
EnforcedHashRocketStyle: key
|
|
25
25
|
EnforcedColonStyle: key
|
|
26
26
|
EnforcedLastArgumentHashStyle: ignore_implicit
|
|
@@ -30,7 +30,7 @@ Layout/AlignHash:
|
|
|
30
30
|
- ignore_implicit
|
|
31
31
|
- ignore_explicit
|
|
32
32
|
|
|
33
|
-
Layout/
|
|
33
|
+
Layout/ParameterAlignment:
|
|
34
34
|
EnforcedStyle: with_fixed_indentation
|
|
35
35
|
SupportedStyles:
|
|
36
36
|
- with_first_parameter
|
|
@@ -76,13 +76,6 @@ Style/BlockDelimiters:
|
|
|
76
76
|
- proc
|
|
77
77
|
- it
|
|
78
78
|
|
|
79
|
-
Style/BracesAroundHashParameters:
|
|
80
|
-
EnforcedStyle: no_braces
|
|
81
|
-
SupportedStyles:
|
|
82
|
-
- braces
|
|
83
|
-
- no_braces
|
|
84
|
-
- context_dependent
|
|
85
|
-
|
|
86
79
|
Layout/CaseIndentation:
|
|
87
80
|
EnforcedStyle: end
|
|
88
81
|
SupportedStyles:
|
|
@@ -172,7 +165,7 @@ Naming/FileName:
|
|
|
172
165
|
Regex:
|
|
173
166
|
IgnoreExecutableScripts: true
|
|
174
167
|
|
|
175
|
-
Layout/
|
|
168
|
+
Layout/FirstArgumentIndentation:
|
|
176
169
|
EnforcedStyle: consistent
|
|
177
170
|
SupportedStyles:
|
|
178
171
|
- consistent
|
|
@@ -198,9 +191,8 @@ Style/FrozenStringLiteralComment:
|
|
|
198
191
|
Add `# frozen_string_literal: true` to the top of the file. Frozen string
|
|
199
192
|
literals will become the default in a future Ruby version, and we want to
|
|
200
193
|
make sure we're ready.
|
|
201
|
-
EnforcedStyle:
|
|
194
|
+
EnforcedStyle: always
|
|
202
195
|
SupportedStyles:
|
|
203
|
-
- when_needed
|
|
204
196
|
- always
|
|
205
197
|
- never
|
|
206
198
|
|
|
@@ -226,7 +218,7 @@ Layout/IndentationConsistency:
|
|
|
226
218
|
Layout/IndentationWidth:
|
|
227
219
|
Width: 2
|
|
228
220
|
|
|
229
|
-
Layout/
|
|
221
|
+
Layout/FirstArrayElementIndentation:
|
|
230
222
|
EnforcedStyle: consistent
|
|
231
223
|
SupportedStyles:
|
|
232
224
|
- special_inside_parentheses
|
|
@@ -234,10 +226,10 @@ Layout/IndentArray:
|
|
|
234
226
|
- align_brackets
|
|
235
227
|
IndentationWidth:
|
|
236
228
|
|
|
237
|
-
Layout/
|
|
229
|
+
Layout/AssignmentIndentation:
|
|
238
230
|
IndentationWidth:
|
|
239
231
|
|
|
240
|
-
Layout/
|
|
232
|
+
Layout/FirstHashElementIndentation:
|
|
241
233
|
EnforcedStyle: consistent
|
|
242
234
|
SupportedStyles:
|
|
243
235
|
- special_inside_parentheses
|
|
@@ -341,9 +333,9 @@ Style/PercentQLiterals:
|
|
|
341
333
|
Naming/PredicateName:
|
|
342
334
|
NamePrefix:
|
|
343
335
|
- is_
|
|
344
|
-
|
|
336
|
+
ForbiddenPrefixes:
|
|
345
337
|
- is_
|
|
346
|
-
|
|
338
|
+
AllowedMethods:
|
|
347
339
|
- is_a?
|
|
348
340
|
Exclude:
|
|
349
341
|
- 'spec/**/*'
|
|
@@ -468,7 +460,7 @@ Style/TernaryParentheses:
|
|
|
468
460
|
- require_no_parentheses
|
|
469
461
|
AllowSafeAssignment: true
|
|
470
462
|
|
|
471
|
-
Layout/
|
|
463
|
+
Layout/TrailingEmptyLines:
|
|
472
464
|
EnforcedStyle: final_newline
|
|
473
465
|
SupportedStyles:
|
|
474
466
|
- final_newline
|
|
@@ -479,7 +471,7 @@ Style/TrivialAccessors:
|
|
|
479
471
|
AllowPredicates: true
|
|
480
472
|
AllowDSLWriters: false
|
|
481
473
|
IgnoreClassMethods: false
|
|
482
|
-
|
|
474
|
+
AllowedMethods:
|
|
483
475
|
- to_ary
|
|
484
476
|
- to_a
|
|
485
477
|
- to_c
|
|
@@ -510,7 +502,7 @@ Style/WhileUntilModifier:
|
|
|
510
502
|
Metrics/BlockNesting:
|
|
511
503
|
Max: 3
|
|
512
504
|
|
|
513
|
-
|
|
505
|
+
Layout/LineLength:
|
|
514
506
|
Max: 120
|
|
515
507
|
AllowHeredoc: true
|
|
516
508
|
AllowURI: true
|
|
@@ -559,95 +551,10 @@ Lint/UnusedMethodArgument:
|
|
|
559
551
|
AllowUnusedKeywordArguments: false
|
|
560
552
|
IgnoreEmptyMethods: true
|
|
561
553
|
|
|
562
|
-
Performance/RedundantMerge:
|
|
563
|
-
MaxKeyValuePairs: 2
|
|
564
|
-
|
|
565
|
-
Rails/ActionFilter:
|
|
566
|
-
EnforcedStyle: action
|
|
567
|
-
SupportedStyles:
|
|
568
|
-
- action
|
|
569
|
-
- filter
|
|
570
|
-
Include:
|
|
571
|
-
- app/controllers/**/*.rb
|
|
572
|
-
|
|
573
|
-
Rails/Date:
|
|
574
|
-
EnforcedStyle: flexible
|
|
575
|
-
SupportedStyles:
|
|
576
|
-
- strict
|
|
577
|
-
- flexible
|
|
578
|
-
|
|
579
|
-
Rails/DynamicFindBy:
|
|
580
|
-
Whitelist:
|
|
581
|
-
- find_by_sql
|
|
582
|
-
|
|
583
|
-
Rails/Exit:
|
|
584
|
-
Include:
|
|
585
|
-
- app/**/*.rb
|
|
586
|
-
- config/**/*.rb
|
|
587
|
-
- lib/**/*.rb
|
|
588
|
-
Exclude:
|
|
589
|
-
- 'lib/**/*.rake'
|
|
590
|
-
|
|
591
|
-
Rails/FindBy:
|
|
592
|
-
Include:
|
|
593
|
-
- app/models/**/*.rb
|
|
594
|
-
|
|
595
|
-
Rails/FindEach:
|
|
596
|
-
Include:
|
|
597
|
-
- app/models/**/*.rb
|
|
598
|
-
|
|
599
|
-
Rails/HasAndBelongsToMany:
|
|
600
|
-
Include:
|
|
601
|
-
- app/models/**/*.rb
|
|
602
|
-
|
|
603
|
-
Rails/NotNullColumn:
|
|
604
|
-
Include:
|
|
605
|
-
- db/migrate/*.rb
|
|
606
|
-
|
|
607
|
-
Rails/Output:
|
|
608
|
-
Include:
|
|
609
|
-
- app/**/*.rb
|
|
610
|
-
- config/**/*.rb
|
|
611
|
-
- db/**/*.rb
|
|
612
|
-
- lib/**/*.rb
|
|
613
|
-
|
|
614
|
-
Rails/ReadWriteAttribute:
|
|
615
|
-
Include:
|
|
616
|
-
- app/models/**/*.rb
|
|
617
|
-
|
|
618
|
-
Rails/RequestReferer:
|
|
619
|
-
EnforcedStyle: referer
|
|
620
|
-
SupportedStyles:
|
|
621
|
-
- referer
|
|
622
|
-
- referrer
|
|
623
|
-
|
|
624
|
-
Rails/SafeNavigation:
|
|
625
|
-
ConvertTry: false
|
|
626
|
-
|
|
627
|
-
Rails/ScopeArgs:
|
|
628
|
-
Include:
|
|
629
|
-
- app/models/**/*.rb
|
|
630
|
-
|
|
631
|
-
Rails/TimeZone:
|
|
632
|
-
EnforcedStyle: flexible
|
|
633
|
-
SupportedStyles:
|
|
634
|
-
- strict
|
|
635
|
-
- flexible
|
|
636
|
-
|
|
637
|
-
Rails/UniqBeforePluck:
|
|
638
|
-
EnforcedStyle: conservative
|
|
639
|
-
SupportedStyles:
|
|
640
|
-
- conservative
|
|
641
|
-
- aggressive
|
|
642
|
-
|
|
643
|
-
Rails/Validation:
|
|
644
|
-
Include:
|
|
645
|
-
- app/models/**/*.rb
|
|
646
|
-
|
|
647
554
|
Naming/AccessorMethodName:
|
|
648
555
|
Enabled: true
|
|
649
556
|
|
|
650
|
-
Layout/
|
|
557
|
+
Layout/ArrayAlignment:
|
|
651
558
|
Enabled: true
|
|
652
559
|
|
|
653
560
|
Style/ArrayJoin:
|
|
@@ -905,13 +812,13 @@ Layout/TrailingWhitespace:
|
|
|
905
812
|
Style/UnlessElse:
|
|
906
813
|
Enabled: true
|
|
907
814
|
|
|
908
|
-
Style/
|
|
815
|
+
Style/RedundantCapitalW:
|
|
909
816
|
Enabled: true
|
|
910
817
|
|
|
911
|
-
Style/
|
|
818
|
+
Style/RedundantInterpolation:
|
|
912
819
|
Enabled: true
|
|
913
820
|
|
|
914
|
-
Style/
|
|
821
|
+
Style/RedundantPercentQ:
|
|
915
822
|
Enabled: true
|
|
916
823
|
|
|
917
824
|
Style/VariableInterpolation:
|
|
@@ -926,7 +833,7 @@ Style/WhileUntilDo:
|
|
|
926
833
|
Style/ZeroLengthPredicate:
|
|
927
834
|
Enabled: true
|
|
928
835
|
|
|
929
|
-
Layout/
|
|
836
|
+
Layout/HeredocIndentation:
|
|
930
837
|
EnforcedStyle: squiggly
|
|
931
838
|
|
|
932
839
|
Lint/AmbiguousOperator:
|
|
@@ -950,7 +857,7 @@ Lint/DeprecatedClassMethods:
|
|
|
950
857
|
Lint/DuplicateMethods:
|
|
951
858
|
Enabled: true
|
|
952
859
|
|
|
953
|
-
Lint/
|
|
860
|
+
Lint/DuplicateHashKey:
|
|
954
861
|
Enabled: true
|
|
955
862
|
|
|
956
863
|
Lint/EachWithObjectArgument:
|
|
@@ -965,9 +872,6 @@ Lint/EmptyEnsure:
|
|
|
965
872
|
Lint/EmptyInterpolation:
|
|
966
873
|
Enabled: true
|
|
967
874
|
|
|
968
|
-
Lint/EndInMethod:
|
|
969
|
-
Enabled: true
|
|
970
|
-
|
|
971
875
|
Lint/EnsureReturn:
|
|
972
876
|
Enabled: true
|
|
973
877
|
|
|
@@ -977,8 +881,8 @@ Lint/FloatOutOfRange:
|
|
|
977
881
|
Lint/FormatParameterMismatch:
|
|
978
882
|
Enabled: true
|
|
979
883
|
|
|
980
|
-
Lint/
|
|
981
|
-
|
|
884
|
+
Lint/SuppressedException:
|
|
885
|
+
AllowComments: true
|
|
982
886
|
|
|
983
887
|
Lint/ImplicitStringConcatenation:
|
|
984
888
|
Description: Checks for adjacent string literals on the same line, which could
|
|
@@ -1033,7 +937,7 @@ Lint/ShadowedException:
|
|
|
1033
937
|
Lint/ShadowingOuterLocalVariable:
|
|
1034
938
|
Enabled: true
|
|
1035
939
|
|
|
1036
|
-
Lint/
|
|
940
|
+
Lint/RedundantStringCoercion:
|
|
1037
941
|
Enabled: true
|
|
1038
942
|
|
|
1039
943
|
Lint/UnderscorePrefixedVariableName:
|
|
@@ -1042,13 +946,13 @@ Lint/UnderscorePrefixedVariableName:
|
|
|
1042
946
|
Lint/UnifiedInteger:
|
|
1043
947
|
Enabled: true
|
|
1044
948
|
|
|
1045
|
-
Lint/
|
|
949
|
+
Lint/RedundantCopDisableDirective:
|
|
1046
950
|
Enabled: true
|
|
1047
951
|
|
|
1048
|
-
Lint/
|
|
952
|
+
Lint/RedundantCopEnableDirective:
|
|
1049
953
|
Enabled: true
|
|
1050
954
|
|
|
1051
|
-
Lint/
|
|
955
|
+
Lint/RedundantSplatExpansion:
|
|
1052
956
|
Enabled: true
|
|
1053
957
|
|
|
1054
958
|
Lint/UnreachableCode:
|
|
@@ -1072,71 +976,6 @@ Lint/UselessSetterCall:
|
|
|
1072
976
|
Lint/Void:
|
|
1073
977
|
Enabled: true
|
|
1074
978
|
|
|
1075
|
-
Performance/CaseWhenSplat:
|
|
1076
|
-
Enabled: true
|
|
1077
|
-
|
|
1078
|
-
Performance/Count:
|
|
1079
|
-
SafeMode: true
|
|
1080
|
-
|
|
1081
|
-
Performance/Detect:
|
|
1082
|
-
SafeMode: true
|
|
1083
|
-
|
|
1084
|
-
Performance/DoubleStartEndWith:
|
|
1085
|
-
Enabled: true
|
|
1086
|
-
|
|
1087
|
-
Performance/EndWith:
|
|
1088
|
-
Enabled: true
|
|
1089
|
-
|
|
1090
|
-
Performance/FixedSize:
|
|
1091
|
-
Enabled: true
|
|
1092
|
-
|
|
1093
|
-
Performance/FlatMap:
|
|
1094
|
-
EnabledForFlattenWithoutParams: false
|
|
1095
|
-
|
|
1096
|
-
Performance/RangeInclude:
|
|
1097
|
-
Enabled: true
|
|
1098
|
-
|
|
1099
|
-
Performance/RedundantMatch:
|
|
1100
|
-
Enabled: true
|
|
1101
|
-
|
|
1102
|
-
Performance/RegexpMatch:
|
|
1103
|
-
Enabled: true
|
|
1104
|
-
|
|
1105
|
-
Performance/ReverseEach:
|
|
1106
|
-
Enabled: true
|
|
1107
|
-
|
|
1108
|
-
Performance/Size:
|
|
1109
|
-
Enabled: true
|
|
1110
|
-
|
|
1111
|
-
Performance/CompareWithBlock:
|
|
1112
|
-
Enabled: true
|
|
1113
|
-
|
|
1114
|
-
Performance/StartWith:
|
|
1115
|
-
Enabled: true
|
|
1116
|
-
|
|
1117
|
-
Performance/StringReplacement:
|
|
1118
|
-
Enabled: true
|
|
1119
|
-
|
|
1120
|
-
Rails/ApplicationRecord:
|
|
1121
|
-
Enabled: true
|
|
1122
|
-
|
|
1123
|
-
Rails/DelegateAllowBlank:
|
|
1124
|
-
Enabled: true
|
|
1125
|
-
|
|
1126
|
-
Rails/HttpPositionalArguments:
|
|
1127
|
-
Include:
|
|
1128
|
-
- spec/**/*
|
|
1129
|
-
- test/**/*
|
|
1130
|
-
|
|
1131
|
-
Rails/InverseOf:
|
|
1132
|
-
Enabled: true
|
|
1133
|
-
|
|
1134
|
-
Rails/OutputSafety:
|
|
1135
|
-
Enabled: true
|
|
1136
|
-
|
|
1137
|
-
Rails/PluralizationGrammar:
|
|
1138
|
-
Enabled: true
|
|
1139
|
-
|
|
1140
979
|
Security/Eval:
|
|
1141
980
|
Enabled: true
|
|
1142
981
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
deprecation_toolkit (1.
|
|
4
|
+
deprecation_toolkit (1.5.0)
|
|
5
5
|
activesupport (>= 4.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (
|
|
10
|
+
activesupport (6.0.2.2)
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
12
|
i18n (>= 0.7, < 2)
|
|
13
13
|
minitest (~> 5.1)
|
|
14
14
|
tzinfo (~> 1.1)
|
|
15
|
+
zeitwerk (~> 2.2)
|
|
15
16
|
ast (2.4.0)
|
|
16
|
-
concurrent-ruby (1.1.
|
|
17
|
+
concurrent-ruby (1.1.6)
|
|
17
18
|
diff-lcs (1.3)
|
|
18
|
-
i18n (1.
|
|
19
|
+
i18n (1.8.2)
|
|
19
20
|
concurrent-ruby (~> 1.0)
|
|
20
|
-
jaro_winkler (1.5.
|
|
21
|
+
jaro_winkler (1.5.4)
|
|
21
22
|
minitest (5.11.3)
|
|
22
|
-
parallel (1.
|
|
23
|
-
parser (2.
|
|
23
|
+
parallel (1.19.1)
|
|
24
|
+
parser (2.7.1.0)
|
|
24
25
|
ast (~> 2.4.0)
|
|
25
|
-
psych (3.1.0)
|
|
26
26
|
rainbow (3.0.0)
|
|
27
27
|
rake (12.3.2)
|
|
28
|
+
rexml (3.2.4)
|
|
28
29
|
rspec (3.8.0)
|
|
29
30
|
rspec-core (~> 3.8.0)
|
|
30
31
|
rspec-expectations (~> 3.8.0)
|
|
@@ -38,19 +39,20 @@ GEM
|
|
|
38
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
39
40
|
rspec-support (~> 3.8.0)
|
|
40
41
|
rspec-support (3.8.0)
|
|
41
|
-
rubocop (0.
|
|
42
|
+
rubocop (0.81.0)
|
|
42
43
|
jaro_winkler (~> 1.5.1)
|
|
43
44
|
parallel (~> 1.10)
|
|
44
|
-
parser (>= 2.
|
|
45
|
-
psych (>= 3.1.0)
|
|
45
|
+
parser (>= 2.7.0.1)
|
|
46
46
|
rainbow (>= 2.2.2, < 4.0)
|
|
47
|
+
rexml
|
|
47
48
|
ruby-progressbar (~> 1.7)
|
|
48
|
-
unicode-display_width (>= 1.4.0, <
|
|
49
|
-
ruby-progressbar (1.10.
|
|
49
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
50
|
+
ruby-progressbar (1.10.1)
|
|
50
51
|
thread_safe (0.3.6)
|
|
51
|
-
tzinfo (1.2.
|
|
52
|
+
tzinfo (1.2.7)
|
|
52
53
|
thread_safe (~> 0.1)
|
|
53
|
-
unicode-display_width (1.
|
|
54
|
+
unicode-display_width (1.7.0)
|
|
55
|
+
zeitwerk (2.3.0)
|
|
54
56
|
|
|
55
57
|
PLATFORMS
|
|
56
58
|
ruby
|
data/deprecation_toolkit.gemspec
CHANGED
|
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/shopify/deprecation_toolkit"
|
|
19
19
|
spec.metadata["changelog_uri"] = "https://github.com/Shopify/deprecation_toolkit/blob/master/CHANGELOG.md"
|
|
20
20
|
|
|
21
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
|
22
|
+
|
|
21
23
|
spec.required_ruby_version = '>= 2.3'
|
|
22
24
|
|
|
23
25
|
spec.files = %x(git ls-files -z).split("\x0").reject do |f|
|
data/gemfiles/test/deprecations
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
../../test/deprecations
|
|
@@ -4,6 +4,32 @@ module DeprecationToolkit
|
|
|
4
4
|
module Warning
|
|
5
5
|
extend self
|
|
6
6
|
|
|
7
|
+
@buffer = nil
|
|
8
|
+
|
|
9
|
+
# Ruby 2.7 has a warning for improper use of keyword arguments that is sent as two parts
|
|
10
|
+
# Example:
|
|
11
|
+
# /path/to/caller.rb:1: warning: Using the last argument as keyword parameters is deprecated; \
|
|
12
|
+
# maybe ** should be added to the call
|
|
13
|
+
# /path/to/calleee.rb:1: warning: The called method `method_name' is defined here
|
|
14
|
+
def two_part_warning?(str)
|
|
15
|
+
str.end_with?("maybe ** should be added to the call\n")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def handle_multipart(str)
|
|
19
|
+
if @buffer
|
|
20
|
+
str = @buffer + str
|
|
21
|
+
@buffer = nil
|
|
22
|
+
return str
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
if two_part_warning?(str)
|
|
26
|
+
@buffer = str
|
|
27
|
+
return
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
str
|
|
31
|
+
end
|
|
32
|
+
|
|
7
33
|
def deprecation_triggered?(str)
|
|
8
34
|
DeprecationToolkit::Configuration.warnings_treated_as_deprecation.any? { |warning| warning =~ str }
|
|
9
35
|
end
|
|
@@ -37,6 +63,9 @@ else
|
|
|
37
63
|
module DeprecationToolkit
|
|
38
64
|
module WarningPatch
|
|
39
65
|
def warn(str)
|
|
66
|
+
str = DeprecationToolkit::Warning.handle_multipart(str)
|
|
67
|
+
return unless str
|
|
68
|
+
|
|
40
69
|
if DeprecationToolkit::Warning.deprecation_triggered?(str)
|
|
41
70
|
ActiveSupport::Deprecation.warn(str)
|
|
42
71
|
else
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'deprecation_toolkit'
|
|
4
|
-
|
|
5
3
|
module Minitest
|
|
6
4
|
extend self
|
|
7
5
|
|
|
@@ -12,6 +10,9 @@ module Minitest
|
|
|
12
10
|
end
|
|
13
11
|
|
|
14
12
|
def plugin_deprecation_toolkit_init(options)
|
|
13
|
+
return unless using_bundler?
|
|
14
|
+
|
|
15
|
+
require 'deprecation_toolkit'
|
|
15
16
|
if options[:record_deprecations]
|
|
16
17
|
DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
|
|
17
18
|
end
|
|
@@ -19,4 +20,10 @@ module Minitest
|
|
|
19
20
|
DeprecationToolkit.add_notify_behavior
|
|
20
21
|
DeprecationToolkit.attach_subscriber
|
|
21
22
|
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def using_bundler?
|
|
27
|
+
ENV['BUNDLE_GEMFILE']
|
|
28
|
+
end
|
|
22
29
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deprecation_toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -137,6 +137,7 @@ metadata:
|
|
|
137
137
|
homepage_uri: https://github.com/shopify/deprecation_toolkit
|
|
138
138
|
source_code_uri: https://github.com/shopify/deprecation_toolkit
|
|
139
139
|
changelog_uri: https://github.com/Shopify/deprecation_toolkit/blob/master/CHANGELOG.md
|
|
140
|
+
allowed_push_host: https://rubygems.org
|
|
140
141
|
post_install_message:
|
|
141
142
|
rdoc_options: []
|
|
142
143
|
require_paths:
|
|
@@ -152,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
153
|
- !ruby/object:Gem::Version
|
|
153
154
|
version: '0'
|
|
154
155
|
requirements: []
|
|
155
|
-
|
|
156
|
-
rubygems_version: 2.7.6
|
|
156
|
+
rubygems_version: 3.0.3
|
|
157
157
|
signing_key:
|
|
158
158
|
specification_version: 4
|
|
159
159
|
summary: Deprecation Toolkit around ActiveSupport::Deprecation
|