Skip to content

Commit

Permalink
Deprecate SolidusSupport.solidus_gem_version
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyadsl committed Feb 11, 2020
1 parent cd4892d commit e65847d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/solidus_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
module SolidusSupport
class << self
def solidus_gem_version
if Spree.respond_to?(:solidus_gem_version)
Spree.solidus_gem_version
elsif Spree.respond_to?(:gem_version)
# 1.1 doesn't have solidus_gem_version
Gem::Version.new(Spree.solidus_version)
else
# 1.0 doesn't have gem_version
Gem::Specification.detect { |x| x.name == 'solidus_core' }.version
end
ActiveSupport::Deprecation.warn <<-WARN.squish, caller
SolidusSupport.solidus_gem_version is deprecated and will be removed
in solidus_support 1.0. Please use Spree.solidus_gem_version instead.
WARN

Spree.solidus_gem_version
end

def reset_spree_preferences_deprecated?
Expand Down

0 comments on commit e65847d

Please sign in to comment.