deprecation_toolkit 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14622e99341958cb8876efa74036f9f90eb27c77f10e24e59b3261c62d5c8b31
4
- data.tar.gz: ea63088375c2c5c1010b267f38bf1b8acbc0e363bdd3cf33d4c6d762e47704bb
3
+ metadata.gz: fde00ef2d6a1a6467342fbeee9f13a947a50674393038576f9070959d7e070f5
4
+ data.tar.gz: ef19a93dddd89dd5e310f51ef5905e1f15f4d9e582553f7d43c5392e58efa298
5
5
  SHA512:
6
- metadata.gz: bf5adecd962fd27a18c223c5852552b52a601230827cd761488ae7d62a8a745f013a62fc57d6ffba2b67c989e9c6cfb9436f76046d5b3159e5ac48d9aeb9f191
7
- data.tar.gz: e51874283d799826c161c52ce091597c60b1583521d8e63b57341c61064241710611dd41aa7d4adbd7db2ef17a26e5ac0c5adb41920f1b04ca8fd86a9add4153
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: backticks
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
@@ -3,3 +3,10 @@ inherit_from:
3
3
 
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.3
6
+ Exclude:
7
+ - gemfiles/vendor/**/*
8
+
9
+ Style/MethodCallWithArgsParentheses:
10
+ Exclude:
11
+ - Gemfile
12
+ - gemfiles/*
data/.travis.yml CHANGED
@@ -12,5 +12,8 @@ gemfile:
12
12
  - gemfiles/activesupport_5.0.gemfile
13
13
  - gemfiles/activesupport_5.1.gemfile
14
14
  - gemfiles/activesupport_5.2.gemfile
15
+ script:
16
+ - bundle exec rubocop --config .rubocop.yml
17
+ - bundle exec rake test
15
18
  notifications:
16
19
  email: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 1.2.1 (2019-01-09)
6
+
7
+ ### Bug fixes
8
+ * [#34](https://github.com/Shopify/deprecation_toolkit/pull/34): Fixes SystemStackError with RubyGems v3 and Ruby 2.5+. (@dylanahsmith)
9
+
5
10
  ## 1.2.0 (2018-11-28)
6
11
 
7
12
  ### New features
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deprecation_toolkit (1.2.0)
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.1.1)
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.3)
17
- i18n (1.1.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 (~> 1.16)
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.1
53
+ 1.17.3
data/Rakefile CHANGED
@@ -10,4 +10,4 @@ Rake::TestTask.new(:test) do |t|
10
10
  t.test_files = FileList["test/**/*_test.rb"]
11
11
  end
12
12
 
13
- task default: :test
13
+ task(default: :test)
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = '>= 2.3'
22
22
 
23
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
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 'activesupport', '>= 4.2'
28
+ spec.add_runtime_dependency('activesupport', '>= 4.2')
29
29
 
30
- spec.add_development_dependency "bundler", "~> 1.16"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "minitest", "~> 5.0"
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
@@ -25,7 +25,7 @@ module DeprecationToolkit
25
25
  return if DeprecationSubscriber.already_attached?
26
26
 
27
27
  Configuration.attach_to.each do |gem_name|
28
- DeprecationSubscriber.attach_to gem_name
28
+ DeprecationSubscriber.attach_to(gem_name)
29
29
  end
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationToolkit
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -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 "-r", "--record-deprecations", "Record deprecations" do
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.0
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: 2018-11-28 00:00:00.000000000 Z
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