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 Jan 14, 2020
1 parent 523db53 commit 98bf2dd
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. Please use
Spree.solidus_gem_version instead.
WARN

Spree.solidus_gem_version
end

def reset_spree_preferences_deprecated?
Expand Down

0 comments on commit 98bf2dd

Please sign in to comment.