Skip to content

Commit

Permalink
Enable gradients when running with Prawn 2.2.0+
Browse files Browse the repository at this point in the history
Closes #62.
  • Loading branch information
Roger Nesbitt committed Mar 31, 2017
1 parent 196e433 commit cfa7a47
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/prawn/svg/elements/gradient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ def type
end

def assert_compatible_prawn_version
# At the moment, the patch required for this functionality to work in prawn has not been merged.
raise SkipElementError, "We are unfortunately still waiting on the Prawn project to merge a pull request that is required for this feature to correctly function"

# if (Prawn::VERSION.split(".").map(&:to_i) <=> [2, 0, 4]) == -1
# raise SkipElementError, "Prawn 2.0.4+ must be used if you'd like prawn-svg to render gradients"
# end
if (Prawn::VERSION.split(".").map(&:to_i) <=> [2, 2, 0]) == -1
raise SkipElementError, "Prawn 2.2.0+ must be used if you'd like prawn-svg to render gradients"
end
end

def load_gradient_configuration
Expand Down

0 comments on commit cfa7a47

Please # to comment.