| |
@@ -6,7 +6,8 @@
|
| |
module Helpers
|
| |
# Expands '~>' and '!=' gem requirements.
|
| |
def self.expand_requirement(requirements)
|
| |
- requirements.inject([]) do |output, r|
|
| |
+ has_conflict = !!requirements.detect { |op, _| op == '!=' }
|
| |
+ new_req = requirements.inject([]) do |output, r|
|
| |
output.concat case r.first
|
| |
when '~>'
|
| |
expand_pessimistic_requirement(r)
|
| |
@@ -22,6 +23,8 @@
|
| |
[r]
|
| |
end
|
| |
end.reject {|r| r.empty? }
|
| |
+ new_req = [['>=', Gem::Version.new(0)]] if has_conflict && new_req.empty?
|
| |
+ new_req
|
| |
end
|
| |
|
| |
# Expands the pessimistic version operator '~>' into equivalent '>=' and
|
| |
rubygem.req: Generate dependencies from conflicts
Please do not merge yet.
I am not sure whether this was not implemented by some other way.