Skip to content

Commit

Permalink
Also deprecate Rails backports
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Feb 16, 2020
1 parent 91b7282 commit e01f4df
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/backports/rails/array.rb
@@ -1,3 +1,7 @@
require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

class Array
# See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/ExtractOptions.html]
def extract_options!
Expand Down
4 changes: 4 additions & 0 deletions lib/backports/rails/enumerable.rb
@@ -1,3 +1,7 @@
require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

module Enumerable
# Standard in rails... See official documentation[http://api.rubyonrails.org/classes/Enumerable.html]
# Modified from rails 2.3 to not rely on size
Expand Down
4 changes: 4 additions & 0 deletions lib/backports/rails/hash.rb
@@ -1,3 +1,7 @@
require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

class Hash
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def reverse_merge(other_hash)
Expand Down
4 changes: 4 additions & 0 deletions lib/backports/rails/kernel.rb
@@ -1,5 +1,9 @@
# frozen_string_literal: true

require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

# From ActiveSupport
unless Object.method_defined? :try
class Object
Expand Down
4 changes: 4 additions & 0 deletions lib/backports/rails/module.rb
@@ -1,3 +1,7 @@
require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

class Module
# Standard in rails... See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Module.html]
def alias_method_chain(target, feature, &block)
Expand Down
4 changes: 4 additions & 0 deletions lib/backports/rails/string.rb
@@ -1,3 +1,7 @@
require 'backports/tools/deprecation'

Backports.deprecate :rails, 'Rails backports are deprecated.'

class String
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def camelize(first_letter = :upper)
Expand Down

0 comments on commit e01f4df

Please sign in to comment.