Skip to content

Commit

Permalink
Remove deprecation warnings. (#177)
Browse files Browse the repository at this point in the history
see #168
  • Loading branch information
albb0920 committed Sep 15, 2020
1 parent f1042be commit 9306d3e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## Unreleased
* Remove deprecation warnings.

## 9.8.6.3
* Fix deprecation warning for non-Rails environment.

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
src="http://postcss.github.io/autoprefixer/logo.svg"
title="Autoprefixer logo by Anton Lovchikov">

**DEPRECATED. [Migration Guide.]**

[Autoprefixer] is a tool to parse CSS and add vendor prefixes to CSS rules
using values from the [Can I Use] database. This gem provides Ruby
and Ruby on Rails integration with this JavaScript tool.
Expand All @@ -14,7 +12,6 @@ and Ruby on Rails integration with this JavaScript tool.
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
</a>

[Migration Guide.]: https://github.com/ai/autoprefixer-rails/wiki/Deprecated
[Autoprefixer]: https://github.com/postcss/autoprefixer
[Can I Use]: http://caniuse.com/
[PostCSS]: https://postcss.org/
Expand Down
3 changes: 0 additions & 3 deletions autoprefixer-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/ai/autoprefixer-rails"
s.license = "MIT"

s.post_install_message = "autoprefixer-rails was deprected. Migration guide:\n" \
"https://github.com/ai/autoprefixer-rails/wiki/Deprecated"

s.add_dependency "execjs", ">= 0"

s.add_development_dependency "rails"
Expand Down
15 changes: 0 additions & 15 deletions lib/autoprefixer-rails/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
IS_SECTION = /^\s*\[(.+)\]\s*$/.freeze

module AutoprefixerRails
def self.show_deprecation_message!
return unless defined?(ActiveSupport::Deprecation)

return if defined?(@deprecation_shown)

ActiveSupport::Deprecation.warn(
"autoprefixer-rails was deprected. Migration guide:\n" \
"https://github.com/ai/autoprefixer-rails/wiki/Deprecated"
)

@deprecation_shown = true
end

# Ruby to JS wrapper for Autoprefixer processor instance
class Processor
def initialize(params = {})
Expand All @@ -33,8 +20,6 @@ def initialize(params = {})
# * `to` with output CSS file name.
# * `map` with true to generate new source map or with previous map.
def process(css, opts = {})
AutoprefixerRails.show_deprecation_message!

opts = convert_options(opts)

plugin_opts = params_with_browsers(opts[:from]).merge(opts)
Expand Down

0 comments on commit 9306d3e

Please sign in to comment.