deprecation_toolkit 1.5.1 → 2.0.0

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: eca1e15cbf4dde5f24f61b66b118b7e1c5e532794e639aab745716f479c3ed8b
4
- data.tar.gz: fbdc94772c27097404d9e815e4b0885c4106f697e5b865e300eea0c88c1d5c79
3
+ metadata.gz: 50f90bbfa1a09a7e1f2cbd9dad67e90d50a3d43e71e57d713f4ed37824bf288f
4
+ data.tar.gz: a8e704fd3454e2f0b7753cc6ed677ebfc7f07298362cd06166f53d5d8a01b67b
5
5
  SHA512:
6
- metadata.gz: 9d8b667e37f01a1ae8bb9b458b96d0f01da9710eea1b2dee2273b3624f21d3a6f6158188469da164b7136341d8f57d0cc21e8dd525eb37d8ade6ac8ae24b7ae2
7
- data.tar.gz: 8576131199145519aedd34382d8dbed2e14cb9135a4fe12b2c3f9a22d14fdb8fb43b84f19477b94ef5c14a0511d43218cc16bae4e8d1da177b2217b7b86766cf
6
+ metadata.gz: aa06c177df6e63bf8a2ba11d734b837481bc1d5ada8d1fbbf8187e5d6424797aa605b70be127c48642ff3a0e66188fff8cbded056167ef045811a74e8a73eb41
7
+ data.tar.gz: 52a7bccd13c97db713aa708e226e817cd0fac52550ded6ef0890ca1b8d6da4a18291787f552f1c11358c5a52d25a8d54a2dfbb1c1efc05bcc99cc559ed8ee7c4
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
9
+ strategy:
10
+ matrix:
11
+ gemfile: [gemfiles/activesupport_5.2.gemfile, gemfiles/activesupport_6.0.gemfile, gemfiles/activesupport_6.1.gemfile, gemfiles/activesupport_7.0.gemfile, gemfiles/activesupport_edge.gemfile]
12
+ ruby: ["2.6", "2.7", "3.0", "3.1"]
13
+ exclude:
14
+ # Active Support requires Ruby >= 2.7 as of 7.0
15
+ - gemfile: "gemfiles/activesupport_7.0.gemfile"
16
+ ruby: "2.6"
17
+ - gemfile: "gemfiles/activesupport_edge.gemfile"
18
+ ruby: "2.6"
19
+ env:
20
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
21
+ steps:
22
+
23
+ - name: Check out code
24
+ uses: actions/checkout@v3
25
+
26
+ - name: Set up Ruby ${{ matrix.ruby }}
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
31
+
32
+ - name: RuboCop
33
+ run: bundle exec rubocop
34
+
35
+ - name: Tests
36
+ run: bundle exec rake test
37
+
38
+ - name: Specs
39
+ run: bundle exec rspec
data/.rubocop.yml CHANGED
@@ -1,8 +1,8 @@
1
- inherit_from:
2
- - https://shopify.github.io/ruby-style-guide/rubocop.yml
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.5
5
+ TargetRubyVersion: 2.6
6
6
  Exclude:
7
7
  - gemfiles/vendor/**/*
8
8
 
data/CHANGELOG.md CHANGED
@@ -1,11 +1,27 @@
1
1
  # Change log
2
2
 
3
- ## master (unreleased)
3
+ ## main (unreleased)
4
+
5
+ ## 2.0.0 (2022-03-16)
6
+
7
+ * [#58](https://github.com/Shopify/deprecation_toolkit/pull/58): Drop support for Ruby < 2.6 & Active Support < 5.2. (@sambostock)
8
+ * [#58](https://github.com/Shopify/deprecation_toolkit/pull/58): Ensure compatibility with Rails 7. (@sambostock)
9
+
10
+ ## 1.5.1 (2020-04-28)
11
+
12
+ * [#46](https://github.com/Shopify/deprecation_toolkit/pull/46): Handle another two part Ruby 2.7 keyword argument deprecation warning. (@casperisfine)
13
+
14
+ ## 1.5.0 (2020-04-14)
15
+
16
+ * [#42](https://github.com/Shopify/deprecation_toolkit/pull/42): Fix Minitest plugin kicking in when it shouldn't. (@Edouard-chin)
17
+ * [#45](https://github.com/Shopify/deprecation_toolkit/pull/45): Handle two part Ruby 2.7 keyword argument deprecation warning. (@casperisfine)
4
18
 
5
19
  ## 1.4.0 (2019-04-29)
20
+
6
21
  * [#37](https://github.com/Shopify/deprecation_toolkit/pull/37): Add Rspec support. (@andrewmarkle)
7
22
 
8
23
  ## 1.3.0 (2019-02-28)
24
+
9
25
  * [#38](https://github.com/Shopify/deprecation_toolkit/pull/38): Add a way to mark test as flaky. (@Edouard-chin)
10
26
  * [#39](https://github.com/Shopify/deprecation_toolkit/pull/39): Introduced a way to help recording massive amount of deprecations. (@Edouard-chin)
11
27
 
data/Gemfile CHANGED
@@ -1,10 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- group :deployment do
8
- gem 'rake'
9
- gem 'rubocop'
7
+ gem "bundler"
8
+ gem "minitest"
9
+ gem "rake"
10
+ gem "rspec"
11
+ gem "rubocop-shopify"
12
+
13
+ if defined?(@activesupport_gem_requirement) && @activesupport_gem_requirement
14
+ # causes Dependabot to ignore the next line
15
+ activesupport = "activesupport"
16
+ gem activesupport, @activesupport_gem_requirement
10
17
  end
data/Gemfile.lock CHANGED
@@ -1,69 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deprecation_toolkit (1.5.1)
5
- activesupport (>= 4.2)
4
+ deprecation_toolkit (2.0.0)
5
+ activesupport (>= 5.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.0.2.2)
10
+ activesupport (7.0.2.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 0.7, < 2)
13
- minitest (~> 5.1)
14
- tzinfo (~> 1.1)
15
- zeitwerk (~> 2.2)
16
- ast (2.4.0)
17
- concurrent-ruby (1.1.6)
18
- diff-lcs (1.3)
19
- i18n (1.8.2)
12
+ i18n (>= 1.6, < 2)
13
+ minitest (>= 5.1)
14
+ tzinfo (~> 2.0)
15
+ ast (2.4.2)
16
+ concurrent-ruby (1.1.9)
17
+ diff-lcs (1.5.0)
18
+ i18n (1.10.0)
20
19
  concurrent-ruby (~> 1.0)
21
- jaro_winkler (1.5.4)
22
- minitest (5.11.3)
23
- parallel (1.19.1)
24
- parser (2.7.1.1)
25
- ast (~> 2.4.0)
26
- rainbow (3.0.0)
27
- rake (12.3.2)
28
- rexml (3.2.4)
29
- rspec (3.8.0)
30
- rspec-core (~> 3.8.0)
31
- rspec-expectations (~> 3.8.0)
32
- rspec-mocks (~> 3.8.0)
33
- rspec-core (3.8.0)
34
- rspec-support (~> 3.8.0)
35
- rspec-expectations (3.8.2)
20
+ minitest (5.15.0)
21
+ parallel (1.21.0)
22
+ parser (3.1.1.0)
23
+ ast (~> 2.4.1)
24
+ rainbow (3.1.1)
25
+ rake (13.0.6)
26
+ regexp_parser (2.2.1)
27
+ rexml (3.2.5)
28
+ rspec (3.11.0)
29
+ rspec-core (~> 3.11.0)
30
+ rspec-expectations (~> 3.11.0)
31
+ rspec-mocks (~> 3.11.0)
32
+ rspec-core (3.11.0)
33
+ rspec-support (~> 3.11.0)
34
+ rspec-expectations (3.11.0)
36
35
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.8.0)
38
- rspec-mocks (3.8.0)
36
+ rspec-support (~> 3.11.0)
37
+ rspec-mocks (3.11.0)
39
38
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.8.0)
41
- rspec-support (3.8.0)
42
- rubocop (0.82.0)
43
- jaro_winkler (~> 1.5.1)
39
+ rspec-support (~> 3.11.0)
40
+ rspec-support (3.11.0)
41
+ rubocop (1.25.1)
44
42
  parallel (~> 1.10)
45
- parser (>= 2.7.0.1)
43
+ parser (>= 3.1.0.0)
46
44
  rainbow (>= 2.2.2, < 4.0)
45
+ regexp_parser (>= 1.8, < 3.0)
47
46
  rexml
47
+ rubocop-ast (>= 1.15.1, < 2.0)
48
48
  ruby-progressbar (~> 1.7)
49
- unicode-display_width (>= 1.4.0, < 2.0)
50
- ruby-progressbar (1.10.1)
51
- thread_safe (0.3.6)
52
- tzinfo (1.2.7)
53
- thread_safe (~> 0.1)
54
- unicode-display_width (1.7.0)
55
- zeitwerk (2.3.0)
49
+ unicode-display_width (>= 1.4.0, < 3.0)
50
+ rubocop-ast (1.16.0)
51
+ parser (>= 3.1.1.0)
52
+ rubocop-shopify (2.5.0)
53
+ rubocop (~> 1.25)
54
+ ruby-progressbar (1.11.0)
55
+ tzinfo (2.0.4)
56
+ concurrent-ruby (~> 1.0)
57
+ unicode-display_width (2.1.0)
56
58
 
57
59
  PLATFORMS
58
60
  ruby
59
61
 
60
62
  DEPENDENCIES
61
- bundler (>= 1.16)
63
+ bundler
62
64
  deprecation_toolkit!
63
- minitest (~> 5.0)
65
+ minitest
64
66
  rake
65
- rspec (~> 3.0)
66
- rubocop
67
+ rspec
68
+ rubocop-shopify
67
69
 
68
70
  BUNDLED WITH
69
- 1.17.3
71
+ 2.2.22
data/README.md CHANGED
@@ -114,6 +114,11 @@ a message in the console.
114
114
  Deprecation Toolkit allows you to configure which warnings should be treated as deprecations in order for you
115
115
  to keep track of them as if they were regular deprecations.
116
116
 
117
+ This setting accepts an array of regular expressions. To match on all warnings, you can provide a empty regex:
118
+
119
+ ```ruby
120
+ DeprecationToolkit::Configuration.warnings_treated_as_deprecation = [//]
121
+ ```
117
122
 
118
123
  ## RSpec
119
124
 
data/RELEASE.md ADDED
@@ -0,0 +1,21 @@
1
+ # Contribution to Deprecation Toolkit
2
+
3
+ ## Releasing a new version
4
+
5
+ 1. Audit PRs and commits merged since the last release, ensuring **all user fancing changes are documented** in `CHANGELOG.md`.
6
+ 2. Based on the changes, determine whether to increment the major, minor, or patch version, adhering to [Semantic Versioning][semver].
7
+ 3. Update the gem version string accordingly in `lib/deprecation_toolkit/version.rb`.
8
+ 4. Run `bundle install` to update the `Gemfile.lock`.
9
+ 5. Insert a new heading in `CHANGELOG.md` containing the version identifier and expected release date (e.g. `## 1.2.3 (1999-12-31)`).
10
+ 6. Commit changes on a new branch and open a PR.
11
+ 7. **Draft** a [new release][github-new-release] on GitHub, but **do not publish it yet**.
12
+ 8. Once you have received approval on your PR, merge it into `main`.
13
+ 9. Deploy using the [ShipIt][shipit] UI, and **verify** the new version is available on [RubyGems][rubygems].
14
+ 10. Publish the drafted release, tagging the deployed commit (should be `HEAD` of the `main` branch) with a tag of the form `vMAJOR.MINOR.PATCH`.
15
+
16
+ If something goes wrong during the deploy process, address it and tag whatever commit was successfully deployed as that version.
17
+
18
+ [semver]: https://semver.org
19
+ [github-new-release]: https://github.com/Shopify/deprecation_toolkit/releases/new
20
+ [shipit]: https://shipit.shopify.io/shopify/deprecation_toolkit/rubygems
21
+ [rubygems]: https://rubygems.org/gems/deprecation_toolkit/versions
@@ -7,7 +7,7 @@ require "deprecation_toolkit/version"
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "deprecation_toolkit"
9
9
  spec.version = DeprecationToolkit::VERSION
10
- spec.authors = %w(Shopify)
10
+ spec.authors = ["Shopify"]
11
11
  spec.email = ["rails@shopify.com"]
12
12
 
13
13
  spec.summary = "Deprecation Toolkit around ActiveSupport::Deprecation"
@@ -16,21 +16,16 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/shopify/deprecation_toolkit"
19
- spec.metadata["changelog_uri"] = "https://github.com/Shopify/deprecation_toolkit/blob/master/CHANGELOG.md"
19
+ spec.metadata["changelog_uri"] = "https://github.com/Shopify/deprecation_toolkit/blob/main/CHANGELOG.md"
20
20
 
21
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
22
22
 
23
- spec.required_ruby_version = '>= 2.5'
23
+ spec.required_ruby_version = ">= 2.6"
24
24
 
25
25
  spec.files = %x(git ls-files -z).split("\x0").reject do |f|
26
26
  f.match(%r{^(test)/})
27
27
  end
28
- spec.require_paths = %w(lib)
28
+ spec.require_paths = ["lib"]
29
29
 
30
- spec.add_runtime_dependency('activesupport', '>= 4.2')
31
-
32
- spec.add_development_dependency("bundler", ">= 1.16")
33
- spec.add_development_dependency("rake", "~> 10.0")
34
- spec.add_development_dependency("minitest", "~> 5.0")
35
- spec.add_development_dependency("rspec", "~> 3.0")
30
+ spec.add_runtime_dependency("activesupport", ">= 5.2")
36
31
  end
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
- source "https://rubygems.org"
3
2
 
4
- gem "activesupport", "~> 5.2"
3
+ @activesupport_gem_requirement = "~> 5.2"
5
4
 
6
- group :deployment do
7
- gem "rake"
8
- gem "rubocop"
9
- end
10
-
11
- gemspec path: "../"
5
+ eval_gemfile "../Gemfile"
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
- source "https://rubygems.org"
3
2
 
4
- gem "activesupport", "~> 6.0"
3
+ @activesupport_gem_requirement = "~> 6.0"
5
4
 
6
- group :deployment do
7
- gem "rake"
8
- gem "rubocop"
9
- end
10
-
11
- gemspec path: "../"
5
+ eval_gemfile "../Gemfile"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ @activesupport_gem_requirement = "~> 6.1"
4
+
5
+ eval_gemfile "../Gemfile"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ @activesupport_gem_requirement = "~> 7.0"
4
+
5
+ eval_gemfile "../Gemfile"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ @activesupport_gem_requirement = { github: "rails/rails" }
4
+
5
+ eval_gemfile "../Gemfile"
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'json'
3
+ require "json"
4
4
 
5
5
  module DeprecationToolkit
6
6
  module Behaviors
7
7
  class CIRecordHelper
8
8
  extend ReadWriteHelper
9
9
 
10
- HEADER = '[DeprecationToolkit]'
10
+ HEADER = "[DeprecationToolkit]"
11
11
 
12
12
  def self.trigger(test, current_deprecations, _recorded_deprecations)
13
13
  filename = recorded_deprecations_path(test)
@@ -61,7 +61,7 @@ module DeprecationToolkit
61
61
  end
62
62
 
63
63
  def flaky?
64
- size == 1 && deprecations.first['flaky'] == true
64
+ size == 1 && deprecations.first["flaky"] == true
65
65
  end
66
66
  end
67
67
  end
@@ -20,7 +20,7 @@ module DeprecationToolkit
20
20
  allowed_deprecations, procs = Configuration.allowed_deprecations.partition { |el| el.is_a?(Regexp) }
21
21
 
22
22
  allowed_deprecations.any? { |regex| regex =~ payload[:message] } ||
23
- procs.any? { |proc| proc.call(payload[:message], payload[:callstack]) }
23
+ procs.any? { |proc| proc.call(payload[:message], payload[:callstack]) }
24
24
  end
25
25
  end
26
26
  end
@@ -4,7 +4,7 @@ module DeprecationToolkit
4
4
  module RSpecPlugin
5
5
  RSpec.configure do |config|
6
6
  config.before(:suite) do
7
- case ENV['DEPRECATION_BEHAVIOR']
7
+ case ENV["DEPRECATION_BEHAVIOR"]
8
8
  when "r", "record", "record-deprecations"
9
9
  DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationToolkit
4
- VERSION = "1.5.1"
4
+ VERSION = "2.0.0"
5
5
  end
@@ -43,43 +43,18 @@ module DeprecationToolkit
43
43
  end
44
44
  end
45
45
 
46
- # Warning is a new feature in ruby 2.5, so support older versions
47
- # Note that the `Warning` module exists in Ruby 2.4 but has a bug https://bugs.ruby-lang.org/issues/12944
48
- if RUBY_VERSION < '2.5.0' && RUBY_ENGINE == 'ruby'
49
- module Kernel
50
- class << self
51
- alias_method :__original_warn, :warn
52
-
53
- def warn(*messages)
54
- message = messages.join("\n")
55
- message += "\n" unless message.end_with?("\n")
56
-
57
- if DeprecationToolkit::Warning.deprecation_triggered?(message)
58
- ActiveSupport::Deprecation.warn(message)
59
- else
60
- __original_warn(messages)
61
- end
62
- end
63
- end
64
-
65
- def warn(*messages)
66
- Kernel.warn(messages)
67
- end
68
- end
69
- else
70
- module DeprecationToolkit
71
- module WarningPatch
72
- def warn(str)
73
- str = DeprecationToolkit::Warning.handle_multipart(str)
74
- return unless str
75
-
76
- if DeprecationToolkit::Warning.deprecation_triggered?(str)
77
- ActiveSupport::Deprecation.warn(str)
78
- else
79
- super
80
- end
46
+ module DeprecationToolkit
47
+ module WarningPatch
48
+ def warn(str)
49
+ str = DeprecationToolkit::Warning.handle_multipart(str)
50
+ return unless str
51
+
52
+ if DeprecationToolkit::Warning.deprecation_triggered?(str)
53
+ ActiveSupport::Deprecation.warn(str)
54
+ else
55
+ super
81
56
  end
82
57
  end
83
58
  end
84
- Warning.singleton_class.prepend(DeprecationToolkit::WarningPatch)
85
59
  end
60
+ Warning.singleton_class.prepend(DeprecationToolkit::WarningPatch)
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- load('tasks/ci_recorder.rake')
3
+ require "active_support"
4
+
5
+ load("tasks/ci_recorder.rake")
4
6
 
5
7
  module DeprecationToolkit
6
8
  autoload :DeprecationSubscriber, "deprecation_toolkit/deprecation_subscriber"
@@ -34,8 +36,5 @@ module DeprecationToolkit
34
36
  end
35
37
  end
36
38
 
37
- unless defined?(RSpec)
38
- require "deprecation_toolkit/minitest_hook"
39
- end
40
-
39
+ require "deprecation_toolkit/minitest_hook" unless defined? RSpec
41
40
  require "deprecation_toolkit/warning"
@@ -12,7 +12,7 @@ module Minitest
12
12
  def plugin_deprecation_toolkit_init(options)
13
13
  return unless using_bundler?
14
14
 
15
- require 'deprecation_toolkit'
15
+ require "deprecation_toolkit"
16
16
  if options[:record_deprecations]
17
17
  DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
18
18
  end
@@ -24,6 +24,6 @@ module Minitest
24
24
  private
25
25
 
26
26
  def using_bundler?
27
- ENV['BUNDLE_GEMFILE']
27
+ ENV["BUNDLE_GEMFILE"]
28
28
  end
29
29
  end
@@ -1,20 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'tempfile'
4
- require 'json'
5
- require 'active_support/core_ext/hash'
6
- require 'rake'
7
- require_relative '../deprecation_toolkit/read_write_helper'
3
+ require "tempfile"
4
+ require "json"
5
+ require "active_support/core_ext/hash"
6
+ require "rake"
7
+ require_relative "../deprecation_toolkit/read_write_helper"
8
8
 
9
9
  class CIRecorder
10
10
  include Rake::DSL
11
11
  include DeprecationToolkit::ReadWriteHelper
12
12
 
13
13
  def initialize
14
- namespace :deprecation_toolkit do
15
- desc 'Parse a file generated with the CIOutputHelper and generate deprecations out of it'
16
- task :record_from_ci_output do
17
- raw_file = ENV.fetch('FILEPATH')
14
+ namespace(:deprecation_toolkit) do
15
+ desc("Parse a file generated with the CIOutputHelper and generate deprecations out of it")
16
+ task(:record_from_ci_output) do
17
+ raw_file = ENV.fetch("FILEPATH")
18
18
 
19
19
  deprecations = extract_deprecations_output(raw_file) do |file|
20
20
  parse_file(file)
@@ -32,6 +32,7 @@ class CIRecorder
32
32
  shell_command = "cat #{file} | sed -n -e 's/^.* \\[DeprecationToolkit\\] \\(.*\\)/\\1/p' > #{tmp_file.path}"
33
33
 
34
34
  raise "Couldn't extract deprecations from output" unless system(shell_command)
35
+
35
36
  yield(tmp_file)
36
37
  ensure
37
38
  tmp_file.delete
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
4
 
5
5
  RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
6
6
  before do
@@ -12,7 +12,7 @@ RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
12
12
  DeprecationToolkit::Configuration.behavior = @previous_configuration
13
13
  end
14
14
 
15
- it '.trigger noop any deprecations' do |example|
15
+ it ".trigger noop any deprecations" do |example|
16
16
  expect do
17
17
  ActiveSupport::Deprecation.warn("Foo")
18
18
  ActiveSupport::Deprecation.warn("Bar")
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
4
 
5
5
  RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
6
6
  before do
@@ -29,7 +29,7 @@ RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
29
29
  end.to(raise_error(DeprecationToolkit::Behaviors::DeprecationRemoved))
30
30
  end
31
31
 
32
- it '.trigger raises a DeprecationRemoved when mismatched and less than expected' do |example|
32
+ it ".trigger raises a DeprecationRemoved when mismatched and less than expected" do |example|
33
33
  expect do
34
34
  ActiveSupport::Deprecation.warn("C")
35
35
 
@@ -37,7 +37,7 @@ RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
37
37
  end.to(raise_error(DeprecationToolkit::Behaviors::DeprecationRemoved))
38
38
  end
39
39
 
40
- it '.trigger raises a DeprecationMismatch when same number of deprecations are triggered with mismatches' do |example|
40
+ it ".trigger raises a DeprecationMismatch when same number of deprecations are triggered with mismatches" do |example|
41
41
  expect do
42
42
  ActiveSupport::Deprecation.warn("A")
43
43
 
@@ -69,7 +69,7 @@ RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
69
69
  end
70
70
 
71
71
  it ".trigger does not raise when deprecations are allowed with Procs" do |example|
72
- class_eval <<-RUBY, 'my_file.rb', 1337
72
+ class_eval <<-RUBY, "my_file.rb", 1337
73
73
  def deprecation_caller
74
74
  deprecation_callee
75
75
  end
@@ -18,7 +18,7 @@ RSpec.describe(DeprecationToolkit::Behaviors::Record) do
18
18
  FileUtils.rm_rf(@deprecation_path)
19
19
  end
20
20
 
21
- it '.trigger should record deprecations' do |example|
21
+ it ".trigger should record deprecations" do |example|
22
22
  expect_deprecations_recorded("Foo", "Bar", example) do
23
23
  ActiveSupport::Deprecation.warn("Foo")
24
24
  ActiveSupport::Deprecation.warn("Bar")
@@ -2,12 +2,12 @@
2
2
 
3
3
  # This needs to be set before we require `spec_helper` to simulate setting an ENV when running a spec like:
4
4
  # `DEPRECATION_BEHAVIOR="record" bundle exec rspec path/to/spec.rb`
5
- ENV['DEPRECATION_BEHAVIOR'] = "record"
5
+ ENV["DEPRECATION_BEHAVIOR"] = "record"
6
6
 
7
- require 'spec_helper'
7
+ require "spec_helper"
8
8
 
9
9
  RSpec.describe("DeprecationToolkit::RSpecPlugin ENV options") do
10
- it 'should set the behavior to `Record` when ENV variable is set' do
10
+ it "should set the behavior to `Record` when ENV variable is set" do
11
11
  expect(DeprecationToolkit::Configuration.behavior).to(eq(DeprecationToolkit::Behaviors::Record))
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
4
 
5
5
  RSpec.describe(DeprecationToolkit::RSpecPlugin) do
6
6
  it "should add `notify` behavior to the deprecations behavior list" do