deprecation_toolkit 1.2.0 → 1.2.1
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 +21 -3
- data/.rubocop.yml +7 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +6 -6
- data/Rakefile +1 -1
- data/deprecation_toolkit.gemspec +5 -5
- data/lib/deprecation_toolkit.rb +1 -1
- data/lib/deprecation_toolkit/version.rb +1 -1
- data/lib/deprecation_toolkit/warning.rb +14 -12
- data/lib/minitest/deprecation_toolkit_plugin.rb +1 -1
- 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: fde00ef2d6a1a6467342fbeee9f13a947a50674393038576f9070959d7e070f5
|
|
4
|
+
data.tar.gz: ef19a93dddd89dd5e310f51ef5905e1f15f4d9e582553f7d43c5392e58efa298
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40ef637cd030aed50b46fbc4f411481a1c77194cac39e2f51469559179963d466fe56c3d0612628b4f9b395c16648bb9d316c56e04878e7fd11110338c0d88a8
|
|
7
|
+
data.tar.gz: 6ca939bf15e3b43f5accf7e0e888403c1c8ef9c3ce8850e87260ff140550eeab94f4b31381a37f0de7a7cb024d8c43e94276573778f9d31f012fb34b3c595a92
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# Recommended rubocop version: ~> 0.56.0
|
|
2
|
-
|
|
3
1
|
AllCops:
|
|
4
2
|
Exclude:
|
|
5
3
|
- 'db/schema.rb'
|
|
6
4
|
DisabledByDefault: true
|
|
5
|
+
StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
|
|
7
6
|
|
|
8
7
|
Layout/AccessModifierIndentation:
|
|
9
8
|
EnforcedStyle: indent
|
|
@@ -102,7 +101,7 @@ Style/ClassCheck:
|
|
|
102
101
|
- kind_of?
|
|
103
102
|
|
|
104
103
|
Style/CommandLiteral:
|
|
105
|
-
EnforcedStyle:
|
|
104
|
+
EnforcedStyle: percent_x
|
|
106
105
|
SupportedStyles:
|
|
107
106
|
- backticks
|
|
108
107
|
- percent_x
|
|
@@ -259,6 +258,19 @@ Style/Next:
|
|
|
259
258
|
Style/NonNilCheck:
|
|
260
259
|
IncludeSemanticChanges: false
|
|
261
260
|
|
|
261
|
+
Style/MethodCallWithArgsParentheses:
|
|
262
|
+
Enabled: true
|
|
263
|
+
IgnoreMacros: true
|
|
264
|
+
IgnoredMethods:
|
|
265
|
+
- require
|
|
266
|
+
- require_relative
|
|
267
|
+
- require_dependency
|
|
268
|
+
- yield
|
|
269
|
+
- raise
|
|
270
|
+
- puts
|
|
271
|
+
Exclude:
|
|
272
|
+
- Gemfile
|
|
273
|
+
|
|
262
274
|
Style/MethodDefParentheses:
|
|
263
275
|
EnforcedStyle: require_parentheses
|
|
264
276
|
SupportedStyles:
|
|
@@ -1110,6 +1122,9 @@ Performance/RedundantMatch:
|
|
|
1110
1122
|
Performance/RedundantSortBy:
|
|
1111
1123
|
Enabled: true
|
|
1112
1124
|
|
|
1125
|
+
Performance/RegexpMatch:
|
|
1126
|
+
Enabled: true
|
|
1127
|
+
|
|
1113
1128
|
Performance/ReverseEach:
|
|
1114
1129
|
Enabled: true
|
|
1115
1130
|
|
|
@@ -1136,6 +1151,9 @@ Rails/HttpPositionalArguments:
|
|
|
1136
1151
|
- spec/**/*
|
|
1137
1152
|
- test/**/*
|
|
1138
1153
|
|
|
1154
|
+
Rails/InverseOf:
|
|
1155
|
+
Enabled: true
|
|
1156
|
+
|
|
1139
1157
|
Rails/OutputSafety:
|
|
1140
1158
|
Enabled: true
|
|
1141
1159
|
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
deprecation_toolkit (1.2.
|
|
4
|
+
deprecation_toolkit (1.2.1)
|
|
5
5
|
activesupport (>= 4.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (5.2.
|
|
10
|
+
activesupport (5.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
15
|
ast (2.4.0)
|
|
16
|
-
concurrent-ruby (1.1.
|
|
17
|
-
i18n (1.
|
|
16
|
+
concurrent-ruby (1.1.4)
|
|
17
|
+
i18n (1.5.1)
|
|
18
18
|
concurrent-ruby (~> 1.0)
|
|
19
19
|
jaro_winkler (1.5.1)
|
|
20
20
|
minitest (5.11.3)
|
|
@@ -43,11 +43,11 @@ PLATFORMS
|
|
|
43
43
|
ruby
|
|
44
44
|
|
|
45
45
|
DEPENDENCIES
|
|
46
|
-
bundler (
|
|
46
|
+
bundler (>= 1.16)
|
|
47
47
|
deprecation_toolkit!
|
|
48
48
|
minitest (~> 5.0)
|
|
49
49
|
rake
|
|
50
50
|
rubocop
|
|
51
51
|
|
|
52
52
|
BUNDLED WITH
|
|
53
|
-
1.17.
|
|
53
|
+
1.17.3
|
data/Rakefile
CHANGED
data/deprecation_toolkit.gemspec
CHANGED
|
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
|
|
21
21
|
spec.required_ruby_version = '>= 2.3'
|
|
22
22
|
|
|
23
|
-
spec.files =
|
|
23
|
+
spec.files = %x(git ls-files -z).split("\x0").reject do |f|
|
|
24
24
|
f.match(%r{^(test)/})
|
|
25
25
|
end
|
|
26
26
|
spec.require_paths = %w(lib)
|
|
27
27
|
|
|
28
|
-
spec.add_runtime_dependency
|
|
28
|
+
spec.add_runtime_dependency('activesupport', '>= 4.2')
|
|
29
29
|
|
|
30
|
-
spec.add_development_dependency
|
|
31
|
-
spec.add_development_dependency
|
|
32
|
-
spec.add_development_dependency
|
|
30
|
+
spec.add_development_dependency("bundler", ">= 1.16")
|
|
31
|
+
spec.add_development_dependency("rake", "~> 10.0")
|
|
32
|
+
spec.add_development_dependency("minitest", "~> 5.0")
|
|
33
33
|
end
|
data/lib/deprecation_toolkit.rb
CHANGED
|
@@ -10,18 +10,7 @@ module DeprecationToolkit
|
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Warning is a new feature in ruby 2.5
|
|
14
|
-
module Warning
|
|
15
|
-
def warn(str)
|
|
16
|
-
if DeprecationToolkit::Warning.deprecation_triggered?(str)
|
|
17
|
-
ActiveSupport::Deprecation.warn(str)
|
|
18
|
-
else
|
|
19
|
-
super
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# Support for version older < 2.5
|
|
13
|
+
# Warning is a new feature in ruby 2.5, so support older versions
|
|
25
14
|
# Note that the `Warning` module exists in Ruby 2.4 but has a bug https://bugs.ruby-lang.org/issues/12944
|
|
26
15
|
if RUBY_VERSION < '2.5.0' && RUBY_ENGINE == 'ruby'
|
|
27
16
|
module Kernel
|
|
@@ -44,4 +33,17 @@ if RUBY_VERSION < '2.5.0' && RUBY_ENGINE == 'ruby'
|
|
|
44
33
|
Kernel.warn(messages)
|
|
45
34
|
end
|
|
46
35
|
end
|
|
36
|
+
else
|
|
37
|
+
module DeprecationToolkit
|
|
38
|
+
module WarningPatch
|
|
39
|
+
def warn(str)
|
|
40
|
+
if DeprecationToolkit::Warning.deprecation_triggered?(str)
|
|
41
|
+
ActiveSupport::Deprecation.warn(str)
|
|
42
|
+
else
|
|
43
|
+
super
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
Warning.singleton_class.prepend(DeprecationToolkit::WarningPatch)
|
|
47
49
|
end
|
|
@@ -4,7 +4,7 @@ module Minitest
|
|
|
4
4
|
extend self
|
|
5
5
|
|
|
6
6
|
def plugin_deprecation_toolkit_options(opts, options)
|
|
7
|
-
opts.on
|
|
7
|
+
opts.on("-r", "--record-deprecations", "Record deprecations") do
|
|
8
8
|
options[:record_deprecations] = true
|
|
9
9
|
end
|
|
10
10
|
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.2.
|
|
4
|
+
version: 1.2.1
|
|
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: 2019-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -28,14 +28,14 @@ dependencies:
|
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '1.16'
|
|
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
40
|
version: '1.16'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|